/* ==========================================================================
   Pulse IR  -  pulseir.co
   Design system. Palette, type, motion, components.
   Built so all core content reads with CSS and JS disabled.
   ========================================================================== */

:root {
  /* Brand palette */
  --cream: #F5F1E8;
  --cream-2: #EFE9DA;
  --navy: #1A2942;
  --navy-2: #142035;
  --navy-3: #0E1726;
  --gold: #B8923D;
  --gold-soft: #CBA85A;
  --copper: #B8623D;
  --ink: #1A2942;
  --ink-soft: #43536B;
  --line: rgba(26, 41, 66, 0.14);
  --line-on-navy: rgba(245, 241, 232, 0.16);
  --cream-dim: rgba(245, 241, 232, 0.72);
  --cream-dimmer: rgba(245, 241, 232, 0.52);

  /* Type */
  --serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --sans: "Helvetica Neue", Arial, "Segoe UI", Calibri, sans-serif;
  --mono: "SF Mono", "Roboto Mono", "Courier New", ui-monospace, monospace;

  /* Scale */
  --maxw: 1180px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(14, 23, 38, 0.06), 0 4px 14px rgba(14, 23, 38, 0.06);
  --shadow-md: 0 10px 30px rgba(14, 23, 38, 0.12);
  --shadow-lg: 0 30px 70px rgba(14, 23, 38, 0.22);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); letter-spacing: -0.022em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
p { margin: 0 0 1.1rem; }
.num, .ticker, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ----------------------------------------------------------- Utilities */
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--copper);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--copper);
  display: inline-block;
}
.lead { font-size: clamp(1.08rem, 1.6vw, 1.3rem); color: var(--ink-soft); }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.muted { color: var(--ink-soft); }
.gold { color: var(--gold); }

section { padding-block: var(--section-y); position: relative; }
.section-head { max-width: 660px; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.center .section-head { margin-inline: auto; }

/* Grain overlay, applied to navy sections for fine texture */
.grain::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------- Section tones */
.tone-navy {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--cream);
}
.tone-navy h1, .tone-navy h2, .tone-navy h3 { color: var(--cream); }
.tone-navy .lead, .tone-navy .muted { color: var(--cream-dim); }
.tone-navy-deep {
  background: radial-gradient(120% 120% at 80% 0%, var(--navy-2) 0%, var(--navy-3) 70%);
  color: var(--cream);
}
.tone-cream-2 { background: var(--cream-2); }

/* ------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.92rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--navy-3);
  box-shadow: 0 8px 22px rgba(184, 146, 61, 0.34);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(184, 146, 61, 0.42); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; opacity: 0.92; }
.btn-ghost:hover { transform: translateY(-2px); opacity: 1; }
.btn-on-navy.btn-ghost { border-color: var(--line-on-navy); color: var(--cream); }
.btn-lg { padding: 1.05rem 1.8rem; font-size: 1rem; }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------------------------------------------------------- Navigation */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(245, 241, 232, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; gap: 1.4rem; padding-block: 0.85rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--serif); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.01em; }
.brand .mark { width: 30px; height: 22px; }
.brand small { display: block; font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 1.15rem; margin-left: auto; }
.nav-links a { font-size: 0.92rem; color: var(--ink-soft); transition: color 0.2s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--navy); }
.nav-cta { display: flex; align-items: center; gap: 0.6rem; }
.nav-toggle { display: none; background: none; border: 0; padding: 0.4rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: 0.25s var(--ease); }

@media (max-width: 1000px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); padding: 1rem 1.25rem 1.6rem;
    border-bottom: 1px solid var(--line); gap: 0.9rem;
  }
  .nav.open .nav-cta .btn { display: inline-flex; }
  .nav.open .nav-cta { position: absolute; top: 100%; margin-top: 12.5rem; left: 1.25rem; }
}

/* --------------------------------------------------------------- Cards */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  box-shadow: var(--shadow-sm);
}
.card-glass {
  background: rgba(245, 241, 232, 0.06);
  border: 1px solid var(--line-on-navy);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  backdrop-filter: blur(6px);
}
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.kicker-num { font-family: var(--mono); color: var(--gold); font-size: 0.8rem; letter-spacing: 0.1em; }
.card h3 { margin-top: 0.6rem; }

/* Stat block */
.stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat .figure { font-family: var(--mono); font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 600; color: var(--gold); line-height: 1; }
.tone-navy .stat .label { color: var(--cream-dim); font-size: 0.86rem; }

/* ----------------------------------------------------------- Pulse line */
.pulse-wrap { width: 100%; overflow: hidden; line-height: 0; }
.pulse-line { width: 100%; height: auto; }
.pulse-path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pulse-animate .pulse-path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: pulse-draw 3.2s var(--ease) forwards;
}
.pulse-divider { padding-block: 0; background: transparent; }
@keyframes pulse-draw { to { stroke-dashoffset: 0; } }

