/* ════════════════════════ LANDING PAGE ONLY (after /css/site.css and /css/demo-phones.css) ════════════════════════
   index.html (/): logo, "Explore The Token Creator", the sign-in card, the two store buttons,
   the three demo phones, and the email dialog. Nothing else.
   Tokens, type, buttons and motion come from site.css — nothing here restyles them. */

/* ─── small grey text: site.css's --text-3 (#7C7567) is 4.4:1 on this background, below AA
   for the store captions. Lifted on this page only (the value the demo phones already use). ─── */
body[data-page="landing"]{ --text-3:#958E80; }

/* ─── utilities ─── */
.sr-only{ position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }   /* site.css's `*` rule loses to its own `html{smooth}` */
/* <dialog> in a browser without dialog support would otherwise render in the page flow */
dialog:not([open]){ display:none; }

/* ─── logo (not sticky: it must never cover the phones) ─── */
.lp-top{ position:relative; z-index:2; padding-top:var(--safe-t); }
.lp-top .container{ display:flex; align-items:center; height:72px; }
.brand .mark svg{ color:var(--gold); }

/* ─── sign in or download ─── */
.lp-hero{ padding:28px 0 40px; overflow-x:clip; }   /* the card's glow (inset -8%) must not widen the page */
.lp-grid{ display:grid; grid-template-columns:minmax(0,1fr); }
.lp-hero h1{ margin:0; font-size:clamp(40px,calc(4vw + .8vw),70px); }
/* the four text lines: one style, clearly below the headline, above body text; gold arrows */
.lp-line{ display:flex; align-items:center; gap:12px; margin:0; font-family:var(--font-display); font-weight:500;
  font-size:clamp(19px,1.6vw,22px); line-height:1.3; letter-spacing:-.005em; color:var(--text-2); }
.lp-arrow{ width:24px; height:24px; flex-shrink:0; color:var(--gold); }
.lp-signin{ margin-top:26px; }
.lp-download{ margin-top:34px; }
/* the two store rows: one grid, so labels, arrows and buttons line up; both buttons as wide as the wider */
.lp-stores{ display:grid; grid-template-columns:minmax(0,max-content) auto minmax(0,max-content); justify-content:start; align-items:center; column-gap:14px; row-gap:12px; margin-top:18px; }
.lp-stores .store{ width:100%; min-width:0; }
/* large text (Android text scaling, translations): the buttons may shrink and their captions wrap */
.lp-stores .store .s1,.lp-stores .store .s2{ white-space:normal; overflow-wrap:anywhere; }

/* sign-in card (the live-market card's shell) */
.lp-card{ width:100%; }
.signin-card{ position:relative; z-index:1; padding:28px 28px 24px; border-radius:var(--r-xl);
  background:linear-gradient(180deg, rgba(22,22,30,.86), rgba(11,11,16,.92));
  border:1px solid var(--line-2); box-shadow:var(--shadow-gold), 0 50px 100px -50px rgba(0,0,0,.9);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); }
.signin-card:focus{ outline:none; }
.signin-card:focus-visible{ outline:2px solid var(--gold); outline-offset:4px; }
.si-title{ font-family:var(--font-display); font-weight:500; letter-spacing:-.015em; font-size:clamp(26px,2.5vw,31px); line-height:1.1; margin-top:16px; font-optical-sizing:auto; }
.si-btns{ display:grid; gap:11px; margin-top:24px; }
.si-btn{ display:flex; align-items:center; justify-content:center; gap:11px; width:100%; min-height:52px; padding:12px 18px;
  font-size:15px; font-weight:600; border-radius:var(--r); margin:0; }
.si-btn svg{ width:19px; height:19px; flex-shrink:0; }
.btn-apple.si-btn{ margin-top:0; }
.si-email svg{ color:var(--gold); }
.si-btn:disabled{ opacity:.42; cursor:not-allowed; transform:none; box-shadow:none; }
.si-msg{ font-size:14px; line-height:1.5; color:var(--text-2); }
.si-msg:not(:empty){ margin-top:16px; padding:11px 14px; border-radius:var(--r-sm); background:rgba(232,194,122,.06); border:1px solid var(--line); }
.si-msg.is-error:not(:empty){ color:#EBB4B4; background:var(--down-soft); border-color:rgba(217,138,138,.28); }
.si-note{ display:flex; align-items:center; gap:10px; margin-top:20px; padding-top:18px; border-top:1px solid var(--hair); font-size:13.5px; color:var(--text-2); }
.si-note svg{ width:16px; height:16px; color:var(--gold); flex-shrink:0; }

/* desktop: text left, the card right and centred against it (the 1fr rows above and below
   take any difference in height, so the left lines stay together) */
@media (min-width:1001px){
  .lp-grid{ grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); column-gap:64px;
    grid-template-rows:1fr auto auto auto auto 1fr;
    grid-template-areas:".        card" "title    card" "signin   card" "download card" "stores   card" ".        card"; }
  .lp-title{ grid-area:title; }
  .lp-signin{ grid-area:signin; }
  .lp-card{ grid-area:card; align-self:center; justify-self:end; max-width:460px; }
  .lp-download{ grid-area:download; }
  .lp-stores{ grid-area:stores; }
}
/* phones and tablets: one column in reading order; "Sign in" points down at the card */
@media (max-width:1000px){
  .lp-hero{ padding:16px 0 34px; }
  .lp-signin{ margin-top:18px; }
  .lp-signin .lp-arrow{ transform:rotate(90deg); }
  .lp-card{ margin-top:16px; max-width:520px; }
  .lp-download{ margin-top:30px; }
  .lp-stores{ margin-top:14px; }
  .lp-hero .hero-glow{ left:0; right:0; }   /* Safari < 16 has no overflow-x:clip */
  /* a longer label (page translation, Android text scaling) wraps instead of widening the
     column, which overflow-x:clip would then cut off */
  .lp-grid{ grid-template-columns:minmax(0,1fr); }
  .si-btn{ white-space:normal; text-align:center; }
}
@media (max-width:760px){ .signin-card{ padding:24px 20px 20px; } }
/* narrow phones: each store row stays on one line down to 320px */
@media (max-width:420px){
  .lp-line{ font-size:18px; gap:10px; }
  .lp-arrow{ width:20px; height:20px; }
  .lp-stores{ column-gap:10px; }
  .lp-stores .store{ gap:9px; padding:11px 12px; }
  .lp-stores .store svg{ width:22px; height:22px; }
}
@media (max-width:360px){
  .lp-line{ font-size:16.5px; gap:8px; }
  .lp-arrow{ width:18px; height:18px; }
  .lp-stores{ column-gap:8px; }
  .lp-stores .store{ gap:8px; padding:10px; }
  .lp-stores .store svg{ width:20px; height:20px; }
  .lp-stores .store .s1{ letter-spacing:.06em; }
}

