/* ==========================================================================
   TV Garden
   Midnight blue from the logo, marigold from the name. The recurring
   structural device is the garland, not a border.
   ========================================================================== */

:root {
  --ink:        #050a18;
  --ink-2:      #0a1128;
  --panel:      #0d1734;
  --line:       #1c2c52;

  --glow:       #2fa8ff;
  --glow-deep:  #1044d6;
  --marigold:   #ff8a1f;
  --marigold-2: #ffc24a;

  --cream:      #f6efe2;
  --mute:       #9aa8c6;

  --page:       min(1280px, 100% - 3rem);
  --r:          14px;
  --dock-h:     78px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* the nav is sticky, so anchor jumps need room above the target */
[id] { scroll-margin-top: 92px; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: "Anek Latin", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto is load-bearing — without it the width/height attributes on each
   <img> win as presentational hints and defeat the aspect-ratio rules below. */
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: "Rozha One", Georgia, serif;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: .005em;
  margin: 0;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--marigold-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--marigold); color: #1a0d00;
  padding: .6rem 1rem; border-radius: 8px; font-weight: 600;
  transition: top .2s var(--ease);
}
.skip:focus { top: 1rem; }

/* ── buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .72em 1.5em;
  border-radius: 999px;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), box-shadow .18s var(--ease);
  white-space: nowrap;
}

.btn--solid {
  background: linear-gradient(180deg, var(--marigold-2), var(--marigold));
  color: #241100;
  box-shadow: 0 8px 26px -10px rgba(255, 138, 31, .8);
}
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -12px rgba(255, 138, 31, .95); }

.btn--ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--cream);
}
.btn--ghost:hover { border-color: var(--glow); background: rgba(47, 168, 255, .1); }

.btn--lg { padding: .85em 1.9em; font-size: 1.02rem; }
.btn--full { width: 100%; }

/* ── nav ─────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease),
              backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(5, 10, 24, .82);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

.nav__inner {
  width: var(--page); margin-inline: auto;
  display: flex; align-items: center; gap: 2rem;
  height: 74px;
}

.nav__brand img { height: 54px; width: auto; }

.nav__links {
  display: flex; gap: 1.9rem;
  margin-right: auto;
  font-size: .95rem; font-weight: 500;
}
.nav__links a { color: var(--mute); transition: color .18s var(--ease); }
.nav__links a:hover { color: var(--cream); }

.nav__burger {
  display: none;
  width: 42px; height: 42px;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__burger span { display: block; width: 18px; height: 1.5px; background: var(--cream); }

.nav__drawer[hidden] { display: none; }
.nav__drawer {
  display: flex; flex-direction: column;
  background: rgba(5, 10, 24, .97);
  border-top: 1px solid var(--line);
  padding: .5rem 1.5rem 1.25rem;
}
.nav__drawer a { padding: .8rem 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.nav__drawer a:last-child { border-bottom: 0; color: var(--marigold-2); }

/* ── hero ────────────────────────────────────────────────────────────── */

.hero { position: relative; padding-top: 1rem; overflow: hidden; }

