/* ============================================================
   NORTHLINE — design system
   Direction: "banknote, modernized."
   Deep engraved-money green · bond-paper white · guilloché
   line-art · Instrument Serif poster moments · mono tabular
   figures on money · one structural signature: THE RAIL.
   ============================================================ */

:root {
  /* paper */
  --paper:      #F7F6F1;
  --paper-2:    #EFEDE4;
  --paper-3:    #E6E3D6;
  --surface:    #FFFFFF;

  /* ink */
  --ink:        #10160F;
  --ink-2:      #46504A;
  --ink-3:      #7A837B;

  /* the green */
  --green-950:  #06231A;
  --green-900:  #0A2E22;
  --green-800:  #0E3C2B;
  --green-700:  #145138;
  --green-600:  #1A6A47;
  --signal:     #2E9E6B;
  --signal-soft:#DCEEE2;

  /* engraving */
  --gold:       #C2A878;
  --line:       #DCD9CC;
  --line-strong:#C8C4B2;
  --line-dark:  rgba(247, 246, 241, 0.14);

  /* second & third inks — banknotes are never one color */
  --blue-800:   #1E3C55;
  --blue-600:   #2E5A7C;
  --blue-soft:  #E3EAF0;
  --copper:     #A4552F;
  --copper-700: #8A4322;
  --copper-soft:#F3E2D7;

  /* status */
  --red:        #B4483B;
  --red-soft:   #F6E4E1;
  --amber:      #A97B2F;

  /* type */
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans:  "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
  --mono:  "Spline Sans Mono", "SF Mono", "IBM Plex Mono", monospace;

  /* rhythm */
  --max: 1180px;
  --gutter: 24px;
  --radius: 8px;
  --radius-lg: 14px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.44, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--green-700); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- type ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.02;
}
.h-hero  { font-size: clamp(46px, 7.4vw, 92px); }
.h-plate { font-size: clamp(38px, 5.4vw, 64px); }
.h-sec   { font-size: clamp(30px, 3.8vw, 44px); letter-spacing: -0.005em; }

h3.h-item, .h-item {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-600);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.on-dark .eyebrow { color: var(--gold); }

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
}
.on-dark .lede { color: rgba(247, 246, 241, 0.78); }

.mono-fig {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.muted { color: var(--ink-3); }
.small { font-size: 14px; }

/* ---------- layout ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { max-width: 640px; display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }

.plate {
  background:
    radial-gradient(120% 90% at 70% 0%, var(--green-800) 0%, var(--green-900) 46%, var(--green-950) 100%);
  color: var(--paper);
}
.on-dark { color: var(--paper); }

.hairline    { border: 0; border-top: 1px solid var(--line); margin: 0; }
.paper-2-bg  { background: var(--paper-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: 0.002em;
  text-decoration: none;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out),
              border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .arr { transition: transform 200ms var(--ease-out); }
.btn:hover .arr { transform: translateX(3px); }

.btn-primary { background: var(--green-800); color: var(--paper); }
.btn-primary:hover { background: var(--green-700); }

.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-2); }

.on-dark .btn-primary,
.btn-paper { background: var(--paper); color: var(--green-900); }
.on-dark .btn-primary:hover,
.btn-paper:hover { background: #FFFFFF; }

.on-dark .btn-ghost { border-color: var(--line-dark); color: var(--paper); }
.on-dark .btn-ghost:hover { border-color: rgba(247, 246, 241, 0.4); }

.btn-lg { padding: 16px 30px; font-size: 16.5px; border-radius: 10px; }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 140ms;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand svg, .brand img { width: 27px; height: 27px; display: block; }
.on-dark .brand, .plate .brand { color: var(--paper); }
.brand .wd { display: inline-flex; flex-direction: column; line-height: 1; gap: 2px; }
.brand .wd small {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.34em;
  color: var(--ink-3);
  font-weight: 500;
}
.on-dark .brand .wd small { color: rgba(247, 246, 241, 0.55); }

/* eyebrow ink variants */
.eyebrow.eb-blue { color: var(--blue-600); }
.eyebrow.eb-copper { color: var(--copper); }

/* plate watermark emblem */
.wm {
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 340px;
  opacity: 0.09;
  pointer-events: none;
}

/* ---------- cards & chips ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.plate .card, .card-dark {
  background: rgba(247, 246, 241, 0.04);
  border-color: var(--line-dark);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
}

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; }
.field label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.005em;
}
.field .hint { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 15.5px;
  transition: border-color 140ms, box-shadow 140ms;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2346504A' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(26, 106, 71, 0.14);
}
.field.error input, .field.error select, .field.error textarea { border-color: var(--red); }
.field .err-msg {
  display: none;
  font-size: 13px;
  color: var(--red);
  font-weight: 500;
}
.field.error .err-msg { display: block; }
.field .optional { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.form-grid .span-2 { grid-column: span 2; }

/* segmented choice chips (radio-style) */
.seg { display: flex; flex-wrap: wrap; gap: 10px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface);
  transition: all 140ms var(--ease-out);
  user-select: none;
}
.seg label:hover { border-color: var(--ink-3); }
.seg input:checked + label {
  background: var(--green-800);
  border-color: var(--green-800);
  color: var(--paper);
}
.seg input:focus-visible + label { outline: 2px solid var(--green-600); outline-offset: 2px; }

