/* Wishat — the warm editorial time-capsule system (WISHAT_BUILD_SPEC.md §7).
   Plain CSS, no build step. Tokens first; every colour below comes from them. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/newsreader-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --paper: #f7f1e8;
  --paper-white: #fffdfc;
  --ink: #242129;
  --plum: #5a435a;
  --plum-dark: #433143;
  --rose: #d8a08e;
  --sand: #e9ddd0;
  --muted: #716a72;
  --error: #9b3f39;
  --line: #b8ada6;
  --font-sans: "Inter Variable", Inter, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-serif: "Newsreader Variable", Newsreader, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 18px; line-height: 1.55; }
a { color: inherit; text-underline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--plum); color: #fff; padding: 10px 14px; border-radius: 3px; }
.skip-link:focus { top: 12px; }

.page { max-width: 1180px; margin: auto; padding: 0 22px; }

/* ---- Site header and footer (scripts/chrome.mjs) ---- */
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 10px 20px; flex-wrap: wrap; padding: 26px 0; font-size: .9rem; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-serif); font-size: 1.35rem; font-weight: 700; letter-spacing: -.06em; color: var(--plum); text-decoration: none; }
.wordmark img { width: 32px; height: 32px; flex: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-nav a { font-size: .95rem; display: inline-block; padding: 10px 0; }
.site-nav a[aria-current="page"] { color: var(--plum); font-weight: 700; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 42px; padding: 26px 0; border-top: 1px solid var(--sand); color: var(--muted); font-size: .9rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0 20px; list-style: none; margin: 0; padding: 0; }
.site-footer a { display: inline-block; padding: 10px 0; }

/* ---- Landing ---- */
.hero { max-width: 720px; margin: 40px auto 32px; text-align: center; }
.eyebrow { margin: 0 0 12px; color: var(--plum); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero h1, .steps h2 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -.055em; line-height: 1.02; }
.hero h1 { margin: 0; font-size: clamp(3rem, 8vw, 5.7rem); }
.intro { max-width: 580px; margin: 25px auto 0; color: var(--muted); font-size: 1.08rem; }

.composer-wrap { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--rose); padding-top: 7px; }
.composer { background: var(--paper-white); border: 1px solid var(--sand); box-shadow: 0 12px 30px #5a435a12; padding: clamp(22px, 5vw, 44px); }
.composer fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-intro { display: flex; gap: 9px; align-items: center; margin-bottom: 22px; color: var(--plum); font-family: var(--font-serif); }
.form-intro p { margin: 0; }
.stamp { flex: none; width: 26px; height: 26px; border: 1.5px solid var(--rose); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--paper-white), inset 0 0 0 4.5px var(--rose); }