.hero__glow {
  position: absolute; inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(60% 55% at 72% 34%, rgba(47, 168, 255, .30), transparent 68%),
    radial-gradient(42% 40% at 24% 16%, rgba(255, 138, 31, .14), transparent 70%),
    radial-gradient(70% 60% at 50% 100%, rgba(16, 68, 214, .22), transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  width: var(--page); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  align-items: center; gap: 2rem;
  padding-block: clamp(1rem, 2.6vw, 2.25rem) clamp(1.5rem, 3.2vw, 2.75rem);
}

.hero__title {
  font-size: clamp(3rem, 6.2vw, 5.6rem);
  letter-spacing: -.01em;
  text-wrap: balance;
}

.hero__lede {
  max-width: 40ch;
  margin-top: 1.1rem;
  color: var(--mute);
  font-size: 1.1rem;
  line-height: 1.62;
}

.hero__actions {
  display: flex; flex-wrap: wrap; gap: .85rem;
  margin-top: 1.5rem;
}

.hero__meta { margin-top: .8rem; font-size: .88rem; color: #6f7d9c; }

.hero__art { position: relative; }
.hero__art::after {
  content: ""; position: absolute; left: 50%; bottom: 4%;
  width: 62%; height: 42px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(47, 168, 255, .28), transparent);
  filter: blur(10px);
}
.hero__art img {
  width: 100%; height: auto;
  filter: drop-shadow(0 34px 60px rgba(0, 0, 0, .65));
}

/* one orchestrated entrance, nothing else moves on its own */
@media (prefers-reduced-motion: no-preference) {
  .hero__title, .hero__lede, .hero__actions, .hero__meta, .hero__art {
    animation: rise .85s var(--ease) backwards;
  }
  .hero__lede    { animation-delay: .09s; }
  .hero__actions { animation-delay: .17s; }
  .hero__meta    { animation-delay: .23s; }
  .hero__art     { animation-delay: .12s; animation-duration: 1.1s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* ── language ticker ─────────────────────────────────────────────────── */

.ticker {
  position: relative;
  border-block: 1px solid var(--line);
  background: rgba(13, 23, 52, .5);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.ticker__track {
  display: flex; gap: 3.2rem;
  padding-block: .85rem;
  width: max-content;
  animation: slide 36s linear infinite;
  font-size: .96rem; color: var(--mute);
}
.ticker__track span { white-space: nowrap; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* ── spotlight ───────────────────────────────────────────────────────── */

.spotlight {
  position: relative;
  min-height: min(60vh, 520px);
  display: flex; align-items: flex-end;
  isolation: isolate;
}
.spotlight__still {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.spotlight::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--ink) 4%, rgba(5, 10, 24, .55) 46%, rgba(5, 10, 24, .1)),
    linear-gradient(to right, rgba(5, 10, 24, .9), rgba(5, 10, 24, .1) 62%);
}
.spotlight__body {
  width: var(--page); margin-inline: auto;
  padding-block: clamp(1.75rem, 3.6vw, 3rem);
  max-width: none;
}
.spotlight__flag {
  color: var(--marigold-2); font-weight: 600; font-size: .92rem;
  margin-bottom: .55rem;
}
.spotlight__title { font-size: clamp(2.8rem, 6.4vw, 5.2rem); }
.spotlight__facts { color: var(--mute); font-size: .95rem; margin-top: .6rem; }
.spotlight__blurb { max-width: 46ch; margin-top: .75rem; color: #cfd7e8; }
.spotlight__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.2rem; }

/* ── rails ───────────────────────────────────────────────────────────── */

.rails { padding-block: clamp(2rem, 3.6vw, 2.75rem) 0; }

.rail + .rail { margin-top: clamp(1.6rem, 3vw, 2.25rem); }

.rail__head {
  width: var(--page); margin-inline: auto;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: .85rem;
}
.rail__head h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }

.rail__nav[hidden] { display: none; }
.rail__nav { display: flex; gap: .5rem; }
.rail__nav button {
  width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); color: var(--cream);
  font-size: 1.35rem; line-height: 1; cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease),
              opacity .18s var(--ease);
}
.rail__nav button:hover { border-color: var(--glow); background: rgba(47, 168, 255, .12); }
.rail__nav button[disabled] { opacity: .3; cursor: default; }
.rail__nav button[disabled]:hover { border-color: var(--line); background: rgba(255, 255, 255, .03); }

.rail__track {
  display: flex; gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding-inline: max(1.5rem, calc((100% - var(--page)) / 2));
  /* keep the snapport off the gutter, or the first card snaps under it */
  scroll-padding-inline: max(1.5rem, calc((100% - var(--page)) / 2));
  padding-block: .35rem .6rem;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__track > * { scroll-snap-align: start; }

.card { flex: 0 0 186px; }
.card a { display: block; }

.card__art {
  position: relative; display: block;
  border-radius: var(--r); overflow: hidden;
  background: var(--panel);
  box-shadow: 0 16px 34px -20px rgba(0, 0, 0, .9);
  transition: transform .26s var(--ease), box-shadow .26s var(--ease);
}
.card__art img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.card a:hover .card__art {
  transform: translateY(-6px);
  box-shadow: 0 26px 44px -22px rgba(0, 0, 0, 1), 0 0 0 1px rgba(47, 168, 255, .45);
}

.card__rank {
  position: absolute; left: 8px; bottom: 6px;
  font-family: "Rozha One", Georgia, serif;
  font-size: 2.6rem; line-height: .8;
  color: var(--cream);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .95);
}

.card__name { display: block; margin-top: .7rem; font-weight: 600; font-size: .98rem; }
.card__facts { display: block; color: var(--mute); font-size: .84rem; }

