/* ============================================================================
   SMART SUITE — COMPONENT LIBRARY
   ----------------------------------------------------------------------------
   This is the full kit. A new page should be assembled almost entirely from
   these classes. Before writing any new CSS for a page, check here first —
   if you need something genuinely new, add it to THIS file (with a comment
   block in the same format) so the next page can reuse it.

   Every component is surface-aware: it reads --surface / --border /
   --text-strong / --text-body / --accent, which are set by .on-dark, .on-light
   or .on-wash on the parent section. Do not hard-code colours in components.

   CONTENTS
     01 Header & navigation      07 Steps / process
     02 Brand lockup             08 Stats & chips
     03 Buttons                  09 Framed media
     04 Section headings         10 Forms
     05 Hero                     11 CTA band
     06 Cards & grids            12 Footer
   ============================================================================ */

/* ==========================================================================
   01 HEADER & NAVIGATION
   Mobile-first: hamburger opens a full-height panel. Desktop (>=980px) becomes
   a horizontal bar. The header is transparent over dark heroes and turns solid
   on scroll (theme.js toggles .is-stuck).

   USAGE: copy the <header class="site-head"> block verbatim from
   templates/page-template.html onto every new page and set aria-current="page"
   on the active link.
   ========================================================================== */
.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  transition: background var(--d-base) var(--ease),
              border-color var(--d-base) var(--ease),
              backdrop-filter var(--d-base) var(--ease);
  border-bottom: 1px solid transparent;
}

.site-head.is-stuck {
  background: rgba(6, 20, 32, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: rgba(255, 255, 255, 0.10);
}

.head-inner {
  width: 100%;
  max-width: calc(var(--max-w) + (var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.nav-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-sm);
  padding: 0;
}

.nav-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #fff;
  transition: transform var(--d-base) var(--ease), opacity var(--d-fast);
}

.nav-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--c-void);
  padding: var(--sp-5) var(--gutter) var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--d-base) var(--ease),
              transform var(--d-base) var(--ease),
              visibility var(--d-base);
  overflow-y: auto;
}

.site-nav.is-open { opacity: 1; visibility: visible; transform: none; }

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: var(--sp-3) var(--sp-3);
  color: #fff;
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.site-nav a[aria-current="page"] { color: var(--c-signal); }
.site-nav a:hover { color: var(--c-pulse); }
.site-nav .nav-cta { border-bottom: 0; margin-top: var(--sp-4); }

@media (min-width: 980px) {
  .nav-btn { display: none; }

  .site-nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-1);
    padding: 0;
    background: transparent;
    opacity: 1;
    visibility: visible;
    transform: none;
    overflow: visible;
  }

  .site-nav a {
    min-height: 40px;
    font-family: var(--f-body);
    font-size: 0.94rem;
    font-weight: 600;
    padding: var(--sp-2) var(--sp-3);
    border-bottom: 0;
    border-radius: var(--r-sm);
    color: rgba(255, 255, 255, 0.82);
  }

  .site-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
  .site-nav .nav-cta { margin: 0 0 0 var(--sp-3); }
}

/* ==========================================================================
   02 BRAND LOCKUP
   The wordmark is HTML text (not an image) so it stays crisp and selectable.
   ========================================================================== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: #fff;
}

.brand img { width: 38px; height: 38px; }

.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
}

.brand-by {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-pulse);
  margin-top: 2px;
}

/* ==========================================================================
   03 BUTTONS
   .btn-signal → primary action (amber). One per view. Never two side by side.
   .btn-line   → secondary, outlined, adapts to surface.
   .btn-quiet  → tertiary text action with arrow.
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 50px;
  padding: 0 var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 0.97rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--d-fast) var(--ease),
              background var(--d-base) var(--ease),
              color var(--d-base) var(--ease),
              border-color var(--d-base) var(--ease);
}

.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }

.btn-signal {
  background: var(--g-signal);
  color: var(--c-deep);
  box-shadow: 0 12px 30px -14px rgba(255, 197, 61, 0.65);
}

.btn-signal:hover { background: var(--c-signal-deep); color: var(--c-deep); }

.btn-line {
  border-color: color-mix(in srgb, var(--text-strong, #fff) 34%, transparent);
  color: var(--text-strong, #fff);
  background: transparent;
}

.btn-line:hover {
  border-color: var(--c-pulse);
  color: var(--c-pulse);
  background: color-mix(in srgb, var(--c-pulse) 10%, transparent);
}

.btn-quiet {
  min-height: 44px;
  padding: 0 var(--sp-2);
  color: var(--accent);
  background: transparent;
}

.btn-quiet:hover { gap: var(--sp-3); }
.btn-full { width: 100%; }

/* ==========================================================================
   04 SECTION HEADINGS
   Standard opener for every section: mono eyebrow → h2 → lead paragraph.
   Keep the eyebrow to 2–4 words; it is a category label, not a sentence.
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--sp-4);
}

/* Small square tick that precedes eyebrow text. */
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--c-signal);
  transform: rotate(45deg);
  flex: none;
}

