/* Complyanz marketing site — shared stylesheet for all pages.
   No build step: this file is the single source of visual truth. */

:root {
  /* Surfaces */
  --ink-900: #0b1120;   /* hero background top */
  --ink-800: #111827;   /* hero background bottom */
  --ink-700: #1e293b;
  --paper: #ffffff;
  --paper-tint: #f8fafc;
  --line: #e2e8f0;
  --line-dark: rgba(255, 255, 255, 0.12);

  /* Text — AA verified against their intended backgrounds */
  --text: #0f172a;
  --text-muted: #475569;        /* 7.5:1 on --paper, 7.0:1 on --paper-tint */
  --text-invert: #f8fafc;
  --text-invert-muted: #cbd5e1; /* 10.9:1 on --ink-900 */

  /* Brand */
  --brand: #6d28d9;             /* 6.4:1 on white */
  --brand-bright: #8b5cf6;      /* for use on dark surfaces only */
  --brand-soft: #f5f3ff;

  /* Framework accents — mirror src/lib/frameworks/*.ts */
  --c-27001: #2563eb;
  --c-27701: #7c3aed;
  --c-42001: #b45309;
  --c-soc2: #047857;
  --c-hipaa: #0f766e;

  --accent: var(--brand);

  /* Type scale */
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: 2.25rem;
  --step-5: 3rem;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.10);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

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

.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;
}

.muted { color: var(--text-muted); }

/* ---------- Layout ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section { padding: 88px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section--tint { background: var(--paper-tint); }

.section-head { max-width: 720px; margin: 0 0 48px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: var(--step-4); margin-bottom: 16px; }
h3 { font-size: var(--step-2); letter-spacing: -0.01em; }
.section-head p { font-size: var(--step-1); color: var(--text-muted); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-invert); font-weight: 700; font-size: var(--step-1); }
.logo__mark { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; background: linear-gradient(135deg, var(--brand-bright), #3b82f6); display: grid; place-items: center; }
.logo__mark svg { width: 17px; height: 17px; fill: #fff; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--text-invert-muted); text-decoration: none; font-size: var(--step--1); font-weight: 550; }
.nav__links a:hover { color: var(--text-invert); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__lang { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav__lang a { color: var(--text-invert-muted); text-decoration: none; font-size: 12px; font-weight: 650; letter-spacing: .03em; padding: 4px 7px; border-radius: 6px; }
.nav__lang a:hover { color: var(--text-invert); background: rgba(255,255,255,.08); }
.nav__lang a[aria-current="page"] { color: var(--text-invert); background: rgba(255,255,255,.12); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  font-size: var(--step--1); font-weight: 650;
  text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.btn--lg { padding: 14px 26px; font-size: var(--step-0); border-radius: 12px; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: #5b21b6; }
.btn--secondary { background: rgba(255,255,255,0.06); color: var(--text-invert); border-color: rgba(255,255,255,0.28); }
.btn--secondary:hover { background: rgba(255,255,255,0.14); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--ink-900), var(--ink-800)); color: var(--text-invert); padding: 96px 0 104px; }
.hero__inner { max-width: 860px; }
.hero__title { font-size: var(--step-5); font-weight: 780; letter-spacing: -0.035em; margin-bottom: 20px; }
.hero__title em { font-style: normal; color: var(--brand-bright); }
.hero__sub { font-size: var(--step-1); color: var(--text-invert-muted); max-width: 68ch; margin-bottom: 32px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero__proof { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: var(--step--1); color: var(--text-invert-muted); }
.hero__proof span { display: inline-flex; align-items: center; gap: 8px; }
.hero__proof svg { width: 16px; height: 16px; stroke: #34d399; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  text-decoration: none; color: inherit; display: block;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card__icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 16px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.card__icon svg { width: 21px; height: 21px; stroke: var(--accent); fill: none; stroke-width: 1.8; }
/* display:block is required — the framework cards are <a> elements whose title
   and body are <span>, while the module cards use <h3>/<p>. Both must stack. */
.card__title { display: block; font-size: var(--step-1); font-weight: 680; margin-bottom: 8px; }
.card__body { display: block; font-size: var(--step--1); color: var(--text-muted); }

/* ---------- Framework badge ---------- */
.fbadge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 100px; margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
}

/* Accent scopes */
.acc-27001 { --accent: var(--c-27001); }
.acc-27701 { --accent: var(--c-27701); }
.acc-42001 { --accent: var(--c-42001); }
.acc-soc2  { --accent: var(--c-soc2); }
.acc-hipaa { --accent: var(--c-hipaa); }

/* On the dark hero the accent must lighten to stay readable. */
.hero .fbadge { color: #fff; border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.1); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { padding-top: 20px; border-top: 2px solid var(--line); }
.step__num { display: block; font-size: var(--step--1); font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.step h3 { font-size: var(--step-1); margin-bottom: 8px; }
.step p { font-size: var(--step--1); color: var(--text-muted); }

/* ---------- Stats ---------- */
.stat { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.stat__num { display: block; font-size: var(--step-3); font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--accent); }
.stat__label { font-size: var(--step--1); color: var(--text-muted); }

/* ---------- Comparison table ---------- */
.cmp-scroll { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; min-width: 680px; font-size: var(--step--1); }
.cmp caption { text-align: left; color: var(--text-muted); padding-bottom: 14px; }
.cmp th, .cmp td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); border-bottom-width: 2px; }
.cmp tbody th { font-weight: 650; width: 26%; }
.cmp td:last-child { background: var(--brand-soft); font-weight: 550; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  cursor: pointer; list-style: none;
  padding: 22px 40px 22px 0; position: relative;
  font-size: var(--step-1); font-weight: 620;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%); font-size: 1.5rem; font-weight: 400;
  color: var(--text-muted); line-height: 1;
}
.faq__item[open] summary::after { content: "\2212"; }
.faq__item p { padding: 0 40px 24px 0; color: var(--text-muted); max-width: 68ch; }

