/* First Valley Capital — brand stylesheet.
 *
 * Built from the brand prototype's own design language, not from another
 * brand's sheet. The vocabulary, in case a later edit is tempted to "tidy" it:
 *
 *   - SQUARE. There is no border-radius anywhere in this file except the status
 *     dot and the progress bar. The prototype's buttons, cards and pills are all
 *     hard-cornered; rounding them is the single fastest way to make this look
 *     like a different company's site.
 *   - White page, full-bleed sections divided by HAIRLINES, not cards. Depth
 *     comes from 1px rules and whitespace, never from shadows.
 *   - The headline is LIGHT and very large (clamp to 68px), tracking tightened,
 *     leading 1.06 — with one clause set in serif italic. That contrast is the
 *     signature; keep it.
 *   - Micro-labels are 10px, bold, uppercase, 0.2em tracked. Used for eyebrows
 *     and buttons.
 *   - Emerald is a HAIRLINE accent only — a dot, an arrow, an icon. The solid
 *     action colour is near-black ink, not green.
 *
 * Oakstone is deliberately the opposite of all of this (rounded cards on cream,
 * bold serif headings). The two brands must not converge.
 */
:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #475569;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --paper: #ffffff;
  --wash: #f8fafc;
  --navy: #0e2b47;
  --forest: #415e37;
  --emerald: #059669;
  --emerald-l: #34d399;
  --danger: #b91c1c;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: Newsreader, Cinzel, Georgia, "Times New Roman", serif;
  --display: Cinzel, Newsreader, Georgia, serif;
  --gut: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
/* LOAD-BEARING. The engine hides the Back button, the file list, the submit
   progress bar and the held-value boxes with el.hidden, and an author
   `display:` rule silently beats the attribute. Without this the Back button
   shows on question one and the held boxes never hide. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 600; }

.wrap { width: min(1240px, 100% - (var(--gut) * 2)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 0; }

/* Micro-label: the prototype's signature typographic device. */
.eyebrow, .fvform-tag, .welcome-pill, .btn, .nav-cta, .topbar {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* ----- Header ----- */
.topbar { border-bottom: 1px solid var(--line-soft); color: var(--muted); font-weight: 600; letter-spacing: .14em; }
.topbar .wrap { display: flex; gap: 18px; padding: 9px 0; }
.topbar a { color: var(--ink-2); text-decoration: none; }
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { display: flex; align-items: center; gap: 28px; padding: 18px 0; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo .word { display: block; font-family: var(--display); font-size: 17px; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); font-weight: 500; }
.logo .logo-sub { font-weight: 400; }
.logo .tag { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-top: 2px; }
/* The nav sits in its own full-width band BELOW the header row (.navbar is a
   sibling of .wrap, not a child), so it has to re-establish the content width
   itself or it runs to the viewport edge. */
.navbar { border-top: 1px solid var(--line-soft); }
.navbar .nav { width: min(1240px, 100% - (var(--gut) * 2)); margin-inline: auto; }
.nav { display: flex; gap: 26px; align-items: center; padding: 2px 0; }
.nav a { color: var(--ink-3); text-decoration: none; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav-cta { background: var(--ink); color: #fff !important; padding: 12px 20px; }
.header-contact { font-size: 12px; color: var(--muted); margin-left: auto; text-align: right; }

/* ----- Buttons: square, micro-caps, ink-first ----- */
.btn { display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; font-family: inherit; padding: 16px 30px; text-decoration: none; }
.btn-forest { background: var(--ink); color: #fff; }
.btn-forest:hover { background: #1e293b; }
.btn-ghost { background: var(--paper); color: var(--ink-3); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--wash); }
.btn-arrow::after { content: "\2192"; color: var(--emerald-l); font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ----- Home: hero ----- */
.hero { padding: 64px 0 72px; border-bottom: 1px solid var(--line-soft); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--wash); color: var(--ink-2); padding: 7px 12px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }
.eyebrow .sep { color: var(--line); }
.eyebrow .soft { font-weight: 400; letter-spacing: .1em; color: var(--muted); }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 68px);
  font-weight: 300;
  letter-spacing: -.022em;
  line-height: 1.06;
  max-width: 19ch;
  margin: 28px 0 0;
}
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.hero p.lede { font-size: clamp(16px, 1.5vw, 20px); color: var(--ink-3); max-width: 62ch; margin: 26px 0 0; line-height: 1.66; }
.hero p.lede strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Commitments: 4 columns of micro-type under a hairline. */
.commitments { margin-top: 44px; padding-top: 34px; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.commitments h3 { font-size: 12px; font-weight: 700; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.commitments h3::before { content: ""; width: 7px; height: 7px; background: var(--emerald); flex: 0 0 auto; }
.commitments p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.6; }

/* ----- Home: sections ----- */
.band { padding: 66px 0; border-bottom: 1px solid var(--line-soft); }
.band-head { max-width: 60ch; margin-bottom: 38px; }
.band-head h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 300; letter-spacing: -.018em; line-height: 1.14; margin: 12px 0 0; }
.band-head h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.band-head p { color: var(--muted); margin: 14px 0 0; }

/* Products: three columns split by vertical hairlines, no cards. */
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.product { padding: 30px 30px 30px 0; border-right: 1px solid var(--line); }
.product:last-child { border-right: 0; padding-right: 0; }
.product + .product { padding-left: 30px; }
.product .badge { font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--emerald); }
.product h3 { font-size: 19px; font-weight: 500; margin: 12px 0 8px; letter-spacing: -.01em; }
.product .tagline { font-size: 14px; color: var(--ink-3); margin: 0 0 14px; }
.product ul { list-style: none; margin: 0 0 18px; padding: 0; }
.product li { font-size: 13px; color: var(--muted); padding-left: 16px; position: relative; margin-bottom: 7px; line-height: 1.55; }
.product li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 1px; background: var(--emerald); }
.product .meta { border-top: 1px solid var(--line-soft); padding-top: 12px; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); display: grid; gap: 5px; }
.product .meta b { color: var(--ink-2); }

