/* Layout after Prince's "How To Brainwash Yourself" opt-in page; colours and
   fonts from the quiz's design v3 ("paper") tokens, 00-Quiz-funnel-builder
   funnels/prince-222-en/themes.ts on client/prince. */

@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #F7F5F0;
  --color-surface: #FFFFFF;
  --color-fg: #161413;
  --color-fg-muted: #6B655F;
  --color-fg-subtle: #8F8880;
  --color-border: #DDD6CB;
  --color-charcoal: #3A3634;
  --color-charcoal-hover: #2A2725;
  --color-gold: #F6BE22;
  --color-ring: #2F2B28;
  --color-error: #B3261E;
  --font-heading: 'Figtree', Arial, sans-serif;
  --font-body: 'Inter', Arial, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 16px 48px;
}

.hero { text-align: center; }
h1, h2 { margin: 0; font-family: var(--font-heading); }
h1 {
  font-size: clamp(26px, 6.4vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.subline {
  margin: 8px 0 0;
  font-family: var(--font-heading);
  font-size: clamp(18px, 4.4vw, 28px);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

/* Phone: headline, cover, form. Wide: form left, cover right. */
.split {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 28px;
  margin-top: 28px;
}

.optin { width: 100%; max-width: 448px; }

.label {
  margin-bottom: 26px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.input {
  display: block;
  width: 100%;
  height: 40px;
  margin-bottom: 16px;
  padding: 0 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-fg);
  font: 16px/1 var(--font-body); /* 16px stops iOS zooming on focus */
}
.input::placeholder { color: var(--color-fg-muted); }
.input:focus { outline: none; border-color: var(--color-ring); box-shadow: 0 0 0 3px rgba(47, 43, 40, 0.12); }

.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 10px; top: 12px; color: var(--color-fg-muted); pointer-events: none; }
.input-icon .input { padding-left: 33px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin-top: 30px;
  padding: 10px 16px;
  border: 0;
  border-radius: 4px;
  background: var(--color-charcoal);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.btn:hover { background: var(--color-charcoal-hover); }
.btn:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 2px; }
.btn:disabled { opacity: 0.6; cursor: progress; }

.consent {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.3;
  color: #3F4652;
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 14px;
  height: 14px;
  margin: 2px 0 0;
  accent-color: var(--color-charcoal);
}

.error { margin: 14px 0 0; color: var(--color-error); font-size: 14px; text-align: center; }
.consent-error { margin: 8px 0 0 32px; font-size: 13px; text-align: left; }
.consent.invalid { color: var(--color-error); }
.consent.invalid input { outline: 2px solid var(--color-error); outline-offset: 2px; }

.legal {
  margin: 42px 0 0;
  text-align: center;
  font-size: 13px;
}
.legal a, .legal a:visited { color: var(--color-fg); text-underline-offset: 2px; }
.legal span { margin: 0 3px; color: var(--color-gold); }

.thanks { text-align: center; }
.thanks:focus { outline: none; }
.thanks h2 { font-size: 26px; font-weight: 700; line-height: 1.2; text-wrap: balance; }
.thanks p { margin: 14px 0 0; color: var(--color-fg-muted); }
.thanks strong { color: var(--color-fg); }
.thanks .btn { margin-top: 22px; }

/* Cover: generated art (design/cover-options, option 05), shown as a book. */
.cover {
  width: 100%;
  max-width: 220px;
  margin: 0;
}
.cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px 8px 8px 4px;
  box-shadow: 0 2px 4px rgba(22, 20, 19, 0.18), 0 22px 44px rgba(22, 20, 19, 0.22);
}

.footer {
  min-height: 144px;
  padding: 24px 16px;
  background: var(--color-charcoal);
  color: #A9A39B;
  font-size: 12px;
  text-align: center;
}
.footer p { margin: 0; }

[hidden] { display: none !important; }

@media (min-width: 820px) {
  .page { padding-top: 56px; }
  .split {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 58px;
    margin-top: 52px;
  }
  .cover { max-width: 330px; }
}
