/* Shared shell for the token pages (reset, confirm-email).
 *
 * Lifted verbatim from the Claude Design early-access export so these pages
 * sit in the same world as the landing page: same ivory ground, same tinted
 * radial washes, same glass card, same Fraunces/Inter pairing.
 *
 * NOTE ON PALETTE: these are the CLAY values, matching the export. That is a
 * deliberate, temporary decision by Rinkesh — the site stays on this design
 * until it moves to Wine. web/landing/ is exempted from tool/design_lint.py
 * for exactly this reason. The app itself is Wine and unaffected.
 */

@import url("fonts.css");

:root {
  --ivory: #F7F3ED;
  --surface: #FCFAF6;
  --ink: #2B2320;
  --stone: #6B6259;
  --muted: #A89C92;
  --clay: #C46A4E;
  --clay-press: #A85A42;
  --danger: #A6453A;
  --ok: #5C7A5E;
  /* Wine, for the confirmed-email success state (the brand tile's colour). */
  --wine: #6B2A38;
  --wine-press: #57212D;
  --blush: #F9EEEB;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 620px at 78% 8%, rgba(235,201,188,0.75), rgba(235,201,188,0) 70%),
    radial-gradient(760px 560px at 6% 82%, rgba(196,106,78,0.16), rgba(196,106,78,0) 72%),
    radial-gradient(700px 500px at 96% 92%, rgba(122,92,110,0.12), rgba(122,92,110,0) 70%),
    var(--ivory);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 0;
}

.glass {
  background: rgba(252,250,246,0.55);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 1px 1px rgba(255,255,255,0.8) inset, 0 8px 28px rgba(43,35,32,0.07);
}

header {
  width: 100%;
  max-width: 1120px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mark {
  /* the brand tile: ivory drape on wine, as on the marketing site */
  display: block; width: 28px; height: 28px; border-radius: 9px;
  background: #6B2A38;
}

.wordmark {
  font: 500 19px/1 Fraunces, Georgia, serif;
  color: var(--ink);
  letter-spacing: 0.01em;
}

main {
  width: 100%;
  max-width: 460px;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 64px 0 96px;
}

.card {
  width: 100%;
  border-radius: 18px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: draprIn 420ms cubic-bezier(0.2,0,0,1) both;
}

h1 {
  margin: 0;
  font: 500 clamp(26px, 5vw, 32px)/1.15 Fraunces, Georgia, serif;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; font: 400 15px/22px Inter, sans-serif; color: var(--stone); text-wrap: pretty; }

label {
  font: 600 11px/16px Inter, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="password"] {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 12px;
  background: rgba(252,250,246,0.6);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 1px 1px rgba(255,255,255,0.8) inset, 0 2px 10px rgba(43,35,32,0.04);
  font: 400 15px/22px Inter, sans-serif;
  color: var(--ink);
}

input::placeholder { color: var(--muted); }

input:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(196,106,78,0.14);
}

button {
  height: 52px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(165deg, #D3805F, #C46A4E 52%, #B05C42);
  color: var(--surface);
  font: 600 12px/16px Inter, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.32) inset, 0 8px 22px rgba(196,106,78,0.3);
  transition: filter 200ms cubic-bezier(0.2,0,0,1), transform 120ms cubic-bezier(0.2,0,0,1);
}

button:hover:not(:disabled) { filter: brightness(0.94); }
button:active:not(:disabled) { transform: scale(0.98); }
button:disabled { opacity: 0.55; cursor: default; }

.field { display: flex; flex-direction: column; gap: 8px; }
.hint { font: 400 13px/18px Inter, sans-serif; color: var(--stone); }

.msg { font: 400 14px/20px Inter, sans-serif; border-radius: 12px; padding: 12px 14px; }
.msg.error { color: var(--danger); background: rgba(166,69,58,0.08); }
.msg.ok { color: var(--ok); background: rgba(92,122,94,0.09); }

/* Keeps a status change audible to a screen reader without moving focus. */
[hidden] { display: none !important; }

footer {
  width: 100%;
  max-width: 1120px;
  border-top: 1px solid rgba(43,35,32,0.1);
  padding: 22px 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font: 400 13px/18px Inter, sans-serif;
  color: var(--stone);
}

a { color: var(--clay); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--clay-press); }

@keyframes draprIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 400px) {
  body { padding: 20px 16px 0; }
  .card { padding: 22px 18px; }
}

/* Spacing helpers, so the token pages need no inline style attributes
   (style-src 'self' refuses those). */
.gap-8 { margin-top: 8px; }
.gap-14 { margin-top: 14px; }

/* ---- Confirmed-email success state (verify-email, confirm-email) ----
   Two columns on a wide screen: the confirmation on the left, a card about
   the phone on the right. One column on a phone, check first, card below.
   token-page.js adds .is-done to <body> when the confirm call succeeds.
   The :has() forms cover a browser still holding the previous token-page.js
   in its cache for the first hour after a deploy. */
