/* ============================================================
   STEPHICA — software research & development
   Sibling to the dAILogix / GeorgeLambert paper-and-brass family.
   ============================================================ */

:root {
  --paper: #efe8d6;
  --paper-2: #e6deca;
  --paper-3: #d8cfb8;
  --cream: #f4ecd8;
  --ink: #161a18;
  --ink-soft: #3c433d;
  --dark: #1a1814;
  --dark-2: #262119;
  --dark-3: #342c20;
  --brass: #b8923a;
  --brass-bright: #d4ae54;
  --brass-deep: #8f6f24;
  --slate: #5c6b73;
  --line: rgba(22, 26, 24, 0.14);
  --line-strong: rgba(22, 26, 24, 0.28);
  --line-cream: rgba(244, 236, 216, 0.16);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Geist", "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
  --wrap: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--brass); color: var(--dark); }

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  min-width: 0;
}

.mono { font-family: var(--mono); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--brass);
}
.dark-zone .eyebrow { color: var(--brass-bright); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.015em;
}
h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--brass-deep);
}
.dark-zone h1 em,
.dark-zone h2 em,
.dark-zone h3 em { color: var(--brass-bright); }

.display {
  font-size: clamp(36px, 6.4vw, 78px);
  overflow-wrap: break-word;
}
.section-title { font-size: clamp(30px, 3.6vw, 48px); margin-bottom: 18px; }
.lede {
  font-size: clamp(17px, 1.6vw, 20.5px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 58ch;
  overflow-wrap: break-word;
}
.dark-zone .lede { color: rgba(244, 236, 216, 0.74); }
.prose { max-width: 68ch; }
.prose p + p { margin-top: 1em; }
.prose a {
  color: var(--brass-deep);
  text-underline-offset: 3px;
}
.dark-zone .prose a { color: var(--brass-bright); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 26px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn.solid {
  background: var(--brass);
  color: #171307;
  border-color: var(--brass-deep);
}
.btn.solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -12px rgba(143, 111, 36, 0.7);
  background: var(--brass-bright);
}
.btn.ghost { border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.dark-zone .btn.ghost {
  border-color: var(--line-cream);
  color: var(--cream);
}
.dark-zone .btn.ghost:hover {
  border-color: var(--brass-bright);
  color: var(--brass-bright);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 640px) {
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { justify-content: center; width: 100%; }
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(26, 24, 20, 0.92);
  backdrop-filter: blur(12px);
  color: var(--cream);
  border-bottom: 1px solid var(--line-cream);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand .cube {
  width: 22px;
  height: 22px;
  color: var(--brass-bright);
  flex: none;
}
.brand .name {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.16em;
  font-style: normal;
}
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(244, 236, 216, 0.68);
  transition: color 0.18s var(--ease);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--brass-bright); }
.site-nav a.cta {
  color: #171307;
  background: var(--brass);
  padding: 9px 15px;
  border: 1px solid var(--brass-deep);
}
.site-nav a.cta:hover { background: var(--brass-bright); color: #171307; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(244, 236, 216, 0.35);
  color: var(--cream);
  margin-left: auto;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 12px;
}
.nav-toggle span { display: none; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 66px;
    background: var(--dark);
    border-bottom: 1px solid var(--line-cream);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    gap: 4px;
  }
  .site-head.is-open .site-nav { display: flex; }
  .site-nav a { padding: 12px 4px; }
  .site-nav a.cta { text-align: center; justify-content: center; }
}

/* ---------- hero ---------- */
.dark-zone { background: var(--dark); color: var(--cream); }
.hero {
  position: relative;
  min-height: min(88vh, 860px);
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 24, 20, 0.28) 0%, rgba(26, 24, 20, 0.55) 42%, rgba(26, 24, 20, 0.94) 100%),
    radial-gradient(700px 360px at 78% 18%, rgba(184, 146, 58, 0.18), transparent 62%);
}
.hero .wrap {
  position: relative;
  z-index: 2;
  padding-top: clamp(90px, 14vh, 170px);
  padding-bottom: clamp(56px, 8vh, 96px);
}
.hero .display { max-width: 16ch; }
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 236, 216, 0.62);
  margin: 16px 0 0;
}

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section.tight { padding: clamp(48px, 6vw, 80px) 0; }
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 56px;
}
.stat {
  background: var(--paper);
  padding: 22px 20px 20px;
}
.dark-zone .stat { background: var(--dark-2); }
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.stat span {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.dark-zone .stat span { color: rgba(244, 236, 216, 0.55); }
@media (max-width: 720px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 36px;
}
@media (max-width: 760px) {
  .card-grid { grid-template-columns: 1fr; }
}
.card {
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--brass); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-body { padding: 22px 22px 24px; }
.card .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--brass-deep);
  text-transform: uppercase;
}
.card h3 { font-size: 28px; margin: 8px 0 10px; }
.card p { color: var(--ink-soft); font-size: 15.5px; }

.venture {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.venture:last-child { border-bottom: 1px solid var(--line); }
.venture .role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-deep);
}
.venture h3 { font-size: 28px; margin: 4px 0 8px; }
.venture p { color: var(--ink-soft); max-width: 62ch; }
@media (max-width: 760px) {
  .venture {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ---------- figure ---------- */
.figure {
  border: 1px solid var(--line);
  background: var(--dark);
}
.figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 2px 0;
}

/* ---------- list ---------- */
.lined li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
}
.lined li:last-child { border-bottom: 1px solid var(--line); }
.lined .when {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--brass-deep);
}
@media (max-width: 640px) {
  .lined li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- form ---------- */
.form {
  display: grid;
  gap: 14px;
  max-width: 560px;
}
label {
  display: grid;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
input, textarea {
  font: 16px/1.5 var(--sans);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line-strong);
  padding: 12px 14px;
  width: 100%;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--brass-deep);
}

.note {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 52ch;
}

/* ---------- footer ---------- */
.site-foot {
  background: var(--dark);
  color: var(--cream);
  padding: 48px 0 36px;
  border-top: 1px solid var(--line-cream);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}
.site-foot a {
  text-decoration: none;
  color: rgba(244, 236, 216, 0.72);
}
.site-foot a:hover { color: var(--brass-bright); }
.site-foot h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin-bottom: 12px;
}
.site-foot li + li { margin-top: 8px; }
.legal {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line-cream);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(244, 236, 216, 0.45);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .foot-grid { grid-template-columns: 1fr; }
}
