/* Home: the night journey, the five reasons, the perfect day, the library toy. */

/* ---------- journey ---------- */

.journey { position: relative; }
.journey-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: linear-gradient(180deg, #1f3478 0%, #3f569f 60%, #0b1430 100%);
}
:root[data-theme="light"] .journey-stage { background: linear-gradient(180deg, #7fa3e6, #f7d6c0 70%, #2f3a72); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .journey-stage { background: linear-gradient(180deg, #7fa3e6, #f7d6c0 70%, #2f3a72); }
}
.journey-canvas { width: 100%; height: 100%; }
.journey-content {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
  margin-top: -100svh;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: calc(60px + 7svh);
  padding-bottom: 32px;
  --hero-ink: #ffffff;
  --hero-ink-2: #e2e8fb;
  color: var(--hero-ink);
}
:root[data-theme="light"] .hero { --hero-ink: var(--ink-blue); --hero-ink-2: #1d2350; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero { --hero-ink: var(--ink-blue); --hero-ink-2: #1d2350; }
}
.hero .eyebrow { color: var(--hero-ink); opacity: 0.92; }
.hero h1 {
  margin-top: 18px;
  font-size: clamp(54px, 17vw, 168px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--hero-ink);
}
@media (max-width: 899px) {
  /* "Знакомьтесь:" and "Знаёмцеся:" are one long word each */
  .hero h1:lang(ru), .hero h1:lang(be) { font-size: clamp(36px, 10.2vw, 92px); }
}
.hero h1:lang(zh) { letter-spacing: 0.02em; line-height: 1.12; }
.hero h1 .dot { color: var(--amber); text-shadow: 0 0 24px rgb(255 181 71 / 0.8); }
.hero-lede {
  margin-top: 22px;
  max-width: 34ch;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--hero-ink-2);
}
.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero .btn-ghost { color: var(--hero-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hero-ink) 45%, transparent); }
.scroll-hint {
  margin-top: auto;
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.85;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.5);
}
.scroll-hint::after {
  content: "";
  width: 2px;
  height: 34px;
  border-radius: 2px;
  background: linear-gradient(#ffffff, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-hint::after { animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
}
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (min-width: 900px) {
  .hero { padding-top: calc(60px + 9vh); }
  .hero h1 { font-size: clamp(72px, 8.6vw, 136px); }
  .hero-lede { font-size: 21px; max-width: 44ch; }
}

.journey-steps {
  list-style: none;
  margin: 0;
  padding-block: 0;
}
.journey-step {
  min-height: 75vh;
  min-height: 75svh;
  display: flex;
  align-items: flex-start;
  padding-top: calc(60px + 4svh);
}
.journey-step:last-child { min-height: 100svh; }
.journey-still { display: none; }
.step-card {
  max-width: 420px;
  padding: 22px 22px 24px;
  border-radius: var(--radius);
  background: rgb(9 15 40 / 0.62);
  border: 1px solid rgb(61 224 255 / 0.18);
  color: #eef1fb;
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 20px 50px -20px rgb(0 0 0 / 0.6);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
:root[data-theme="light"] .step-card { background: rgb(250 248 243 / 0.94); color: var(--ink-blue); border-color: rgb(20 24 58 / 0.12); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .step-card { background: rgb(250 248 243 / 0.94); color: var(--ink-blue); border-color: rgb(20 24 58 / 0.12); }
}
.js:not(.calm) .journey-step .step-card {
  position: sticky;
  top: calc(72px + 2svh);
  opacity: 0;
  transform: translateY(24px) scale(0.97);
}
.js:not(.calm) .journey-step.active .step-card { opacity: 1; transform: none; }
.step-time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}
:root[data-theme="light"] .step-time { color: #9a4a00; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .step-time { color: #9a4a00; }
}
.step-card h3 { margin-top: 10px; font-size: clamp(22px, 5.6vw, 30px); }
.step-card p:last-child { margin-top: 10px; font-size: 16px; line-height: 1.55; opacity: 0.92; }

@media (min-width: 900px) {
  .journey-step { padding-top: calc(60px + 10vh); }
  .journey-step:nth-child(even) { justify-content: flex-end; }
  .step-card { padding: 28px 30px 30px; }
}

/* calm mode: no sticky scene; the hero sits on a still, each step shows its own still */
.calm .journey-stage { position: absolute; inset: 0 0 auto 0; }
.calm .journey-content { margin-top: 0; }
.calm .journey-step { min-height: 0; padding: 28px 0; display: grid; gap: 16px; justify-content: stretch; }
.calm .journey-step:first-child { padding-top: 56px; }
.calm .journey-step:last-child { min-height: 0; }
.calm .journey-steps { background: var(--bg); }
.calm .journey-still {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: var(--night-1);
}
@media (min-width: 640px) {
  .calm .journey-still { aspect-ratio: 16 / 10; }
}
.calm .step-card { max-width: none; }
.calm .scroll-hint { display: none; }
@media (min-width: 900px) {
  .calm .journey-step { grid-template-columns: 1.4fr 1fr; align-items: center; }
}

/* ---------- five reasons ---------- */

.reasons { counter-reset: reason; }
.reason-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 72px; }
.reason {
  display: grid;
  gap: 22px;
  align-items: center;
}
.reason .photo { aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.reason-body { display: grid; gap: 12px; position: relative; }
.reason-num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--eyebrow);
}
.reason h3 { font-size: clamp(24px, 6.4vw, 40px); }
.reason p { color: var(--ink-2); font-size: 17px; }
.reason .maps-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 4px; }