.rail__track--wide .tile { flex: 0 0 min(400px, 78vw); }
.tile a { display: block; }
.tile__art {
  position: relative; display: block;
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 16px 34px -20px rgba(0, 0, 0, .9);
  transition: transform .26s var(--ease), box-shadow .26s var(--ease);
}
.tile__art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tile a:hover .tile__art {
  transform: translateY(-6px);
  box-shadow: 0 26px 44px -22px rgba(0, 0, 0, 1), 0 0 0 1px rgba(47, 168, 255, .45);
}
.tile__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px; background: rgba(255, 255, 255, .22);
}
.tile__bar i { display: block; height: 100%; background: var(--marigold); }
.tile__name { display: block; margin-top: .7rem; font-weight: 600; }
.tile__facts { display: block; color: var(--mute); font-size: .85rem; }

/* ── AI shorts ───────────────────────────────────────────────────────── */

.shorts {
  position: relative;
  margin-top: clamp(2.25rem, 4vw, 3rem);
  /* top padding clears the garland, whose height is 29.5% of the section width */
  padding-block: clamp(7rem, 25vw, 20rem) clamp(2rem, 3.6vw, 2.75rem);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255, 138, 31, .14), transparent 62%),
    var(--ink-2);
  border-block: 1px solid var(--line);
  overflow: hidden;
}

/* the garland hangs in the doorway of the section, like a toran */
.shorts__garland {
  position: absolute; top: -8.5vw; left: 0;
  width: 100%;
  opacity: .9; pointer-events: none;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .55));
}

.shorts__head {
  width: var(--page); margin-inline: auto;
  max-width: min(var(--page), 62ch);
  text-align: center;
}
.shorts__head h2 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
.shorts__head p { margin-top: .8rem; color: var(--mute); }

.shorts__row {
  display: flex; gap: 1.1rem;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  padding-inline: max(1.5rem, calc((100% - var(--page)) / 2));
  scroll-padding-inline: max(1.5rem, calc((100% - var(--page)) / 2));
  padding-block: clamp(1.4rem, 2.8vw, 2rem) .9rem;
}
.shorts__row::-webkit-scrollbar { display: none; }

.short { flex: 0 0 200px; scroll-snap-align: center; }
.short__art {
  position: relative; display: block;
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 1);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}
.short__art img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
.short__art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5, 10, 24, .72), transparent 38%);
}
.short a:hover .short__art {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 30px 56px -24px rgba(0, 0, 0, 1), 0 0 0 1px rgba(255, 194, 74, .5);
}

/* alternating lift gives the row a planted-bed rhythm rather than a flat grid */
.short:nth-child(even) .short__art { transform: translateY(18px); }
.short:nth-child(even) a:hover .short__art { transform: translateY(10px) scale(1.015); }

.short__name { display: block; margin-top: .8rem; font-weight: 600; font-size: .96rem; }
.short:nth-child(even) .short__name,
.short:nth-child(even) .short__facts { transform: translateY(18px); }
.short__facts { display: block; color: var(--mute); font-size: .83rem; }

.shorts__note {
  width: var(--page); margin-inline: auto;
  text-align: center; color: #6f7d9c; font-size: .86rem;
  margin-top: 1.3rem;
}

/* ── languages ───────────────────────────────────────────────────────── */

.langs {
  width: var(--page); margin-inline: auto;
  padding-block: clamp(2.25rem, 4.2vw, 3.25rem);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 3.4vw, 3rem); align-items: center;
}
.langs__copy h2 { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 18ch; text-wrap: balance; }
.langs__copy p { margin-top: .85rem; color: var(--mute); max-width: 44ch; }

.langs__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.langs__grid li {
  background: var(--ink);
  padding: .9rem .7rem;
  text-align: center;
  transition: background-color .2s var(--ease);
}
.langs__grid li:hover { background: var(--panel); }
.langs__grid b { display: block; font-size: 1.35rem; font-weight: 500; line-height: 1.3; }
.langs__grid span { display: block; font-size: .8rem; color: var(--mute); margin-top: .15rem; }

/* ── features ────────────────────────────────────────────────────────── */

.feats { width: var(--page); margin-inline: auto; padding-bottom: clamp(2rem, 3.6vw, 2.75rem); }
.feats__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border-block: 1px solid var(--line);
}
.feats__grid li { background: var(--ink); padding: 1.5rem 1.3rem 1.6rem; }
.feats__grid h3 { font-size: 1.3rem; }
.feats__grid p { margin-top: .7rem; color: var(--mute); font-size: .94rem; }

/* ── get the app ─────────────────────────────────────────────────────── */

