/* ==========================================================================
   The Smile & Wellness Journal — main.css
   Mobile-first. Tokens first, then base, then components in page order.
   ========================================================================== */

:root {
	--paper: #ffffff;
	--mint: #eef4ef;
	--mint-deep: #dfeae2;
	--sage: #7fa48c;
	--sage-light: #c9dacf;
	--green: #244a3a;
	--green-deep: #16332a;
	--ink: #17261f;
	--muted: #56675e;
	--berry: #c63a45;
	--berry-dark: #a52c36;
	--berry-soft: #fcebec;
	--line: #d9e4dc;

	--font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
	--font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

	--wrap: 1120px;
	--measure: 42rem;
	--radius-s: 6px;
	--radius-m: 14px;
	--radius-l: 28px;
	--shadow-card: 0 18px 40px -24px rgba(23, 38, 31, 0.35);
}

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--berry-dark); }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.5em; color: var(--green-deep); }
h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.4rem); font-variation-settings: "opsz" 144; }
h2 { font-size: clamp(1.55rem, 1.1rem + 1.7vw, 2.15rem); font-variation-settings: "opsz" 96; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1.1em; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--green); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-s); z-index: 100; }
.skip-link:focus { top: 1rem; }

/* Buttons ---------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	font: 600 1rem/1 var(--font-body);
	padding: 0.95rem 1.5rem;
	border-radius: 999px;
	border: 2px solid transparent;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--berry); color: #fff; border-color: var(--berry); }
.btn-primary:hover { background: var(--berry-dark); border-color: var(--berry-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--sage-light); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-sm { padding: 0.65rem 1.1rem; font-size: 0.9rem; }
.btn-lg { padding: 1.1rem 2rem; font-size: 1.1rem; }
.cta-wrap { display: inline-flex; flex-direction: column; gap: 0.5rem; max-width: 100%; }
.cta-note { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }

/* Header ----------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--green-deep); text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem; letter-spacing: -0.01em; }
.brand-mark { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--berry) 0 42%, var(--sage) 46% 100%); flex: none; }
.custom-logo { max-height: 44px; width: auto; }
.nav-toggle { background: none; border: 2px solid var(--sage-light); border-radius: 999px; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 18px; height: 2px; background: var(--green); border-radius: 2px; position: relative; content: ""; }
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }
.site-nav { display: none; width: 100%; padding: 0.5rem 0 1rem; }
.site-nav.is-open { display: block; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.site-nav a { display: block; padding: 0.55rem 0.25rem; text-decoration: none; font-weight: 500; color: var(--ink); }
.site-nav a:hover, .site-nav .current-menu-item a { color: var(--berry-dark); }
@media (min-width: 760px) {
	.nav-toggle { display: none; }
	.site-nav { display: block; width: auto; padding: 0; }
	.site-nav .menu { flex-direction: row; gap: 1.6rem; }
}

/* Hero ------------------------------------------------------------------- */
.hero { padding: 2rem 0 2.5rem; background: linear-gradient(180deg, var(--mint) 0%, var(--paper) 100%); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.kicker { font-size: 0.85rem; font-weight: 600; color: var(--berry-dark); margin-bottom: 1rem; }
.kicker-sep { color: var(--sage); margin: 0 0.35rem; }
.hero h1 { font-style: italic; font-weight: 500; margin-bottom: 0.7em; }
.dek { font-size: 1.15rem; line-height: 1.55; color: var(--muted); max-width: var(--measure); }
.byline { display: flex; gap: 0.85rem; align-items: flex-start; margin: 1.5rem 0; padding-top: 1.25rem; border-top: 1px solid var(--line); max-width: var(--measure); }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; display: grid; place-items: center; }
.byline p { margin: 0; }
.byline-name { font-weight: 600; font-size: 0.95rem; }
.byline-meta { font-weight: 400; color: var(--muted); display: block; font-size: 0.85rem; }
.byline-disclosure { font-size: 0.82rem; color: var(--muted); line-height: 1.45; margin-top: 0.4rem !important; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.hero-figure { position: relative; margin: 0; padding: 1rem 0 0; }
.hero-disc { position: absolute; inset: 6% 8% 14% 8%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, var(--sage-light), var(--sage) 70%, var(--green) 140%); opacity: 0.55; z-index: 0; }
.hero-figure img { position: relative; z-index: 1; width: min(100%, 520px); margin-inline: auto; }
.hero-figure figcaption { position: relative; z-index: 1; font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 0.5rem; }
@media (min-width: 900px) {
	.hero { padding: 3.5rem 0 3rem; }
	.hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
	.hero-figure { padding: 0; }
}