/* ----------------------------------------------------------- Hero */
.hero { position: relative; overflow: hidden; }
.hero .grid-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
@media (max-width: 940px) { .hero .grid-hero { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 0.7rem; }
.hero .tagline { font-family: var(--mono); color: var(--gold); letter-spacing: 0.04em; font-size: 0.95rem; margin-bottom: 1.4rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.7rem; align-items: center; }

/* glow accents on navy */
.glow {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.5; pointer-events: none; z-index: 0;
}
.glow-gold { width: 460px; height: 460px; background: rgba(184, 146, 61, 0.30); top: -160px; right: -120px; }
.glow-copper { width: 380px; height: 380px; background: rgba(184, 98, 61, 0.20); bottom: -180px; left: -120px; }
.hero > .wrap, .hero .grid-hero { position: relative; z-index: 2; }

/* ------------------------------------------------- Live demo widget */
.demo {
  background: rgba(14, 23, 38, 0.55);
  border: 1px solid var(--line-on-navy);
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 2vw, 1.6rem);
  box-shadow: var(--shadow-lg);
}
.demo .demo-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.demo .demo-tag { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); display: inline-flex; align-items: center; gap: 0.5rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(184, 146, 61, 0.6); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(184,146,61,0.5); } 70% { box-shadow: 0 0 0 9px rgba(184,146,61,0); } 100% { box-shadow: 0 0 0 0 rgba(184,146,61,0); } }
.demo-form { display: flex; gap: 0.5rem; }
.demo-form input {
  flex: 1; padding: 0.85rem 1rem; border-radius: 10px;
  border: 1px solid var(--line-on-navy);
  background: rgba(245,241,232,0.06); color: var(--cream);
  font-size: 1rem; font-family: var(--mono); letter-spacing: 0.04em;
}
.demo-form input::placeholder { color: var(--cream-dimmer); }
.demo-form input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.demo-suggest { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.demo-chip { font-size: 0.78rem; font-family: var(--mono); padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid var(--line-on-navy); color: var(--cream-dim); background: transparent; }
.demo-chip:hover { color: var(--cream); border-color: var(--gold); }
.demo-output { margin-top: 1.1rem; border-top: 1px solid var(--line-on-navy); padding-top: 1.1rem; min-height: 64px; }
.demo-output .placeholder { color: var(--cream-dimmer); font-size: 0.92rem; }
.demo-output .snapshot { color: var(--cream); font-size: 0.96rem; white-space: pre-line; }
.demo-disclaimer { margin-top: 0.9rem; font-size: 0.72rem; color: var(--cream-dimmer); font-style: italic; }
.demo-teaser { margin-top: 0.9rem; display: none; }
.demo.show-teaser .demo-teaser { display: block; }
.skeleton { height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(245,241,232,0.08), rgba(245,241,232,0.18), rgba(245,241,232,0.08)); background-size: 200% 100%; animation: sk 1.3s infinite; margin-bottom: 0.6rem; }
.skeleton.s2 { width: 86%; } .skeleton.s3 { width: 70%; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* verbatim callout */
.verbatim {
  border-left: 3px solid var(--gold);
  background: rgba(14, 23, 38, 0.04);
  padding: 1.2rem 1.4rem;
  border-radius: 0 12px 12px 0;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.tone-navy .verbatim { background: rgba(245,241,232,0.05); color: var(--cream-dim); }

/* quote badge */
.quote-badge {
  display: inline-flex; align-items: baseline; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.85rem;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
}
.tone-navy .quote-badge { border-color: var(--line-on-navy); background: rgba(245,241,232,0.05); color: var(--cream); }
.quote-badge .sym { color: var(--gold); font-weight: 700; }
.quote-badge .chg.up { color: #2f8a5b; } .quote-badge .chg.down { color: var(--copper); }

/* ------------------------------------------------- System diagram */
.diagram { width: 100%; height: auto; }

/* product mock frame */
.frame {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line-on-navy);
  background: linear-gradient(180deg, rgba(245,241,232,0.08), rgba(245,241,232,0.02));
  box-shadow: var(--shadow-lg);
}
.frame-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line-on-navy); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(245,241,232,0.3); }
.frame-body { padding: 1.1rem 1.2rem; }

/* ------------------------------------------------- Loop steps */
.loop { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); counter-reset: step; }
@media (max-width: 760px) { .loop { grid-template-columns: 1fr; } }
.loop .step { position: relative; }
.loop .step .tag { font-family: var(--mono); color: var(--gold); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }

/* list with pulse ticks */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 1.6rem; margin-bottom: 0.7rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }

/* ------------------------------------------------------------- Footer */
.foot { background: var(--navy-3); color: var(--cream-dim); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.foot a { color: var(--cream-dim); }
.foot a:hover { color: var(--cream); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; margin-bottom: 2.5rem; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.foot h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 0.6rem; font-size: 0.92rem; }
.foot .disclaimer { border-top: 1px solid var(--line-on-navy); padding-top: 1.6rem; font-size: 0.78rem; color: var(--cream-dimmer); line-height: 1.7; }
.foot .brand { color: var(--cream); }
.foot .brand small { color: var(--cream-dimmer); }

/* --------------------------------------------------------- Reveal motion */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; } .reveal.d3 { transition-delay: 0.24s; }

/* skip link + focus */
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: var(--cream); padding: 0.7rem 1rem; z-index: 100; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* page hero (interior) */
.page-hero { padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2rem, 4vw, 3rem); }
.breadcrumb { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--cream-dimmer); margin-bottom: 1.2rem; }
.breadcrumb a { color: var(--cream-dim); }

/* compliance note box */
.note {
  border: 1px dashed var(--line); border-radius: 12px;
  padding: 1rem 1.2rem; font-size: 0.86rem; color: var(--ink-soft);
  background: rgba(184,146,61,0.06);
}
.tone-navy .note { border-color: var(--line-on-navy); color: var(--cream-dim); }

/* CTA band */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 720px; margin-inline: auto; }
.cta-band .hero-cta { justify-content: center; }

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .pulse-animate .pulse-path { stroke-dashoffset: 0; }
}