@media (min-width: 900px) {
  .reason-list { gap: 120px; }
  .reason { grid-template-columns: 7fr 5fr; gap: 64px; }
  .reason:nth-child(even) { grid-template-columns: 5fr 7fr; }
  .reason:nth-child(even) .photo-wrap { order: 2; }
  .reason p { font-size: 18px; }
}

/* ---------- a perfect day ---------- */

.day {
  position: relative;
  background:
    radial-gradient(120% 60% at 0% 0%, rgb(255 181 71 / 0.12), transparent 60%),
    radial-gradient(120% 60% at 100% 100%, rgb(61 224 255 / 0.1), transparent 60%);
}
.day-parts { display: grid; gap: 64px; }
.day-part { display: grid; gap: 24px; }
.day-part .photo { aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.day-label {
  display: flex;
  align-items: center;
  gap: 14px;
}
.day-icon {
  width: 48px; height: 48px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--card-line);
}
.day-icon svg { width: 26px; height: 26px; }
.day-part h3 { font-size: clamp(26px, 7vw, 44px); }
.day-hours { font-size: 14px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.stops { list-style: none; margin: 0; padding: 0 0 0 24px; display: grid; gap: 22px; position: relative; }
.stops::before {
  content: "";
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--amber), var(--cyan));
  opacity: 0.6;
}
.stop { position: relative; display: grid; gap: 4px; }
.stop::before {
  content: "";
  position: absolute;
  left: -24px; top: 7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--amber);
}
.morning .stop::before { border-color: var(--amber); }
.afternoon .stop::before { border-color: #ff8f6b; }
.evening .stop::before { border-color: var(--cyan); }
:root[data-theme="light"] .evening .stop::before { border-color: var(--deep); }
.stop-time { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; color: var(--ink-3); }
.stop h4 { margin: 0; font-family: var(--font-head); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.stop h4 a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--link), var(--link)); background-size: 100% 2px; background-position: 0 100%; background-repeat: no-repeat; padding-bottom: 2px; }
.stop h4 a:hover { color: var(--link); }
.stop p { color: var(--ink-2); font-size: 16px; }

@media (min-width: 900px) {
  .day-parts { gap: 96px; }
  .day-part { grid-template-columns: 5fr 6fr; gap: 64px; align-items: start; }
  .day-part .photo-wrap { position: sticky; top: 100px; }
  .day-part:nth-child(even) .photo-wrap { order: 2; }
}

/* ---------- the library toy ---------- */

