/* Layout idea: an operator's holding. Marine header and hero carrying the Perium square grid,
   then white, ruled sections that read like a P&L. One light visual world by choice. */
:root {
  --ink: #0E1A2B;          /* marine: header, heroes, text */
  --ink-2: #13233A;        /* raised surface on marine */
  --green: #1F6B4F;        /* Perium green: actions, links */
  --green-dark: #174F3B;
  --signal: #5FC39A;       /* signal green: accents on marine */
  --mint: #DCEFE6;         /* highlighted surfaces */
  --mist: #F3F5F7;         /* alternate section ground */
  --slate: #4A5565;        /* secondary text */
  --stone: #7D8897;        /* proof-strip figures */
  --line: #D9DEE5;         /* rules and borders */
  --field: #8E99A8;        /* form borders */
  --paper: #FFFFFF;
  --ink-soft: #A9B4C2;     /* secondary text on marine */
  --ink-line: #2A3A52;     /* rules on marine */
  --todo: #FFF3C4;         /* placeholder highlight: remove before launch */

  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --wrap: 1160px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

.todo { background: var(--todo); color: var(--ink); padding: 0 4px; border-radius: 3px; }
.todo-bar { background: var(--todo); color: var(--ink); font-size: 15px; padding: 10px 0; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; color: inherit; }
h1 { font-weight: 800; font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.03; letter-spacing: -0.01em; }
h2 { font-weight: 800; font-size: clamp(1.75rem, 3.3vw, 2.5rem); line-height: 1.1; }
h3 { font-weight: 700; font-size: 1.22rem; line-height: 1.25; }
p { margin: 0; }
.lead { font-size: 1.18rem; line-height: 1.55; color: var(--slate); max-width: 36em; }
.muted { color: var(--slate); }
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
.measure { max-width: 40em; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 6px;
  border: 2px solid transparent;
  font-family: var(--body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn-primary { background: var(--green); color: var(--paper); }
.btn-primary:hover { background: var(--green-dark); color: var(--paper); }
.btn-signal { background: var(--signal); color: var(--ink); }
.btn-signal:hover { background: var(--paper); color: var(--ink); }
.btn-ghost { border-color: var(--ink-soft); color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--paper); color: var(--paper); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header (marine, uppercase nav with rules) ---------- */
.site-header { background: var(--ink); color: var(--paper); border-bottom: 1px solid var(--ink-line); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.brand:hover { color: var(--paper); }
.brand-mark { width: 24px; height: 33px; flex: none; }
.brand-word { display: flex; flex-direction: column; gap: 5px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 0.9; letter-spacing: 0.04em; }
.brand-name .i { color: var(--signal); }
.brand-sub { font-size: 8px; font-weight: 600; letter-spacing: 0.66em; color: var(--ink-soft); line-height: 1; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ink-soft);
  border-radius: 6px;
  background: transparent;
  color: var(--paper);
  font: 600 14px/1 var(--body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav { display: flex; align-items: center; }
.nav-link {
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-left: 1px solid var(--ink-line);
}
.nav-link:first-child { border-left: none; }
.nav-link:hover { color: var(--signal); }
.nav-link[aria-current="page"] { color: var(--signal); }
.header-actions .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }

@media (max-width: 899px) {
  .menu-toggle { display: inline-flex; align-items: center; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; order: 3; padding-bottom: 6px; }
  .nav.is-open { display: flex; }
  .nav-link { border-left: none; border-top: 1px solid var(--ink-line); padding: 14px 0; }
}
@media (max-width: 380px) {
  .header-actions .btn { padding: 0 12px; font-size: 14px; }
}

/* ---------- Heroes (marine with the Perium grid) ---------- */
.hero {
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse at 85% 20%, rgba(95, 195, 154, 0.16), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Crect x='3' y='3' width='24' height='24' rx='3' fill='%23ffffff' fill-opacity='0.035'/%3E%3Crect x='33' y='33' width='24' height='24' rx='3' fill='%23ffffff' fill-opacity='0.035'/%3E%3C/svg%3E");
  color: var(--paper);
  padding-block: clamp(56px, 8vw, 104px);
}
.hero .lead { color: var(--ink-soft); }
.hero .eyebrow { color: var(--signal); }
.hero-short { padding-block: clamp(48px, 6vw, 80px); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-mist { background: var(--mist); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink .lead, .section-ink .muted { color: var(--ink-soft); }
.section-ink .eyebrow { color: var(--signal); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 44em; }

.split { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: flex-start; }
.split > * { min-width: 0; }
.split-main { flex: 999 1 460px; }
.split-side { flex: 1 1 320px; }

/* ---------- Proof strip (banner under the home hero) ---------- */
.proof { padding-block: 40px 44px; border-bottom: 1px solid var(--line); }
.proof-title { text-align: center; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.04em; color: var(--green); }
.proof-row { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 32px; }
.proof-row li { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.proof-figure { font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.05; color: var(--stone); letter-spacing: -0.01em; }
.proof-label { font-size: 15px; color: var(--slate); }

/* ---------- Cards (three ways in) ---------- */
.cards { display: flex; flex-wrap: wrap; gap: 20px; }
.card {
  flex: 1 1 300px;
  min-width: 0;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card-tag { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }
.card p { color: var(--slate); }
.card .btn { align-self: flex-start; margin-top: auto; }
.card-feature { border-top-color: var(--green); }

/* ---------- Ledger (rows like a P&L) ---------- */
.ledger { margin: 0; border-top: 2px solid var(--ink); }
.ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 8px 24px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.ledger dt { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.ledger dd { margin: 0; color: var(--slate); }
@media (max-width: 599px) { .ledger-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Steps (a real sequence, with delays) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 28px; counter-reset: step; }
.steps > li {
  counter-increment: step;
  flex: 1 1 220px;
  min-width: 0;
  border-top: 2px solid var(--ink);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.steps > li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 14px; color: var(--green); }
.steps p { color: var(--slate); font-size: 16px; }
.step-time { font-family: var(--mono); font-size: 14px; color: var(--ink); }

/* ---------- Criteria panel (marine) ---------- */
.panel { background: var(--ink); color: var(--paper); border-radius: 10px; padding: clamp(24px, 3vw, 32px); display: flex; flex-direction: column; gap: 4px; }
.panel .eyebrow { color: var(--signal); margin-bottom: 8px; }
.criteria { margin: 0; display: flex; flex-direction: column; }
.criteria-row { display: flex; flex-direction: column; gap: 2px; padding-block: 14px; border-bottom: 1px solid var(--ink-line); }
.criteria-row:last-child { border-bottom: none; }
.criteria dt { font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.criteria dd { margin: 0; font-size: 15px; color: var(--ink-soft); }

/* ---------- Terms list ---------- */
.terms { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.terms li { padding-block: 12px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.terms li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 10px; background: var(--green); border-radius: 2px; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding-block: 18px; font-weight: 600; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 20px; line-height: 1; color: var(--green); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding-bottom: 18px; color: var(--slate); max-width: 44em; }

/* ---------- Founder ---------- */
.founder-photo { width: 100%; max-width: 320px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; display: block; }
.founder-name { font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
.founder-role { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }

/* ---------- Notice (investor page) ---------- */
.notice { border-left: 4px solid var(--green); background: var(--mist); padding: 16px 18px; font-size: 15px; color: var(--slate); border-radius: 0 6px 6px 0; }

/* ---------- Calculator ---------- */
.calc {
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  padding: clamp(20px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 24px 60px rgba(4, 10, 20, 0.35);
}
.calc-title { font-family: var(--display); font-weight: 800; font-size: 1.3rem; }
.calc-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.calc-grid .field { flex: 1 1 160px; }
.money { position: relative; }
.money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--slate); pointer-events: none; }
.money input { padding-left: 26px !important; }
.choice { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.choice legend { font-size: 15px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { flex: 1 1 auto; min-width: 0; position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 6px 12px;
  border: 1px solid var(--field);
  border-radius: 6px;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 3px solid var(--signal); outline-offset: 2px; }
.calc-result { background: var(--mint); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.calc-kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-dark); }
.calc-high { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.calc-range, .calc-inventory, .calc-multiple { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-inventory b { color: var(--green-dark); }
.calc-note { font-size: 13px; color: var(--slate); }

/* ---------- Forms ---------- */
.form { display: flex; flex-wrap: wrap; gap: 16px; }
.field { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field-full { flex-basis: 100%; }
.field label { font-size: 15px; font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--field);
  border-radius: 6px;
  min-height: 48px;
  padding: 10px 12px;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); outline: 2px solid var(--mint); outline-offset: 0; }
.check { flex-basis: 100%; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex: none; }
.form .btn { border: none; }
.form-status { flex-basis: 100%; font-size: 15px; background: var(--mint); color: var(--ink); padding: 12px 14px; border-radius: 6px; }

.email-line { font-family: var(--mono); font-size: 16px; user-select: all; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--ink-soft); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 28px;
  font-size: 14px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand svg { width: 14px; height: 19px; flex: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { color: var(--ink-soft); text-decoration: none; padding-block: 10px; }
.footer-links a:hover { color: var(--signal); }

/* ---------- Adjustments ---------- */
.hero-calc h1 { font-size: clamp(2.1rem, 3.8vw, 3.1rem); }
.footer-links { align-items: center; }
@media (max-width: 479px) {
  .header-actions { gap: 8px; }
  .header-actions .btn { padding: 0 12px; font-size: 14px; }
  .menu-toggle { padding: 0 10px; font-size: 13px; }
}