/* Facts strip ------------------------------------------------------------ */
.facts { background: var(--green-deep); color: #fff; }
.facts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; padding: 1.75rem 0; }
.fact { display: flex; flex-direction: column; gap: 0.15rem; }
.fact-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; line-height: 1; color: #fff; }
.fact-label { font-size: 0.82rem; line-height: 1.4; color: var(--sage-light); max-width: 20ch; }
@media (min-width: 760px) { .facts-row { grid-template-columns: repeat(4, 1fr); } }

/* Article body ----------------------------------------------------------- */
.article-body { padding: 3rem 0 2rem; }
.article-body > section { max-width: var(--measure); margin: 0 auto 3rem; }
.prose h2 { margin-top: 0; }
.prose p { font-size: 1.0625rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.45em; }
.pull { margin: 1.75rem 0 0; padding-left: 1.25rem; border-left: 4px solid var(--berry); }
.pull p { font-family: var(--font-display); font-style: italic; font-size: 1.45rem; line-height: 1.3; color: var(--green-deep); margin: 0; }

/* Formula list ----------------------------------------------------------- */
.formula-intro { color: var(--muted); }
.formula-group { margin-top: 2rem; color: var(--berry-dark); font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; }
.formula-list { margin: 0.5rem 0 0; }
.formula-item { padding: 1rem 0; border-top: 1px solid var(--line); display: grid; gap: 0.35rem; }
.formula-list .formula-item:last-child { border-bottom: 1px solid var(--line); }
.formula-item dt { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--green-deep); }
.formula-item dt em { font-style: italic; }
.formula-item dd { margin: 0; color: var(--ink); }
.formula-note { font-size: 0.9rem; color: var(--muted); margin-top: 1.25rem; }
@media (min-width: 640px) {
	.formula-item { grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: start; }
}

/* Mid CTA ---------------------------------------------------------------- */
.mid-cta {
	max-width: var(--measure); margin: 0 auto 3rem;
	display: grid; gap: 1.25rem; padding: 1.5rem;
	border: 1px solid var(--sage-light); border-radius: var(--radius-l);
	background: var(--mint);
}
.mid-cta img { width: 140px; margin-inline: auto; }
.mid-cta-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--green-deep); line-height: 1.25; }
.mid-cta p { font-size: 0.95rem; }
@media (min-width: 640px) {
	.mid-cta { grid-template-columns: 170px 1fr; align-items: center; padding: 1.75rem 2rem; }
	.mid-cta img { width: 100%; }
}

/* Verdict ---------------------------------------------------------------- */
.verdict { border-top: 4px solid var(--berry); padding-top: 1.5rem; }
.verdict-grid { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
.verdict-col { background: var(--mint); border-radius: var(--radius-m); padding: 1.25rem 1.35rem; }
.verdict-col h3 { font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; margin-bottom: 0.75rem; }
.verdict-col ul { list-style: none; margin: 0; padding: 0; }
.verdict-col li { position: relative; padding-left: 1.4rem; margin-bottom: 0.65rem; font-size: 0.97rem; }
.verdict-col li::before { position: absolute; left: 0; top: 0; font-family: var(--font-display); font-weight: 700; }
.verdict-col:first-child li::before { content: "+"; color: var(--green); }
.verdict-col:last-child li::before { content: "–"; color: var(--berry-dark); }
.verdict-close { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.4; color: var(--green-deep); }
@media (min-width: 640px) { .verdict-grid { grid-template-columns: 1fr 1fr; } }

/* FAQ -------------------------------------------------------------------- */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2.25rem 1rem 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.8rem; font-family: var(--font-display); font-size: 1.5rem; color: var(--berry); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1rem; margin: 0; color: var(--ink); }

