/* The landing page (index.html) only. Tokens and base are in styles.css. */

.home-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(8, 27, 32, 0.78), rgba(8, 27, 32, 0));
}

/* Hero: a muted, looping film behind the copy; the poster is the fallback. */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: max(620px, min(100svh, 940px));
  padding: 132px var(--gutter) clamp(56px, 9vh, 104px);
  overflow: hidden;
  isolation: isolate;
  background: var(--night-deep) url("./assets/hero-poster.jpg") center / cover no-repeat;
}
.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-shade {
  background:
    linear-gradient(90deg, rgba(8, 27, 32, 0.9) 0%, rgba(8, 27, 32, 0.62) 46%, rgba(8, 27, 32, 0.15) 100%),
    linear-gradient(180deg, rgba(11, 35, 41, 0) 55%, var(--night) 100%);
}
.hero-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
}
.hero-inner > * {
  max-width: 640px;
}
.eyebrow,
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero h1 {
  margin-bottom: 22px;
  font-size: clamp(2.9rem, 7.4vw, 5.6rem);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.hero-lede {
  margin-bottom: 30px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}
.status-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 165, 42, 0.2);
}
.hero-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(8, 27, 32, 0.6);
  cursor: pointer;
}
.hero-toggle[hidden] {
  display: none;
}
.hero-toggle-icon {
  width: 12px;
  height: 14px;
  border-left: 4px solid var(--ink);
  border-right: 4px solid var(--ink);
}
.hero-toggle[data-state="paused"] .hero-toggle-icon {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid var(--ink);
  border-right: 0;
}

/* Sections */
.section {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin: 0 auto;
  padding: clamp(72px, 10vw, 120px) 0;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 56px;
  margin-bottom: 40px;
}
.section-head > div {
  max-width: 44rem;
}
.section h2 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
}
.kicker span:first-child {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.04em;
}
.section-lede {
  max-width: 27rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-link:hover {
  color: var(--link-hover);
}

/* Catalog */
.catalog-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--gold);
}
.catalog-steps li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px 0 0;
}
.catalog-steps li:nth-child(n + 3) {
  border-top: 2px dashed var(--line-strong);
  margin-top: -2px;
}
.catalog-steps span {
  color: var(--gold);
  font: 600 14px var(--serif);
}
.catalog-steps strong {
  font-size: 15px;
}
/* The six category tiles, as in the app (Категории): each in its own theme (ground, surface, accent), the sign on
   an accent chip, the title over the cover; below it the description and the category's paths. */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cat {
  --cat-ground: var(--night);
  --cat-surface: var(--surface);
  --cat-accent: var(--gold);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px solid color-mix(in srgb, var(--cat-accent) 60%, transparent);
  border-radius: 22px;
  background: var(--cat-ground);
}
.cat-media {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 440px;
  width: 100%;
  overflow: hidden;
  background: radial-gradient(120% 90% at 70% 15%, var(--cat-surface) 0%, var(--cat-ground) 75%);
}
.cat-media img,
.highlight-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, color-mix(in srgb, var(--cat-ground) 96%, transparent) 100%);
}
.cat-sign {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-bottom: 18%;
}
.cat-sign svg {
  width: 46%;
  height: auto;
  fill: none;
  stroke: var(--cat-accent);
  stroke-width: 0.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}
.cat-icon {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--cat-accent);
}
.cat-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--cat-ground);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cat-title {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 14px;
  left: 18px;
  margin: 0;
  font: 600 clamp(1.6rem, 2.4vw, 2rem) / 1.08 var(--serif);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.cat-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 4px 18px 20px;
}
.cat-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}
.cat-label {
  margin: auto 0 0;
  padding-top: 4px;
  color: var(--cat-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cat-soon::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border: 1.5px dashed var(--cat-accent);
  border-radius: 50%;
  vertical-align: 1px;
}
.cat-paths {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 0;
  padding: 0;
  list-style: none;
}
.cat-paths li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cat-surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}