.library {
  position: relative;
  color: #eef1fb;
  background: radial-gradient(90% 70% at 50% 40%, #13204a 0%, #0b1430 55%, #060b20 100%);
  border-block: 1px solid rgb(61 224 255 / 0.14);
  overflow: hidden;
}
.library .eyebrow { color: var(--cyan); }
.library .section-head p { color: #c3cbe8; }
.library a { color: var(--cyan); }
.library-toy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.library-toy > * { min-width: 0; }
.library-stage {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  background: #050a1d;
  cursor: pointer;
  touch-action: pan-y;
  box-shadow: 0 0 0 1px rgb(61 224 255 / 0.16), 0 40px 90px -30px rgb(61 224 255 / 0.35);
  -webkit-tap-highlight-color: transparent;
}
.library-stage:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.library-canvas { width: 100%; aspect-ratio: 4 / 5; }
.library-hint {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgb(5 10 29 / 0.7);
  border: 1px solid rgb(61 224 255 / 0.2);
  color: #d8f7ff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  width: max-content;
  max-width: calc(100% - 32px);
  pointer-events: none;
}
.library-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-content: start; }
.shows { display: flex; flex-wrap: wrap; gap: 8px; }
.show-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgb(195 203 232 / 0.28);
  background: rgb(255 255 255 / 0.04);
  color: #eef1fb;
  font: 700 15px/1 var(--font-body);
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), background 0.2s ease, border-color 0.2s ease;
}
.show-chip:hover { border-color: var(--cyan); }
.show-chip:active { transform: scale(0.94); }
.show-chip[aria-checked="true"] { background: var(--cyan); color: #06102c; border-color: var(--cyan); box-shadow: 0 0 22px rgb(61 224 255 / 0.5); }
.show-chip .swatch { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.word-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.word-form label { font-weight: 800; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: #9ba7d0; }
.word-row { display: flex; gap: 8px; }
.word-input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid rgb(195 203 232 / 0.3);
  background: rgb(5 10 29 / 0.6);
  color: #ffffff;
  font: 800 18px/1 var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.word-input::placeholder { color: #8390bd; letter-spacing: 0.08em; }
.word-input:focus-visible { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgb(61 224 255 / 0.3); }
.library-facts { display: grid; gap: 12px; color: #c3cbe8; font-size: 16px; }
.library-facts strong { color: #ffffff; }
.library-status { min-height: 1.6em; font-size: 14px; color: #9ba7d0; }

@media (min-width: 900px) {
  .library-toy { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; align-items: center; }
  .library-canvas { aspect-ratio: 1 / 1; }
}

/* ---------- more: play and history ---------- */

.more-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .more-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.more-card {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 30px 26px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--card-line);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease-spring), border-color 0.3s ease;
}
.more-card:hover { transform: translateY(-4px); border-color: var(--link); text-decoration: none; }
.more-card h3 { font-size: clamp(26px, 6.6vw, 40px); }
.more-card p { color: var(--ink-2); }
.more-card .go { margin-top: 8px; font-weight: 800; color: var(--link); display: inline-flex; gap: 8px; align-items: center; }
.more-card .go svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease-spring); }
.more-card:hover .go svg { transform: translateX(5px); }
.more-art { height: 120px; margin: -6px -6px 6px; }
.more-art svg { width: 100%; height: 100%; }

/* ---------- before you go ---------- */

.before {
  display: grid;
  gap: 16px;
  padding: 30px 26px;
  border-radius: 28px;
  border: 1.5px dashed var(--line-strong);
  background: var(--bg-raise);
}
@media (min-width: 900px) {
  .before { grid-template-columns: auto 1fr; gap: 28px; padding: 40px 44px; align-items: start; }
}
.before-icon { width: 56px; height: 56px; color: var(--link); }
.before h2 { font-size: clamp(24px, 6vw, 36px); }
.before p { color: var(--ink-2); font-size: 17px; max-width: 64ch; }
.before .btn { justify-self: start; margin-top: 6px; }
