/* Layout concept: an engineering drawing sheet. Quiet cool paper, ink-navy type,
   one signal-orange accent, and a drafting "title block" grid for the company's
   registration facts. */
:root {
  --paper: #f5f7fa;
  --sheet: #ffffff;
  --ink: #142133;
  --ink-soft: #4a5a70;
  --rule: #d5dce6;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --band: #142133;
  --band-ink: #e8eef6;
  --band-soft: #9fb0c6;
  --ph-bg: #fff4cc;
  --ph-ink: #6b4e00;
  --ph-rule: #d9a400;
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.25rem, 5vw, 3.25rem);
  --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1622; --sheet: #142030; --ink: #e6edf6; --ink-soft: #a3b2c6; --rule: #2a3a50;
    --accent: #fb8a4c; --accent-ink: #1a0d04; --band: #0a111b; --band-ink: #e6edf6; --band-soft: #8da0b8;
    --ph-bg: #3a3010; --ph-ink: #ffe08a; --ph-rule: #b8901a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1622; --sheet: #142030; --ink: #e6edf6; --ink-soft: #a3b2c6; --rule: #2a3a50;
  --accent: #fb8a4c; --accent-ink: #1a0d04; --band: #0a111b; --band-ink: #e6edf6; --band-soft: #8da0b8;
  --ph-bg: #3a3010; --ph-ink: #ffe08a; --ph-rule: #b8901a; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6;
}
img { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; font-weight: 600; }
h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; max-width: 65ch; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }

.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));
}
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* Placeholder marker: anything still missing from Christian */
.ph {
  background: var(--ph-bg); color: var(--ph-ink); border: 1px dashed var(--ph-rule);
  border-radius: 3px; padding: 0 0.3em; font-family: var(--font-mono); font-size: 0.88em; white-space: normal;
}
.ph-block {
  background: var(--ph-bg); color: var(--ph-ink); border: 1px dashed var(--ph-rule);
  border-radius: 4px; padding: 0.75rem 1rem; font-size: var(--step--1);
}

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--sheet); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--sheet); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; }
.wordmark { text-decoration: none; display: flex; flex-direction: column; line-height: 1; color: var(--ink); }
.wordmark b { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.04em; }
.wordmark span { font-family: var(--font-display); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.42em; color: var(--ink-soft); margin-top: 3px; }
.wordmark:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.1rem; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: 0.94rem; color: var(--ink-soft); padding-block: 4px; }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.nav a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 600; font-size: 0.94rem;
  background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1rem; border-radius: 4px; border: 0; cursor: pointer; font-family: inherit;
}
.btn:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.btn-ghost:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink-soft); filter: none; }
.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: 0.45rem 0.8rem; border: 1.5px solid var(--rule); border-radius: 4px; }
.menu summary::-webkit-details-marker { display: none; }
@media (max-width: 960px) {
  .nav { display: none; }
  .menu { display: block; position: relative; }
  .menu[open] .menu-panel {
    position: absolute; right: 0; top: calc(100% + 8px); background: var(--sheet); border: 1px solid var(--rule);
    border-radius: 6px; padding: 0.75rem; width: min(80vw, 18rem); display: grid; gap: 0.25rem; box-shadow: 0 10px 30px rgb(0 0 0 / 0.15);
  }
  .menu-panel a { text-decoration: none; padding: 0.5rem; border-radius: 4px; }
  .menu-panel a[aria-current="page"] { background: var(--paper); }
  .menu-panel .btn { justify-content: center; margin-top: 0.4rem; }
}

