/* LetsPlay marketing site — shared stylesheet
   Design tokens mirror the React Native app (lib/constants/colors.ts, light theme).
   No webfonts, no JS. */

:root {
  /* Color */
  --teal: #0D5C63;
  --teal-dark: #0B2227;
  --teal-tint: rgba(13, 92, 99, 0.04);
  --teal-wash: #ebf3f4; /* opaque, one step up from --bg; matches the auth emails */
  --mint: #00D4AA;
  --mint-soft: rgba(0, 212, 170, 0.12);
  --bg: #F5F9FA;
  --card: #FFFFFF;
  --border: #D4E4E7;
  --text: #1C2E33;
  --text-muted: #5C7B82;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: rgba(255, 255, 255, 0.78);

  /* Shape */
  --r-button: 12px;
  --r-card: 16px;
  --r-chip: 20px;

  /* Layout */
  --max-w: 1100px;
  --gutter: 24px;

  /* Type */
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Reset / base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-stack);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 44px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}

h3 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
}

p {
  margin: 0 0 14px;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 72px 0;
}

.section-tight {
  padding: 56px 0;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--teal);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  padding: 2px 0;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  margin: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 90px;
}

.nav__brand img {
  width: 133px;
  height: 133px;
  object-fit: contain;
  display: block;
  margin: 0;
}

.nav__link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-on-dark);
}

.nav__link:hover {
  color: var(--mint);
  text-decoration: none;
}

/* Hero */
.hero {
  background: var(--teal);
  color: var(--text-on-dark);
  padding: 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  /* Subtle radial highlight to give the dark band depth — no external assets. */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at bottom,
    rgba(0, 212, 170, 0.12),
    transparent 60%
  );
  pointer-events: none;
}

.hero > .container {
  position: relative;
}

.eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.eyebrow-line {
  width: 20px;
  height: 1.5px;
  background: var(--mint);
  opacity: 0.7;
  border-radius: 1px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3.5px;
  color: var(--mint);
  text-transform: uppercase;
}

.hero .eyebrow {
  font-size: 14px;
}

.hero h1 {
  color: var(--text-on-dark);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 auto 18px;
  max-width: 14ch;
}

.hero__sub {
  color: var(--text-on-dark-muted);
  font-size: 19px;
  line-height: 1.55;
  max-width: 600px;
  margin: 0 auto 36px;
}

/* Store badges */
.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* Official Apple / Google artwork, shown unmodified. Both are rendered at the
   same height: Apple's minimum on-screen height is 40px, and Google requires
   its badge to be at least as large as any other store badge beside it. */
.store-badge {
  display: block;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.store-badge img {
  display: block;
  height: 52px;
  width: auto;
}

.cta-strip .store-row {
  margin-top: 24px;
}

/* Section heading block */
.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-head .eyebrow {
  display: inline-block;
  margin-bottom: 10px;
}

.section-head p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* Cards / steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--mint);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--text-on-dark);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  box-shadow: 0 0 0 4px var(--mint-soft);
}

.card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.card__head h3 {
  margin: 0;
}

.card__icon {
  width: 28px;
  height: 28px;
  color: var(--mint);
  flex-shrink: 0;
}

.card h3 {
  margin: 0;
  font-size: 18px;
}

.card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Final CTA strip */
.cta-strip {
  background: var(--teal);
  color: var(--text-on-dark);
  text-align: center;
  padding: 64px 0;
}

.cta-strip h2 {
  color: var(--text-on-dark);
  margin-bottom: 12px;
  font-size: 32px;
}

/* Footer */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
}

.footer__inner a {
  color: var(--text-muted);
  font-weight: 600;
}

.footer__inner a:hover {
  color: var(--teal);
  text-decoration: none;
}

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

/* ============ Contact page ============ */
.contact-email-row {
  text-align: center;
}

.contact-email {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  color: var(--teal);
}

/* ============ Payouts-complete page ============ */
/* Shown in a small in-app browser sheet after Stripe Connect onboarding
   returns/refreshes. Status-neutral: it never claims success. */
.payouts {
  min-height: calc(100vh - 137px); /* viewport minus nav + footer */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px var(--gutter);
}

.payouts__card {
  max-width: 460px;
}

.payouts__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  color: var(--teal);
}

.payouts h1 {
  font-size: 34px;
  margin-bottom: 14px;
}

.payouts p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 480px) {
  .payouts h1 {
    font-size: 28px;
  }
  .payouts p {
    font-size: 17px;
  }
}

/* ============ Auth hand-off pages ============ */
/* Fallback landing pages behind the /auth/* Universal Links. Only seen when iOS
   could not hand the link to the app — desktop, an in-app browser that swallows
   Universal Links, Chrome on iOS (which has been seen not handing them to the app),
   or a device without LetsPlay installed. */
.applink {
  min-height: calc(100vh - 137px); /* viewport minus nav + footer */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px var(--gutter);
}

.applink__card {
  max-width: 460px;
}

/* The /auth/* pages ship all three hand-off blocks and let the inline script reveal whichever
   applies. Browsers hide [hidden] on their own, but any class setting `display` would silently
   beat that UA rule — so pin it here rather than depend on none ever being added. */
.applink [hidden] {
  display: none !important;
}

.applink__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  color: var(--teal);
}

.applink h1 {
  font-size: 34px;
  margin-bottom: 14px;
}

