/* Landing page, part 1: type scale, reveals, hero, the phone, the sphere,
   the scroll-lit statement. Type scale follows Apple's product pages
   (breakpoints 1068 / 734), with Yatra One only at 32px and up. */

:root {
  --h1: 64px;
  --h2: 50px;
  --lede: 21px;
  --eyebrow: 19px;
  --section: 160px;
}
@media (max-width: 1068px) { :root { --h1: 52px; --h2: 42px; --lede: 19px; --eyebrow: 17px; --section: 120px; } }
@media (max-width: 734px) { :root { --h1: 40px; --h2: 34px; --lede: 17px; --eyebrow: 17px; --section: 88px; } }

/* One texture, once: a faint film grain over the whole page. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1.title { font-size: var(--h1); line-height: 1.04; margin: 0 0 24px; letter-spacing: -0.005em; }
h2.title { font-size: var(--h2); line-height: 1.07; margin: 0 0 20px; }
.eyebrow { font-size: var(--eyebrow); }
.lead { font-size: var(--lede); line-height: 1.42; font-weight: 500; letter-spacing: 0.006em; color: var(--muted); margin: 0; max-width: 34em; }
.fine { font-size: 14px; line-height: 1.5; color: var(--faint); margin: 28px 0 0; max-width: 34em; }
.fine a { color: var(--muted); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.cta-row.center { justify-content: center; }

/* Reveal once on entering the viewport (home.js adds .in). */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0, 0, 0.5, 1), transform 0.7s cubic-bezier(0, 0, 0.5, 1); transition-delay: var(--delay, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - 60px); display: flex; align-items: center;
  padding: 32px 0 56px;
}
.hero > .wrap { width: 100%; }
.hero-glow {
  position: absolute; right: -10%; top: 12%; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(255, 87, 51, 0.2), rgba(255, 138, 61, 0.06) 55%, transparent 75%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 56px; align-items: center; }
.hero .phone { width: min(300px, calc((100svh - 150px) * 9 / 19.5)); min-width: 240px; }
.hero-copy .lead { max-width: 30em; }
@media (max-width: 900px) {
  .hero { min-height: 0; padding-top: 48px; }
  .hero .phone { width: min(290px, 78vw); }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lead { margin: 0 auto; }
  .hero .cta-row { justify-content: center; }
  .hero-glow { right: -30%; top: 45%; width: 140vw; height: 140vw; }
}

/* The phone: an Android with a punch-hole camera, built in CSS. */
.phone {
  position: relative; margin: 0 auto;
  width: clamp(260px, 26vw, 330px); aspect-ratio: 9 / 19.5;
  padding: 10px; border-radius: 50px; background: #0b0b0c;
  container-type: inline-size;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 0 0 2px #242426, 0 50px 100px -20px rgba(0, 0, 0, 0.9), 0 30px 80px -40px rgba(255, 87, 51, 0.35);
}
.phone::after { content: ""; position: absolute; right: -3px; top: 22%; width: 3px; height: 64px; border-radius: 0 3px 3px 0; background: #2a2a2d; }
.screen {
  /* One of the app's dp: the screen stands for a 390 dp wide phone. */
  --dp: calc(100cqw / 390); /* 100cqw: the phone's inner width */
  position: relative; height: 100%; border-radius: 40px; overflow: hidden; background: #000; padding: 14px 16px 0; display: flex; flex-direction: column; }
.status { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 600; color: #e9e9ee; padding: 0 6px; height: 18px; }
.status .cam { width: 11px; height: 11px; border-radius: 50%; background: #111; box-shadow: inset 0 0 0 2px #1d1d20; }
.status .bars { display: flex; gap: 2px; align-items: flex-end; height: 10px; }
.status .bars b { width: 3px; background: #e9e9ee; border-radius: 1px; }
.status .bars b:nth-child(1) { height: 4px; } .status .bars b:nth-child(2) { height: 6px; }
.status .bars b:nth-child(3) { height: 8px; } .status .bars b:nth-child(4) { height: 10px; }

/* The space's name and count, at the app's sizes (space_header.dart):
   Yatra One 20 dp, spaced 1.2 dp; the count 12 dp. */
.sp-title { font-size: calc(20 * var(--dp)); line-height: 1.25; margin: 18px 0 calc(2 * var(--dp)); text-transform: uppercase; letter-spacing: calc(1.2 * var(--dp)); text-align: center; }
.sp-meta { margin: 0 0 14px; font-size: calc(12 * var(--dp)); font-weight: 500; line-height: 1.2; color: var(--muted); text-align: center; display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.kind { display: none; font-size: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(97, 97, 97, 0.4); border: 1px solid rgba(117, 117, 117, 0.3); color: var(--text); white-space: nowrap; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.room {
  position: relative; aspect-ratio: 1; border-radius: 18px; padding: 10px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(135deg, var(--deep), var(--bright)); color: var(--ink); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.room b.title { font-size: clamp(17px, 1.7vw, 21px); line-height: 1.05; overflow-wrap: anywhere; }
.room b.title.small { font-size: clamp(13px, 1.3vw, 16px); overflow-wrap: normal; }
.nw { white-space: nowrap; }
.room small { display: flex; justify-content: space-between; font-size: 9px; opacity: 0.8; margin-top: 4px; }
.room.add { background: linear-gradient(160deg, #1f1f22, #0d0d0f); color: var(--muted); align-items: center; justify-content: center; gap: 2px; font-size: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 0 1px rgba(255,255,255,.05); }
.room.add span { font-size: 22px; line-height: 1; }
.c-graphite { --deep: #2b2f38; --bright: #5b6475; --ink: #dcdee3; }
.c-teal { --deep: #14505c; --bright: #2c9a94; --ink: #cbe8e6; }
.c-indigo { --deep: #3b2f63; --bright: #7457b8; --ink: #ddd5ef; }
.c-amber { --deep: #5c4416; --bright: #c08a2e; --ink: #f1e3cb; }
.c-plum { --deep: #55204e; --bright: #aa4c99; --ink: #ecd6e8; }

/* The sphere (66 dp, drawn in a 1.2x canvas) and its mode word: Yatra
   One 12 dp, grey, as in sphere_dock.dart. */
.mini-sphere { margin: auto 0 10px; display: flex; flex-direction: column; align-items: center; gap: 0; }
.mini-sphere canvas { width: calc(66 * 1.2 * var(--dp)); height: calc(66 * 1.2 * var(--dp)); }
.mini-sphere span { font-family: var(--title); font-size: calc(12 * var(--dp)); line-height: 1.6; color: var(--muted); margin-top: calc(-0.1 * 66 * var(--dp)); }

/* Statement: words light up as it scrolls through. */
.statement { padding: calc(var(--section) * 0.6) 0 var(--section); }
.statement .lit { font-size: clamp(30px, 4.4vw, 56px); line-height: 1.22; margin: 0; max-width: 21em; }
.lit .w { color: rgba(244, 244, 246, 0.16); transition: color 0.25s; }
.lit .w.on { color: var(--text); }
.lit .w.hl.on { color: var(--orange); }

/* The hero rises on load (CSS only, so nothing flashes before the script). */
.rise { animation: rise 0.9s cubic-bezier(0, 0, 0.5, 1) both; }
.hero-copy .rise:nth-child(2) { animation-delay: 80ms; }
.hero-copy .rise:nth-child(3) { animation-delay: 160ms; }
.hero-copy .rise:nth-child(4) { animation-delay: 240ms; }
.hero-phone.rise { animation-delay: 200ms; animation-duration: 1.2s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
