/* ==========================================================
   The Granny Review — main stylesheet
   ========================================================== */
:root {
  --paper: #F7F8FC;
  --white: #FFFFFF;
  --ink: #1B2140;
  --ink-soft: #4A5173;
  --teal: #0F7A6E;
  --teal-soft: #DDF1EE;
  --stamp: #E03E62;
  --butter: #FFD45E;
  --butter-soft: #FFF4D1;
  --line: #DCE0EC;
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(27, 33, 64, .35);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 248, 252, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 24px -20px rgba(27,33,64,.5); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
.brand-name span { font-weight: 500; }
.nav-links { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: .55rem .9rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: .98rem;
  transition: background .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--butter-soft); }
.nav-toggle {
  display: none; background: none; border: 1.5px solid var(--line); border-radius: 12px;
  width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ink); cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: .5rem 1.25rem 1.25rem;
    background: var(--paper); border-bottom: 1px solid var(--line);
    clip-path: inset(0 0 100% 0); transition: clip-path .35s ease;
  }
  .nav-links.is-open { clip-path: inset(0 0 0 0); }
  .nav-links a { padding: .9rem .5rem; border-radius: 10px; font-size: 1.1rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .9rem 1.4rem; border-radius: 999px; border: 2px solid var(--ink);
  font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
}
.btn-primary { background: var(--ink); color: var(--white); box-shadow: 4px 4px 0 var(--butter); }
.btn-primary:hover { color: var(--white); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--butter); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--white); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.75rem); font-weight: 800; letter-spacing: -0.045em; max-width: 13ch; }
.hero-lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 36ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.25rem; padding: 0; list-style: none; color: var(--ink-soft); font-size: .98rem; }
.hero-proof li { display: flex; align-items: center; gap: .45rem; }
.hero-proof .icon { color: var(--teal); }

/* Review card showcase */
.showcase { position: relative; min-height: 440px; }
.showcase-card {
  position: absolute; background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.showcase-back {
  inset: 30px 0 auto 60px; height: 340px; transform: rotate(6deg);
  background: var(--teal-soft); border-color: transparent;
}
.showcase-main { inset: 0 50px auto 0; padding: 1.5rem; }
.showcase-product {
  height: 190px; border-radius: 20px; background: var(--butter-soft);
  display: grid; place-items: center; margin-bottom: 1.25rem; position: relative; overflow: hidden;
}
.showcase-product svg.gadget { width: 120px; height: 120px; animation: float 5s ease-in-out infinite; }
.showcase-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .35rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal);
}
.showcase-main h3 { font-size: 1.4rem; margin-bottom: .6rem; }
.verdict-bars { display: grid; gap: .55rem; margin-top: 1rem; }
.verdict-row { display: grid; grid-template-columns: 7.5rem 1fr 2rem; align-items: center; gap: .6rem; font-size: .9rem; color: var(--ink-soft); }
.bar { height: 8px; border-radius: 99px; background: var(--paper); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--teal); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.verdict-row b { color: var(--ink); text-align: right; }

/* The stamp — the one loud moment */
.stamp {
  position: absolute; right: 0; top: -44px; width: 150px; height: 150px;
  color: var(--stamp); opacity: 0; transform: scale(2.4) rotate(-40deg);
}
.stamp.is-down { animation: stamp .55s cubic-bezier(.3,1.6,.5,1) forwards; }
.stamp svg { width: 100%; height: 100%; }
.stamp text { font: 800 11.5px var(--display); letter-spacing: .12em; fill: currentColor; }

@keyframes stamp {
  0%   { opacity: 0; transform: scale(2.4) rotate(-40deg); }
  60%  { opacity: 1; transform: scale(.92) rotate(-12deg); }
  100% { opacity: 1; transform: scale(1) rotate(-14deg); }
}
@keyframes float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }

/* Hero load sequence */
.hero [data-load] { opacity: 0; transform: translateY(18px); }
.is-loaded .hero [data-load] { animation: rise .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--d, 0) * 110ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .showcase { max-width: 460px; min-height: 430px; }
}

/* ---------- Ticker ---------- */
.ticker { background: var(--ink); color: var(--white); overflow: hidden; padding: .95rem 0; }
.ticker-track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { display: inline-flex; align-items: center; gap: .7rem; padding-right: 2.5rem; font-family: var(--display); font-weight: 600; font-size: 1.15rem; white-space: nowrap; }
.ticker-track span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--butter); margin-left: 1.8rem; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2.25rem; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 0; max-width: 18ch; }
.section-head p { color: var(--ink-soft); max-width: 42ch; margin: 0; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter {
  font: 700 .95rem var(--body); color: var(--ink); background: var(--white);
  border: 1.5px solid var(--line); border-radius: 999px; padding: .6rem 1.05rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem; transition: background .2s, border-color .2s, color .2s;
}
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Review grid */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.4rem; }
.review {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  display: flex; flex-direction: column; overflow: hidden;
  transition: opacity .3s, transform .3s;
}
.review.is-hidden { display: none; }
.review.is-entering { animation: pop .4s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.review-art { height: 150px; display: grid; place-items: center; position: relative; }
.review-art svg { width: 64px; height: 64px; stroke-width: 1.6; }
.review-art .score {
  position: absolute; top: 14px; right: 14px; background: var(--white); color: var(--ink);
  font: 800 1rem var(--display); padding: .35rem .65rem; border-radius: 10px;
}
.review-body { padding: 1.3rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.review-body h3 { font-size: 1.25rem; margin: .7rem 0 .45rem; }
.review-body p { color: var(--ink-soft); font-size: .98rem; flex: 1; }
.stars { display: flex; gap: 2px; color: var(--butter); }
.stars svg { width: 18px; height: 18px; fill: currentColor; stroke: #E8B92E; stroke-width: 1; }
.stars svg.off { fill: var(--line); stroke: var(--line); }
.review-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.review-link .icon { transition: transform .2s; }
.review-link:hover .icon { transform: translateX(4px); }
.tone-butter { background: var(--butter-soft); color: #8A6400; }
.tone-teal { background: var(--teal-soft); color: var(--teal); }
.tone-pink { background: #FDE4EA; color: var(--stamp); }
.tone-ink { background: #E4E7F3; color: var(--ink); }

/* How we test — a genuine sequence */
.test-section { background: var(--white); border-block: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: step; list-style: none; padding: 0; margin: 0; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 28px; left: 28px; right: 28px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}
.step { position: relative; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--ink); font: 800 1.2rem var(--display);
  position: relative; margin-bottom: 1.1rem;
}
.step-num .icon { width: 24px; height: 24px; }
.step h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.step h3 small { display: block; font: 700 .85rem var(--body); color: var(--teal); letter-spacing: 0; margin-bottom: .25rem; }
.step p { color: var(--ink-soft); font-size: .98rem; margin: 0; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
  .steps::before { display: none; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Trust / about */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-grid h2 { font-size: clamp(2rem, 4vw, 3rem); }
.about-grid .lead { font-size: 1.2rem; color: var(--ink-soft); }
.promise-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.promise-list li {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem 1.3rem;
  border-radius: var(--radius-md); background: var(--white); border: 1px solid var(--line);
}
.promise-list .icon-tile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.promise-list strong { display: block; font-family: var(--display); font-size: 1.1rem; margin-bottom: .15rem; }
.promise-list span { color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* CTA band */
.cta {
  background: var(--butter); border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 0 0 .35rem; max-width: 20ch; }
.cta p { margin: 0; max-width: 46ch; }
.cta-glasses { position: absolute; right: -30px; bottom: -40px; width: 220px; opacity: .14; color: var(--ink); pointer-events: none; }

/* Scroll reveal (subtle) */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C9CDE0; padding: 3.5rem 0 2rem; margin-top: clamp(3rem, 7vw, 5rem); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.site-footer .brand { color: var(--white); }
.footer-about { max-width: 42ch; margin-top: 1rem; font-size: .98rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: flex-end; align-content: start; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--white); text-decoration: none; font-weight: 700; }
.footer-links a:hover { color: var(--butter); }
.disclosure { font-size: .88rem; line-height: 1.55; margin: 1.5rem 0 0; color: #A5AAC4; max-width: 90ch; }
.copyright { font-size: .88rem; margin-top: 1rem; color: #A5AAC4; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } .footer-links { justify-content: flex-start; } }

/* ---------- Inner pages (legal, contact) ---------- */
.page-hero { padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; margin-bottom: .4rem; }
.page-hero p { color: var(--ink-soft); margin: 0; }
.crumbs { display: flex; gap: .4rem; align-items: center; font-size: .92rem; margin-bottom: 1.25rem; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.legal-layout { display: grid; grid-template-columns: 250px 1fr; gap: 3rem; align-items: start; }
.toc {
  position: sticky; top: 96px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 1.1rem; font-size: .92rem;
}
.toc p { font-family: var(--display); font-weight: 700; margin-bottom: .6rem; color: var(--ink); }
.toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover, .toc a.is-active { color: var(--teal); text-decoration: underline; }
.legal {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem); max-width: 78ch;
}
.legal h2 { font-size: 1.45rem; margin: 2.2rem 0 .8rem; scroll-margin-top: 96px; }
.legal h2:first-of-type { margin-top: 1.5rem; }
.legal p, .legal li { color: #2C3354; }
.legal ol { padding-left: 1.3rem; }
.legal ol li { margin-bottom: .6rem; }
.legal .caps { font-size: .95rem; }
.effective { display: inline-flex; align-items: center; gap: .45rem; background: var(--teal-soft); color: var(--teal); font-weight: 700; font-size: .9rem; padding: .4rem .8rem; border-radius: 999px; margin-bottom: 1rem; }
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2rem; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3.5vw, 2.4rem); }
.email-card { background: var(--ink); color: var(--white); border: none; }
.email-card h2 { font-size: 1.6rem; }
.email-card p { color: #C9CDE0; }
.email-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; justify-content: space-between;
  background: rgba(255,255,255,.08); border-radius: var(--radius-md); padding: .9rem 1rem; margin: 1.25rem 0 1.5rem;
}
.email-row a { color: var(--butter); font-weight: 700; font-size: 1.08rem; word-break: break-all; }
.copy-btn {
  display: inline-flex; align-items: center; gap: .4rem; font: 700 .9rem var(--body);
  background: var(--butter); color: var(--ink); border: none; border-radius: 999px; padding: .55rem .95rem; cursor: pointer;
}
.copy-btn.is-done { background: #9BE3D6; }
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.note-list li { display: flex; gap: .8rem; font-size: .98rem; color: #C9CDE0; }
.note-list .icon { color: var(--butter); margin-top: .2rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .95rem; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .8rem .9rem; width: 100%;
  transition: border-color .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); background: var(--white); }
.field textarea { min-height: 150px; resize: vertical; }
.form-hint { font-size: .9rem; color: var(--ink-soft); margin: 1rem 0 0; }
.form-error { color: var(--stamp); font-weight: 700; font-size: .92rem; margin: .75rem 0 0; min-height: 1.2em; }
.about-copy { margin-top: 2rem; }
.about-copy h2 { font-size: 1.6rem; }
.about-copy p { color: var(--ink-soft); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } }

/* Back to top */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40;
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--ink);
  background: var(--butter); color: var(--ink); display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s;
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero [data-load], .reveal { opacity: 1; transform: none; }
  .stamp { opacity: 1; transform: rotate(-14deg); }
  .ticker-track { animation: none; }
}