/* Process: numbered, hairline-separated rows. */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 28px 30px 0 0; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step + .step { padding-left: 30px; }
.step .n { font-family: var(--display); font-size: 34px; font-weight: 500; color: var(--line-soft); line-height: 1; }
.step h3 { font-size: 16px; font-weight: 600; margin: 14px 0 6px; }
.step p { font-size: 13.5px; color: var(--muted); margin: 0; }

/* Industries: a dense micro-caps list, no boxes. */
.tags { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); }
.tags span { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding: 14px 22px 14px 0; margin-right: 22px; border-right: 1px solid var(--line-soft); }

/* Closing call to action. */
.closer { padding: 62px 0 70px; }
.closer h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 300; letter-spacing: -.018em; margin: 0; }
.closer h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.closer p { color: var(--muted); margin: 14px 0 28px; max-width: 58ch; }

/* ----- Apply page ----- */
.canvas { background: var(--paper); }
.apply-main { padding: 34px 0 60px; }
.apply-top { margin-bottom: 26px; }
.apply-top h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 300; letter-spacing: -.018em; }
.lede { color: var(--ink-3); max-width: 64ch; margin: 0 0 8px; }
.welcome { display: none; border: 1px solid var(--line); border-top: 2px solid var(--ink); padding: 26px 28px; margin-bottom: 26px; background: var(--wash); }
.welcome.is-active { display: block; }
.welcome-pill { display: inline-block; color: var(--emerald); margin-bottom: 12px; }
.welcome-title { font-size: 22px; font-weight: 400; margin: 0 0 6px; }
.welcome-sub { color: var(--muted); margin: 0; }

