/* Tell Us Again: the one stylesheet for the new design.
   Every page builds from the pieces below; no page has its own style block. Colours, type and shapes are the
   variables in :root ("Garden Party", 00_Handover/11_BRANDING_GUIDE.md), so a change there changes every page.
   Source of the design: 05_Marketing/Tell_Us_Again_Brand/prototype/ (tua.css). Pieces are added here when the
   first page needs them, not before.
   Fonts: Lexend for everything, Caveat only for handwritten quotes (both served from Scripts/vendor). */

/* ---------------------------------------------------------------- tokens */
:root {
	--cotton: #FFFBEA; --leaf: #3E7C59; --leaf-ink: #236342; --deep: #1F3D2C; --sun: #F5C84C;
	--bg: #FEFAE9; --surface: #FFFFFF; --panel: #F4F0DE; --panel-2: #ECE8D6; --mint: #DDEFE2; --mint-ink: #1F5236;
	--fg: #1F3D2C; --muted: #56655B; --line: #E4DFC9; --alert: #B3261E; --alert-soft: #FBE3DF;
	--btn: #F5C84C; --btn-fg: #1F3D2C; --btn-2: #ECE8D6; --btn-2-fg: #1F3D2C;
	--shadow: 0 1px 2px rgba(31, 61, 44, .06), 0 8px 24px rgba(31, 61, 44, .07);
	--sans: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
	--hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
	--r: 22px; --r-sm: 14px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #141E18; --surface: #1B2820; --panel: #22312A; --panel-2: #2B3B32; --mint: #244233; --mint-ink: #BFE6CC;
		--fg: #EEF2EA; --muted: #A8B8AC; --line: #2F3F35; --leaf-ink: #94D5AC; --alert: #FF8A80; --alert-soft: #3A2420;
		--btn-2: #2B3B32; --btn-2-fg: #EEF2EA;
		--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
		color-scheme: dark;
	}
}

/* ---------------------------------------------------------------- basics */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); font-family: var(--sans); font-weight: 300; font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; text-wrap: balance; letter-spacing: -.01em; }
p, ul, ol { margin: 0; }
strong, b { font-weight: 600; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--leaf-ink); text-underline-offset: .15em; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--deep); color: var(--cotton); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }

/* ---------------------------------------------------------------- page frame */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 700px) { .wrap { padding-inline: 28px; } }
main.wrap { flex: 1; padding-block: 28px 56px; display: flex; flex-direction: column; gap: 24px; }