.applink p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.applink__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin-top: 18px;
  padding: 0 28px;
  border-radius: var(--r-button);
  background: var(--teal);
  color: var(--text-on-dark);
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.applink__btn:hover {
  text-decoration: none;
  color: var(--text-on-dark);
  transform: translateY(-1px);
  opacity: 0.92;
}

.applink__note {
  margin: 20px 0 0;
  font-size: 15px;
}

@media (max-width: 480px) {
  .applink h1 {
    font-size: 28px;
  }
  .applink p {
    font-size: 17px;
  }
  .applink__btn {
    display: flex;
    width: 100%;
    padding: 0 18px;
  }
}

/* ============ 404 page ============ */
/* 404.html does double duty: GitHub Pages serves it for genuine typos *and* for
   every /event/<uuid> share link, since no file exists at those paths. A script
   in the <head> stamps .is-event on <html> so the right half shows with no
   flash of the wrong copy. With JS off, the plain not-found copy wins. */
.nf-event {
  display: none;
}

.is-event .nf-event {
  display: block;
}

.is-event .nf-generic {
  display: none;
}

/* Official App Store / Google Play badges (styled by .store-badge). */
.applink__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

/* "Already have the app?" line. Needs .applink__badges in the selector to
   beat the generic `.applink p` margin and size. */
.applink__badges + .applink__note {
  margin-top: 22px;
  font-size: 15px;
}

/* Shrink slightly on phones so both badges fit side by side down to a 360px
   screen. Still above Apple's 40px minimum; if a screen is narrower they wrap,
   centred. */
@media (max-width: 480px) {
  .applink__badges {
    gap: 10px;
  }
  .applink__badges .store-badge img {
    height: 44px;
  }
}

/* ============ Privacy page ============ */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px var(--gutter) 96px;
}

.legal__head {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal__head h1 {
  font-size: 40px;
  margin-bottom: 8px;
}

.legal__meta {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.legal h2 {
  font-size: 22px;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--teal);
}

.legal h3 {
  font-size: 16px;
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal p,
.legal li {
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

.legal ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal__data {
  margin: 14px 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--card);
}

.legal__data dl {
  margin: 0;
}

.legal__data div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.legal__data div:last-child {
  border-bottom: none;
}

.legal__data dt {
  font-weight: 600;
  color: var(--text);
}

.legal__data dd {
  margin: 0;
  color: var(--text-muted);
}

.legal__data .legal__group {
  background: var(--teal-tint);
  font-weight: 700;
  color: var(--teal);
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

/* ============ Delete-account page ============ */
/* Blocks the privacy page doesn't use: a callout, a white panel, and the two
   data tables. Namespaced under .legal__ so the panel can't pick up the
   marketing .card, which is a hover-lifting tile and wrong for body copy. */
.legal__note {
  background: var(--teal-wash);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--r-button) var(--r-button) 0;
  padding: 14px 18px;
  margin: 20px 0;
}

.legal__note p:last-child {
  margin-bottom: 0;
}

.legal__panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 22px 26px;
  margin: 28px 0;
}

.legal__panel h2 {
  margin-top: 0;
}

.legal__panel p:last-child {
  margin-bottom: 0;
}

/* The tables are wider than a phone. They scroll inside this box so the page
   body never scrolls sideways. */
.legal__table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 18px 0;
}

.legal table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  background: var(--card);
  font-size: 16px;
  line-height: 1.6;
}

.legal th,
.legal td {
  border: 1px solid var(--border);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}

.legal thead th {
  background: var(--teal-wash);
}

.legal tbody th {
  width: 34%;
  font-weight: 600;
}

.legal ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

/* Nested bullets (the worked refund example) need room from their parent. */
.legal li > ul {
  margin: 6px 0 0;
}

/* Contact blocks (privacy s10, terms s16). <address> defaults to italic. */
.legal address {
  font-style: normal;
  margin: 0 0 14px;
}

/* Region identifiers in the provider table, e.g. us-east-2. */
.legal code {
  background: var(--teal-wash);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.9em;
}

/* The provider table carries three columns, so the row header needs less
   width than the two-column tables on the deletion page. */
.legal .legal__table--3col {
  min-width: 620px;
}

.legal .legal__table--3col tbody th {
  width: 20%;
}

.legal__seealso {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 15px;
}

/* ============ Responsive ============ */
@media (max-width: 720px) {
  .nav__brand img {
    width: 80px;
    height: 80px;
  }
  .nav__inner {
    padding-left: 18px;
    padding-right: 18px;
  }
  .nav__links {
    gap: 22px;
  }
  .section {
    padding: 56px 0;
  }
  .hero {
    padding: 64px 0 72px;
  }
  .hero h1 {
    font-size: 36px;
  }
  .hero__sub {
    font-size: 17px;
  }
  h1 {
    font-size: 32px;
  }
  h2 {
    font-size: 24px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
  .cta-strip h2 {
    font-size: 26px;
  }
  .legal__data div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .legal {
    padding: 40px var(--gutter) 64px;
  }
  .legal__head h1 {
    font-size: 32px;
  }
  .legal__panel {
    padding: 20px 18px;
  }
  .legal table {
    min-width: 380px;
  }
  .legal tbody th {
    width: auto;
  }
  .legal th,
  .legal td {
    padding: 10px 12px;
  }
}
