/* ============================================================
   STONN · Federated Civil Viewer
   Landing page stylesheet
   ============================================================ */

:root {
  --paper:        #efe9dd;        /* vellum */
  --paper-2:      #e6dfce;        /* deeper vellum */
  --paper-3:      #f5f0e4;        /* lighter vellum */
  --ink:          #14130f;        /* near black */
  --ink-2:        #2c2a24;
  --ink-soft:     #5b574c;
  --rule:         #1b1a160d;
  --rule-strong:  #1b1a161f;
  --hi:           #ff5a1f;        /* surveyor hi-vis */
  --hi-deep:      #d6420c;
  --water:        #1e6dd6;
  --gas:          #f0b400;
  --sewer:        #5a8a3a;
  --fiber:        #b14ec9;
  --electric:     #d1454a;
  --contour:      #1b1a1638;
  --contour-bold: #1b1a1670;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% 10%, #00000008, transparent 60%),
    radial-gradient(circle at 90% 80%, #00000008, transparent 50%);
}

.mono    { font-family: "JetBrains Mono", ui-monospace, monospace; }
.display { font-family: "Space Grotesk", system-ui, sans-serif; letter-spacing: -0.02em; }

/* paper grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.045 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.55;
}

/* container */
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 40px; position: relative; }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule-strong);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 28px; height: 28px; position: relative; }
.brand-mark img,
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600; font-size: 19px; letter-spacing: 0.06em;
}
.brand-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px; color: var(--ink-soft);
  border-left: 1px solid var(--rule-strong);
  padding-left: 10px; margin-left: 4px;
  letter-spacing: 0.04em;
}
.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links a {
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500;
}
.nav-links a:hover { color: var(--hi); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500; font-size: 14px;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover     { background: var(--hi);     border-color: var(--hi);     color: white; }
.btn-ghost     { background: transparent;   color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--ink);  color: var(--paper); border-color: var(--ink); }
.btn-hi        { background: var(--hi);     border-color: var(--hi);     color: white; }
.btn-hi:hover  { background: var(--hi-deep); border-color: var(--hi-deep); }

/* ============ HERO ============ */
.hero { padding: 56px 0 80px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1.4fr;
  gap: 48px;
  align-items: stretch;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--rule-strong);
  padding: 6px 12px;
  background: var(--paper-3);
}
.eyebrow .dot {
  width: 6px; height: 6px; background: var(--hi);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--hi) 30%, transparent);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
h1.hero-h {
  font-family: "Space Grotesk", sans-serif;
  font-size: 88px; line-height: 0.92; letter-spacing: -0.035em;
  font-weight: 500;
  margin: 24px 0 0;
  color: var(--ink);
  text-wrap: balance;
}
h1.hero-h em {
  font-style: normal;
  font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(180deg, transparent 65%, color-mix(in oklab, var(--hi) 45%, transparent) 65%);
  padding: 0 2px;
}
.hero-sub {
  font-size: 18px; line-height: 1.5;
  color: var(--ink-2);
  max-width: 480px;
  margin: 28px 0 0;
}
.hero-cta { display: flex; gap: 12px; margin-top: 36px; }
.hero-meta {
  margin-top: 44px;
  border-top: 1px solid var(--rule-strong);
  padding-top: 20px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.hero-meta dt {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 6px;
}
.hero-meta dd {
  margin: 0; font-family: "Space Grotesk", sans-serif;
  font-size: 22px; font-weight: 500; letter-spacing: -0.01em;
}
.hero-meta dd small {
  font-size: 12px; color: var(--ink-soft); font-weight: 400;
  margin-left: 4px;
}

/* hero image — replaces the old interactive .scene block, same paper-framed
   look so it sits cohesively next to the headline. Image is 877×800; we let
   it scale fluidly inside its grid column but cap at native width so it
   never upscales past the source pixels. */
.hero-visual {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.hero-image {
  display: block;
  width: 100%;
  max-width: 877px;
  height: auto;
  border: 1px solid var(--ink);
  background: var(--paper-3);
  box-shadow:
    0 1px 0 var(--ink),
    0 30px 60px -30px #1b1a1655;
}

/* ============ PLACEHOLDERS ============
   These mark areas where actual platform screenshots / illustrations
   will be dropped in.
   ----------------------------------------------------------------- */
.placeholder {
  position: relative;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 28px;
  border: 1px dashed color-mix(in oklab, var(--ink) 35%, transparent);
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 14px,
      color-mix(in oklab, var(--ink) 4%, transparent) 14px,
      color-mix(in oklab, var(--ink) 4%, transparent) 15px
    ),
    var(--paper);
  color: var(--ink-2);
}
.placeholder-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hi);
  border: 1px solid var(--hi);
  padding: 3px 8px;
  margin-bottom: 14px;
}
.placeholder-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500; font-size: 18px; letter-spacing: -0.01em;
  color: var(--ink);
}
.placeholder-meta {
  margin-top: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px; letter-spacing: 0.08em;
  color: var(--ink-soft);
  max-width: 360px;
  line-height: 1.5;
}
/* ============ FORMAT STRIP ============ */
.format-strip {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper-3);
  padding: 28px 0;
  margin-top: 0;
}
.format-strip-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px;
}
.format-strip-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft);
  max-width: 200px;
}
.format-strip-label b      { color: var(--ink); display: block; font-weight: 500; margin-bottom: 4px; }
.format-strip-label-right  { text-align: right; }
.format-pills { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; justify-content: center; }
.pill {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500; font-size: 13px;
  padding: 7px 12px;
  border: 1px solid var(--ink);
  background: var(--paper);
  letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 6px;
}
.pill .pill-mono            { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--ink-soft); margin-left: 2px; }
.pill.featured              { background: var(--ink); color: var(--paper); }
.pill.featured .pill-mono   { color: color-mix(in oklab, var(--paper) 60%, transparent); }

