/* PackAuth marketing site — packauth.com
 *
 * Loaded AFTER tokens.css, which is generated from
 * spec/registries/design-tokens.json. Every colour, typeface, shadow and type
 * step comes from there; this file is layout and component behaviour only.
 *
 * Self-hosted fonts, no CDN, no build step at request time: the page renders
 * identically behind any network policy. For a compliance buyer sitting behind
 * a corporate proxy that is not a nicety.
 */

:root {
  /* Aliases onto the generated tokens. Kept so the component rules below read
     in layout terms (`--bg`, `--line`) while the VALUE lives in exactly one
     place. Renaming the alias is safe; redefining the value here would not be. */
  --bg: var(--paper);
  --bg-2: var(--surface-sunk);
  --bg-3: var(--surface-sunk);
  --surface-raised: var(--surface);

  --shadow: var(--shadow-sm);
  --shadow-md: var(--shadow-md);

  --no: var(--block);
  --no-bg: var(--block-bg);

  --wrap: 74rem;
  --radius: var(--radius-md);
  --sans: var(--font-text);
  --mono: var(--font-mono);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1, "cv05" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }

h1, h2, h3, h4 { line-height: 1.14; margin: 0 0 .5em; }
/* Display type is the text face at display weight. A sans needs weight and
   negative tracking to carry a headline; the serif carried it on shape alone,
   so the values do not transfer. */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
}
h1 { font-size: var(--size-display); line-height: 1.06; }
h2 { font-size: var(--size-h2); }
h3, h4 { font-family: var(--sans); font-size: var(--size-h3); font-weight: 640; letter-spacing: -0.008em; }
h4 { font-size: .95rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
em { font-style: italic; }
code { font-family: var(--mono); font-size: .9em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip { position: absolute; left: -9999px; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0; z-index: 60; }
.skip:focus { left: 0; top: 0; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- header --------------------------------------------------------------- */

/* Opaque by default, translucent only where the blur genuinely works.
   The bar sits over scrolling text, so its background is doing legibility work,
   not decoration. Written the other way round — translucent, with the blur
   expected to hide what is underneath — iOS drops the unprefixed
   backdrop-filter and the bar becomes an 86% wash with sharp body copy reading
   through it. An optional effect may improve a surface; it may not be the thing
   that makes it readable. */
.bar {
  position: sticky; top: 0; z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bar {
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
  }
}
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-weight: 670; letter-spacing: -.012em; }
.brand sup { font-size: .55em; font-weight: 500; }
.nav { display: flex; align-items: center; gap: 1.05rem; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.nav a:hover { color: var(--ink); }
.nav .cta { background: var(--accent); color: var(--accent-ink); padding: .42rem .85rem; border-radius: 8px; font-weight: 570; }
.nav .cta:hover { color: var(--accent-ink); background: var(--accent-2); }
@media (max-width: 980px) { .nav a:not(.cta) { display: none; } }

/* --- hero ----------------------------------------------------------------- */

.hero { padding: clamp(2.8rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow, .kicker {
  font: 650 .74rem var(--sans);
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--warm); margin: 0 0 .75rem;
}
.kicker { color: var(--warm); }
.hero h1 { max-width: 19ch; }
.lede { font-size: var(--size-lede); color: var(--ink-2); max-width: 58ch; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 1rem; }
.btn {
  display: inline-block; padding: .68rem 1.25rem; border-radius: 9px;
  border: 1px solid var(--line-2); color: var(--ink); text-decoration: none;
  font-weight: 570; font-size: .96rem; background: var(--bg-2);
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--accent-ink); border-color: transparent;
  box-shadow: 0 1px 2px rgb(26 79 138 / 30%), 0 6px 18px rgb(26 79 138 / 22%);
}
.btn.primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn { transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.btn:not(.primary) { background: var(--surface); box-shadow: var(--shadow-sm); }
.micro { font-size: .85rem; color: var(--ink-3); margin: 0; }

.hero-vis { margin: 0; }
.hero-vis svg { width: 100%; height: auto; display: block; }
.hero-vis figcaption { font-size: .84rem; color: var(--ink-3); margin-top: .7rem; line-height: 1.5; }
.vlab { font: 600 12px var(--sans); fill: var(--ink-2); }
.vsub { font: 500 11px var(--sans); fill: var(--ink-3); }
.vaxis { font: 600 11px var(--sans); fill: var(--ink-3); letter-spacing: .06em; }

/* --- strip ---------------------------------------------------------------- */

.strip { background: var(--surface-sunk); border-block: 1px solid var(--line); padding: 2.2rem 0; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.5rem; }
.grid-4 strong {
  display: block; font-size: 2.3rem; font-weight: 700;
  letter-spacing: -.035em; color: var(--warm); line-height: 1;
}
.grid-4 span { font-size: .89rem; color: var(--ink-2); }

/* --- bands ---------------------------------------------------------------- */

.band { padding: clamp(2.8rem, 6.5vw, 4.6rem) 0; }
.band.alt { background: var(--surface-sunk); border-block: 1px solid var(--line); }

.sub { color: var(--ink-2); max-width: 70ch; font-size: 1.02rem; }
.sub-h { margin-top: 2rem; font-size: 1rem; }
.note { color: var(--ink-3); font-size: .92rem; max-width: 72ch; margin-top: 1.6rem; }
.tiny { font-size: .86rem; color: var(--ink-3); }
.mantra {
  font-weight: 620; font-size: 1.05rem; color: var(--ink);
  border-left: 3px solid var(--accent); padding-left: .9rem; margin-top: 1.4rem;
}

/* minmax(0, 1fr), not 1fr. A bare `1fr` track has an automatic minimum equal to
   the item's min-content width, so one unbreakable thing inside — a code block,
   a long identifier — silently widens the track past the viewport and the whole
   page gains a horizontal scrollbar. The zero minimum keeps the overflow where
   it belongs: inside the element that scrolls. */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 880px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.reverse > :first-child { order: 2; }
}

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1rem; margin-top: 1.8rem; }
.grid-3.tight { margin-top: 1.4rem; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow); margin: 0;
}
.card p { margin: 0 0 .6rem; color: var(--ink-2); font-size: .94rem; }
.card p:last-child { margin-bottom: 0; }
.card h3 { margin-bottom: .4rem; }
.card.fail { border-top: 3px solid var(--block); }
.card { transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.link-btn {
  background: none; border: 0; padding: 0; margin-top: .3rem;
  color: var(--accent); font: inherit; font-size: .9rem; font-weight: 570;
  cursor: pointer; text-align: left;
}
.link-btn:hover { color: var(--accent-2); text-decoration: underline; }

.boundaries ul { list-style: none; padding: 0; margin: .6rem 0 1rem; display: grid; gap: .4rem; }
.boundaries li { padding-left: 1.4rem; position: relative; color: var(--ink-2); font-size: .94rem; }
.boundaries li::before { content: ""; position: absolute; left: .15rem; top: .64em; width: .72rem; height: 2px; background: var(--no); border-radius: 2px; }

/* --- pipeline ------------------------------------------------------------- */

.pipeline { margin: 2rem 0 0; overflow-x: auto; }
.pipeline svg { width: 100%; min-width: 720px; height: auto; display: block; }
.pipe rect { fill: var(--bg); stroke: var(--line-2); stroke-width: 1.5; }
.pipe rect.last { fill: color-mix(in srgb, var(--accent) 12%, var(--bg)); stroke: var(--accent); }
.pnum text { font: 700 11px var(--sans); fill: var(--accent); }
.ptxt text { font: 640 13px var(--sans); fill: var(--ink); }
.ptxt text.psub { font: 500 11px var(--sans); fill: var(--ink-3); }
.parrow path { stroke: var(--line-2); stroke-width: 2; fill: none; marker-end: none; }
.prail text { font: 600 10.5px var(--mono); fill: var(--ink-3); letter-spacing: .02em; }

/* --- jurisdictions -------------------------------------------------------- */

.jur-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: .75rem; margin: 1.8rem 0 0; }
.jur {
  display: grid; gap: .12rem; text-align: left;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: .85rem .95rem; font: inherit; color: var(--ink);
}
button.jur { cursor: pointer; }
button.jur:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.jur-code { font: 700 1.05rem var(--sans); letter-spacing: -.01em; }
.jur-name { font-size: .84rem; color: var(--ink-2); }
.jur-state { font-size: .74rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; margin-top: .25rem; }
.jur.enforced .jur-state { color: var(--ok); }
.jur.registered { opacity: .82; border-style: dashed; }
.jur.registered .jur-state { color: var(--warn); }

.callout {
  margin-top: 1.6rem; padding: 1rem 1.15rem; border-radius: var(--radius);
  background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  font-size: .93rem; color: var(--ink-2);
}
.callout strong { color: var(--ink); }

.dut-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem; margin-top: 1rem; }
.dut { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; }
.dut h4 { margin-bottom: .3rem; color: var(--ink); }
.dut p { margin: 0; font-size: .87rem; color: var(--ink-2); }