.field { margin-top: 19px; }
.field label, .field .label { display: block; margin-bottom: 7px; font-weight: 700; font-size: .94rem; }
textarea, input, select { width: 100%; border: 1px solid var(--line); border-radius: 3px; background: #fff; padding: 12px 13px; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.45; }
input[type="date"] { min-height: 49px; -webkit-appearance: none; appearance: none; }
textarea { resize: vertical; min-height: 132px; }
textarea:focus, input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--error); }
textarea:disabled, input:disabled, select:disabled { background: var(--paper); color: var(--muted); cursor: not-allowed; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.helper, .counter, .error, .form-status { font-size: .9rem; margin: 6px 0 0; }
.helper, .counter { color: var(--muted); }
.error { color: var(--error); font-weight: 600; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { margin-top: 16px; min-height: 0; }
.turnstile:empty { margin: 0; }

button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 52px; margin-top: 28px; border: 0; border-radius: 3px; background: var(--plum); color: #fff; cursor: pointer; font: 700 1rem var(--font-sans); text-decoration: none; padding: 12px 18px; transition: background .18s ease; }
button:hover, .button:hover { background: var(--plum-dark); }
button:disabled { opacity: .65; cursor: not-allowed; }
button[aria-busy="true"] { cursor: wait; }
.button-secondary { background: transparent; color: var(--plum); border: 1.5px solid var(--plum); }
.button-secondary:hover { background: var(--paper); }
.button-danger { background: var(--error); }
.button-danger:hover { background: #7e322d; }
.text-button { width: auto; min-height: 44px; margin-top: 8px; padding: 8px 4px; background: transparent; color: var(--plum); text-decoration: underline; font-size: .95rem; }
.text-button:hover { background: transparent; color: var(--plum-dark); }
.form-status { min-height: 1.55em; text-align: center; color: var(--muted); }
.form-status.is-error { color: var(--error); font-weight: 600; }
.trust-line { text-align: center; margin: 18px auto 70px; font-size: 1rem; color: var(--muted); }

.notice { margin: 0 0 22px; padding: 14px 16px; background: var(--paper); border-left: 3px solid var(--rose); }
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; color: var(--muted); font-size: .95rem; }
.notice strong { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; color: var(--plum); }

.confirmation-card h2, .card h1 { font-family: var(--font-serif); font-size: 2.4rem; font-weight: 500; line-height: 1.1; letter-spacing: -.03em; margin: 4px 0 16px; }

.steps { padding: 50px 0; border-top: 1px solid var(--sand); }
.steps h2 { text-align: center; font-size: 2.2rem; margin: 0 0 32px; }
.steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; padding: 0; margin: 0; }
.steps li { border-top: 2px solid var(--rose); padding-top: 14px; }
.steps span { color: var(--plum); font-size: .78rem; font-weight: 700; letter-spacing: .09em; }
.steps h3 { margin: 8px 0 4px; font-family: var(--font-serif); font-weight: 500; }
.steps p { margin: 0; color: var(--muted); font-size: 1rem; }

/* ---- Single-card pages: verify, manage ---- */
.card-page { max-width: 680px; margin: 40px auto 70px; }
.card { background: var(--paper-white); border: 1px solid var(--sand); box-shadow: 0 12px 30px #5a435a12; padding: clamp(24px, 5vw, 44px); }
.card-page .composer-wrap { max-width: none; }
.card p { margin: 0 0 14px; }
.card .lead { font-size: 1.08rem; }
.card .muted { color: var(--muted); }
.card .actions { display: grid; gap: 0; }
.card .actions .button + .text-button, .card .actions button + .text-button { justify-self: center; }
.date-stamp { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 18px; padding: 8px 14px 8px 10px; border: 1.5px dashed var(--rose); border-radius: 999px; color: var(--plum); font-weight: 700; font-size: .95rem; }
.date-stamp::before { content: ""; width: 18px; height: 18px; border: 1.5px solid var(--rose); border-radius: 50%; box-shadow: inset 0 0 0 2px var(--paper-white), inset 0 0 0 3.5px var(--rose); }

.letter { position: relative; margin: 6px 0 4px; padding: 22px 22px 22px 24px; background: #fff; border: 1px solid var(--sand); border-left: 3px solid var(--rose); font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.manage-section { padding: 22px 0; border-top: 1px solid var(--sand); }
.manage-section:first-of-type { border-top: 0; padding-top: 6px; }
.manage-section h2 { margin: 0 0 8px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--plum); }
.manage-section .value { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.manage-section .button { margin-top: 14px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 14px; }
.inline-actions button { width: auto; margin-top: 0; min-width: 140px; }
.inline-actions .text-button { min-width: 0; }
.danger-zone { margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--sand); }
.confirm-box { margin-top: 12px; padding: 18px; border: 1.5px solid var(--error); background: #fff; }
.confirm-box p { margin: 0 0 6px; }

/* ---- How it works, contact ---- */
.how-page, .text-page { max-width: 760px; margin: 52px auto 90px; }
.how-page h1, .how-page h2, .text-page h1 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -.05em; line-height: 1.06; }
.how-page h1, .text-page h1 { font-size: clamp(2.9rem, 7vw, 5rem); margin: 0 0 24px; }
.how-intro { max-width: 660px; color: var(--muted); font-size: 1.12rem; }
.how-steps { list-style: none; margin: 54px 0; padding: 0; }
.how-steps li { display: grid; grid-template-columns: 88px 1fr; gap: 20px; padding: 28px 0; border-top: 1px solid var(--sand); }
.how-steps li:last-child { border-bottom: 1px solid var(--sand); }
.how-steps span { color: var(--plum); font-size: .8rem; font-weight: 700; letter-spacing: .1em; padding-top: 8px; }
.how-steps h2 { font-size: 1.65rem; margin: 0 0 8px; }
.how-steps p { color: var(--muted); margin: 0; }
.privacy-promise { margin: 50px 0; padding: 32px; background: var(--paper-white); border-left: 3px solid var(--rose); }
.privacy-promise h2, .how-cta h2, .faq > h2 { font-size: 2rem; margin: 0 0 10px; }
.privacy-promise p:not(.eyebrow), .how-cta p { margin: 0 0 18px; color: var(--muted); }
.faq { margin: 50px 0; }
.faq dl { margin: 18px 0 0; }
.faq dt { margin: 22px 0 6px; font-family: var(--font-serif); font-size: 1.35rem; font-weight: 500; letter-spacing: -.02em; }
.faq dd { margin: 0; color: var(--muted); }
.secondary-link { color: var(--plum); font-size: .95rem; font-weight: 700; }
.how-cta { text-align: center; padding: 44px 20px; border-top: 1px solid var(--sand); }
.primary-link { display: inline-block; background: var(--plum); color: #fff; text-decoration: none; padding: 14px 20px; min-height: 52px; font-weight: 700; border-radius: 3px; }
.primary-link:hover { background: var(--plum-dark); }
.text-page p { margin: 0 0 20px; }
.text-page .note { color: var(--muted); font-size: .95rem; }

@media (max-width: 600px) {
  .page { padding: 0 16px; }
  .site-header { padding-top: 18px; padding-bottom: 10px; }
  .site-nav { gap: 0 16px; }
  .hero { margin-top: 26px; }
  .hero h1 { font-size: 3rem; }
  .intro { font-size: 1rem; }
  .form-row, .steps ol { grid-template-columns: 1fr; }
  .composer { padding: 22px 18px; }
  .card { padding: 24px 18px; }
  .card-page { margin-top: 20px; }
  .confirmation-card h2, .card h1 { font-size: 2rem; }
  .steps { padding-top: 36px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .how-page, .text-page { margin-top: 30px; }
  .how-steps li { grid-template-columns: 55px 1fr; gap: 10px; }
  .privacy-promise { padding: 24px 20px; }
  .inline-actions button { width: 100%; }
}

@media (min-width: 1024px) {
  .site-header { padding: 22px 0; }
  .landing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 64px; align-items: center; margin: 8px 0 64px; }
  .landing .hero { max-width: none; margin: 0 0 40px; text-align: left; }
  .landing .hero h1 { font-size: clamp(3.6rem, 5.6vw, 5rem); }
  .landing .intro { margin: 22px 0 0; max-width: 420px; }
  .landing .composer-wrap { max-width: none; margin: 0; }
  .landing .composer { padding: 28px 36px 20px; }
  .landing .form-intro { margin-bottom: 6px; }
  .landing .field { margin-top: 14px; }
  .landing textarea { min-height: 104px; }
  .landing button[type="submit"] { margin-top: 20px; }
  .landing .trust-line { margin: 14px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Containers that receive focus from script (to move screen readers) need no focus ring. */
[tabindex="-1"]:focus { outline: none; }