/* ----- The form ----- */
.fvform { border: 1px solid var(--line); background: var(--paper); }
.fvform-progress { display: flex; align-items: center; gap: 14px; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.fvform-bar { flex: 1; height: 2px; background: var(--line); }
.fvform-fill { display: block; height: 100%; background: var(--emerald); transition: width .28s ease; }
.fvform-count { font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--faint); font-variant-numeric: tabular-nums; }
.fvform-step { display: none; padding: 32px 28px 8px; border: 0; margin: 0; }
.fvform-step.is-active { display: block; }
.fvform-tag { color: var(--emerald); }
.fvform-num { color: var(--faint); font-weight: 600; }
/* .fvform-state is the SUBMITTING / SUCCESS panel, not a heading — it must be
   hidden until the engine activates it. Getting this wrong put "A confirmation
   is on its way to your email" on the page before anyone filled the form in. */
.fvform-state { display: none; padding: 38px 4px; }
.fvform-state.is-active { display: block; }
.fvform-state h3 { font-size: clamp(20px, 2.6vw, 27px); font-weight: 300; letter-spacing: -.014em; margin: 0 0 10px; }
/* The question heading, which is what that rule used to be mistaken for. */
.fvform-step h3 { font-size: clamp(20px, 2.6vw, 27px); font-weight: 300; letter-spacing: -.014em; margin: 10px 0 14px; }
.fvform-help { color: var(--muted); font-size: 14px; margin: -8px 0 16px; }
.fvform-err { color: var(--danger); font-size: 13.5px; min-height: 20px; margin-top: 10px; }
.fvform-nav { display: flex; gap: 12px; align-items: center; padding: 10px 28px 28px; }
.fvform-nav .btn-forest { margin-left: auto; }

/* ----- Fields ----- */
.field { margin-bottom: 18px; }
.lbl { display: block; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.inp { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: 13px 14px; }
.inp:focus { outline: 0; border-color: var(--ink); box-shadow: inset 0 -2px 0 var(--emerald); }
.inp[readonly], .inp.is-locked { background: var(--wash); color: var(--muted); }
.inp.is-held { border-color: var(--emerald); background: #f0fdf7; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.field-grid { display: grid; gap: 16px; }
.field-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.legal { font-size: 12.5px; color: var(--muted); }

/* ----- Options ----- */
.opts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.opt { display: flex; align-items: center; gap: 14px; padding: 15px 4px; cursor: pointer; border-bottom: 1px solid var(--line-soft); background: none; }
.opt:hover { background: var(--wash); }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt:has(input:checked) { background: var(--wash); box-shadow: inset 3px 0 0 var(--emerald); }
.opt-key { flex: 0 0 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--faint); font-size: 10px; font-weight: 700; }
.opt:has(input:checked) .opt-key { border-color: var(--emerald); color: var(--emerald); }
.opt-text { font-size: 15px; font-weight: 500; }
.opt-note { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }

/* ----- Sliders ----- */
.slider-wrap { padding: 6px 0 2px; }
.slider-val { font-family: var(--display); font-size: 34px; font-weight: 500; letter-spacing: -.01em; }
.slider { width: 100%; appearance: none; height: 2px; margin: 18px 0 8px; background: linear-gradient(to right, var(--ink) 0 calc(var(--fv-slider-fill, .5) * 100%), var(--line) calc(var(--fv-slider-fill, .5) * 100%) 100%); }
.slider::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; background: var(--ink); border: 0; cursor: pointer; }
.slider::-moz-range-thumb { width: 16px; height: 16px; background: var(--ink); border: 0; cursor: pointer; border-radius: 0; }
.slider-ends, .slider-cap { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

/* ----- MCA rows ----- */
.mca-rows { display: grid; gap: 12px; }
.mca-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: center; }

/* ----- Uploads ----- */
.drop { display: block; border: 1px dashed var(--line); padding: 30px; text-align: center; cursor: pointer; background: var(--wash); }
.drop:hover, .drop.is-dragging { border-color: var(--emerald); background: var(--paper); }
.drop.has-files { border-style: solid; }
.drop input[type="file"] { position: absolute; opacity: 0; width: 0; height: 0; }
.filelist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line-soft); }
.filelist li { border-bottom: 1px solid var(--line-soft); padding: 12px 2px; font-size: 13.5px; }
/* The submit progress bar. Its child is an <i>, not a <span>. */
.upbar { height: 2px; background: var(--line); margin: 10px 0; }
.upbar > i { display: block; height: 100%; width: 0; background: var(--emerald); transition: width .2s ease; }

