/* TrendsPresso — styles
   Palette from brand brief; type: Newsreader (editorial serif) + Hanken Grotesk (UI). */

:root {
  --espresso: #4B2E1F;
  --coffee: #6F4E37;
  --latte: #C8A27A;
  --cream: #F7F1E8;
  --cream-deep: #EFE5D6;
  --charcoal: #252525;
  --white: #FFFFFF;
  --muted: #5E554E;
  --line: #E3D7C6;
  --ok: #3F6B4A;
  --no: #9A3B2E;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(75, 46, 31, .06), 0 12px 32px -12px rgba(75, 46, 31, .18);
  --container: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--coffee); text-underline-offset: 3px; }
a:hover { color: var(--espresso); }
:focus-visible { outline: 3px solid var(--latte); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--espresso); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 400; letter-spacing: -.025em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: 68ch; }

.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: -100px; background: var(--espresso); color: var(--white); padding: .6rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 1rem; color: var(--white); }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container.narrow { max-width: 820px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 1rem/1 var(--sans); padding: 1rem 1.5rem; border-radius: 999px;
  border: 1.5px solid transparent; text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--espresso); color: var(--cream); }
.btn-dark:hover { background: var(--coffee); color: var(--white); }
.btn-ghost { background: transparent; color: var(--espresso); border-color: var(--espresso); }
.btn-ghost:hover { background: var(--espresso); color: var(--cream); }
.btn-light { background: var(--latte); color: var(--espresso); }
.btn-light:hover { background: var(--cream); color: var(--espresso); }
.btn-small { padding: .65rem 1.1rem; font-size: .925rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.text-link { font-weight: 600; color: var(--espresso); text-decoration-color: var(--latte); text-decoration-thickness: 2px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(247, 241, 232, .92); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid transparent; transition: border-color .25s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--espresso); }
.brand-mark { width: 32px; height: 32px; }
.site-nav ul { list-style: none; display: flex; align-items: center; gap: 1.75rem; margin: 0; padding: 0; }
.site-nav a:not(.btn) { color: var(--charcoal); text-decoration: none; font-weight: 500; font-size: .975rem; }
.site-nav a:not(.btn):hover { color: var(--coffee); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--espresso); transition: transform .25s var(--ease), opacity .2s; content: ""; }
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { left: 0; top: -7px; }
.nav-toggle-bar::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { position: fixed; inset: calc(72px + env(safe-area-inset-top, 0px)) 0 auto 0; background: var(--cream); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.5rem; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s var(--ease), visibility .2s; box-shadow: var(--shadow); }
  .site-nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li a:not(.btn) { display: block; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .site-nav .btn { margin-top: 1rem; width: 100%; }
}

