/* Credential Press shared stylesheet.
   Every page links /css/fonts.css, /css/tokens.css and this file, in that order.
   Colours and type stacks come from tokens.css only. Do not hardcode a hex here. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--heading);
  line-height: 1.14;
  letter-spacing: -0.011em;
  font-weight: 600;
}
h1 { font-size: clamp(2.4rem, 1.8rem + 3.2vw, 4.1rem); font-weight: 700; letter-spacing: -0.018em; }
h2 { font-size: clamp(1.75rem, 1.25rem + 2vw, 2.6rem); max-width: 26ch; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }
p, li { max-width: 68ch; }
p + p { margin-top: 1em; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--seal); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--seal); color: var(--on-seal); }

hr { border: 0; border-top: 1px solid var(--border-soft); margin: 40px 0; }
strong { font-weight: 600; color: var(--heading); }
code, kbd { font-family: var(--mono); font-size: 0.9em; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--ink); color: var(--certificate); padding: 10px 18px;
  border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip:focus { left: 8px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.narrow { max-width: 760px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Kicker ---------- */
.kicker {
  font-family: var(--mono); font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--seal-deep);
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.kicker::before { content: ""; width: 26px; height: 2px; background: currentColor; flex: none; }
[data-theme="dark"] .kicker { color: var(--seal-bright); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kicker { color: var(--seal-bright); }
}
.hero .kicker { color: var(--seal-bright); }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.nav { display: flex; align-items: center; gap: 26px; height: 70px; }
.lockup { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.lockup svg { width: 32px; height: 32px; flex: none; }
.lockup span {
  font-family: var(--display); font-weight: 700; font-size: 1.14rem;
  color: var(--heading); letter-spacing: 0.005em; white-space: nowrap;
}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text); text-decoration: none; font-size: 0.94rem; font-weight: 500; }
.nav-links a:hover { color: var(--link); }
.nav-links a[aria-current="page"] { color: var(--link); font-weight: 600; }
.theme-btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  width: 38px; height: 38px; border-radius: var(--radius-md); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.theme-btn:hover { border-color: var(--seal); color: var(--link); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .moon { display: none; }
[data-theme="dark"] .theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}
@media (max-width: 880px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 0.96rem; text-decoration: none;
  padding: 13px 24px; border-radius: var(--radius-md); border: 1.5px solid transparent;
  cursor: pointer; transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--seal); color: var(--on-seal); border-color: var(--seal); }
.btn-primary:hover { background: #D2932F; box-shadow: 0 10px 24px -12px rgba(192, 131, 39, 0.75); }
.btn-ghost { color: var(--heading); border-color: var(--border); background: transparent; }
.btn-ghost:hover { border-color: var(--seal); color: var(--link); }
.hero .btn-ghost { color: var(--certificate); border-color: rgba(246, 244, 239, 0.32); }
.hero .btn-ghost:hover { border-color: var(--seal-bright); color: var(--seal-bright); }
.nav .btn { padding: 9px 18px; font-size: 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 460px at 84% -12%, rgba(192, 131, 39, 0.20), transparent 62%),
    radial-gradient(720px 420px at -8% 110%, rgba(62, 82, 102, 0.28), transparent 60%),
    linear-gradient(178deg, var(--ink) 0%, var(--ink-deep) 100%);
  color: var(--hero-body);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(246, 244, 239, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 244, 239, 0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(1100px 640px at 50% 0%, black 28%, transparent 82%);
  -webkit-mask-image: radial-gradient(1100px 640px at 50% 0%, black 28%, transparent 82%);
}
.hero-grid {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 5vw, 68px); align-items: center;
  padding: clamp(64px, 8vw, 116px) 0 clamp(58px, 7vw, 100px);
}
.hero h1 { color: var(--certificate); margin-bottom: 22px; }
.hero .lede { font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem); color: var(--hero-body); margin-bottom: 30px; }
.hero-small {
  position: relative; padding: clamp(48px, 6vw, 80px) 0 clamp(40px, 5vw, 64px);
}
.hero-small h1 { color: var(--certificate); }
.hero-small p { color: var(--hero-body); margin-top: 16px; font-size: 1.06rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* The seal card that sits in the hero */
.seal-card {
  background: rgba(246, 244, 239, 0.045);
  border: 1px solid rgba(246, 244, 239, 0.16);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 3vw, 34px);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.seal-card h2 {
  color: var(--certificate); font-size: 1.24rem; margin-bottom: 4px; max-width: none;
}
.seal-card .sub {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--seal-bright); margin-bottom: 18px;
}
.checklist { list-style: none; display: grid; gap: 13px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.97rem; max-width: none; }
.checklist svg { width: 19px; height: 19px; flex: none; margin-top: 2px; color: var(--seal-bright); }

/* ---------- Sections ---------- */
section { padding: clamp(56px, 7vw, 96px) 0; }
section.tight { padding: clamp(40px, 5vw, 64px) 0; }
section.alt { background: var(--surface-2); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-head { max-width: 66ch; margin-bottom: clamp(28px, 4vw, 46px); }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.04rem; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  background: var(--surface); border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 9px; }
.card p { color: var(--muted); font-size: 0.97rem; max-width: none; }
.card .num {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--seal-deep); display: block; margin-bottom: 12px;
}
[data-theme="dark"] .card .num { color: var(--seal-bright); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card .num { color: var(--seal-bright); }
}

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; min-width: 520px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
th {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--field-slate); border-bottom: 1.5px solid var(--border);
}
[data-theme="dark"] th { color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) th { color: var(--muted); }
}