/* Page sections */
main { display: block; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section + .section { border-top: 1px solid var(--rule); }
.stack { display: grid; gap: 1rem; }
.stack-lg { display: grid; gap: 2rem; }
.eyebrow { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.lede { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; }
.muted { color: var(--ink-soft); }

.page-head { background: var(--sheet); border-bottom: 1px solid var(--rule); }
.page-head .wrap { padding-block: clamp(2.5rem, 6vw, 4rem); display: grid; gap: 0.9rem; }

/* Hero */
.hero { background: var(--band); color: var(--band-ink); }
.hero .wrap { padding-block: clamp(3rem, 8vw, 5.5rem); display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.hero .lede { color: var(--band-soft); }
.hero .eyebrow { color: var(--accent); }
.hero .btn-ghost { color: var(--band-ink); box-shadow: inset 0 0 0 1.5px var(--band-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Drafting title block: registration facts */
.titleblock { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1.5px solid currentColor; font-family: var(--font-mono); }
.titleblock div { padding: 0.65rem 0.8rem; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; min-width: 0; }
.titleblock div:nth-child(2n) { border-right: 0; }
.titleblock div:nth-last-child(-n+2) { border-bottom: 0; }
.titleblock dt { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
.titleblock dd { margin: 0.15rem 0 0; font-size: 0.98rem; font-weight: 500; overflow-wrap: anywhere; }
.titleblock .wide { grid-column: 1 / -1; border-right: 0; }
.hero .titleblock { color: var(--band-ink); border-color: var(--band-soft); }
.hero .titleblock div { border-color: var(--band-soft); }

/* Grids and cards */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.grid-2 { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; padding: 1.25rem; display: grid; gap: 0.6rem; align-content: start; min-width: 0; }
.card .code { font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-soft); }
.card a.more { font-weight: 600; font-size: 0.94rem; text-decoration: none; color: var(--accent); }

.split { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.list { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; max-width: 65ch; }

.photo-ph {
  aspect-ratio: 4 / 5; max-width: 100%; width: 100%; border: 1px dashed var(--ph-rule); background: var(--ph-bg); color: var(--ph-ink);
  display: grid; place-items: center; text-align: center; font-family: var(--font-mono); font-size: var(--step--1); border-radius: 6px; padding: 1rem;
}

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--rule); }
.timeline li { position: relative; padding: 0 0 1.75rem 1.5rem; display: grid; gap: 0.3rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 0.45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--accent); }
.timeline .when { font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-soft); }

/* Callout band */
.cta-band { background: var(--sheet); border-top: 1px solid var(--rule); }
.cta-band .wrap { padding-block: 2.5rem; display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; justify-content: space-between; }

/* Forms */
form { display: grid; gap: 1rem; max-width: 40rem; }
.field { display: grid; gap: 0.35rem; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
label { font-weight: 600; font-size: 0.92rem; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--sheet); border: 1.5px solid var(--rule); border-radius: 4px; padding: 0.6rem 0.7rem; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 9rem; resize: vertical; }
.form-note { font-size: var(--step--1); color: var(--ink-soft); }
.form-status { font-weight: 600; }

/* Footer */
.site-footer { background: var(--band); color: var(--band-ink); font-size: 0.92rem; }
.site-footer .wrap { padding-block: 3rem 2rem; display: grid; gap: 2rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.site-footer h2 { font-size: 0.75rem; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--band-soft); font-weight: 500; margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer a { text-decoration: none; color: var(--band-ink); }
.site-footer a:hover { color: var(--accent); }
.site-footer .facts { font-family: var(--font-mono); font-size: 0.85rem; display: grid; gap: 0.3rem; }
.site-footer .fine { border-top: 1px solid var(--band-soft); padding-top: 1.25rem; color: var(--band-soft); font-size: 0.82rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.site-footer .wordmark { color: var(--band-ink); }
.site-footer .wordmark span { color: var(--band-soft); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Fixes: keep button text readable inside nav and menu; keep headshot placeholder modest */
.nav a.btn, .menu-panel a.btn { color: var(--accent-ink); padding: 0.6rem 1rem; box-shadow: none; }
.photo-ph { max-width: 22rem; }
.grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
.monogram {
  aspect-ratio: 4 / 5; width: 100%; border-radius: 6px; background: var(--band); color: var(--band-ink);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 8vw, 5rem);
  letter-spacing: 0.06em; box-shadow: inset 0 0 0 1px var(--rule);
}
.founder-photo {
  display: block; width: 100%; max-width: 340px; height: auto;
  aspect-ratio: 1 / 1; object-fit: cover; object-position: center;
  align-self: start; justify-self: start;
  border-radius: 6px; box-shadow: 0 0 0 1px var(--rule);
}