.sec-head { max-width: 46rem; margin-bottom: var(--sp-7); }
.sec-head h2 { margin-bottom: var(--sp-4); }

.lead {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  margin: 0;
  text-wrap: pretty;
}

/* ==========================================================================
   05 HERO
   .hero        → full-bleed photo hero with animated layers (home page)
   .hero-slim   → shorter dark hero for interior pages (products, policy)
   Hero budget: eyebrow, one headline, one paragraph, one CTA pair. Nothing else.
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(100svh, 900px);
  display: grid;
  /* minmax(0, 1fr) is required: an `auto` track sizes to max-content and the
     hero copy then overflows the viewport on mobile. */
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding-top: calc(var(--header-h) + var(--sp-7));
  padding-bottom: var(--sp-8);
  overflow: hidden;
  isolation: isolate;
  background: var(--c-void);
}

.hero > .wrap { position: relative; z-index: 3; }

.hero-title {
  margin: 0 0 var(--sp-5);
  color: #fff;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: -0.045em;
}

/* Second line of the hero headline, set lighter and smaller for contrast. */
.hero-sub {
  display: block;
  margin-top: var(--sp-3);
  font-size: clamp(1.15rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: rgba(255, 255, 255, 0.86);
  max-width: 20ch;
}

/* Amber underline used to mark the single most important word. */
.mark {
  position: relative;
  color: var(--c-signal);
  white-space: nowrap;
}

.hero-copy { max-width: 40rem; color: var(--t-body-on-dark); font-size: var(--fs-lead); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.hero-slim {
  position: relative;
  padding-top: calc(var(--header-h) + var(--sp-8));
  padding-bottom: var(--sp-8);
  background: var(--g-deep);
  overflow: hidden;
  isolation: isolate;
}

.hero-slim h1 { color: #fff; max-width: 20ch; }

/* ==========================================================================
   06 CARDS & GRIDS
   .grid       → responsive auto-fit grid (default min 260px)
   .grid-2/3/4 → fixed column counts from the md breakpoint up
   .card       → base surface card
   .card-link  → interactive card (whole card is the anchor)
   ========================================================================== */
.grid { display: grid; gap: var(--sp-4); }

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

@media (min-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  position: relative;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.on-dark .card { background: rgba(255, 255, 255, 0.04); }
.on-light .card { box-shadow: var(--e-card); }

.card h3 { margin: 0; }
.card p { color: var(--text-muted); margin: 0; }

.card-link {
  text-decoration: none;
  color: inherit;
  transition: transform var(--d-base) var(--ease),
              border-color var(--d-base) var(--ease);
}

.card-link:hover {
  transform: translateY(-4px);
  border-color: var(--c-pulse);
  color: inherit;
}

/* Top-edge amber signal line that draws in on hover. */
.card-link::after {
  content: "";
  position: absolute;
  left: var(--sp-5);
  right: var(--sp-5);
  top: 0;
  height: 2px;
  background: var(--g-signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-slow) var(--ease);
}

.card-link:hover::after { transform: scaleX(1); }

/* Product icon tile. Icons live in /assets/icons and are stroke SVGs. */
.icon-tile {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c-pulse) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-pulse) 26%, transparent);
  flex: none;
}

.icon-tile img { width: 26px; height: 26px; }

.card-more {
  margin-top: auto;
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   SPLIT — alternating media/copy block. This is the workhorse for product
   sections. Add .split-flip to put the media on the right at desktop.
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  gap: var(--sp-6);
  align-items: center;
}

@media (min-width: 920px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .split-flip .split-media { order: 2; }
  .split-flip .split-copy { order: 1; }
}

.split-copy > h2 { margin-bottom: var(--sp-3); }

.split-tagline {
  font-family: var(--f-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

/* Checked feature list — use inside .split-copy and cards. */
.ticks { list-style: none; padding: 0; margin: 0 0 var(--sp-5); display: grid; gap: var(--sp-3); }

.ticks li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-body);
  font-size: var(--fs-sm);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 12px;
  height: 12px;
  border: 2px solid var(--c-pulse);
  border-radius: 3px;
  transform: rotate(45deg);
}

/* ==========================================================================
   07 STEPS / PROCESS
   Numbered only when order genuinely matters (a real sequence).
   ========================================================================== */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-4); counter-reset: step; }

@media (min-width: 760px) { .steps { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }

.steps li {
  counter-increment: step;
  padding: var(--sp-5) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-raised);
  position: relative;
}

.on-dark .steps li { background: rgba(255, 255, 255, 0.04); }

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  color: var(--c-signal);
  display: block;
  margin-bottom: var(--sp-3);
}

.steps h3 { font-size: 1.08rem; margin-bottom: var(--sp-2); }
.steps p { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }

/* ==========================================================================
   08 STATS, CHIPS, MARQUEE
   ========================================================================== */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-5); }

.stat {
  padding: var(--sp-4) var(--sp-3);
  border-left: 2px solid var(--c-signal);
  background: color-mix(in srgb, var(--c-pulse) 6%, transparent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.stat b {
  display: block;
  font-family: var(--f-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-strong);
}

.stat span { font-size: var(--fs-xs); color: var(--text-muted); }

.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-5); }

.chip {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  background: var(--surface-raised);
}

.on-dark .chip { background: rgba(255, 255, 255, 0.05); }

/* Scrolling credential bar under the hero. Duplicate the item list twice
   inside .marquee-track so the loop is seamless. */
.marquee {
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.02);
  padding-block: var(--sp-4);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track { display: flex; width: max-content; gap: var(--sp-7); will-change: transform; }

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}

.marquee-item::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--c-pulse);
  transform: rotate(45deg);
}

/* ==========================================================================
   09 FRAMED MEDIA
   Photos are always framed: rounded, bordered, with a drawing perimeter and a
   corner label. This is the brand's picture treatment — use it everywhere so
   photography reads as instrumentation, not stock.
   ========================================================================== */
.frame { position: relative; border-radius: var(--r-lg); overflow: hidden; isolation: isolate; }

.frame img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.frame-tall img { aspect-ratio: 3 / 4; }
.frame-wide img { aspect-ratio: 16 / 9; }

.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: inherit;
  pointer-events: none;
}

.frame svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

/* Mono caption pinned inside the frame's bottom-left corner. */
.frame-tag {
  position: absolute;
  left: var(--sp-4);
  bottom: var(--sp-4);
  z-index: 3;
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(6, 20, 32, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-sm);
  padding: 0.35rem 0.6rem;
}

/* ==========================================================================
   10 FORMS
   Labels are always visible (never placeholder-only). Errors sit under the
   field they belong to. Inputs are 50px min for touch.
   ========================================================================== */
.form {
  background: var(--c-paper);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  border: 1px solid var(--c-line);
  box-shadow: var(--e-float);
  color: var(--t-body);
}

@media (min-width: 620px) { .form { padding: var(--sp-6); } }

.field { margin-bottom: var(--sp-4); border: 0; padding: 0; min-width: 0; }

.field > label,
.field > legend {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--t-strong);
  margin-bottom: var(--sp-2);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.72rem 0.9rem;
  background: var(--c-wash);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  color: var(--t-strong);
  transition: border-color var(--d-fast), background var(--d-fast), box-shadow var(--d-fast);
}

.field textarea { min-height: 120px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--c-pulse-deep);
  box-shadow: 0 0 0 3px rgba(41, 196, 176, 0.18);
}

.field-row { display: grid; gap: var(--sp-4); }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }

/* Checkbox group presented as selectable tiles. */
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }

.opts label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 46px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--d-fast), background var(--d-fast);
}

.opts label:has(input:checked) {
  border-color: var(--c-pulse-deep);
  background: rgba(41, 196, 176, 0.09);
}

.opts input { width: 17px; height: 17px; accent-color: var(--c-pulse-deep); flex: none; }

.form-note { font-size: var(--fs-xs); color: var(--t-muted); margin-top: var(--sp-3); }

.form-status { margin-top: var(--sp-3); font-size: var(--fs-sm); font-weight: 600; color: var(--c-pulse-deep); min-height: 1.4em; }
.form-status.is-error { color: var(--c-alert); }

/* ==========================================================================
   11 CTA BAND
   Full-width dark closer used at the bottom of every page above the footer.
   ========================================================================== */
.cta-band { text-align: center; }
.cta-band .wrap-narrow { position: relative; z-index: 2; }
.cta-band h2 { color: #fff; margin-inline: auto; }
.cta-band .lead { margin-inline: auto; margin-bottom: var(--sp-6); }
.cta-band .hero-actions { justify-content: center; }

/* ==========================================================================
   12 FOOTER
   Same on every page — copy verbatim from the template and only edit links.
   ========================================================================== */
.site-foot { background: var(--c-void); color: var(--t-muted-on-dark); padding-block: var(--sp-8) var(--sp-6); border-top: 1px solid rgba(255, 255, 255, 0.08); }

.foot-grid { display: grid; gap: var(--sp-6); }

@media (min-width: 780px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--sp-7); } }

.foot-grid h4 {
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-pulse);
  margin-bottom: var(--sp-4);
  font-weight: 500;
}

.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.foot-grid a { color: rgba(255, 255, 255, 0.74); text-decoration: none; font-size: var(--fs-sm); }
.foot-grid a:hover { color: var(--c-signal); }

.foot-about { color: var(--t-muted-on-dark); font-size: var(--fs-sm); max-width: 32ch; margin-top: var(--sp-4); }

.foot-bottom {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--t-muted-on-dark);
}

.foot-bottom p { margin: 0; }