/* --- stakeholders --------------------------------------------------------- */

.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.4rem; margin-top: 1.8rem; }
.who-col h3 { color: var(--ink-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; }
.roles { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.roles li { display: grid; gap: .1rem; padding-left: .85rem; border-left: 2px solid var(--line-2); }
.roles b { font-size: .95rem; font-weight: 620; }
.roles span { font-size: .84rem; color: var(--ink-3); }

/* --- integration ---------------------------------------------------------- */

.fit-vis { margin: 2rem 0 0; overflow-x: auto; }
.fit-vis svg { width: 100%; min-width: 700px; height: auto; display: block; }
.fbox rect { fill: var(--bg); stroke: var(--line-2); stroke-width: 1.5; }
.ftxt text { font: 620 13px var(--sans); fill: var(--ink); text-anchor: middle; }
.ftxt text.fsub { font: 500 11px var(--sans); fill: var(--ink-3); }
.farrow path { stroke: var(--line-2); stroke-width: 2; fill: none; }
.fcore { fill: color-mix(in srgb, var(--accent) 12%, var(--bg)); stroke: var(--accent); stroke-width: 1.8; }
.fcore-t { font: 660 15px var(--sans); fill: var(--ink); }
.fcore-s { font: 500 11.5px var(--sans); fill: var(--ink-3); }

/* --- roi ------------------------------------------------------------------ */

.roi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: .9rem; margin: 1.8rem 0 0; }
.roi-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.05rem 1.15rem; }
.roi-card h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: .5rem; }
.roi-cost { font-size: 1.08rem; font-weight: 660; color: var(--accent); margin-bottom: .5rem !important; letter-spacing: -.01em; }
.roi-card p:last-child { font-size: .88rem; color: var(--ink-2); margin: 0; }
.roi-card.bad { border-color: color-mix(in srgb, var(--no) 45%, transparent); background: var(--no-bg); }
.roi-card.bad .roi-cost { color: var(--no); }
.roi-split { margin-top: 2.4rem; }