.get {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(70% 120% at 20% 0%, rgba(47, 168, 255, .16), transparent 60%),
    var(--ink-2);
}
.get__inner {
  width: var(--page); margin-inline: auto;
  padding-block: clamp(2.25rem, 4.2vw, 3.25rem);
  display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem);
  flex-wrap: wrap;
}
.get__icon {
  width: 128px; height: 128px; border-radius: 28px;
  box-shadow: 0 22px 50px -22px rgba(0, 0, 0, 1);
  flex: none;
}
.get__copy h2 { font-size: clamp(2rem, 4vw, 3rem); }
.get__copy > p { margin-top: .7rem; color: var(--mute); }

.get__dl { gap: .6rem; margin-top: 1.2rem; }
.get__dl svg {
  width: 21px; height: 21px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── footer ──────────────────────────────────────────────────────────── */

/* extra room at the very bottom so the dock never sits on the fine print */
.foot {
  border-top: 1px solid var(--line);
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
}
.foot__inner {
  width: var(--page); margin-inline: auto;
  padding-block: clamp(1.9rem, 3.4vw, 2.5rem) 1.4rem;
  display: grid; grid-template-columns: auto 1fr;
  gap: clamp(1.6rem, 3.4vw, 3rem);
}
.foot__logo { height: 52px; width: auto; opacity: .95; }

.foot__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.foot__cols h3 {
  font-family: "Anek Latin", sans-serif;
  font-size: .85rem; font-weight: 600; color: var(--cream);
  margin-bottom: .7rem;
}
.foot__cols a {
  display: block; color: var(--mute); font-size: .9rem; padding: .22rem 0;
  transition: color .18s var(--ease);
}
.foot__cols a:hover { color: var(--cream); }

.foot__fine {
  width: var(--page); margin-inline: auto;
  border-top: 1px solid var(--line);
  padding-block: 1.1rem 1.6rem;
  color: #5d6a87; font-size: .82rem;
}

/* ── responsive ──────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  :root { --page: min(1280px, 100% - 2.5rem); }

  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; margin-left: auto; }
  .nav { background: rgba(5, 10, 24, .82); backdrop-filter: blur(16px); border-bottom-color: var(--line); }

  .hero__inner { grid-template-columns: 1fr; gap: 1rem; }
  .hero__art { order: -1; max-width: min(400px, 74%); margin-inline: auto; }
  .hero__title { font-size: clamp(3rem, 12vw, 5rem); }

  .langs { grid-template-columns: 1fr; }
  .feats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .foot__inner { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1rem; }
}

@media (max-width: 560px) {
  :root { --page: min(1280px, 100% - 2rem); }
  body { font-size: 16px; }

  .hero { padding-top: 1rem; }
  .hero__lede { font-size: 1.02rem; }
  .hero__actions .btn { flex: 1 1 100%; }

  .spotlight { min-height: 0; }
  .spotlight::after {
    background: linear-gradient(to top, var(--ink) 8%, rgba(5, 10, 24, .5) 60%, rgba(5, 10, 24, .35));
  }
  .spotlight__body { padding-top: 8.5rem; }
  .spotlight__actions .btn { flex: 1 1 100%; }

  .card { flex: 0 0 144px; }
  .card__rank { font-size: 2rem; }
  .short { flex: 0 0 168px; }

  .langs__grid { grid-template-columns: repeat(2, 1fr); }
  .feats__grid { grid-template-columns: 1fr; }
  .feats__grid li { padding: 1.25rem 0; }

  .get__icon { width: 92px; height: 92px; border-radius: 22px; }
}

/* ── sticky download dock ────────────────────────────────────────────── */

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: .9rem;
  min-height: var(--dock-h);
  padding-inline: max(1rem, calc((100% - var(--page)) / 2));
  padding-block: .75rem;
  padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(8, 15, 34, .92);
  backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid var(--line);
  box-shadow: 0 -18px 40px -26px rgba(0, 0, 0, 1);

  /* parked off-screen until the hero is behind us; visibility keeps it
     out of the tab order while it is down */
  transform: translateY(105%);
  visibility: hidden;
  transition: transform .34s var(--ease), visibility .34s var(--ease);
}
.dock.is-up { transform: none; visibility: visible; }

.dock__icon { width: 46px; height: 46px; border-radius: 12px; flex: none; }

.dock__copy {
  display: flex; flex-direction: column; line-height: 1.25;
  margin-right: auto; min-width: 0;
}
.dock__copy b { font-weight: 600; font-size: .95rem; }
.dock__copy span { font-size: .8rem; color: var(--mute); }

.dock__btn { flex: none; }

@media (max-width: 440px) {
  .dock { gap: .7rem; }
  .dock__icon { width: 40px; height: 40px; }
  .dock__copy span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dock { transition: none; }
}