/* Sections */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-cream { background: var(--cream-deep); }
.section-dark { background: var(--espresso); color: #EADFD0; }
.section-dark h2, .section-dark h3 { color: var(--cream); }
.section-dark a { color: var(--latte); }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); max-width: 640px; }
.section-head p { color: var(--muted); font-size: 1.125rem; }
.section-dark .section-head p { color: #D6C6B2; }
.section-head.centered { text-align: center; margin-inline: auto; }
.section-head.centered p { margin-inline: auto; }
.section-cta { margin: 2.5rem 0 0; }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.lede { font-family: var(--serif); font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.55; color: #43392F; max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin: 2rem 0 1.75rem; }
.trust-note { font-size: .9rem; color: var(--muted); border-left: 2px solid var(--latte); padding-left: 1rem; max-width: 52ch; }

/* Signature: source ledger */
.ledger { margin: 0; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.5rem, 3vw, 2.25rem); position: relative; }
.ledger::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; border-radius: var(--radius-lg) 0 0 var(--radius-lg); background: linear-gradient(var(--espresso), var(--latte)); }
.ledger-claim p { font-family: var(--serif); font-size: 1.25rem; line-height: 1.6; color: var(--charcoal); margin-bottom: 1.5rem; }
.cite { font-family: var(--sans); font-size: .7rem; font-weight: 600; color: var(--coffee); margin-left: 1px; }
.ledger-sources { list-style: none; margin: 0; padding: 1.25rem 0 0; border-top: 1px dashed var(--line); counter-reset: src; display: grid; gap: .6rem; }
.ledger-sources li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .95rem; padding: .55rem .75rem; border-radius: var(--radius-sm); background: var(--cream); transition: background-color .3s, transform .3s var(--ease); }
.ledger-sources li:not(.rejected) { counter-increment: src; }
.ledger-sources li:not(.rejected) .src-name::before { content: "[" counter(src) "] "; color: var(--coffee); font-weight: 600; }
.ledger-sources li.rejected .src-name { text-decoration: line-through; text-decoration-color: rgba(154, 59, 46, .5); color: var(--muted); }
.ledger-sources li.is-lit { background: #F0E3CF; transform: translateX(4px); }
.src-tag { font-size: .78rem; font-weight: 600; white-space: nowrap; padding: .2rem .55rem; border-radius: 999px; }
.src-tag.ok { color: var(--ok); background: #E4EDE3; }
.src-tag.no { color: var(--no); background: #F4E1DC; }
.ledger figcaption { margin-top: 1.25rem; font-size: .9rem; color: var(--muted); font-style: italic; font-family: var(--serif); }

/* Page-load sequence: sources confirm one at a time (single orchestrated moment) */
@media (prefers-reduced-motion: no-preference) {
  .js .ledger-sources li { opacity: 0; transform: translateY(6px); animation: srcIn .6s var(--ease) forwards; }
  .js .ledger-sources li:nth-child(1) { animation-delay: .5s; }
  .js .ledger-sources li:nth-child(2) { animation-delay: .75s; }
  .js .ledger-sources li:nth-child(3) { animation-delay: 1s; }
  .js .ledger-sources li:nth-child(4) { animation-delay: 1.35s; }
  @keyframes srcIn { to { opacity: 1; transform: none; } }
}

/* Services */
.services { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.service { background: var(--white); border-radius: var(--radius); padding: 2rem 1.75rem; border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s; }
.service:hover { border-color: var(--latte); box-shadow: var(--shadow); }
.service p { color: var(--muted); margin: 0; font-size: 1rem; }
.service-icon { width: 40px; height: 40px; margin-bottom: 1.25rem; fill: none; stroke: var(--coffee); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Process: a single pour line through five stages */
.process { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; position: relative; }
.process::before { content: ""; position: absolute; top: 28px; left: 28px; right: 28px; height: 2px; background: linear-gradient(90deg, var(--latte), rgba(200, 162, 122, .25)); }
.step { position: relative; }
.step-num { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--espresso); border: 2px solid var(--latte); color: var(--latte); font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin-bottom: 1.5rem; position: relative; }
.step h3 { font-size: 1.25rem; }
.step p { color: #D6C6B2; font-size: .98rem; }

.notice { font-size: .95rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.25rem; color: var(--charcoal); max-width: none; }
.notice-dark { background: rgba(255, 255, 255, .05); border-color: rgba(200, 162, 122, .35); color: #EADFD0; }

/* Forms */
.tool { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 3rem); }
.tool-progress { list-style: none; margin: 0 0 2.25rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; counter-reset: prog; }
.tool-progress li { counter-increment: prog; font-size: .85rem; font-weight: 600; color: var(--muted); padding-top: .75rem; border-top: 3px solid var(--line); transition: border-color .3s, color .3s; }
.tool-progress li span::before { content: counter(prog) ". "; }
.tool-progress li.is-active, .tool-progress li.is-done { border-top-color: var(--espresso); color: var(--espresso); }
.tool-progress li.is-done { border-top-color: var(--latte); }

.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.tool-step > legend { font-family: var(--serif); font-size: 1.6rem; color: var(--espresso); margin-bottom: 1.25rem; padding: 0; }
.step-help { color: var(--muted); font-size: .98rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.field { margin-bottom: 1.25rem; }
.field label, .choice-group > legend { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .45rem; color: var(--charcoal); }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.help { font-size: .875rem; color: var(--muted); margin: .4rem 0 0; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--charcoal); background: var(--cream);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .8rem .95rem; transition: border-color .2s, background-color .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--coffee); background: var(--white); box-shadow: 0 0 0 3px rgba(200, 162, 122, .3); }
textarea { resize: vertical; min-height: 110px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236F4E37' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
[aria-invalid="true"] { border-color: var(--no) !important; }
.field-msg { display: block; color: var(--no); font-size: .85rem; margin-top: .35rem; }

.choice-group { margin-bottom: 1.5rem !important; }
.pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: inline-block; padding: .65rem 1.25rem; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 500; cursor: pointer; transition: all .2s; background: var(--cream); }
.pill input:checked + span { background: var(--espresso); border-color: var(--espresso); color: var(--cream); }
.pill input:focus-visible + span { outline: 3px solid var(--latte); outline-offset: 2px; }
.choice-group.is-invalid .pill span { border-color: var(--no); }

.checks { display: grid; gap: .6rem; }
.check { display: flex; gap: .85rem; align-items: flex-start; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--cream); transition: border-color .2s, background-color .2s; font-size: .98rem; line-height: 1.45; }
.check:hover { border-color: var(--latte); }
.check:has(input:checked) { background: #F3E8D8; border-color: var(--coffee); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--espresso); }
.check-consent { background: transparent; border: 0; padding: .25rem 0; margin: .5rem 0 1rem; font-size: .92rem; }
.check-consent:has(input:checked) { background: transparent; }
.check-consent.is-invalid span { color: var(--no); }

.file-drop { border: 1.5px dashed var(--latte); border-radius: var(--radius-sm); padding: 1rem; background: var(--cream); }
.file-drop input { font: inherit; font-size: .95rem; width: 100%; }

.form-error:not(:empty) { color: var(--no); background: #F8ECE8; border-radius: var(--radius-sm); padding: .75rem 1rem; margin: 0 0 1rem; font-size: .95rem; }
.tool-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.tool-nav [data-next], .tool-nav [data-submit] { margin-left: auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Result */
.result:focus { outline: none; }
.result h3 { font-size: 1.8rem; margin-top: 1.5rem; }
.result-meter { height: 10px; background: var(--cream-deep); border-radius: 999px; overflow: hidden; }
.result-meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--coffee), var(--latte)); border-radius: 999px; transition: width 1.1s var(--ease); }
.lead { margin-top: 2.5rem; background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--line); padding: clamp(1.5rem, 4vw, 3rem); }
.lead h3 { font-size: 1.8rem; }
.lead > p { color: var(--muted); }

/* PR */
.pr-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.pull { margin: 2rem 0 1rem; padding: 0 0 0 1.5rem; border-left: 3px solid var(--coffee); font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; color: var(--espresso); font-style: italic; }
.pr-list { list-style: none; margin: 0; padding: 1.25rem 1.75rem; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.pr-list li { padding: .85rem 0; border-bottom: 1px solid var(--line); font-weight: 500; display: flex; align-items: center; gap: .75rem; }
.pr-list li:last-child { border-bottom: 0; }
.pr-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--latte); flex: none; }

/* Why */
.why { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0; border-top: 2px solid var(--espresso); }
.why > div { padding: 1.75rem 1.5rem 0 0; }
.why > div + div { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.why dt { font-family: var(--serif); font-size: 1.35rem; color: var(--espresso); margin-bottom: .6rem; }
.why dd { margin: 0; color: var(--muted); font-size: .98rem; }

/* About */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.about-media img { border-radius: var(--radius-lg); background: var(--cream); }
.lede-sm { font-family: var(--serif); font-size: 1.3rem; line-height: 1.55; color: var(--espresso); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1.4rem 3rem 1.4rem 0; position: relative; font-family: var(--serif); font-size: 1.3rem; color: var(--espresso); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: .5rem; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--coffee); border-bottom: 2px solid var(--coffee); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: #43392F; padding-bottom: 1.4rem; margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-direct { margin-top: 2rem; font-size: 1.05rem; }
.form-on-dark { background: var(--white); color: var(--charcoal); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem); }
.form-on-dark .btn-light { background: var(--espresso); color: var(--cream); }
.form-on-dark .btn-light:hover { background: var(--coffee); color: var(--white); }
.form-on-dark a { color: var(--coffee); }

/* Footer */
.site-footer { background: #2E1C13; color: #CDBBA5; padding: 4rem 0 2rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(200, 162, 122, .2); }
.footer-brand { font-family: var(--serif); font-size: 1.75rem; color: var(--cream); margin-bottom: .35rem; }
.footer-tag { font-size: .95rem; margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: .55rem 2.5rem; }
.footer-links a { color: #E6D8C5; text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: var(--latte); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.75rem; font-size: .85rem; }
.footer-base p { margin: 0; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 150%); background: var(--espresso); color: var(--cream); padding: 1rem 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); max-width: min(92vw, 520px); z-index: 80; transition: transform .35s var(--ease), visibility .35s; font-size: .98rem; visibility: hidden; }
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; }
.toast.is-error { background: var(--no); }

