/* 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; }

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