/* TenderDeck waitlist. Colours and fonts are the app's tokens (src/app/globals.css). Sizes are in rem so they grow with
   the visitor's text-size setting; the landing page fits one screen at normal settings and scrolls naturally (nothing is
   ever cut off) when larger text needs more room. */
:root {
  --ground: #f7f4ee; --surface: #fffdf9; --raised: #f3efe7; --tint: #f4ecdc;
  --line: #e7e1d5; --line-strong: #d8d0c1;
  --ink: #13293d; --muted: #4c5b69; --faint: #5d6b78;
  --teal: #155e55; --teal-2: #0f4a43; --teal-soft: #dcefe9;
  --copper: #c5a15a; --copper-light: #e3c98f; --accent: #7a5f26;
  --sage: #9fd3c3; --danger: #8e2c1c; --danger-bg: #f8e0da;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(19, 41, 61, .05), 0 12px 32px -12px rgba(19, 41, 61, .18);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 1rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-2); }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }

/* brand (the approved mark + wordmark, as in the app) */
.brand { display: inline-flex; align-items: center; gap: .38em; font: 600 1.6rem/1 var(--serif); text-decoration: none; }
.brand .mark { height: 1.08em; width: auto; flex: none; }
.wordmark { display: inline-flex; align-items: baseline; }
.w-ink { color: var(--ink); } .w-teal { color: var(--teal); }

/* ---------- single-screen landing page ---------- */
.screen {
  min-height: 100vh; min-height: 100dvh;           /* at least one screen; grows (and scrolls) if content needs more */
  display: flex; flex-direction: column;
  width: min(1080px, 100% - 32px); margin-inline: auto;
  padding: clamp(16px, 3.5vh, 36px) 0 clamp(12px, 2.5vh, 24px);
  position: relative;
}
body.landing { background:
  radial-gradient(640px 640px at 100% 0%, rgba(159, 211, 195, .32), transparent 70%),
  radial-gradient(560px 560px at 0% 100%, rgba(227, 201, 143, .22), transparent 70%),
  var(--ground); background-attachment: fixed; }
.landing-header { flex: none; }
.landing-main {
  flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
  gap: clamp(32px, 6vw, 80px); align-items: center; padding: clamp(16px, 4vh, 40px) 0;
}
.intro h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.lead { margin-top: clamp(12px, 2.2vh, 20px); max-width: 32em; color: var(--muted); font-size: clamp(1rem, .95rem + .3vw, 1.15rem); }
.landing-footer { flex: none; color: var(--faint); font-size: .85rem; }

/* form */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3.2vh, 28px); box-shadow: var(--shadow); animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.field { margin-bottom: clamp(10px, 1.8vh, 14px); }
label { display: block; margin-bottom: 5px; font-weight: 600; font-size: .9rem; }
input[type="text"], input[type="email"] { width: 100%; min-height: 2.875rem; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font: 1rem/1.4 var(--sans); transition: border-color .15s, box-shadow .15s; }
input[type="text"]:focus, input[type="email"]:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(21, 94, 85, .18); }
input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; margin-top: 4px; }
.field-error:empty { display: none; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; margin-top: 4px; }
.consent input { width: 1.375rem; height: 1.375rem; margin: 1px 0 0; accent-color: var(--teal); }
.consent label { margin: 0; font-weight: 400; font-size: .85rem; color: var(--muted); line-height: 1.45; }
.consent .field-error { grid-column: 2; }
.turnstile:empty { display: none; }
.turnstile { margin-top: 12px; min-height: 0; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form-status { margin-top: 12px; font-size: .92rem; }
.form-status:empty { display: none; }
.form-status.is-error { padding: 10px 14px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); }
.form-title { font-size: 1.45rem; }
.success { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.success:focus { outline: none; }
.success p { margin-top: 10px; color: var(--muted); }
.success-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 50%; background: var(--teal-soft); }
.success-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--teal); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .6s .2s ease-out forwards; }
.muted-small { font-size: .88rem; color: var(--faint) !important; }

/* buttons */
.btn { --bg: var(--teal); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 3rem; padding: 12px 22px; border: 0; border-radius: 10px; background: var(--bg); color: #fff; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 6px 16px -8px rgba(21, 94, 85, .6); }
.btn:hover { --bg: var(--teal-2); color: #fff; transform: translateY(-1px); }
.btn-block { width: 100%; margin-top: clamp(12px, 2vh, 18px); }
.btn[disabled] { cursor: progress; opacity: .85; transform: none; }
.spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.is-busy .spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* tablets and phones: one column */
@media (max-width: 860px) {
  .landing-main { grid-template-columns: 1fr; align-content: center; gap: clamp(18px, 3vh, 28px); }
  .form-card { max-width: 32rem; width: 100%; }
}
@media (max-width: 520px) {
  .brand { font-size: 1.4rem; }
  .intro h1 { font-size: clamp(1.6rem, 1rem + 2.8vw, 1.9rem); }   /* about 10% smaller than before on phones */
  .form-card { padding: 18px 16px; }
}
/* short screens (small phones, landscape laptops): tighten spacing, never the text size */
@media (max-height: 760px) {
  .landing-main { padding: 10px 0; gap: 14px 40px; }
  .lead { margin-top: 10px; }
  .field { margin-bottom: 9px; }
  .screen { padding-top: 12px; padding-bottom: 10px; }
  .form-card { padding-top: 16px; padding-bottom: 16px; }
  .btn-block { margin-top: 12px; }
}

/* ---------- simple pages (privacy, unsubscribe, 404) ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--ground); }
.header-row { display: flex; align-items: center; height: 64px; }
.page { padding: 48px 0 40px; }
.page h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); }
.page .updated { margin-top: 10px; color: var(--faint); font-size: .9rem; }
.prose { margin-top: 28px; }
.prose h2 { margin: 36px 0 10px; font-size: 1.4rem; }
.prose p, .prose li { color: var(--muted); }
.prose p + p { margin-top: 12px; }
.prose address { font-style: normal; color: var(--muted); margin: 8px 0 0 0; padding-left: 14px; border-left: 3px solid var(--line, #e3ddd2); line-height: 1.6; }
.prose ul { padding-left: 22px; margin: 10px 0 0; }
.prose li + li { margin-top: 6px; }
.prose table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--raised); color: var(--ink); }
.table-scroll { overflow-x: auto; }
.panel { margin-top: 28px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel p { color: var(--muted); }
.panel .btn { margin-top: 20px; }
.site-footer { margin-top: 40px; padding: 28px 0 36px; border-top: 1px solid var(--line); color: var(--faint); font-size: .9rem; }
.footer-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-row p { flex: 1 1 280px; }
.brand-small { font-size: 1.3rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .success-icon svg { stroke-dashoffset: 0; }
}