/* What every story gives the learner. */
.learn {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.learn-title {
  margin: 0 0 26px;
  font: 600 clamp(1.5rem, 2.6vw, 1.9rem) / 1.15 var(--serif);
}
.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 26px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.learn-grid h4 {
  margin: 12px 0 6px;
  font-size: 1.02rem;
}
.learn-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}
.learn-icon {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Highlights: a horizontal strip of real posters (9:16). */
.highlight-strip {
  display: grid;
  list-style: none;
  grid-auto-flow: column;
  grid-auto-columns: clamp(150px, 42vw, 210px);
  gap: 14px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-color: var(--surface-2) transparent;
}
.highlight {
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-snap-align: start;
}
.highlight-poster {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.highlight-time {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(8, 20, 24, 0.78);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.highlight h3 {
  margin: 0;
  font: 600 1.02rem/1.22 var(--serif);
}

/* How it works: the light „Пергамент“ band from the design. */
.how {
  background: var(--paper);
  color: var(--paper-ink);
}
.how h2 em {
  color: #00636c;
}
.how .kicker {
  color: var(--gold-ink);
}
.how .section-lede {
  color: var(--paper-muted);
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 20px;
}
.how-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e4ded1;
  border-radius: 22px;
  background: #fffefa;
}
.how-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  height: 260px;
  padding: 24px;
  overflow: hidden;
  background: var(--night);
  color: var(--ink);
}
.how-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px 26px;
}
.how-step {
  color: var(--gold-ink);
  font-size: 13px;
  font-weight: 700;
}
.how-body h3 {
  margin: 0;
  font-size: 1.3rem;
}
.how-body p {
  margin: 0;
  color: var(--paper-muted);
  line-height: 1.6;
}
.mock-phone {
  position: relative;
  align-self: center;
  width: 116px;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(232, 165, 42, 0.5);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(11, 35, 41, 0) 40%, rgba(11, 35, 41, 0.92)),
    url("./assets/hero-poster.jpg") 58% center / cover;
}
.mock-play {
  position: absolute;
  top: 34%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  border: 1.5px solid rgba(244, 239, 228, 0.7);
  border-radius: 50%;
  background: rgba(11, 35, 41, 0.55);
}
.mock-play::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 15px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 12px solid var(--ink);
}
.mock-caption {
  position: absolute;
  right: 6px;
  bottom: 22px;
  left: 6px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.mock-caption mark {
  padding: 0 3px;
  border-radius: 4px;
  background: var(--gold);
  color: var(--on-gold);
}
.mock-progress {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  height: 3px;
  border-radius: 99px;
  background: rgba(244, 239, 228, 0.25);
}
.mock-progress span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}
.node {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  font-size: 14px;
}
.node .star {
  width: 24px;
  height: 24px;
}
.node .ring {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: radial-gradient(circle, var(--gold) 0 3px, transparent 4px);
}
.node.next {
  color: var(--muted);
}
.node.next .ring {
  border: 2px dashed var(--line-strong);
  background: none;
}
.how-quiz strong {
  font: 600 1.2rem/1.2 var(--serif);
}
.option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 15px;
}
.option.right {
  border: 2px solid var(--link);
  background: rgba(92, 194, 201, 0.12);
  color: var(--ink);
  font-weight: 700;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 28px;
  margin: 48px 0 0;
  padding: 32px 0 0;
  border-top: 1px solid #d9d1c1;
  list-style: none;
}
.feature-grid h3 {
  margin: 12px 0 6px;
  font-size: 1.05rem;
}
.feature-grid p {
  margin: 0;
  color: var(--paper-muted);
  line-height: 1.55;
}
.feature-icon {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #00636c;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Approach */
.approach {
  background:
    linear-gradient(90deg, rgba(11, 35, 41, 0.96) 0%, rgba(11, 35, 41, 0.86) 50%, rgba(11, 35, 41, 0.55) 100%),
    url("./assets/hero-poster.jpg") center 30% / cover;
}
.approach h2 {
  max-width: 40rem;
  margin-bottom: 40px;
}
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 28px;
  max-width: 960px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.principles li {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(232, 165, 42, 0.5);
}
.principles .star {
  width: 18px;
  height: 18px;
}
.principles p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.5;
}

/* For content creators */
.creators-band {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: end;
  gap: 32px 56px;
}
.creators-copy p:last-child {
  max-width: 40rem;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}
.creators-band h2 {
  max-width: 34rem;
}
.creators-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* Closing */
.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 72px var(--gutter) 88px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.closing-logo {
  width: 140px;
  height: 140px;
}
.closing h2 {
  margin: 12px 0 6px;
  font-size: clamp(2rem, 4vw, 3rem);
}
.closing p {
  max-width: 32rem;
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1000px) {
  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .cat-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .cat-media {
    aspect-ratio: 16 / 10;
  }
  .cat-media img {
    object-position: 50% 30%;
  }
  .cat-sign {
    padding-bottom: 6%;
  }
  .cat-sign svg {
    width: 30%;
  }
}
@media (max-width: 760px) {
  .hero {
    min-height: max(600px, min(100svh, 820px));
    padding-top: 112px;
  }
  .hero-shade {
    background:
      linear-gradient(180deg, rgba(8, 27, 32, 0.35) 0%, rgba(8, 27, 32, 0.55) 40%, rgba(8, 27, 32, 0.92) 78%, var(--night) 100%);
  }
  .hero-actions .button {
    flex: 1 1 180px;
  }
  .hero-toggle {
    top: 88px;
    bottom: auto;
  }
  .catalog-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 14px;
  }
  .catalog-steps li:nth-child(n + 3) {
    margin-top: 0;
  }
  .learn {
    margin-top: 44px;
  }
  .creators-band {
    grid-template-columns: minmax(0, 1fr);
  }
  .creators-actions .button {
    width: 100%;
  }
}