/* Final CTA -------------------------------------------------------------- */
.final-cta { max-width: none !important; }
.final-card { background: var(--green); color: #fff; border-radius: var(--radius-l); padding: 2.25rem 1.5rem; text-align: center; max-width: 52rem; margin: 0 auto; }
.final-kicker { color: var(--sage-light); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }
.final-card h2 { color: #fff; }
.final-card p { max-width: 36rem; margin-inline: auto; }
.final-card .cta-note { color: var(--sage-light); }
.final-card .cta-wrap { align-items: center; }
@media (min-width: 760px) { .final-card { padding: 3rem 3rem 2.5rem; } }

.sources { font-size: 0.92rem; color: var(--muted); }
.sources h2 { font-size: 1.15rem; color: var(--ink); }

/* Static pages ----------------------------------------------------------- */
.page-head { background: var(--mint); padding: 2.5rem 0 2rem; }
.page-head h1 { max-width: 30ch; }
.page-meta { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 0; }
.page-content { max-width: var(--measure); padding: 2.5rem 0 3rem; }
.page-content h2 { font-size: 1.35rem; margin-top: 1.75rem; }
.page-content h2:first-child { margin-top: 0; }
.post-hero { border-radius: var(--radius-m); margin-top: 1.5rem; }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.post-list a { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; text-decoration: none; }

.contact-form { max-width: 34rem; }
.contact-form label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem; }
.contact-form input, .contact-form textarea { width: 100%; font: inherit; padding: 0.75rem 0.9rem; border: 1px solid var(--sage-light); border-radius: var(--radius-s); background: #fff; }
.contact-form .hp { position: absolute; left: -9999px; }
.form-note { font-size: 0.85rem; color: var(--muted); }
.notice { padding: 0.9rem 1.1rem; border-radius: var(--radius-s); font-weight: 500; }
.notice-ok { background: var(--mint); color: var(--green-deep); }
.notice-err { background: var(--berry-soft); color: var(--berry-dark); }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--mint); border-top: 1px solid var(--line); padding: 2.5rem 0 2rem; margin-top: 2rem; font-size: 0.9rem; }
.footer-grid { display: grid; gap: 1.5rem; }
.footer-brand { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--green-deep); margin-bottom: 0.5rem; }
.footer-legal .menu { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 1rem; }
.footer-legal a { text-decoration: none; }
.footer-fine { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.5rem; color: var(--muted); font-size: 0.82rem; }
.footer-fine p { max-width: 70rem; }
.copyright { margin-top: 1.25rem; }
@media (min-width: 760px) {
	.footer-grid { grid-template-columns: 1.4fr 1fr; gap: 3rem; }
}

/* Redirect modal --------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(23, 38, 31, 0.6); }
.modal-card { position: relative; background: #fff; border-radius: var(--radius-l); padding: 1.75rem; max-width: 30rem; width: 100%; box-shadow: var(--shadow-card); }
.modal-kicker { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 0.25rem; }
.modal-card h2 { font-size: 1.45rem; }
.modal-card p { font-size: 0.95rem; }
.modal-disclosure { background: var(--mint); padding: 0.75rem 0.9rem; border-radius: var(--radius-s); font-size: 0.85rem !important; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

/* Cookie banner ---------------------------------------------------------- */
.cookie-banner {
	position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 50;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m);
	padding: 1rem 1.1rem; box-shadow: var(--shadow-card);
	display: grid; gap: 0.75rem; font-size: 0.9rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; }
.cookie-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
@media (min-width: 760px) {
	.cookie-banner { left: auto; max-width: 30rem; }
}

/* Sticky CTA (front page, after scrolling past hero) --------------------- */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,0.96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); padding: 0.6rem 0; }
.sticky-cta[hidden] { display: none; }
.sticky-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.sticky-text { font-size: 0.9rem; font-weight: 500; }
body.has-cookie-banner .sticky-cta { display: none; }
@media (max-width: 480px) { .sticky-text { display: none; } .sticky-inner { justify-content: center; } }
