/* TH Solutions LLC — site styles
   Palette sampled directly from the logo mark. */

:root {
  --ink:      #03123F;
  --ink-2:    #0A1E52;
  --signal:   #01A6F1;
  --blue:     #0B6FC4;
  --paper:    #FBFCFD;
  --paper-2:  #F2F5F8;
  --rule:     #DCE3EB;
  --muted:    #5F6E80;
  --text:     #1A2432;

  --font-display: 'Archivo', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --band: clamp(4rem, 9vw, 7.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0; letter-spacing: -0.018em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.45rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; letter-spacing: -0.01em; }
p  { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); line-height: 1.55; }

/* The hairline under a heading is lifted straight from the logo lockup —
   it is the brand's one structural device, reused rather than invented. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 1.15rem;
  display: inline-block;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--signal);
}
.band--ink .eyebrow { color: var(--signal); }

/* ---------- Bands ---------- */

.band { padding-block: var(--band); }
.band--tint { background: var(--paper-2); }
.band--ink  { background: var(--ink); color: #E8EEF6; }
.band--ink h2, .band--ink h3 { color: #FFFFFF; }
.band--ink .lede { color: #A9BDD6; }

/* ---------- Header ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: rgba(251, 252, 253, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 74px; }
.masthead__logo img { width: 220px; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--blue); border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--signal); }
.nav__cta {
  background: var(--ink);
  color: #fff !important;
  padding: 0.55rem 1.05rem;
  border-radius: 3px;
  border-bottom: none !important;
}
.nav__cta:hover { background: var(--blue); }

.nav__toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: 3px; padding: 0.5rem 0.7rem; font: inherit; font-size: 0.85rem; cursor: pointer; color: var(--text); }

@media (max-width: 800px) {
  .masthead__inner { flex-wrap: wrap; min-height: 64px; }
  .nav__toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 0.75rem; }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
  .nav__cta { text-align: center; margin-top: 0.75rem; }
}

/* ---------- Hero + ledger (signature) ---------- */

.hero { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.hero__grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 940px) { .hero__grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 1.4rem; max-width: 46ch; }

/* Raw export rows, rendered the way an operator actually sees them. */
.ledger {
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(3, 18, 63, 0.05), 0 12px 32px -18px rgba(3, 18, 63, 0.35);
}
.ledger__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: #B7CBE4;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ledger__rows { padding: 0.5rem 0; font-family: var(--font-mono); font-size: 0.74rem; }
.ledger__row {
  display: grid;
  grid-template-columns: 5.5rem 3.6rem 1fr 4.2rem 3.6rem;
  gap: 0.5rem;
  padding: 0.32rem 1rem;
  color: #93A2B4;
  white-space: nowrap;
}
.ledger__row span:nth-child(4), .ledger__row span:nth-child(5) { text-align: right; }
.ledger__row--gap span:nth-child(5) { color: #C3CCD7; }
.ledger__answer {
  border-top: 1px solid var(--rule);
  padding: 1.15rem 1rem;
  background: linear-gradient(0deg, rgba(1,166,241,0.05), rgba(1,166,241,0.05));
}
.ledger__answer strong { display: block; font-size: 0.95rem; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
.ledger__answer em {
  display: block; margin-top: 0.3rem; font-style: normal;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--blue);
}

/* Narrow viewports: drop the part-description column and tighten the grid.
   The cost column stays — the empty cost is the whole point of the graphic. */
@media (max-width: 620px) {
  .masthead__logo img { width: 168px; }
  .ledger__rows { font-size: 0.66rem; }
  .ledger__row { grid-template-columns: 4.9rem 3.1rem 1fr 3.1rem; gap: 0.4rem; padding-inline: 0.8rem; }
  .ledger__row span:nth-child(3) { display: none; }
  .ledger__bar { padding-inline: 0.8rem; font-size: 0.62rem; }
  .ledger__answer { padding-inline: 0.8rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .ledger__row { animation: rowIn 0.5s ease-out backwards; }
  .ledger__row:nth-child(1) { animation-delay: 0.05s; }
  .ledger__row:nth-child(2) { animation-delay: 0.11s; }
  .ledger__row:nth-child(3) { animation-delay: 0.17s; }
  .ledger__row:nth-child(4) { animation-delay: 0.23s; }
  .ledger__row:nth-child(5) { animation-delay: 0.29s; }
  .ledger__row:nth-child(6) { animation-delay: 0.35s; }
  .ledger__row:nth-child(7) { animation-delay: 0.41s; }
  .ledger__answer { animation: rowIn 0.6s ease-out 0.6s backwards; }
}
@keyframes rowIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

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

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: 3px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--blue); }
.btn--ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.band--ink .btn--primary { background: var(--signal); color: var(--ink); }
.band--ink .btn--primary:hover { background: #fff; }
.band--ink .btn--ghost { border-color: rgba(255,255,255,0.3); color: #fff; }
.band--ink .btn--ghost:hover { border-color: var(--signal); color: var(--signal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

/* ---------- Pipeline (ordered — the sequence carries meaning) ---------- */

.pipeline { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; margin-top: 3rem; }
@media (min-width: 780px) { .pipeline { grid-template-columns: repeat(4, 1fr); } }
.pipeline__step { background: var(--paper); padding: 1.75rem 1.5rem; }
.band--tint .pipeline__step { background: #fff; }
.pipeline__step h3 { margin-bottom: 0.5rem; }
.pipeline__step p { font-size: 0.94rem; color: var(--muted); }
.pipeline__mark { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; color: var(--signal); display: block; margin-bottom: 0.85rem; }

/* ---------- Generic grids & cards ---------- */

.grid { display: grid; gap: 1.5rem; margin-top: 3rem; }
@media (min-width: 720px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card { background: #fff; border: 1px solid var(--rule); border-radius: 4px; padding: 1.75rem; }
.band--tint .card { background: #fff; }
.band--ink .card { background: var(--ink-2); border-color: rgba(255,255,255,0.13); }
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.96rem; color: var(--muted); }
.band--ink .card p { color: #A9BDD6; }

.checklist { list-style: none; margin: 1.75rem 0 0; padding: 0; }
.checklist li { position: relative; padding-left: 1.5rem; margin-bottom: 0.7rem; color: var(--muted); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 2px; background: var(--signal); }
.band--ink .checklist li { color: #A9BDD6; }

.stat-row { display: grid; gap: 2rem; margin-top: 3rem; }
@media (min-width: 720px) { .stat-row { grid-template-columns: repeat(3, 1fr); } }
.stat__num { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; }
.band--ink .stat__num { color: var(--signal); }
.stat__label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.09em; color: var(--muted); margin-top: 0.5rem; text-transform: uppercase; }
.band--ink .stat__label { color: #A9BDD6; }

.prose { max-width: 68ch; }
.prose h3 { margin-top: 2.5rem; margin-bottom: 0.75rem; }

/* ---------- Form ---------- */

.form { max-width: 34rem; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: #fff;
  color: var(--text);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--signal); outline-offset: 1px; border-color: var(--signal); }
.field__hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 1rem 1.15rem; border-radius: 3px; margin-bottom: 1.75rem; font-size: 0.95rem; }
.notice--ok   { background: #E9F7EC; border: 1px solid #B6E2C1; color: #1B5E2A; }
.notice--err  { background: #FDECEC; border: 1px solid #F3C0C0; color: #8A2020; }

/* ---------- Footer ---------- */

.foot { background: var(--ink); color: #A9BDD6; padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; font-size: 0.92rem; }
.foot a { color: #D6E4F5; text-decoration: none; }
.foot a:hover { color: var(--signal); text-decoration: underline; }
.foot__grid { display: grid; gap: 2.5rem; }
@media (min-width: 780px) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot__logo img { width: 200px; margin-bottom: 1.1rem; }
.foot h4 { font-size: 0.72rem; font-family: var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: #fff; margin: 0 0 0.9rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.5rem; }
.foot__base { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.13); font-size: 0.82rem; color: #7E93AE; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

/* ---------- A11y ---------- */

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff; padding: 0.75rem 1.15rem; z-index: 100; border-radius: 0 0 3px 0;
}
.skip:focus { left: 0; top: 0; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