.ticks, .crosses { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .6rem; }
.ticks li, .crosses li { padding-left: 1.6rem; position: relative; color: var(--ink-2); font-size: .93rem; }
.ticks b, .crosses b { color: var(--ink); font-weight: 620; }
.ticks li::before {
  content: ""; position: absolute; left: .1rem; top: .5em;
  width: .55rem; height: .3rem;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.crosses li::before {
  content: ""; position: absolute; left: .2rem; top: .62em;
  width: .7rem; height: 2px; background: var(--no); border-radius: 2px;
}

/* --- quote / code --------------------------------------------------------- */

.quote blockquote {
  margin: 0 0 .8rem; font-size: 1.1rem; line-height: 1.42;
  font-weight: 570; letter-spacing: -.012em;
  border-left: 3px solid var(--accent); padding-left: .9rem;
}
.quote figcaption { font-size: .89rem; color: var(--ink-2); margin: 0 0 1rem; }

.code {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px;
  padding: .95rem 1.05rem; overflow-x: auto; font-family: var(--mono);
  font-size: .8rem; line-height: 1.6; margin: 0;
}
.code code { white-space: pre; }
.code.mini { font-size: .74rem; }

/* --- cta / footer --------------------------------------------------------- */

.cta-band { background: var(--bg-2); border-top: 1px solid var(--line); }
.cta-band .actions { margin-top: 1.4rem; }

.foot { border-top: 1px solid var(--line); padding: 2rem 0 2.6rem; background: var(--bg); }
.foot-inner p { margin: 0 0 .4rem; }
.foot .micro { max-width: 70ch; }

/* --- modals --------------------------------------------------------------- */

.modal-root { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1.25rem; }
.modal-root[hidden] { display: none; }
/* The 62% wash is what makes the dialog readable. The blur is decoration on top
   of it, so it is prefixed for Safari and declared where its absence is a
   defined state — same rule as the header, for the same reason. */
.modal-backdrop { position: absolute; inset: 0; background: rgb(8 11 15 / 62%); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .modal-backdrop { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
}
.modal {
  position: relative; z-index: 1;
  width: min(100%, 46rem); max-height: min(84vh, 46rem); overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 1.6rem 1.75rem 1.75rem;
}
.modal h2 { font-size: 1.3rem; margin-bottom: .7rem; padding-right: 2rem; }
.modal p { font-size: .94rem; color: var(--ink-2); }
.modal-x {
  position: absolute; top: .7rem; right: .8rem;
  background: none; border: 0; font-size: 1.7rem; line-height: 1;
  color: var(--ink-3); cursor: pointer; padding: .2rem .45rem; border-radius: 6px;
}
.modal-x:hover { color: var(--ink); background: var(--bg-3); }

.mlist { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .65rem; }
.mlist li { padding-left: 1.05rem; position: relative; font-size: .93rem; color: var(--ink-2); }
.mlist li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.mlist b { color: var(--ink); font-weight: 620; }
.mlist.two-col { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
