/* creatureX landing — design tokens
   Palette matches the app (app tokens are the source of truth).
   Contrast values are computed, not eyeballed. */

:root {
  color-scheme: light dark;

  /* brand */
  --seal:        #F2742C; /* FILL only. 2.87:1 on white — never body text */
  --seal-ink:    #C25207; /* TEXT orange. 4.66:1 on white */
  --ink:         #22314F; /* headings */
  --ink-strong:  #0E152A; /* display */
  --muted:       #6E7480; /* secondary text. 4.69:1 on white */
  --hairline:    #E8EAED;

  --bg:          #FFFFFF;
  --surface:     #FAFAF9;

  /* spacing — 4px grid */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s6: 24px; --s8: 32px; --s12: 48px; --s16: 64px; --s24: 96px;

  --r-card: 14px;
  --r-ctl: 10px;

  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --seal:       #F2742C; /* 6.58:1 on --bg dark — usable as text here */
    --seal-ink:   #F2742C;
    --ink:        #F2F4F7;
    --ink-strong: #FFFFFF;
    --muted:      #9BA3AF; /* 7.43:1 on --bg dark */
    --hairline:   #232A33;
    --bg:         #0E1116;
    --surface:    #161B22;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}

h1, h2, h3 { text-wrap: balance; margin: 0; }

h1 {
  font-size: clamp(2rem, 7vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--ink-strong);
}

h2 {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 600;
}

.lede {
  font-size: clamp(1rem, 3.4vw, 1.125rem);
  color: var(--muted);
  margin: var(--s4) 0 0;
  max-width: 34ch;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s6);
}

/* ---------- App Store badge ----------
   Apple's official black badge SVG, unmodified (developer.apple.com).
   The mark may not be redrawn, recoloured, or distorted. Height 54px
   (Apple's minimum is 40px). Clear space = 10% of height ≈ 6px, held by
   the padding below. Dark mode keeps the SAME black badge on a light
   plate: black-on-dark is what the guidelines forbid, and the white
   variant only ships in Marketing Resources (login required). */
.badge {
  display: inline-flex;
  padding: 6px;
  border-radius: 16px;
  text-decoration: none;
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
  touch-action: manipulation;
}
@media (prefers-color-scheme: dark) {
  .badge { background: #FFFFFF; }
}
.badge:hover { transform: translateY(-1px); }
.badge:active { transform: scale(0.97); }
.badge:focus-visible { outline: 3px solid var(--seal-ink); outline-offset: 3px; }
.badge img { display: block; height: 54px; width: auto; }

@media (prefers-reduced-motion: reduce) {
  .badge { transition: none; }
  .badge:hover, .badge:active { transform: none; }
}

/* ---------- phone frame (real 19.5:9 aspect, capture drops in) ---------- */
.phone {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 8px 24px -12px rgba(0,0,0,.18);
  overflow: hidden;
  display: grid;
  place-items: center;
}
@media (prefers-color-scheme: dark) {
  .phone { box-shadow: 0 0 0 1px rgba(255,255,255,.09); }
}
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone .ph {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: var(--s4);
  letter-spacing: .01em;
}
.cap {
  margin: var(--s3) 0 0;
  font-size: 14px;
  color: var(--muted);
}

.foot {
  border-top: 1px solid var(--hairline);
  margin-top: var(--s24);
  padding: var(--s8) 0 var(--s12);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: var(--s6);
  flex-wrap: wrap;
}
.foot a { color: inherit; }
.foot a:focus-visible { outline: 2px solid var(--seal-ink); outline-offset: 2px; }

.card img { display: block; width: 100%; height: auto; }
