/* Share-link landing pages (/vg/*, /us/*): one layout, per-app colours.
   Phone: app-colour band with the icon, then a fixed white sheet with the
   actions. Wide screens: band on the left, content on the right. */

[hidden] { display: none !important; }

* { box-sizing: border-box; }

:root {
  --font-display: 'Bricolage Grotesque', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --surface: #ffffff;
  --radius-sheet: 28px;
  --focus: #2f6fed;
}

body[data-app="vg"] {
  --band: #2b604e;
  --band-ink: #efeee9;
  --ink: #191814;
  --muted: #57544c;
  --line: #dad8d0;
  --open-bg: #191814;
  --open-ink: #ffffff;
}

body[data-app="us"] {
  --band: #37e07b;
  --band-ink: #06130b;
  --ink: #0f1a14;
  --muted: #4a5550;
  --line: #d9ddd5;
  --open-bg: #0f1a14;
  --open-ink: #ffffff;
}

body[data-app="wb"] {
  --band: #e7570e;
  --band-ink: #ffffff;
  --ink: #1e293b;
  --muted: #516074;
  --line: #d8dee6;
  --open-bg: #1e293b;
  --open-ink: #ffffff;
}

@media (prefers-color-scheme: dark) {
  body[data-app] {
    --surface: #16181b;
    --ink: #f2f2ef;
    --muted: #a9ada6;
    --line: #2c3035;
    --open-bg: #f2f2ef;
    --open-ink: #16181b;
    --focus: #8ab4ff;
  }
}

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--band);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

.lp {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* Band: shrinks on short screens so the Open button stays visible on an
   iPhone SE with Safari's toolbars and the Smart App Banner showing */
.lp-band {
  flex-shrink: 0;
  height: clamp(150px, 34vh, 320px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: env(safe-area-inset-top, 0px);
}

@supports (height: 1svh) {
  .lp-band { height: clamp(150px, 34svh, 320px); }
}

.lp-icon {
  width: clamp(84px, 16svh, 128px);
  height: clamp(84px, 16svh, 128px);
  border-radius: 23%;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

.lp-band-name { display: none; }

/* Sheet: fixed, no drag handle, so nobody tries to swipe it away */
.lp-sheet {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px max(24px, env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-bottom, 0px));
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background: var(--surface);
}

.lp-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.lp-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.lp-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 8.4vw, 34px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lp-tagline {
  margin: 4px 0 0;
  max-width: 300px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--muted);
}

.lp-note {
  margin: 0;
  text-align: center;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}

.lp-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lp-open {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 20px;
  border-radius: 14px;
  background: var(--open-bg);
  color: var(--open-ink);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.lp-open:active { opacity: 0.85; }

/* After an Open tap that didn't reach the app, the store button leads */
.lp-open.is-demoted {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.lp-store {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.lp-store-label {
  font-size: 15px;
  color: var(--muted);
}

/* Apple's badge: official artwork, unmodified (no restyling even when it
   takes the lead after a failed Open tap), at least 40px tall */
.lp-badge {
  display: inline-flex;
  line-height: 0;
  border-radius: 8px;
}

.lp-badge img { height: 48px; width: auto; }

/* iPhone: the badge is the main action (people with the app usually never
   reach this page), so it gets a little more presence */
.lp-store.is-primary .lp-badge img { height: 56px; }

/* Secondary "Already have it? Open it" line */
.lp-alt {
  margin: 0;
  text-align: center;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}

.lp-alt a {
  display: inline-block;
  padding: 12px 4px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lp-store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.lp-store-btn.is-prominent {
  min-height: 54px;
  padding: 0 28px;
  background: var(--open-bg);
  color: var(--open-ink);
  box-shadow: none;
  font-size: 17px;
  font-weight: 700;
}

/* QR card: desktop only (shown by script) */
.lp-qr {
  display: flex;
  align-items: center;
  gap: 24px;
}

.lp-qr-code {
  flex-shrink: 0;
  width: 168px;
  height: 168px;
  padding: 10px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--line);
}

.lp-qr-code svg { display: block; width: 100%; height: 100%; }

.lp-qr-text { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); }

.lp-qr-text strong { display: block; margin-bottom: 4px; font-size: 18px; color: var(--ink); }

.lp-spacer { flex-grow: 1; }

.lp-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.lp-footer a { color: var(--muted); text-decoration: none; }
.lp-footer a:hover { text-decoration: underline; }

.lp a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Wide screens: band on the left, content on the right */
@media (min-width: 900px) {
  .lp { flex-direction: row; }

  .lp-band {
    width: 44%;
    max-width: 560px;
    height: auto;
    min-height: 100vh;
    flex-direction: column;
    gap: 28px;
    padding-top: 0;
  }

  .lp-icon {
    width: 200px;
    height: 200px;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.28);
  }

  .lp-band-name {
    display: block;
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--band-ink);
  }

  .lp-sheet {
    justify-content: center;
    gap: 32px;
    padding: 64px 96px 40px;
    border-radius: 0;
  }

  .lp-intro { align-items: flex-start; text-align: left; }

  .lp-title { font-size: 48px; }

  .lp-tagline { max-width: 480px; font-size: 19px; }

  .lp-note { text-align: left; }

  .lp-actions { align-items: flex-start; max-width: 420px; }

  .lp-open { width: 100%; }

  .lp-store { justify-content: flex-start; }

  .lp-alt { text-align: left; }

  .lp-spacer { flex-grow: 0; }

  .lp-footer { justify-content: flex-start; }
}