.is-done main, main:has(> #done.confirmed:not([hidden])) { max-width: 1040px; }
main:has(> #done.confirmed:not([hidden])) > #start { display: none; }

.confirmed {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
  animation: draprIn 420ms cubic-bezier(0.2,0,0,1) both;
}

.confirmed-main { display: flex; flex-direction: column; align-items: flex-start; }

.check-ring { display: block; width: 64px; height: 64px; color: var(--wine); }

.eyebrow {
  margin: 0;
  font: 600 11px/16px Inter, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wine);
}

.confirmed-main .eyebrow { margin-top: 28px; }

.confirmed h1 {
  margin-top: 14px;
  font: 500 clamp(38px, 6vw, 60px)/1.04 Fraunces, Georgia, serif;
  letter-spacing: -0.02em;
  max-width: 11ch;
}

.confirmed h1:focus { outline: none; }

.confirmed .lede {
  margin-top: 20px;
  max-width: 44ch;
  font: 400 17px/26px Inter, sans-serif;
}

.confirmed .lede + .lede { margin-top: 12px; }
.confirmed strong { color: var(--ink); font-weight: 600; }

.confirmed-rule {
  width: 100%;
  max-width: 440px;
  height: 1px;
  margin: 36px 0 22px;
  border: 0;
  background: rgba(43,35,32,0.12);
}

.no-app { font: 400 14px/20px Inter, sans-serif; color: var(--stone); }

.stores { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }

/* A store the app is in is a link (App Store, 2026-10-15); one it isn't in
   yet stays plain text. Both look the same. */
.store {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(43,35,32,0.16);
  border-radius: 999px;
  background: rgba(252,250,246,0.6);
  font: 500 13px/18px Inter, sans-serif;
  color: var(--ink);
  white-space: nowrap;
}
a.store { text-decoration: none; }

.phone-card {
  background: var(--surface);
  border: 1px solid rgba(43,35,32,0.06);
  border-radius: 24px;
  padding: 32px 30px 34px;
  box-shadow: 0 1px 1px rgba(255,255,255,0.8) inset, 0 18px 48px rgba(43,35,32,0.09);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.phone-card h2 {
  margin: 10px 0 0;
  font: 500 26px/1.2 Fraunces, Georgia, serif;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* A drawn phone with the brand tile on its screen, where the design had a
   QR code. There is no link that opens the app yet, so nothing to encode. */
.phone {
  margin: 26px 0 24px;
  width: 112px;
  height: 196px;
  border: 1.5px solid rgba(107,42,56,0.35);
  border-radius: 22px;
  padding: 7px;
  background: var(--surface);
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: var(--blush);
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-screen img { width: 40px; height: 40px; border-radius: 12px; background: var(--wine); }

.phone-card p:not(.eyebrow) { max-width: 30ch; font: 400 15px/22px Inter, sans-serif; }

@media (max-width: 820px) {
  .is-done main, main:has(> #done.confirmed:not([hidden])) { max-width: 520px; padding-top: 40px; }
  .confirmed { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .check-ring { width: 56px; height: 56px; }
  .confirmed .lede { font-size: 16px; line-height: 24px; }
  .confirmed-rule { margin: 30px 0 20px; }
}

/* "On your computer? Continue on your phone" makes no sense on the phone
   itself, so phones (a touch screen at phone width) don't get the card. */
@media (max-width: 820px) and (pointer: coarse) {
  .phone-card { display: none; }
}

@media (max-width: 400px) {
  .phone-card { padding: 26px 20px 28px; }
  .store { padding: 0 14px; }
}

/* Long-form legal pages (privacy, terms, delete-account, support): a
   reading column, section headings, lists and simple tables. */
.legal main { max-width: 720px; align-items: flex-start; }
.legal .card { gap: 14px; }
.legal h2 {
  margin: 14px 0 0;
  font: 500 21px/1.25 Fraunces, Georgia, serif;
  color: var(--ink);
  text-wrap: balance;
}
.legal h3 { margin: 6px 0 0; font: 600 15px/22px Inter, sans-serif; color: var(--ink); }
.legal ul, .legal ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal li { font: 400 15px/22px Inter, sans-serif; color: var(--stone); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal .updated { font: 400 13px/18px Inter, sans-serif; color: var(--muted); }
.legal .table-wrap { overflow-x: auto; }
.legal table { width: 100%; border-collapse: collapse; font: 400 14px/20px Inter, sans-serif; color: var(--stone); min-width: 520px; }
.legal table.wide { min-width: 720px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 9px 10px; border-top: 1px solid rgba(43,35,32,0.1); }
.legal th { font: 600 12px/16px Inter, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-top: 0; }
.legal .toc { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 400 14px/20px Inter, sans-serif; }

/* spacing helpers for the token pages (the CSP blocks style="" attributes) */
.mt-8 { margin-top: 8px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }
