:root {
  --ruby: #a3123a;
  --ruby-dark: #7a0d2b;
  --ruby-bright: #e0245e;
  --ink: #2b1b21;
  --muted: #5e4850;
  --bg: #fffafb;
  --alt: #f8eef1;
  --line: #e8d5db;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(122, 13, 43, .12);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1.0625rem;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--ruby); }
a:hover { color: var(--ruby-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6rem; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--ruby-bright); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff;
  padding: .6rem 1rem; border-radius: 8px; z-index: 100;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 250, 251, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ruby); }
.site-nav ul { list-style: none; display: flex; align-items: center; gap: 1.5rem; margin: 0; padding: 0; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; padding: .4rem 0; border-bottom: 2px solid transparent; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--ruby); color: var(--ruby); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s, opacity .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-block; background: var(--ruby); color: #fff; border: 2px solid var(--ruby);
  padding: .8rem 1.5rem; border-radius: 999px; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .15s, color .15s;
}
.btn:hover { background: var(--ruby-dark); border-color: var(--ruby-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ruby); }
.btn-ghost:hover { background: var(--ruby); color: #fff; }
.btn-small { padding: .5rem 1.1rem; font-size: .95rem; }
.btn-light { background: #fff; color: var(--ruby-dark); border-color: #fff; }
.btn-light:hover { background: var(--alt); color: var(--ruby-dark); border-color: var(--alt); }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5rem) 0; background: linear-gradient(160deg, var(--alt), var(--bg) 70%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 800; color: var(--ruby); margin-bottom: .6rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(122, 13, 43, .18)); }
.page-hero { padding: clamp(2rem, 6vw, 3.5rem) 0; background: linear-gradient(160deg, var(--alt), var(--bg)); border-bottom: 1px solid var(--line); }

/* Sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section.alt { background: var(--alt); }
.section-intro { color: var(--muted); max-width: 65ch; margin-bottom: 2rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; }
.icon { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--alt); stroke: var(--ruby); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .9rem; }
.two-col { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem; align-items: start; }
.check-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .7rem; }
.check-list li { position: relative; padding-left: 2rem; }
.check-list li::before { position: absolute; left: 0; top: .1rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 800; color: #fff; }
.check-list .yes::before { content: "\2713"; background: #1d7a46; }
.check-list .no::before { content: "!"; background: #a15c00; }
.note { color: var(--muted); font-size: .98rem; }
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; counter-reset: s; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.steps p { color: var(--muted); margin: 0; }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ruby); color: #fff; font-weight: 800; margin-bottom: .8rem; }

.cta { background: linear-gradient(135deg, var(--ruby), var(--ruby-dark)); color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0; text-align: center; }
.cta p { opacity: .95; }
.cta-inner { display: grid; justify-items: center; }

/* Demos */
.demos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; }
.demo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.demo > p { color: var(--muted); }
.field { margin-bottom: 1rem; }
label { display: block; font-weight: 700; margin-bottom: .35rem; }
input[type="text"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 10px; padding: .65rem .8rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--ruby); outline: none; box-shadow: 0 0 0 3px rgba(224, 36, 94, .25); }
input[type="range"] { width: 100%; accent-color: var(--ruby); }
.results { margin: 1rem 0 0; padding: 1rem; background: var(--alt); border-radius: 12px; display: grid; gap: .5rem; }
.results div { display: flex; justify-content: space-between; gap: 1rem; }
.results dt { color: var(--muted); }
.results dd { margin: 0; font-weight: 700; }
.results .big { border-top: 1px solid var(--line); padding-top: .6rem; font-size: 1.2rem; }
.results .big dd { color: var(--ruby); }
.palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; margin-bottom: 1rem; }
.swatch { border: 0; border-radius: 10px; height: 130px; display: flex; align-items: flex-end; justify-content: center; padding: .4rem 0; cursor: pointer; font: 700 .7rem/1 ui-monospace, Consolas, monospace; transition: transform .15s; }
.swatch:hover { transform: translateY(-4px); }
.demo-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.status { margin: .8rem 0 0; min-height: 1.5rem; color: var(--muted); font-weight: 600; }
.timer-face { display: grid; place-items: center; height: 130px; background: var(--ink); border-radius: 14px; margin-bottom: 1rem; }
.timer-face span { font: 800 3rem/1 ui-monospace, Consolas, monospace; color: #fff; letter-spacing: .04em; }

/* Form */
.form-layout { grid-template-columns: 1.3fr .8fr; }
.form-card, .side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.form-card { box-shadow: var(--shadow); }
.side-card { background: var(--alt); }
textarea { resize: vertical; }
.error { color: #b00020; font-size: .92rem; font-weight: 600; margin: .3rem 0 0; min-height: 0; }
.error:empty { display: none; }
input.invalid, select.invalid, textarea.invalid { border-color: #b00020; }
.success { margin-top: 1.2rem; padding: 1rem 1.2rem; background: #e6f4ec; border: 1px solid #1d7a46; color: #11502d; border-radius: 10px; font-weight: 600; }

/* Footer */
.site-footer { background: var(--ink); color: #f1e3e8; padding: 2.5rem 0 1.5rem; }
.site-footer a { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.5rem; }
.brand-footer { color: #fff; margin-bottom: .5rem; }
.brand-footer:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; justify-content: start; }
.copy { grid-column: 1 / -1; border-top: 1px solid #4a2f38; padding-top: 1rem; margin: 0; font-size: .9rem; color: #d9c3cb; }

/* Responsive */
@media (max-width: 960px) {
  .card-grid, .demos { grid-template-columns: repeat(2, 1fr); }
  .demos .demo:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; padding: 1rem 1.25rem 1.5rem; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .hero-grid, .two-col, .form-layout, .steps, .card-grid, .demos { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}