/* ---------- THE RAIL ---------- */
.rail {
  position: relative;
  display: grid;
  gap: 0;
}
.rail::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--line-strong);
}
.rail .rail-fill {
  position: absolute;
  left: 15px;
  top: 14px;
  width: 2px;
  height: 0%;
  max-height: calc(100% - 28px);
  background: var(--green-600);
  transition: height 600ms var(--ease-out);
}
.rail-stop {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 22px;
  padding-block: 22px;
}
.rail-node {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  transition: all 300ms var(--ease-out);
  z-index: 1;
}
.rail-stop.active .rail-node {
  border-color: var(--green-700);
  background: var(--green-800);
  color: var(--paper);
}
.rail-stop.done .rail-node {
  border-color: var(--green-600);
  background: var(--signal-soft);
  color: var(--green-700);
}

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-strong);
}
.tbl td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  vertical-align: top;
}
.tbl td.fig { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--green-600);
  transition: transform 200ms var(--ease-out);
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 4px 24px; color: var(--ink-2); max-width: 56em; }

/* ---------- badges / status ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.on-dark .badge { border-color: var(--line-dark); color: rgba(247, 246, 241, 0.8); }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 158, 107, 0.5); }
  55%      { box-shadow: 0 0 0 6px rgba(46, 158, 107, 0); }
}
.badge .dot { animation: pulse-dot 2.4s infinite; }

/* ---------- reveals (progressive: visible by default; JS hides
   below-fold elements just-in-time, then transitions them in) ---------- */
.rv-prep { opacity: 0; transform: translateY(22px); transition: none; }
.rv-anim { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.rv-anim.rv-d1 { transition-delay: 90ms; }
.rv-anim.rv-d2 { transition-delay: 180ms; }
.rv-anim.rv-d3 { transition-delay: 270ms; }
.rv-anim.rv-d4 { transition-delay: 360ms; }

/* ---------- guilloché plate art ---------- */
.guilloche {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.guilloche svg { position: absolute; }
@keyframes drift-rot { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---------- footer ---------- */
.footer { padding-block: 56px 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer h4 {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(247, 246, 241, 0.55);
  margin-bottom: 16px;
}
.footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer a { text-decoration: none; font-size: 14.5px; color: rgba(247, 246, 241, 0.8); }
.footer a:hover { color: var(--paper); }
.footer-legal {
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(247, 246, 241, 0.5);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- compact booking widget (industry pages) ---------- */
.bw { display: grid; gap: 14px; }
.bw-lab { font-size: 13.5px; font-weight: 600; }
.bw-days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.bw-day {
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface);
  padding: 9px 4px; display: grid; justify-items: center; gap: 1px; cursor: pointer;
  transition: all 130ms var(--ease-out);
}
.bw-day .dw { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.bw-day .dn { font-size: 16.5px; font-weight: 600; }
.bw-day .dm { font-size: 10.5px; color: var(--ink-3); }
.bw-day:hover { border-color: var(--ink-3); }
.bw-day.sel { background: var(--green-800); border-color: var(--green-800); color: var(--paper); }
.bw-day.sel .dw, .bw-day.sel .dm { color: rgba(247,246,241,0.7); }
.bw-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.bw-slot {
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
  padding: 9px 4px; font-family: var(--mono); font-size: 12.5px; cursor: pointer;
  transition: all 120ms var(--ease-out);
}
.bw-slot:hover { border-color: var(--ink-3); }
.bw-slot.sel { background: var(--green-800); border-color: var(--green-800); color: var(--paper); }
.bw-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.bw-in {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); font-size: 15px;
}
.bw-in:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(26,106,71,0.14); }
.bw-span { grid-column: span 2; }
.bw-err { display: none; color: var(--red); font-size: 13.5px; font-weight: 500; }
.bw-err.show { display: block; }
.bw-go { justify-self: start; }
.bw-note { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
@media (max-width: 560px) {
  .bw-fields { grid-template-columns: 1fr; }
  .bw-span { grid-column: span 1; }
  .bw-go { justify-self: stretch; }
}

/* ---------- animation kill-switch (?noanim, for QA/debug) ---------- */
html.noanim .rv, html.noanim .rv-prep { opacity: 1 !important; transform: none !important; transition: none !important; }
html.noanim [data-guilloche] g { animation: none !important; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .rv, .rv-prep { opacity: 1; transform: none; }
}
