/* ==========================================================
   [BRAND_NAME] — styles.css
   Palette: wine → crimson → rose. One memorable element (hero rings),
   everything else quiet.
   ========================================================== */

:root {
  --ink:        #12040a;   /* page background — black cherry */
  --ink-2:      #1f060d;   /* raised surfaces */
  --ink-3:      #2a0810;   /* cards / table rows */
  --wine:       #4a0710;
  --crimson:    #c1121f;   /* primary accent */
  --vermilion:  #e63b2e;   /* hot accent, hover / glow */
  --rose:       #f5b8b0;   /* secondary text */
  --paper:      #f7e9e6;   /* body text */
  --line:       rgba(245, 184, 176, .16);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(.85rem, .8rem + .2vw, .95rem);
  --step-0:  clamp(1rem, .95rem + .3vw, 1.125rem);
  --step-1:  clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  --step-3:  clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem);
  --step-4:  clamp(3rem, 1.8rem + 5vw, 6.5rem);

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section: clamp(4rem, 9vw, 9rem);
  --radius: 4px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--crimson); text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--vermilion); }

:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 3px; border-radius: 2px; }

.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 {
  position: absolute; left: var(--gutter); top: -3rem;
  background: var(--crimson); color: #fff; padding: .5rem 1rem; z-index: 100;
  transition: top .2s;
}
.skip:focus { top: .75rem; }

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: 0 0 .6em;
  color: var(--paper);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-variation-settings: "opsz" 144; overflow-wrap: anywhere; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 500; }
p  { margin: 0 0 1.1em; max-width: var(--measure); }
.prose p { color: var(--rose); }
.prose h3 { margin-top: 2.2rem; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 1rem var(--gutter);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, padding .3s;
}
.site-head.is-scrolled { border-bottom-color: var(--line); padding-block: .6rem; }

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-size: var(--step-1); font-weight: 500;
  text-decoration: none; color: var(--paper); margin: 0;
}
.brand-mark { width: 30px; height: 30px; color: var(--vermilion); }

.menu {
  display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); align-items: center;
  list-style: none; margin: 0; padding: 0;
}
.menu a { text-decoration: none; font-weight: 500; font-size: var(--step--1); color: var(--rose); position: relative; }
.menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -.35em; height: 1px;
  background: var(--vermilion); transition: right .35s var(--ease-out);
}
.menu a:not(.btn):hover::after,
.menu a:not(.btn).is-active::after { right: 0; }
.menu a.is-active { color: var(--paper); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 44px; height: 44px; cursor: pointer; position: relative; color: var(--paper);
}
.nav-toggle .bar {
  position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor;
  transition: transform .3s var(--ease-out), top .3s var(--ease-out);
}
.nav-toggle .bar:nth-child(2) { top: 16px; }
.nav-toggle .bar:nth-child(3) { top: 26px; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85em 1.6em; border-radius: 999px;
  font-weight: 700; font-size: var(--step--1); text-decoration: none;
  transition: background .25s, color .25s, box-shadow .25s, transform .2s;
}
.btn-solid { background: var(--crimson); color: #fff; box-shadow: 0 0 0 0 rgba(230, 59, 46, .5); }
.btn-solid:hover { background: var(--vermilion); box-shadow: 0 0 0 8px rgba(230, 59, 46, .15); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--crimson); color: var(--paper); }
.btn-ghost:hover { background: rgba(193, 18, 31, .18); }
.link-quiet { color: var(--rose); font-weight: 500; font-size: var(--step--1); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 900px);
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
  padding: var(--section) var(--gutter) calc(var(--section) * .7);
  isolation: isolate;
  overflow: hidden;
}
.hero-copy { position: relative; z-index: 2; max-width: 44rem; min-width: 0; }

.crumbs ol { list-style: none; display: flex; gap: .6rem; padding: 0; margin: 0 0 2rem; font-size: var(--step--1); color: var(--rose); }
.crumbs li + li::before { content: "/"; margin-right: .6rem; opacity: .5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.hero h1 { display: grid; gap: .1em; }
.hero h1 .h1-key { display: block; }
.hero h1 em {
  display: block; font-style: italic; font-weight: 300;
  font-size: .5em; color: var(--rose); letter-spacing: 0; line-height: 1.2;
}
.lede { font-size: var(--step-1); color: var(--rose); font-weight: 400; margin: 1.6rem 0 2rem; max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }

.hero-facts {
  display: grid; grid-template-columns: repeat(3, auto); gap: 2.5rem;
  margin: 3.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line);
  width: fit-content;
}
.hero-facts dt { font-size: var(--step--1); color: var(--rose); }
.hero-facts dd { margin: .15rem 0 0; font-family: var(--font-display); font-size: var(--step-2); overflow-wrap: anywhere; }

/* the memorable thing: peeled onion rings, bleeding off the right edge */
.hero-rings {
  position: absolute; z-index: 1;
  right: -12vw; top: 50%; translate: 0 -50%;
  width: clamp(420px, 58vw, 900px); aspect-ratio: 1;
  pointer-events: none;
}
.hero-rings span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--crimson);
  animation: spin 40s linear infinite;
}
.hero-rings span:nth-child(1) { inset: 0;   border-style: dashed; opacity: .35; animation-duration: 90s; }
.hero-rings span:nth-child(2) { inset: 11%; border-color: var(--vermilion); opacity: .55; animation-direction: reverse; animation-duration: 60s; border-style: dotted; border-width: 2px; }
.hero-rings span:nth-child(3) { inset: 23%; opacity: .7; border-style: dashed; animation-duration: 42s; }
.hero-rings span:nth-child(4) { inset: 36%; border-color: var(--rose); opacity: .5; animation-direction: reverse; animation-duration: 28s; border-width: 1px; }
.hero-rings span:nth-child(5) {
  inset: 47%; border: none; opacity: 1;
  background: radial-gradient(circle, #ffd9d2 0 18%, var(--vermilion) 30%, rgba(230, 59, 46, 0) 70%);
  animation: pulse 4.5s ease-in-out infinite;
}
.hero::before {
  content: ""; position: absolute; z-index: 0; inset: auto -20% -40% auto;
  width: 80vw; height: 80vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 18, 31, .28), transparent 65%);
  filter: blur(40px);
}

@keyframes spin  { to { rotate: 360deg; } }
@keyframes pulse { 0%, 100% { scale: 1; opacity: .9; } 50% { scale: 1.12; opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding: var(--section) var(--gutter); position: relative; }
.section + .section { border-top: 1px solid var(--line); }

.section-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: start;
}
.section-grid-rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.section-head { max-width: var(--measure); margin-bottom: 3rem; }
.section-head p { color: var(--rose); font-size: var(--step-1); }
.section-head-side { margin-bottom: 0; position: sticky; top: 6rem; }

/* figures */
.figure { margin: 0; }
.figure img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--ink-2);
}
.figure figcaption { margin-top: .8rem; font-size: var(--step--1); color: var(--rose); opacity: .8; }
.figure-onion { position: sticky; top: 6rem; }
.figure-wide { margin: 0 0 3.5rem; }
.figure-lantern { max-width: 380px; justify-self: end; }

/* steps — numbered because the content IS a sequence */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.step {
  position: relative; padding: 2.25rem 2rem 2rem;
  background: var(--ink-2);
  transition: background .3s;
}
.step + .step { border-left: 1px solid var(--line); }
.step:hover { background: var(--ink-3); }
.step-no {
  font-family: var(--font-display); font-size: var(--step-3); line-height: 1;
  color: var(--crimson); display: block; margin-bottom: 1.25rem;
}
.step h3 { margin-bottom: .5rem; }
.step p { color: var(--rose); font-size: var(--step--1); margin: 0; }
.step::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--vermilion); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.step.is-visible::after { transform: scaleX(1); }
.step:nth-child(2).is-visible::after { transition-delay: .18s; }
.step:nth-child(3).is-visible::after { transition-delay: .36s; }