/* Success panel replacing a form */
.form-success { text-align: left; padding: 1rem 0; }
.form-success h3 { font-size: 1.6rem; }

/* Legal / 404 pages */
.page { padding: clamp(3rem, 7vw, 5rem) 0 6rem; }
.page .container { max-width: 760px; }
.page h2 { font-size: 1.6rem; margin-top: 2.5rem; }
.page p, .page li { color: #43392F; }
.page-404 { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.page-404 p { margin-inline: auto; }

/* Responsive */
@media (max-width: 1080px) {
  .process { grid-template-columns: 1fr; gap: 0; }
  .process::before { top: 28px; bottom: 28px; left: 27px; right: auto; width: 2px; height: auto; background: linear-gradient(var(--latte), rgba(200, 162, 122, .25)); }
  .step { display: grid; grid-template-columns: 56px 1fr; gap: 1.5rem; padding-bottom: 2rem; }
  .step-num { margin: 0; }
  .why { grid-template-columns: repeat(2, 1fr); border-top: 0; gap: 1.5rem; }
  .why > div, .why > div + div { padding: 1.5rem 0 0; border-left: 0; border-top: 2px solid var(--espresso); }
}
@media (max-width: 900px) {
  .hero-grid, .pr-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr 1fr; }
  .about-media { max-width: 480px; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .services, .grid-2, .why { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .tool-progress li { font-size: .75rem; }
  .tool-progress li span::before { content: counter(prog); display: block; font-size: 1rem; }
  .ledger-sources li { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .footer-links { grid-template-columns: 1fr 1fr; gap: .55rem 1.5rem; }
  .tool-nav .btn { flex: 1; }
}
