/* ==========================================================================
   Highcard — shared styles (design system)
   Light theme only. System fonts. Zero external requests.
   Tokens + components used verbatim by index.html and pricing.html —
   see website/LAYOUT.md for class conventions.
   ========================================================================== */

:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #e8eaef;
  --accent: #ffb300;     /* brand amber — CTAs, always with ink text */
  --accent-2: #f57c00;   /* deep amber — gradients, hover accents */
  --orange: #ea700b;     /* signal orange — ONLY live-signal moments (dots, borders, large display) */
  --orange-text: #b85200; /* darker companion for small orange TEXT — meets 4.5:1 on white */
  --honey: #92600a;      /* mono eyebrows */
  --espresso: #5d4037;
  --ok: #1a9b6c;         /* sent / verified checks */

  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.05), 0 8px 24px rgba(17, 24, 39, 0.06);
  --shadow-lift: 0 2px 4px rgba(17, 24, 39, 0.06), 0 14px 34px rgba(17, 24, 39, 0.1);
  --font-sans: -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, monospace;
  --nav-h: 64px;
}

/* ----- Reset ------------------------------------------------------------ */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  /* Glow-blobs intentionally bleed past section edges; clip (not hidden — no
     new scroll container, sticky header keeps working) so they never create
     a horizontal scrollbar. */
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.15rem; }

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

ul {
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(255, 179, 0, 0.35);
}

/* ----- Layout ----------------------------------------------------------- */

.container {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
}

.container-narrow {
  width: min(760px, calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding: 84px 0;
  position: relative;
}

.section-tight {
  padding: 48px 0;
}

.section-head {
  max-width: 680px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.06rem;
}

/* ----- Text utilities --------------------------------------------------- */

.mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: 14px;
}

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

/* ----- Background texture + glow ---------------------------------------- */

.grid-texture {
  background-image: radial-gradient(#d9dde4 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Absolutely-positioned amber glow blob. Parent needs position:relative;
   size/position the blob with inline style (e.g. style="width:520px;height:520px;top:-120px;right:-80px"). */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 179, 0, 0.55), rgba(245, 124, 0, 0.25) 55%, transparent 72%);
  opacity: 0.14;
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
}

/* ----- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.1);
}

.btn-primary:hover {
  background: #f0a800;
  box-shadow: 0 4px 14px rgba(245, 124, 0, 0.35);
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn[disabled],
.btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ----- Cards ------------------------------------------------------------ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card-hover {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
}

/* ----- Badges + chips --------------------------------------------------- */

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--accent);
  border-radius: 999px;
  padding: 4px 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  white-space: nowrap;
}

.chip-amber {
  background: rgba(255, 179, 0, 0.14);
  border-color: rgba(255, 179, 0, 0.45);
  color: var(--honey);
}

.chip-orange {
  background: rgba(234, 112, 11, 0.09);
  border-color: rgba(234, 112, 11, 0.35);
  color: var(--orange-text);
}

.chip-ok {
  background: rgba(26, 155, 108, 0.09);
  border-color: rgba(26, 155, 108, 0.32);
  color: var(--ok);
}

/* The perpetual orange pulse — use AT MOST ONCE per page. */
.dot-pulse {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  animation: nb-dot-pulse 1.6s ease-in-out infinite;
}

@keyframes nb-dot-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(234, 112, 11, 0.35);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 0 6px rgba(234, 112, 11, 0);
  }
}

/* ----- Checklists (pricing features) ------------------------------------ */

.checklist li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}

.checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ok);
  font-weight: 700;
}

/* ----- Grids ------------------------------------------------------------ */

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ----- Header / nav (markup verbatim from LAYOUT.md) --------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  position: relative;
}

.brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links > a:not(.btn) {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.15s ease;
}

.nav-links > a:not(.btn):hover {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

/* ----- Footer (markup verbatim from LAYOUT.md) --------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 40px 0;
  margin-top: 24px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-tag {
  color: var(--muted);
  margin-top: 6px;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-copy {
  color: var(--muted);
}

/* ----- Toast (created by site.js) ---------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  z-index: 200;
  max-width: min(440px, calc(100vw - 40px));
  background: var(--ink);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  padding: 13px 18px;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ----- Status pages (success.html / cancel.html) -------------------------- */

.status-page {
  min-height: calc(100vh - var(--nav-h) - 220px);
  display: flex;
  align-items: center;
}

.status-card {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 44px 36px;
  position: relative;
  z-index: 1;
}

.status-glyph {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
}

.status-glyph-ok {
  background: rgba(26, 155, 108, 0.12);
  border: 1px solid rgba(26, 155, 108, 0.35);
  color: var(--ok);
}

.status-glyph-neutral {
  background: rgba(255, 179, 0, 0.14);
  border: 1px solid rgba(255, 179, 0, 0.45);
  color: var(--honey);
}

.status-sub {
  color: var(--muted);
  margin-top: 12px;
}

.status-session {
  margin-top: 18px;
  color: var(--muted);
  word-break: break-all;
}

.status-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* ----- Responsive -------------------------------------------------------- */

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .section { padding: 60px 0; }

  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(var(--nav-h) - 6px);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    padding: 18px;
  }

  .nav-links.is-open { display: flex; }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .container,
  .container-narrow { width: calc(100% - 32px); }

  .grid-4 { grid-template-columns: 1fr; }

  .btn-lg { width: 100%; }

  .status-card { padding: 32px 22px; }
}

/* ----- Reduced motion ----------------------------------------------------
   Every animated sequence must be designed so its RESTING state (no
   animation) is the final frame — see LAYOUT.md motion conventions. */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- classic-comparison additions ---- */
h1 em { font-style: normal; color: var(--accent-2); }
.home-hero h1 { margin-bottom: 22px; }
.home-hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.1rem); }