/* feature list */
.feature-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0; }
.feature-list li {
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-top: 1px solid var(--line);
  position: relative;
}
.feature-list li:last-child { border-bottom: 1px solid var(--line); }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: calc(1.5rem + .7em); width: 8px; height: 8px;
  border-radius: 50%; background: var(--crimson);
  box-shadow: 0 0 0 4px rgba(193, 18, 31, .2);
}
.feature-list h3 { margin-bottom: .35rem; }
.feature-list p { color: var(--rose); font-size: var(--step--1); margin: 0; }

/* comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.cmp { width: 100%; border-collapse: collapse; min-width: 560px; font-size: var(--step--1); }
.cmp th, .cmp td { padding: 1.1rem 1.4rem; text-align: left; border-bottom: 1px solid var(--line); }
.cmp thead th { background: var(--ink-3); font-family: var(--font-display); font-size: var(--step-0); font-weight: 500; }
.cmp thead th:nth-child(2) { color: var(--vermilion); }
.cmp tbody th { font-weight: 500; color: var(--rose); }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp tbody tr:hover { background: rgba(193, 18, 31, .08); }
.cmp td.yes { color: var(--paper); font-weight: 700; }
.cmp td.yes::before { content: "✓"; color: var(--vermilion); margin-right: .5rem; }

/* FAQ */
.faq-list { display: grid; gap: 0; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.4rem 3rem 1.4rem 0; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: var(--step-1); }
.faq-item summary::after {
  content: ""; position: absolute; right: .5rem; top: 50%; width: 14px; height: 14px;
  translate: 0 -50%;
  background:
    linear-gradient(var(--vermilion), var(--vermilion)) center / 100% 2px no-repeat,
    linear-gradient(var(--vermilion), var(--vermilion)) center / 2px 100% no-repeat;
  transition: transform .35s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--rose); padding: 0 0 1.6rem; margin: 0; }
.faq-item[open] p { animation: reveal .45s var(--ease-out); }
@keyframes reveal { from { opacity: 0; translate: 0 -6px; } }

/* CTA */
.cta { padding-top: 0; }
.cta-box {
  position: relative; overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--wine), var(--ink-3) 60%);
  border: 1px solid rgba(230, 59, 46, .35);
}
.cta-box::after {
  content: ""; position: absolute; right: -10%; top: -40%; width: 50%; aspect-ratio: 1;
  border-radius: 50%; border: 1.5px dashed var(--crimson); opacity: .4;
  animation: spin 70s linear infinite;
}
.cta-box h2 { max-width: 20ch; }
.cta-box p { color: var(--rose); }

/* Footer */
.site-foot { padding: 4rem var(--gutter) 2rem; border-top: 1px solid var(--line); background: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 3rem; }
.foot-brand p { color: var(--rose); font-size: var(--step--1); }
.foot-h { font-family: var(--font-body); font-size: var(--step--1); font-weight: 700; margin-bottom: 1rem; color: var(--paper); }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-foot a { text-decoration: none; color: var(--rose); font-size: var(--step--1); }
.site-foot a:hover { color: var(--paper); text-decoration: underline; }
.site-foot p { font-size: var(--step--1); color: var(--rose); }
.copy { margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); opacity: .7; }

/* ---------- Scroll reveal (one orchestrated entrance per section) ---------- */
.js .reveal { opacity: 0; translate: 0 18px; transition: opacity .7s var(--ease-out), translate .7s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; translate: 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .section-grid, .section-grid-rev { grid-template-columns: 1fr; }
  .figure-onion, .section-head-side { position: static; }
  .figure-onion { max-width: 420px; }
  .figure-lantern { justify-self: start; order: -1; }
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; border-top: 1px solid var(--line); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .hero-rings { right: -40vw; opacity: .55; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
    display: none;
  }
  .menu.is-open { display: flex; }
  .menu li { padding: .6rem 0; }
  .menu a.btn { margin-top: .75rem; }
  .hero-facts { grid-template-columns: 1fr 1fr; gap: 1.5rem; width: 100%; }
  .foot-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; translate: none; }
  .step::after { transform: none; }
}

@media print {
  .site-head, .hero-rings, .cta, .skip { display: none; }
  body { background: #fff; color: #000; }
}