/* ============ FEATURE BLOCKS ============ */
section.features { padding: 120px 0 40px; }
.section-head {
  display: grid; grid-template-columns: 1fr 1.8fr;
  gap: 40px; margin-bottom: 64px; align-items: end;
}
.section-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.section-eyebrow::before { content: "§ "; color: var(--hi); }
.section-h {
  font-family: "Space Grotesk", sans-serif;
  font-size: 56px; line-height: 1; letter-spacing: -0.03em; font-weight: 500;
  margin: 12px 0 0;
  text-wrap: balance;
}
.section-sub {
  font-size: 17px; color: var(--ink-2); line-height: 1.5;
  max-width: 540px;
  margin: 18px 0 0;
}

.feat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.feat {
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 28px 28px 32px;
  background: var(--paper-3);
  position: relative;
  min-height: 360px;
  display: flex; flex-direction: column;
}
.feat-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.feat-icon {
  height: 140px; margin: 4px -8px 18px;
  border: 1px dashed var(--rule-strong);
  background: var(--paper);
  position: relative; overflow: hidden;
}
.feat-icon svg,
.feat-icon img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.feat h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px; font-weight: 500; letter-spacing: -0.015em;
  margin: 0 0 10px;
  line-height: 1.1;
}
.feat p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.feat-foot {
  margin-top: auto; padding-top: 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px; letter-spacing: 0.06em;
  color: var(--ink-soft);
  display: flex; justify-content: space-between;
  border-top: 1px dashed var(--rule-strong);
}
.feat-foot b { color: var(--ink); font-weight: 500; }

/* ============ VIEWER MOCKUP (carousel) ============ */
section.viewer-section { padding: 80px 0 100px; }
.viewer-window {
  border: 1px solid var(--ink);
  background: #1a1814;
  box-shadow: 0 50px 80px -40px #1b1a1655;
  overflow: hidden;
}

/* Crossfade carousel driven by JS — adds/removes .is-active on slides + dots.
   Falls back to a static first slide if JS is disabled (the `is-active` class
   is set in HTML on slide 1 so it stays visible without scripting). */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1349 / 800;
  overflow: hidden;
  background: #0d0c0a;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.55s ease-in-out;
}
.carousel-slide.is-active { opacity: 1; }
.carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Clickable dot selector under the carousel */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}
.carousel-dot {
  width: 10px; height: 10px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.carousel-dot:hover {
  background: color-mix(in oklab, var(--ink) 18%, transparent);
}
.carousel-dot.is-active {
  background: var(--hi);
  border-color: var(--hi);
}
.carousel-dot:focus-visible {
  outline: 2px solid var(--hi);
  outline-offset: 3px;
}

/* Respect reduced-motion: no crossfade, no auto-advance (JS also honours this) */
@media (prefers-reduced-motion: reduce) {
  .carousel-slide { transition: none; }
}

/* ============ SPECS ============ */
section.specs { padding: 60px 0 80px; }
.specs-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
}
.spec-col h4 {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft);
  margin: 24px 0 12px;
}
.spec-col {
  padding: 0 0 30px;
  border-right: 1px solid var(--ink);
}
.spec-col:last-child  { border-right: 0; padding-left: 40px; }
.spec-col:first-child { padding-right: 40px; }
.spec-row {
  display: grid; grid-template-columns: 130px 1fr auto;
  gap: 16px; padding: 10px 0;
  border-top: 1px solid var(--rule-strong);
  align-items: baseline;
}
.spec-row .ext {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--hi-deep);
  font-weight: 500;
}
.spec-row .desc { font-size: 14px; color: var(--ink-2); }
.spec-row .stat {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px; letter-spacing: 0.06em;
  color: var(--ink-soft); text-align: right;
  text-transform: uppercase;
}
.spec-row .stat.ok { color: var(--sewer); }

/* ============ CTA ============ */
section.cta {
  background: var(--ink); color: var(--paper);
  padding: 100px 0 110px;
  border-top: 1px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.cta-bg { position: absolute; inset: 0; pointer-events: none; opacity: 0.18; }
.cta-bg svg { width: 100%; height: 100%; }
.cta-inner { position: relative; }
.cta-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--hi);
  text-transform: uppercase;
}
.cta-h {
  font-family: "Space Grotesk", sans-serif;
  font-size: 96px; line-height: 0.93; letter-spacing: -0.035em; font-weight: 500;
  margin: 18px 0 28px;
  max-width: 1100px;
  text-wrap: balance;
}
.cta-h em {
  font-style: normal;
  background: linear-gradient(180deg, transparent 65%, color-mix(in oklab, var(--hi) 70%, transparent) 65%);
  padding: 0 4px;
}
.cta-sub { font-size: 18px; color: #b0a999; max-width: 580px; margin: 0 0 36px; }
.cta-btns { display: flex; gap: 12px; align-items: center; }
.cta .btn-ghost       { color: var(--paper); border-color: #3a362f; }
.cta .btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ============ FOOTER ============ */
footer {
  background: var(--paper-3);
  border-top: 1px solid var(--ink);
  padding: 40px 0 28px;
  font-size: 13px;
}
.foot-grid     { display: block; }
.foot-brand    { margin-bottom: 14px; }
.foot-blurb {
  margin: 0;
  color: var(--ink-soft);
  max-width: 380px;
  font-size: 13px;
}
.foot-contact {
  display: inline-block;
  margin-top: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
}
.foot-contact:hover { color: var(--hi-deep); border-bottom-color: var(--hi-deep); }
.foot-bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--rule-strong);
  display: flex; justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px; color: var(--ink-soft); letter-spacing: 0.06em;
}