/* File rows are built by the engine: .file-item > .file-name .file-size .file-x
   plus an absolutely positioned .file-bar along the bottom edge. */
.file-item { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--line-soft); position: relative; }
.file-name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.file-x { background: none; border: 0; color: var(--faint); font-size: 17px; line-height: 1; cursor: pointer; padding: 0 2px; }
.file-x:hover { color: var(--danger); }
.file-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--emerald); transition: width .2s ease; }
.file-item.is-done .file-bar { width: 100% !important; }
.file-item.is-failed .file-bar { background: var(--danger); }

/* ----- Held ("on file") ----- */
.held-note { border-left: 2px solid var(--emerald); background: var(--wash); padding: 13px 16px; font-size: 13.5px; color: var(--ink-3); }
.held-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); color: var(--emerald); padding: 5px 12px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.keep-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13.5px; }

/* ----- Signature ----- */
.sign-box { border: 1px solid var(--line); padding: 14px; background: var(--paper); position: relative; }
.sign-pad { width: 100%; height: 190px; touch-action: none; display: block; cursor: crosshair; }
.sign-rule { border-top: 1px solid var(--ink-2); margin: 0 14px; }
.sign-hint { position: absolute; left: 0; right: 0; top: 46%; text-align: center; color: var(--line); font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; pointer-events: none; }
.sign-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.sign-clear { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; }

/* ----- Banner / submitting / success ----- */
.banner { padding: 15px 18px; margin: 0 28px 4px; font-size: 14px; display: none; }
.banner.is-active { display: block; background: #fef2f2; border-left: 2px solid var(--danger); color: #7f1d1d; }
.spinner { width: 28px; height: 28px; margin: 0 0 16px; border: 1px solid var(--line); border-top-color: var(--emerald); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-mark { width: 38px; height: 38px; margin: 0 0 14px; background: var(--ink); color: var(--emerald-l); display: grid; place-items: center; font-size: 19px; }

/* ----- Rail ----- */
.rail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.rail-item { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 10px 18px 10px 0; margin-right: 18px; border-right: 1px solid var(--line-soft); }
.rail-item:last-child { border-right: 0; margin-right: 0; }
.rail-item.is-current { color: var(--ink); box-shadow: inset 0 -2px 0 var(--emerald); }
.rail-item.is-done { color: var(--emerald); }
.rail-fine { font-size: 12px; color: var(--muted); }

/* ----- Footer ----- */
.site-footer { border-top: 1px solid var(--line); margin-top: 0; padding: 52px 0 30px; font-size: 13.5px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; }
.site-footer a { color: var(--ink-3); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-fine { border-top: 1px solid var(--line-soft); margin-top: 32px; padding-top: 18px; font-size: 11.5px; color: var(--faint); line-height: 1.7; }

@media (max-width: 960px) {
  .commitments { grid-template-columns: repeat(2, 1fr); }
  .products, .steps { grid-template-columns: 1fr; }
  .product, .step { border-right: 0; border-bottom: 1px solid var(--line); padding: 26px 0; }
  .product + .product, .step + .step { padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  /* The nav WRAPS on small screens rather than being hidden. There is no
     hamburger in the markup, so hiding it would leave a phone with no
     navigation and — worse — no "Apply for capital" button in the header. */
  .header-contact { display: none; }
  .nav { flex-wrap: wrap; gap: 14px 18px; padding-bottom: 10px; }
  .nav-cta { padding: 10px 16px; }
}
@media (max-width: 640px) {
  .commitments { grid-template-columns: 1fr; }
  .field-grid-2, .field-grid-3 { grid-template-columns: 1fr; }
  .mca-row { grid-template-columns: 1fr; }
}
