/* The home page for Median 2.0: one morning, told as a walk through the app.
 *
 * Every section has its own ground and light, from the same painted world as the
 * App Store screenshots: dawn over the range (hero), deep night (wake), teal (the
 * minutes), glass over dark (the games), blue hour (history), night (trust), and
 * sunrise (close). Built on median.css (fonts, colours, frame). */

body { background: #04080b; }
:root { --ink: #F2F2F2; --soft: rgba(242,242,242,0.66); --faint: rgba(242,242,242,0.42); }
h1, h2 { font-weight: 500; letter-spacing: -0.032em; margin: 0; }
section, header { position: relative; isolation: isolate; }
.kicker { display: block; margin-bottom: 20px; color: var(--faint); }
.words p { color: var(--soft); font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; max-width: 34ch; margin: 26px 0 0; }
.words h2 { font-size: clamp(40px, 4.8vw, 64px); line-height: 1.04; max-width: 14ch; }
.sky { position: absolute; inset: 0; z-index: -1; background-size: cover; background-repeat: no-repeat; }

/* ── Nav ── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 10; }
.nav::before { content: ""; position: absolute; inset: 0 0 -30px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(4,8,11,0.92), rgba(4,8,11,0.7) 60%, rgba(4,8,11,0)); }
.nav .frame { display: flex; align-items: center; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { height: 22px; width: auto; }
.brand span { font-size: 19px; font-weight: 500; letter-spacing: -0.025em; }
.nav .spacer, footer .spacer { flex: 1; }
.nav-cta { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; padding: 9px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); }

/* ── The phone ── generic device (Apple marketing guidelines): no island, no buttons */
.device { position: relative; display: block; width: var(--w, 320px); aspect-ratio: 413 / 872; border-radius: 15.74% / 7.45%;
  box-shadow: 0 1px 1px rgba(0,0,0,.5), 0 30px 50px -20px rgba(0,0,0,.85), 0 80px 140px -50px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.05); }
.device img { display: block; width: 100%; height: 100%; border-radius: inherit; }
.store-badge { display: inline-block; margin-top: 40px; line-height: 0; }
.store-badge img { height: 54px; width: auto; }

/* ── Hero: dawn over the range ── */
.hero { min-height: min(100svh, 980px); display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; }
.hero .sky { background-image: url("img/bg-hero-v1.jpg"); background-position: center 30%; }
.hero .sky::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(4,8,11,.85) 0%, rgba(4,8,11,.45) 45%, rgba(4,8,11,.15) 100%), linear-gradient(to bottom, rgba(4,8,11,0) 55%, #04080b 100%); }
.hero .frame { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 24px; width: 100%; }
.hero h1 { font-size: clamp(52px, 6.4vw, 96px); line-height: .98; max-width: 9ch; }
.hero .lead { margin: 30px 0 0; max-width: 31ch; font-size: clamp(19px, 1.65vw, 23px); line-height: 1.45; color: var(--soft); }
.stage { position: relative; height: min(760px, 84svh); perspective: 2200px; }
.stage .device { position: absolute; }
.stage .back  { --w: min(300px, 25vw); right: 2%; top: 11%; transform: rotateY(-16deg) rotateZ(4deg) translateZ(-140px); filter: brightness(.82); }
.stage .front { --w: min(340px, 29vw); left: 6%; top: 3%; transform: rotateY(14deg) rotateX(3deg) rotateZ(-3deg); }

/* ── Wake: deep night, the lock screen ── */
.wake { padding: clamp(120px, 16vh, 190px) 0; background: radial-gradient(60% 70% at 28% 50%, rgba(56,110,120,.22), transparent 70%), #04080b; }
.wake .frame, .better .frame { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
.phone-col { display: flex; justify-content: center; }
.phone-col .device { --w: min(340px, 30vw); }

/* ── The minutes: teal, the routine ── */
.minutes { padding: clamp(120px, 16vh, 190px) 0; overflow: hidden;
  background: radial-gradient(70% 80% at 75% 55%, rgba(60,140,128,.38), rgba(20,60,58,.20) 45%, transparent 75%), linear-gradient(#04080b, #07181a 40%, #07181a 60%, #04080b); }
.minutes .frame { display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: 24px; }
.pair { position: relative; height: 700px; }
.pair .device { position: absolute; --w: min(300px, 26vw); }
.pair .first { left: 4%; top: 0; transform: rotate(-5deg); }
.pair .second { right: 2%; top: 90px; transform: rotate(5deg); }

/* ── The games: glass over dark ── */
.games { padding: clamp(110px, 15vh, 170px) 0 clamp(60px, 9vh, 110px); overflow: hidden;
  background: radial-gradient(55% 45% at 50% 62%, rgba(70,130,140,.30), transparent 70%), radial-gradient(40% 30% at 20% 80%, rgba(120,140,220,.14), transparent 70%), #04080b; }
.games .head { text-align: center; }
.games .head h2 { font-size: clamp(40px, 4.8vw, 68px); line-height: 1.04; max-width: 19ch; margin: 0 auto; }
.games .head p { color: var(--soft); font-size: clamp(18px, 1.5vw, 21px); margin: 22px auto 0; }
.wall { margin-top: clamp(56px, 8vh, 90px); display: flex; flex-direction: column; gap: 34px; align-items: center;
  -webkit-mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(#000 70%, transparent);
  -webkit-mask-composite: source-in; mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(#000 70%, transparent); mask-composite: intersect; }
.row { display: flex; gap: 30px; }
.row.r0 { transform: translateX(-90px); } .row.r1 { transform: translateX(110px); } .row.r2 { transform: translateX(-60px); }

.gcard { position: relative; flex: none; width: 300px; height: 348px; border-radius: 44px; font-family: "Geist", -apple-system, sans-serif;
  background: linear-gradient(155deg, rgba(255,255,255,.13), rgba(255,255,255,.05) 40%, rgba(255,255,255,.03));
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: inset 0 1.5px 1px rgba(255,255,255,.5), inset 0 -1px 1px rgba(255,255,255,.16), 0 24px 50px rgba(0,0,0,.35); }
.gcard::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.8), rgba(255,255,255,.12) 28%, rgba(255,255,255,.04) 55%, rgba(255,255,255,.32) 85%, rgba(255,255,255,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.gcard .vis { position: absolute; left: 0; right: 0; top: 4px; height: 182px; display: flex; align-items: center; justify-content: center; }
.gcard .k { position: absolute; left: 25px; top: 190px; font-size: 11px; font-weight: 500; letter-spacing: 2.6px; text-transform: uppercase; color: var(--kick); }
.gcard .t { position: absolute; left: 23px; top: 207px; font: 400 40px/1.1 "New York", "Iowan Old Style", Georgia, serif; letter-spacing: -.4px; color: #f6f8f7; }
.gcard .go { position: absolute; left: 17px; bottom: 18px; width: 200px; height: 54px; border-radius: 27px; background: var(--btn);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.9), 0 6px 18px var(--glow); display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 20px; font-weight: 500; color: #10201e; }
.gcard .go::before { content: ""; border-left: 12px solid #10201e; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.gcard .nw { position: absolute; right: 17px; bottom: 18px; width: 58px; height: 54px; border-radius: 17px; color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.2), inset 0 1.5px 0 rgba(255,255,255,.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; }
.gcard.focus { --kick: #9eeedb; --btn: linear-gradient(#f2fdf9, #a6eddb); --glow: rgba(140,230,205,.32); }
.gcard.calm { --kick: #b4ccff; --btn: linear-gradient(#f4f7ff, #b7cbf8); --glow: rgba(160,185,250,.32); }
.gcard.energy { --kick: #f8c49c; --btn: linear-gradient(#fff6ef, #f4c49c); --glow: rgba(245,190,150,.32); }
.gcard.clarity { --kick: #d3dde8; --btn: linear-gradient(#f6f8fb, #cdd8e3); --glow: rgba(200,215,230,.28); }
.tiles, .gt { display: grid; grid-template-columns: repeat(3, 46px); gap: 9px; }
.tiles i, .gt i { height: 46px; border-radius: 13px; font-style: normal; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.16), 0 5px 12px rgba(0,0,0,.18); }
.gt i { background: rgba(255,255,255,.10); display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 500; color: rgba(255,255,255,.55); }
.gt i.on { background: rgba(255,255,255,.26); color: #fff; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.7), 0 0 20px rgba(180,255,235,.35); }
.gt i.lit { background: radial-gradient(circle, #fff6e8, #f6b884 70%); box-shadow: 0 0 34px 8px rgba(255,180,120,.45), inset 0 1.5px 0 #fff; }
.orb { width: 124px; height: 124px; border-radius: 50%; box-shadow: 0 0 40px 12px rgba(255,205,160,.3), 0 0 100px 36px rgba(255,170,110,.15); }
.orb img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.ar { display: grid; grid-template-columns: repeat(4, 36px); gap: 9px; font-size: 28px; color: rgba(255,255,255,.75); text-align: center; }
.ar b { font-weight: 500; color: #fff; text-shadow: 0 0 14px rgba(180,255,235,.9); }
.wr { text-align: center; } .wr .L { font: 400 72px/1 "New York", Georgia, serif; color: #fff; }
.wr .chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; width: 230px; margin-top: 10px; }
.wr .chips span { font-size: 13px; color: rgba(255,255,255,.75); padding: 5px 10px; border-radius: 12px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.us { display: flex; gap: 9px; } .us i { width: 50px; height: 60px; border-radius: 13px; background: rgba(255,255,255,.14); font-style: normal; font-size: 29px; font-weight: 500; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.18), 0 6px 14px rgba(0,0,0,.18); }
.us i.up { transform: translateY(-17px) rotate(-8deg); background: rgba(255,255,255,.26); }

/* ── Better: blue hour, history ── */
.better { padding: clamp(130px, 17vh, 200px) 0; overflow: hidden; }
.better .sky { background-image: url("img/bg-history-v1.jpg"); background-position: center 40%; }
.better .sky::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(#04080b 0%, rgba(4,8,11,.35) 25%, rgba(4,8,11,.35) 70%, #04080b 100%), linear-gradient(90deg, rgba(4,8,11,.7), rgba(4,8,11,.1) 60%); }

/* ── Trust: night ── */
.trust { padding: clamp(120px, 16vh, 180px) 0; text-align: center; background: radial-gradient(50% 60% at 50% 40%, rgba(40,70,90,.25), transparent 70%), #04080b; }
.trust h2 { font-size: clamp(40px, 4.6vw, 64px); line-height: 1.04; }
.laurels { margin-top: clamp(60px, 8vh, 90px); display: flex; justify-content: center; gap: clamp(8px, 1.4vw, 22px); }
.laurel { display: flex; align-items: center; gap: 4px; }
.laurel > img { height: 104px; width: auto; opacity: .9; }
.laurel .w { width: 214px; }
.laurel .big { white-space: nowrap; font-size: 24px; font-weight: 500; letter-spacing: -.02em; margin: 0; }
.laurel .cap { color: var(--soft); font-size: 15px; line-height: 1.35; margin: 8px 0 0; }
.laurel .stars { display: flex; justify-content: center; gap: 5px; margin-bottom: 10px; } .laurel .stars svg { width: 24px; height: 23px; }
.laurel .quote { font-size: 16px; line-height: 1.4; font-weight: 500; margin: 0; }

/* ── Questions ── */
.questions { padding: clamp(90px, 12vh, 140px) 0; }
.questions .frame { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.questions h2 { font-size: clamp(36px, 3.8vw, 52px); }
.faq details { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; }
.faq details:last-child { border-bottom: 1px solid rgba(255,255,255,.1); }
.faq summary { cursor: pointer; list-style: none; font-size: 19px; font-weight: 500; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--soft); margin: 14px 0 0; font-size: 17px; line-height: 1.55; max-width: 52ch; }

/* ── Close: sunrise ── */
.close { min-height: min(86svh, 820px); display: flex; align-items: center; text-align: center; overflow: hidden; }
.close .sky { background-image: url("img/bg-close-v1.jpg"); background-position: 70% 40%; }
.close .sky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#04080b 0%, rgba(4,8,11,.25) 30%, rgba(4,8,11,.2) 70%, #04080b 100%); }
.close .frame { display: flex; flex-direction: column; align-items: center; }
.close .mark { height: 46px; width: auto; margin-bottom: 30px; opacity: .95; }
.close h2 { font-size: clamp(48px, 6.6vw, 96px); line-height: 1; max-width: 11ch; }

footer.site { padding: 34px 0 44px; } footer.site .frame { display: flex; gap: 22px; font-size: 13px; color: var(--faint); }
footer.site a { color: var(--faint); text-decoration: none; } footer.site a:hover { color: var(--ink); }

/* ── Arrival: things rise into place once ── */
.device, .gcard, .laurel { transition: opacity .9s var(--ease-out), translate .9s var(--ease-out); }
.js-anim .device:not(.in), .js-anim .gcard:not(.in), .js-anim .laurel:not(.in) { opacity: 0; translate: 0 24px; }

/* ── Phone width ── */
@media (max-width: 860px) {
  .hero { padding-top: 110px; }
  .hero .frame, .wake .frame, .minutes .frame, .better .frame, .questions .frame { grid-template-columns: 1fr; }
  .hero .words { text-align: center; } .hero h1, .hero .lead { margin-left: auto; margin-right: auto; }
  .stage { height: 520px; margin-top: 30px; }
  .stage .front { --w: 230px; left: 12%; } .stage .back { --w: 200px; right: 8%; }
  .wake .phone-col { order: 2; } .phone-col .device { --w: 260px; }
  .pair { height: 520px; } .pair .device { --w: 210px; } .pair .first { left: 4%; } .pair .second { right: 4%; top: 60px; }
  .gcard { transform: scale(.62); margin: -66px -57px; } .row { gap: 14px; } .wall { gap: 10px; }
  .laurels { flex-direction: column; align-items: center; }
  .laurel > img { height: 92px; }
}
