/* CSS Variables */
:root {
  --brand: #e21428;
  --brand-dark: #b70d1d;
  --brand-soft: #fff0f2;
  --ink: #15171c;
  --ink-2: #323640;
  --muted: #68707d;
  --line: #e6e8ec;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-dark: #111318;
  --success: #157347;
  --warning: #8a5a00;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 8px 22px rgba(17, 19, 24, .06);
  --shadow: 0 18px 50px rgba(17, 19, 24, .11);
  --container: 1180px;
  --header-h: 76px;
  --ease: 180ms ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding-left: 1.2rem; }
img, picture, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }

/* Base Styles */
body {
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
main { min-height: 60vh; }
a { text-decoration-thickness: .08em; text-underline-offset: .2em; }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-sm { padding: clamp(40px, 5vw, 64px) 0; }
.section-alt { background: var(--surface-2); }
.section-dark { background: var(--surface-dark); color: white; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.6rem; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.center { text-align: center; }
.narrow { max-width: 820px; margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow { color: var(--brand); font-size: .82rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.kicker { font-size: 1.05rem; color: var(--ink-2); max-width: 720px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; font-size: .92rem; color: var(--muted); margin-bottom: 22px; }
.breadcrumbs a { color: var(--ink-2); }
.breadcrumbs span[aria-current="page"] { font-weight: 700; }
.quick-answer { background: var(--brand-soft); border: 1px solid #ffd0d7; border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 22px; }
.quick-answer strong { display: block; margin-bottom: 6px; }
.notice { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: white; color: var(--ink-2); }
.notice--warning { background: #fff9e9; border-color: #f1d58d; }
.tag { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .82rem; font-weight: 800; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Typography */
h1, h2, h3, h4 { line-height: 1.13; letter-spacing: -.025em; }
h1 { font-size: clamp(2.45rem, 6vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
h4 { font-size: 1.08rem; }
p { color: var(--ink-2); }
.section-dark p { color: #d4d8df; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 760px; }
.section-head { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 38px; }
.section-head > div { max-width: 760px; }
.section-head p { margin-top: 12px; }
.article-prose { max-width: 820px; }
.article-prose > * + * { margin-top: 1.1rem; }
.article-prose h2 { margin-top: 2.8rem; font-size: clamp(1.65rem, 3vw, 2.35rem); }
.article-prose h3 { margin-top: 2rem; }
.article-prose li + li { margin-top: .5rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; color: var(--muted); font-size: .92rem; }
.article-shell { display: grid; grid-template-columns: minmax(0, 820px) 260px; gap: 54px; align-items: start; }
.article-aside { position: sticky; top: 110px; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: white; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--brand); }
.toc li + li { margin-top: .5rem; }

/* Utilities */
.skip-link { position: fixed; z-index: 1000; left: 12px; top: 12px; transform: translateY(-160%); background: var(--ink); color: white; padding: 10px 14px; border-radius: 8px; transition: transform var(--ease); }
.skip-link:focus { transform: translateY(0); }
.icon-badge { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-weight: 900; flex: 0 0 auto; }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--success); font-weight: 900; }
.check-list li + li { margin-top: .65rem; }
.inline-link { color: var(--brand-dark); font-weight: 800; }

/* Header */
.announcement { background: var(--surface-dark); color: white; text-align: center; padding: 9px 20px; font-size: .88rem; }
.announcement a { color: #ffb7c0; font-weight: 800; }
.site-header { position: sticky; z-index: 100; top: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: box-shadow var(--ease), border-color var(--ease); }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 10px 30px rgba(17,19,24,.05); }
.header-inner { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 900; min-width: max-content; }
.brand-mark { width: 38px; height: 42px; border-radius: 13px 13px 17px 17px; background: linear-gradient(145deg, #ff3347, var(--brand-dark)); color: white; display: grid; place-items: center; box-shadow: 0 7px 16px rgba(226,20,40,.25); }
.brand-text { display: grid; line-height: 1.05; }
.brand-text small { font-size: .65rem; color: var(--muted); letter-spacing: .07em; text-transform: uppercase; margin-top: 4px; }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* Navigation */
.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav a { text-decoration: none; color: var(--ink-2); font-size: .94rem; font-weight: 700; padding: 10px 11px; border-radius: 10px; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--brand-dark); background: var(--brand-soft); }
.menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: white; border-radius: 12px; cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px auto; transition: transform var(--ease), opacity var(--ease); }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(70px, 9vw, 128px) 0; background: radial-gradient(circle at 15% 20%, #ffe8ec 0, transparent 34%), linear-gradient(135deg, #fff 0%, #fafafa 60%, #fff1f3 100%); }
.hero::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -180px; top: -220px; border-radius: 50%; border: 90px solid rgba(226,20,40,.06); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); gap: clamp(40px, 7vw, 90px); align-items: center; }
.hero-copy p { margin-top: 20px; }
.hero-copy .cluster { margin-top: 30px; }
.hero-proof { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--muted); font-size: .92rem; }
.hero-visual { position: relative; }
.hero-visual::before { content: ""; position: absolute; inset: 8% 4% 0; background: linear-gradient(145deg, #ffdde3, #fff); border-radius: 42px; transform: rotate(-3deg); z-index: -1; }
.hero-visual img { width: 100%; height: auto; filter: drop-shadow(0 24px 28px rgba(17,19,24,.15)); }
.page-hero { padding: clamp(54px, 7vw, 86px) 0; background: linear-gradient(180deg, #fff 0, #fff5f6 100%); border-bottom: 1px solid #f7dadd; }
.page-hero h1 { max-width: 940px; font-size: clamp(2.4rem, 5vw, 4.4rem); }
.page-hero .lead { margin-top: 18px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 11px 18px; border-radius: 12px; border: 1px solid transparent; text-decoration: none; font-weight: 850; line-height: 1.2; cursor: pointer; transition: transform var(--ease), box-shadow var(--ease), background var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: white; box-shadow: 0 10px 20px rgba(226,20,40,.2); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: white; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; border-color: #ffffff33; color: white; }
.btn-sm { min-height: 42px; padding: 9px 14px; font-size: .9rem; }
.btn-block { width: 100%; }

/* Cards */
.card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); box-shadow: var(--shadow-sm); }
.card h3 { margin-top: 16px; }
.card p { margin-top: 10px; }
.card--flat { box-shadow: none; }
.card--red { background: linear-gradient(145deg, #fff2f4, #fff); border-color: #ffd1d7; }
.card-link { display: block; height: 100%; text-decoration: none; transition: transform var(--ease), box-shadow var(--ease); }
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* Sections */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: white; }
.stats-strip > div { padding: 22px; border-right: 1px solid var(--line); }
.stats-strip > div:last-child { border-right: 0; }
.stats-strip strong { display: block; }
.stats-strip span { color: var(--muted); font-size: .9rem; }
.media-frame { border-radius: var(--radius-lg); background: linear-gradient(145deg, #ffeff2, #f6f6f7); border: 1px solid #f2d2d7; padding: clamp(22px, 4vw, 40px); overflow: hidden; }
.media-frame img { width: 100%; height: auto; }
.cta-band { border-radius: var(--radius-lg); padding: clamp(30px, 6vw, 60px); background: linear-gradient(125deg, #b50b1c 0%, var(--brand) 55%, #f74658 100%); color: white; position: relative; overflow: hidden; }
.cta-band::after { content:""; position:absolute; width:280px; height:280px; border:60px solid #ffffff12; border-radius:50%; right:-100px; top:-100px; }
.cta-band p { color: #ffe9ec; max-width: 700px; margin-top: 12px; }
.cta-band .cluster { margin-top: 24px; position: relative; z-index: 1; }
.disclosure { background: #fff8e6; color: #554318; border-top: 1px solid #f0ddaa; border-bottom: 1px solid #f0ddaa; padding: 13px 0; font-size: .9rem; }

/* Features */
.feature-row { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.feature-row + .feature-row { margin-top: 24px; }
.feature-list-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.feature-list-card h3 { margin-bottom: 8px; }
.usecase { display: flex; gap: 15px; align-items: flex-start; }
.usecase + .usecase { margin-top: 20px; }

/* How It Works */
.timeline { display: grid; gap: 18px; counter-reset: steps; }
.timeline-step { counter-increment: steps; display: grid; grid-template-columns: 60px 1fr; gap: 20px; align-items: start; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.timeline-step::before { content: counter(steps); width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: white; font-weight: 900; font-size: 1.2rem; }
.timeline-step p { margin-top: 8px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pricing-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; background: white; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.pricing-card.featured { border: 2px solid var(--brand); transform: translateY(-6px); }
.price-label { font-size: 1.8rem; line-height: 1.1; font-weight: 900; margin: 18px 0 8px; }
.pricing-card ul { margin: 22px 0; }
.pricing-card .btn { margin-top: auto; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-size: .9rem; color: var(--ink); }
tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: white; overflow: hidden; }
.faq-question { width: 100%; border: 0; background: white; color: var(--ink); text-align: left; padding: 19px 54px 19px 20px; position: relative; font-weight: 850; cursor: pointer; }
.faq-question::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.45rem; color: var(--brand); }
.faq-question[aria-expanded="true"]::after { content: "−"; }
.faq-answer { padding: 0 20px 20px; }
.faq-answer[hidden] { display: none; }
.faq-category + .faq-category { margin-top: 38px; }
.faq-category > h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 16px; }

/* Blog */
.blog-card { overflow: hidden; padding: 0; }
.blog-card-media { min-height: 190px; display: grid; place-items: center; background: linear-gradient(145deg, #fff0f2, #f5f6f8); }
.blog-card-media span { font-size: 3rem; }
.blog-card-body { padding: 24px; }
.blog-card h3 { margin: 10px 0; }
.blog-card p { margin-top: 0; }
.blog-card-meta { font-size: .82rem; color: var(--muted); }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 800; font-size: .92rem; }
input, textarea, select { width: 100%; border: 1px solid #cfd3da; border-radius: 11px; padding: 12px 13px; background: white; color: var(--ink); min-height: 46px; }
textarea { min-height: 150px; resize: vertical; }
.form-status { margin-top: 14px; font-weight: 700; }

/* Footer */
.site-footer { background: #0f1115; color: white; padding: 64px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 36px; }
.footer-brand p { color: #afb5bf; margin-top: 14px; max-width: 340px; }
.footer-col h3 { font-size: .92rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a { display: block; color: #c7cbd2; text-decoration: none; padding: 5px 0; font-size: .93rem; }
.footer-col a:hover { color: white; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid #ffffff19; display: flex; justify-content: space-between; gap: 20px; color: #969da8; font-size: .86rem; }
.back-to-top { position: fixed; z-index: 90; right: 20px; bottom: 20px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--ink); color: white; box-shadow: var(--shadow); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px); transition: all var(--ease); }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Animations */
.reveal { animation: rise .55s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* Accessibility */
:focus-visible { outline: 3px solid #1b67d9; outline-offset: 3px; }
[aria-disabled="true"] { cursor: not-allowed; opacity: .65; }

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .primary-nav a { padding-inline: 8px; }
  .footer-grid { grid-template-columns: 1.4fr repeat(2, 1fr); }
}
@media (max-width: 992px) {
  .menu-toggle { display: inline-block; }
  .primary-nav { position: fixed; inset: calc(var(--header-h) + 36px) 20px auto; flex-direction: column; align-items: stretch; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); opacity: 0; transform: translateY(-10px); pointer-events: none; transition: all var(--ease); }
  .primary-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .primary-nav a { padding: 12px 14px; }
  .header-actions .login-link { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 760px; }
  .hero-visual { max-width: 640px; margin-inline: auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: none; }
  .article-shell { grid-template-columns: 1fr; }
  .article-aside { position: static; order: -1; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  :root { --header-h: 70px; }
  .container { width: min(calc(100% - 30px), var(--container)); }
  .grid-2, .grid-3, .related-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stats-strip > div:nth-child(2) { border-right: 0; }
  .stats-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section-head { display: block; }
  .section-head .btn { margin-top: 18px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
}
@media (max-width: 576px) {
  .announcement { font-size: .78rem; }
  .brand-text small { display: none; }
  .header-actions .btn { display: none; }
  .grid-4, .stats-strip { grid-template-columns: 1fr; }
  .stats-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .stats-strip > div:last-child { border-bottom: 0; }
  .hero { padding-top: 54px; }
  .hero-grid { gap: 34px; }
  .hero-copy .cluster .btn { width: 100%; }
  .timeline-step { grid-template-columns: 46px 1fr; padding: 20px; }
  .timeline-step::before { width: 42px; height: 42px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