/* Header: logo and menu (on phones the menu folds behind a button, Scripts/tua/menu.js) */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font-weight: 600; font-size: 1.15rem; white-space: nowrap; }
.brand svg { width: 36px; height: 36px; }
.menu { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.menu a, .menu button { text-decoration: none; color: var(--fg); padding: 9px 16px; border-radius: 999px; font-size: .92rem; font-weight: 400; background: none; border: 0; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--panel); }
.menu a[aria-current] { background: var(--leaf); color: var(--cotton); }
.menu .btn { padding: 9px 18px; min-height: 0; }
.menu .btn.leaf:hover { background: var(--leaf); }
.menu form { margin: 0; }
.menu-btn { display: none; margin-left: auto; align-items: center; gap: 6px; border: 0; background: var(--panel); border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: .95rem; cursor: pointer; min-height: 44px; }
@media (max-width: 760px) {
	.menu-btn { display: inline-flex; }
	.menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow); }
	.menu.open { display: flex; }
	.menu a, .menu button { padding: 14px 16px; font-size: 1.05rem; text-align: left; }
	.menu .btn { justify-content: center; padding: 14px 16px; }
}

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: auto; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-block: 24px; font-size: .85rem; color: var(--muted); }
.foot .hand { font-family: var(--hand); font-size: 1.5rem; color: var(--leaf-ink); font-weight: 700; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot nav a { color: var(--muted); }
.foot .legal { flex-basis: 100%; }

/* ---------------------------------------------------------------- headings and text */
.head { display: flex; flex-direction: column; gap: 8px; }
.head h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.head p { color: var(--muted); max-width: 60ch; }
.eyebrow { font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.quote { font-family: var(--hand); font-weight: 700; font-size: 1.65rem; line-height: 1.2; color: var(--leaf-ink); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* Long reading pages (legal, help): a comfortable measure and spacing */
.prose { max-width: 72ch; display: flex; flex-direction: column; gap: 14px; }
.prose h2 { font-size: 1.35rem; margin-top: 22px; }
.prose h3 { font-size: 1.08rem; margin-top: 8px; }
.prose ul { padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; }
.prose code { font-size: .85em; word-break: break-all; }
.table-scroll { overflow-x: auto; }

/* ---------------------------------------------------------------- cards and chips */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 2.4vw, 26px); display: flex; flex-direction: column; gap: 16px; min-width: 0; box-shadow: var(--shadow); }
.card.soft { background: var(--panel); box-shadow: none; border-color: transparent; }
.card.mint { background: var(--mint); color: var(--mint-ink); box-shadow: none; border-color: transparent; }
.card h2 { font-size: 1.25rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-size: .8rem; font-weight: 400; background: var(--mint); color: var(--mint-ink); white-space: nowrap; }

/* ---------------------------------------------------------------- page sections */
/* Two columns from 900px: the main content and a side card (one column on phones, in page order) */
.split { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }

/* The big green welcome block (holding page, family home) */
.hero { background: var(--leaf); color: var(--cotton); border-radius: var(--r); padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 16px; }
.hero h1 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); }
.hero .quote { color: var(--sun); }
.hero .chip { background: rgba(255, 251, 234, .16); color: var(--cotton); align-self: flex-start; }

/* A row of short points, e.g. how it works (stacked on phones) */
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .points { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- buttons: one main (yellow) button per screen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px; padding: 14px 26px; min-height: 52px; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; background: var(--btn-2); color: var(--btn-2-fg); text-align: center; transition: transform .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(.97); }
.btn:active { transform: scale(.98); }
.btn.main { background: var(--btn); color: var(--btn-fg); font-size: 1.08rem; min-height: 60px; box-shadow: 0 6px 18px rgba(197, 150, 30, .28); }
.btn.leaf { background: var(--leaf); color: var(--cotton); }
.btn.line { background: transparent; border: 2px solid var(--line); color: var(--fg); }
.btn.wide { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------------------------------------------------------------- forms
   Labels above boxes, big touch targets, errors in words next to the box they belong to. The class names
   field-validation-error, input-validation-error and validation-summary-errors are the ones ASP.NET writes. */
.narrow { width: 100%; max-width: 520px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-weight: 400; }
.field .hint { font-size: .85rem; color: var(--muted); }
.field input:not([type=checkbox]) { width: 100%; min-height: 52px; padding: 12px 16px; border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.field input:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 60%, transparent); }
.field input.input-validation-error { border-color: var(--alert); }
.field-validation-error { color: var(--alert); font-size: .9rem; font-weight: 400; }
.check { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--leaf); flex: none; }
.form-links { display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }

/* A message about the whole form or page: a problem, or good news */
.notice { border-radius: var(--r-sm); padding: 14px 18px; background: var(--mint); color: var(--mint-ink); }
.notice.problem, .validation-summary-errors { background: var(--alert-soft); color: var(--alert); border-radius: var(--r-sm); padding: 14px 18px; }
.validation-summary-errors ul { margin: 0; padding-left: 1.2em; }
.validation-summary-valid { display: none; }

/* Password strength (Scripts/tua/password-strength.js sets data-score 0-4 on the meter) */
.strength { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .2s ease; }
.strength[data-score="1"] i { width: 25%; background: var(--alert); }
.strength[data-score="2"] i { width: 50%; background: var(--sun); }
.strength[data-score="3"] i { width: 75%; background: var(--leaf); }
.strength[data-score="4"] i { width: 100%; background: var(--leaf); }

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