/* ---------- CTA band ---------- */
.cta { background: linear-gradient(180deg, var(--ink-800), var(--ink-900)); color: var(--text-invert); padding: 88px 0; text-align: center; }
.cta h2 { font-size: var(--step-4); margin-bottom: 14px; }
.cta p { color: var(--text-invert-muted); max-width: 60ch; margin: 0 auto 32px; }
.cta__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { background: var(--ink-900); color: var(--text-invert-muted); padding: 56px 0 32px; font-size: var(--step--1); }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding-bottom: 36px; }
.footer__col h4 { color: var(--text-invert); font-size: var(--step--1); font-weight: 650; margin-bottom: 14px; letter-spacing: 0; }
.footer__col a { display: block; text-decoration: none; padding: 5px 0; }
.footer__col a:hover { color: var(--text-invert); }
.footer__bottom { border-top: 1px solid var(--line-dark); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Motion (progressive enhancement only) ---------- */
/* Elements are fully visible by default. The animation runs only where
   scroll-driven timelines are supported (Chromium today). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 26%;
    }
    @keyframes reveal {
      from { opacity: 0; transform: translateY(14px); }
      to { opacity: 1; transform: none; }
    }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .grid--5 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --step-4: 1.75rem; --step-5: 2.125rem; }
  .section { padding: 60px 0; }
  .hero { padding: 64px 0 72px; }
  .nav__links { display: none; }
  /* The picker keeps its place on narrow screens; the primary links collapse. */
  .nav__lang a { padding: 4px 5px; }
  .grid--5, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__ctas .btn { width: 100%; justify-content: center; }
}

/* ---------- value comparison ---------- */
.value { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value__col { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; }
.value__col--us { border-color: var(--brand); box-shadow: var(--shadow-md); background: var(--brand-soft); }
.value__label { font-size: var(--step--1); font-weight: 650; color: var(--text-muted); }
.value__col--us .value__label { color: var(--brand); }
.value__num { font-size: var(--step-3); font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.value__unit { font-size: var(--step--1); color: var(--text-muted); }
.value__col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: var(--step--1); color: var(--text-muted); margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.value__note { font-size: 0.8rem; color: var(--text-muted); margin-top: 20px; max-width: 80ch; }

/* ---------- pricing ---------- */
.pricing__controls { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--paper); }
.seg button { font: inherit; font-size: var(--step--1); font-weight: 600; padding: 7px 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-muted); cursor: pointer; transition: background-color .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.seg__save { font-size: 0.72rem; font-weight: 700; color: #047857; margin-left: 4px; }
.seg button[aria-pressed="true"] .seg__save { color: #d1fae5; }
.band { display: inline-flex; align-items: center; gap: 10px; font-size: var(--step--1); font-weight: 600; }
.band select { font: inherit; font-weight: 600; padding: 8px 34px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; color: var(--text); cursor: pointer; }
.pricing__note { font-size: var(--step--1); color: var(--text-muted); margin-bottom: 28px; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 26px; box-shadow: var(--shadow-sm); }
.plan--featured { border: 2px solid var(--brand); box-shadow: var(--shadow-md); }
.plan__flag { position: absolute; top: -13px; left: 26px; background: var(--brand); color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 100px; }
.plan__name { font-size: var(--step-2); font-weight: 720; margin-bottom: 6px; }
.plan__for { font-size: var(--step--1); color: var(--text-muted); min-height: 3.3em; }
.plan__price { display: flex; align-items: baseline; gap: 6px; margin: 20px 0 4px; flex-wrap: wrap; }
.plan__amount { font-size: 2.5rem; font-weight: 780; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.plan__per { font-size: var(--step--1); color: var(--text-muted); }
.plan__alt { font-size: 0.82rem; color: var(--text-muted); min-height: 1.4em; margin-bottom: 20px; font-variant-numeric: tabular-nums; }
.plan__alt b { color: #047857; font-weight: 650; }
.plan .btn { justify-content: center; }
.plan__cta--ghost { background: transparent; color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.plan__cta--ghost:hover { background: var(--brand-soft); }
.plan__list { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: var(--step--1); margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.plan__list li { display: flex; gap: 10px; align-items: flex-start; }
.plan__list svg { width: 16px; height: 16px; flex: 0 0 16px; stroke: var(--brand); margin-top: 4px; }
.plan__list li.plan__lead { font-weight: 650; }

.included { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; margin: 32px 0 0; font-size: var(--step--1); color: var(--text-muted); }
.included span { display: inline-flex; gap: 8px; align-items: center; }
.included svg { width: 15px; height: 15px; stroke: #047857; }

.addons { margin-top: 56px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.addons h3 { font-size: var(--step-1); margin-bottom: 14px; }
.addons table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.addons td { padding: 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.addons td:last-child { text-align: right; font-weight: 650; white-space: nowrap; padding-left: 16px; font-variant-numeric: tabular-nums; }
.addons td span { display: block; color: var(--text-muted); font-size: 0.82rem; }
.partner { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; background: var(--paper); }
.partner p { font-size: var(--step--1); color: var(--text-muted); margin-bottom: 16px; }
.partner .btn { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: transparent; }

.hero__price { margin-top: 18px; font-size: var(--step--1); color: var(--text-invert-muted); }
.hero__price a { color: #fff; font-weight: 650; }

@media (max-width: 1040px) {
  .plans, .value { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .addons { grid-template-columns: 1fr; }
  .plan__for { min-height: 0; }
}