/* ---------- Prose pages (legal, contact) ---------- */
.prose { padding: clamp(44px, 6vw, 72px) 0 clamp(56px, 7vw, 88px); }
.prose h2 { font-size: 1.5rem; margin: 38px 0 12px; max-width: none; }
.prose h3 { font-size: 1.12rem; margin: 26px 0 8px; }
.prose ul, .prose ol { margin: 12px 0 12px 22px; }
.prose li { margin-bottom: 7px; }
.prose .updated {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-top: 10px;
}

/* ---------- Notice ---------- */
.notice {
  border-left: 3px solid var(--seal); background: var(--surface-2);
  border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: 18px 22px; margin: 26px 0;
}
.notice p { max-width: none; }
.notice.flag { border-left-color: var(--flag); }

/* ---------- Do / do not ---------- */
.dd { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.dd ul { list-style: none; display: grid; gap: 11px; }
.dd li { display: flex; gap: 11px; align-items: flex-start; font-size: 0.97rem; max-width: none; }
.dd svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.dd .yes svg { color: var(--seal-deep); }
.dd .no svg { color: var(--flag); }
[data-theme="dark"] .dd .yes svg { color: var(--seal-bright); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dd .yes svg { color: var(--seal-bright); }
}

/* ---------- Swatches (brand page) ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.swatch { border: 1.5px solid var(--border-soft); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.swatch .chip { height: 92px; display: block; }
.swatch .meta { padding: 14px 16px 16px; }
.swatch .meta strong { display: block; font-size: 0.98rem; }
.swatch .meta code { display: block; color: var(--muted); margin: 3px 0 8px; letter-spacing: 0.04em; }
.swatch .meta p { font-size: 0.88rem; color: var(--muted); max-width: none; }

/* ---------- Type specimen (brand page) ---------- */
.specimen { border: 1.5px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--surface); padding: 24px; }
.specimen .lab {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--field-slate); margin-bottom: 12px;
}
.specimen .sample-display { font-family: var(--display); font-size: 2.1rem; line-height: 1.15; color: var(--heading); font-weight: 600; }
.specimen .sample-body { font-family: var(--body); font-size: 1.05rem; }
.specimen .sample-mono { font-family: var(--mono); font-size: 1rem; letter-spacing: 0.02em; }
.specimen .weights { color: var(--muted); font-size: 0.88rem; margin-top: 12px; }

/* ---------- Logo panels (brand page) ---------- */
.logo-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.logo-panel { border: 1.5px solid var(--border-soft); border-radius: var(--radius-lg); padding: 34px 24px; text-align: center; }
.logo-panel.on-dark { background: var(--ink); }
.logo-panel.on-light { background: var(--certificate); }
.logo-panel .cap { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 18px; }
.logo-panel.on-dark .cap { color: var(--hero-body); }
.logo-panel.on-light .cap { color: var(--muted); }
.logo-lockup { display: inline-flex; align-items: center; gap: 13px; }
.logo-lockup svg { width: 46px; height: 46px; flex: none; }
.logo-lockup span { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.005em; }
.logo-panel.on-dark .logo-lockup span { color: var(--certificate); }
.logo-panel.on-light .logo-lockup span { color: var(--ink); }

/* ---------- Footer ---------- */
footer.site {
  background: var(--ink); color: var(--hero-body);
  padding: clamp(48px, 6vw, 72px) 0 32px; margin-top: 0;
}
footer.site a { color: var(--seal-bright); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(150px, 1fr)); gap: 34px; }
.foot-brand .lockup span { color: var(--certificate); }
.foot-brand p { color: var(--hero-body); font-size: 0.93rem; margin-top: 14px; max-width: 42ch; }
.foot-col h2 {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--seal-bright); margin-bottom: 12px;
  max-width: none;
}
.foot-col ul { list-style: none; display: grid; gap: 9px; }
.foot-col li { font-size: 0.93rem; max-width: none; }
.foot-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(246, 244, 239, 0.14);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
  font-size: 0.86rem; color: var(--hero-body);
}
.foot-bottom p { max-width: none; }

/* ---------- Consent ---------- */
.consent {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(140%);
  bottom: 18px; z-index: 300; width: min(560px, calc(100vw - 32px));
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift); padding: 22px 24px;
  transition: transform 0.25s ease;
}
.consent.show { transform: translateX(-50%) translateY(0); }
.consent h2 { font-size: 1.14rem; max-width: none; margin-bottom: 8px; }
.consent p { font-size: 0.93rem; color: var(--muted); max-width: none; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.consent .btn { padding: 10px 18px; font-size: 0.92rem; }
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--seal-bright); text-decoration: underline; text-underline-offset: 3px;
}
.linkish:hover { text-decoration-thickness: 2px; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface); border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow);
}
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: 0.95rem; color: var(--heading); }
.field .hint { font-size: 0.87rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 0.97rem; color: var(--text); background: var(--surface-2);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px;
  width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--seal); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 14px; font-size: 0.95rem; min-height: 1.4em; }
.form-status.err { color: var(--flag); }
.form-status.ok { color: var(--seal-deep); font-weight: 600; }
[data-theme="dark"] .form-status.ok { color: var(--seal-bright); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-status.ok { color: var(--seal-bright); }
}
