/*
 * PAC/SAFE HSN LLC — site styles (home page + NFC card pages).
 * Brand: black and gold lettering/accents; the emblem's blue and red flames
 * appear only as a thin accent rule. Working colour values from the brand
 * binder (no official hex yet — confirm before print use).
 * System fonts only: no web-font downloads, nothing third-party.
 */
:root {
  --black: #0b0b0d;
  --ink: #16161a;
  --line: #2a2a30;
  --gold: #d4af37;
  --gold-soft: #f1d77a;
  --flame-blue: #1e5bff;
  --flame-red: #d62828;
  --text: #f5f3ee;
  --muted: #b9b4a8;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--gold); text-decoration: underline; }
.skip, .mark, nav a, .card-link, .action, .btn-save { text-decoration: none; }
nav a:hover, nav a:focus-visible { text-decoration: underline; }
.card a.card-link:hover, .card a.card-link:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: .01em; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.25rem); }
h3 { font-size: 1.25rem; color: var(--text); }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { width: min(1080px, 100% - 2rem); margin-inline: auto; }
.plain { list-style: none; margin: 0; padding: 0; }
.eyebrow {
  margin: 0 0 .6rem; font-family: var(--sans);
  color: var(--gold);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.skip { position: absolute; left: -999px; top: 0; padding: .5rem 1rem; background: var(--gold); color: var(--black); }
.skip:focus { left: 1rem; z-index: 10; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(11,11,13,.86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); font-family: var(--serif); letter-spacing: .12em; }
.mark img { border-radius: 8px; mix-blend-mode: lighten; }
.mark:hover { color: var(--text); text-decoration: none; }
nav { display: flex; gap: 1.5rem; font-size: .95rem; }
nav a { color: var(--muted); }
nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 2.5rem; text-align: center; }
/* lighten: the emblem's pure-black field disappears into the page's near-black, so the flames float. */
.emblem { width: min(640px, 92vw); margin: 0 auto 2rem; mix-blend-mode: lighten; }
.tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2.6vw, 1.5rem); color: var(--gold-soft); margin-bottom: .5rem; }

/* Thin flame accent: blue to red, echoing the emblem. */
.rule { height: 2px; width: min(1080px, 100% - 2rem); margin: 0 auto; background: linear-gradient(90deg, transparent, var(--flame-blue) 25%, var(--gold) 50%, var(--flame-red) 75%, transparent); opacity: .8; }

/* About */
.about { padding: 4rem 0 2rem; max-width: 760px; }
.lead { font-family: var(--serif); font-size: clamp(1.3rem, 2.8vw, 1.65rem); line-height: 1.4; }
.mission { margin: 2rem 0 0; padding: 1rem 0 1rem 1.25rem; border-left: 2px solid var(--gold); font-family: var(--serif); font-style: italic; color: var(--gold-soft); font-size: 1.15rem; }

/* Companies */
.companies { padding: 3rem 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 1.75rem; }
.card { display: flex; flex-direction: column; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; transition: border-color .2s; }
.card:hover { border-color: rgba(212,175,55,.55); }
.card p { color: var(--muted); }
.card .card-link { margin: auto 0 0; padding-top: .5rem; font-size: .95rem; }
.card a.card-link { color: var(--gold-soft); }
.status { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted) !important; margin-bottom: .75rem; }
.status::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .5rem; border-radius: 50%; background: var(--line); vertical-align: .05em; }
.status-live::before { background: var(--gold); }
.status-next::before { background: var(--flame-blue); }

/* Contact */
.contact { padding: 3rem 0 4.5rem; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.contact h3 { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-top: 1rem; }
.contact h3:first-child { margin-top: 0; }
address { font-style: normal; line-height: 1.8; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; background: #08080a; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; align-items: start; }
.footer img { border-radius: 10px; margin-bottom: .75rem; mix-blend-mode: lighten; }
.footer li { margin-bottom: .35rem; }
.signature { grid-column: 1 / -1; margin: 1rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); text-align: center; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: .95rem; }
.signature span { font-style: normal; color: var(--gold); margin-left: .4rem; letter-spacing: .08em; }

/* ── NFC business-card pages (/c/<tag>/) ─────────────────────────────────── */
.card-page { min-height: 100svh; display: flex; flex-direction: column; }
.card-page main { flex: 1; width: min(520px, 100% - 2rem); margin: 0 auto; padding: 2rem 0 7rem; }
.card-front {
  position: relative; aspect-ratio: 1.75 / 1; border-radius: 16px;
  background: radial-gradient(120% 140% at 50% 0%, #1b1b21 0%, var(--black) 60%);
  border: 1px solid rgba(212,175,55,.6); box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.03);
  display: grid; grid-template-columns: 38% 1fr; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem;
}
.card-front img { width: 100%; border-radius: 10px; mix-blend-mode: lighten; }
.card-front .who { font-family: var(--serif); }
.card-front .who strong { display: block; font-weight: 400; font-size: clamp(1rem, 4.4vw, 1.3rem); color: var(--text); }
.card-front .who span { display: block; color: var(--gold); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-top: .35rem; }
.card-front .who em { display: block; color: var(--muted); font-style: normal; font-size: .8rem; margin-top: .6rem; }
.card-front::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 0 0 16px 16px; background: linear-gradient(90deg, var(--flame-blue), var(--gold), var(--flame-red)); }
.card-intro { margin: 1.75rem 0 1.25rem; color: var(--muted); }
.actions { display: grid; gap: .75rem; }
.action {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.15rem; background: var(--ink); border: 1px solid var(--line); border-radius: 12px; color: var(--text);
}
.action:hover { border-color: rgba(212,175,55,.6); text-decoration: none; color: var(--text); }
.action small { display: block; color: var(--gold); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.action .go { color: var(--gold-soft); }
.action.placeholder { color: var(--muted); border-style: dashed; }
.namebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: rgba(8,8,10,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
}
.namebar-inner { width: min(520px, 100% - 2rem); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0 calc(.8rem + env(safe-area-inset-bottom)); }
.namebar strong { font-family: var(--serif); font-weight: 400; }
.namebar span { display: block; color: var(--muted); font-size: .8rem; }
.btn-save { flex: none; padding: .75rem 1.15rem; border-radius: 999px; background: var(--gold); color: var(--black) !important; font-weight: 600; font-size: .95rem; }
.btn-save:hover { background: var(--gold-soft); text-decoration: none; }
.card-verse { margin-top: 2rem; text-align: center; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: .9rem; }
.card-verse span { font-style: normal; color: var(--gold); margin-left: .35rem; }

/* Small phones: keep the wordmark on one line. */
.mark span { white-space: nowrap; }
@media (max-width: 420px) {
  .mark { letter-spacing: .06em; gap: .5rem; }
  nav { gap: 1rem; font-size: .9rem; }
}
@media (max-width: 360px) {
  .topbar-inner { padding: .5rem 0; gap: .5rem; }
}

/* Anchor jumps land below the sticky top bar. */
section[id] { scroll-margin-top: 80px; }
/* Card pages: the cardholder's name is the page's h1 (styled like the card text). */
.card-front .who h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1rem, 4.4vw, 1.3rem); color: var(--text); }
/* 404 page */
.notfound { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: .5rem; }
.notfound img { margin: 0 auto; border-radius: 12px; mix-blend-mode: lighten; }