/* ─── demo phones ─── */
.lp-demos{ padding:0 0 calc(64px + var(--safe-b)); }
/* the one-line caption under each phone is not shown on this page */
#demoPhones .dp-cap{ display:none; }
/* The stage is the size container the reservation below measures against; .dp-root (a
   container itself) is exactly as wide. The reservation repeats the component's own sizing,
   so the page does not grow when DemoPhones.mount() fills it: row padding 30+6 · phone 56em. */
.demo-stage{ container-type:inline-size; }
.demo-mount{
  --dpf:clamp(8px, calc(100cqi / 87), 11px);   /* .dp-item font-size (desktop row) */
  min-height:calc(36px + 56 * var(--dpf));
}
@media (max-width:899px){
  .demo-stage{ margin:0 -26px; }            /* the swipe row runs edge to edge */
  .demo-mount{ min-height:calc(28px + 560px + 23px); }   /* padding 22+6 · phone 560px · dots 16+7 */
}

/* ─── email dialog ─── */
.ed{ width:calc(100% - 32px); max-width:440px; margin:auto; padding:0; border:0; background:transparent; color:var(--text); overflow:visible; }
.ed::backdrop{ background:rgba(4,4,7,.74); backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px); }
.ed-card{ position:relative; padding:32px 30px 24px; text-align:left;
  background:linear-gradient(180deg,var(--surface-2),var(--surface)); border:1px solid var(--line-2); border-radius:var(--r-xl);
  box-shadow:var(--shadow-glass), 0 60px 120px -50px rgba(0,0,0,.9); }
.ed[open] .ed-card{ animation:edIn .26s cubic-bezier(.2,.7,.3,1); }
@keyframes edIn{ from{ opacity:0; transform:translateY(14px) scale(.985); } }
.ed h2{ font-family:var(--font-display); font-weight:600; font-size:25px; letter-spacing:-.01em; padding-right:48px; }
.ed-sub{ color:var(--text-2); font-size:14.5px; margin-top:8px; }
.ed .m-input[readonly]{ opacity:.6; }
.ed-msg{ font-size:14px; line-height:1.5; color:var(--text-2); }
.ed-msg:not(:empty){ margin-top:16px; padding:11px 14px; border-radius:var(--r-sm); background:rgba(232,194,122,.06); border:1px solid var(--line); }
.ed-msg.is-error:not(:empty){ color:#EBB4B4; background:var(--down-soft); border-color:rgba(217,138,138,.28); }
.ed-go{ margin-top:22px; position:relative; }
.ed-busy{ display:none; align-items:center; gap:10px; }
.ed-go.is-busy .ed-label{ display:none; }
.ed-go.is-busy .ed-busy{ display:inline-flex; }
.ed-spin{ width:16px; height:16px; border-radius:50%; border:2px solid rgba(28,20,4,.25); border-top-color:#1c1404; animation:spin .75s linear infinite; }
.ed-forgot{ display:block; margin:12px auto 0; padding:8px 10px; font-size:13.5px; color:var(--text-2);
  text-decoration:underline; text-decoration-color:var(--line-2); text-underline-offset:4px; transition:color .2s; }
.ed-forgot:hover{ color:var(--gold); }
.ed [aria-disabled="true"]{ opacity:.55; cursor:default; pointer-events:none; }
.ed-go[aria-disabled="true"]{ opacity:.85; }
.ed-close[aria-disabled="true"]{ opacity:.35; }
@media (max-width:480px){ .ed-card{ padding:28px 20px 20px; } .ed h2{ font-size:23px; } }
@media (prefers-reduced-motion:reduce){
  .ed[open] .ed-card{ animation:none; }
  .ed-spin{ animation:spin .75s linear infinite !important; }   /* a busy indicator, not decoration */
}
/* browsers without <dialog>.showModal(): landing.js adds .ed-fallback and the open attribute */
.ed.ed-fallback[open]{ position:fixed; inset:0; z-index:300; display:flex; align-items:center; justify-content:center;
  width:auto; max-width:none; height:auto; padding:16px; background:rgba(4,4,7,.8); overflow-y:auto; }
.ed.ed-fallback .ed-card{ width:100%; max-width:440px; }
