/* nowill-meridian — the survey. Monumental slabs, cartographic mono, z-flight scroll.
   Archivo Black + IBM Plex Mono. Slate world, one teal seam. */

:root {
  --bg: #08090b;
  --ink: #f1f4f2;
  --ink-dim: rgba(241, 244, 242, 0.6);
  --teal: #0fb5ba;
  --teal-bright: #31d3c9;
  --teal-glow: rgba(15, 181, 186, 0.35);
  --rule: rgba(241, 244, 242, 0.18);
  --display: 'Archivo Black', 'Arial Black', sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(1.25rem, 4vw, 4.5rem);
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--teal); color: #02272a; }
:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 3px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 70;
  padding: 0.7em 1.2em; background: var(--teal); color: #02272a;
  font-family: var(--mono); font-weight: 500; font-size: 0.85rem; text-decoration: none;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- Header ---------- */

.head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad);
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.04em;
}
.head-cta {
  font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.22em;
  color: var(--ink); text-decoration: none;
  padding: 0.7em 1.5em;
  border: 1px solid var(--rule);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.head-cta:hover { border-color: var(--teal); color: var(--teal-bright); }

/* ---------- Marks (sections) ---------- */

.mark { position: relative; height: 230vh; }
.fix {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
  display: grid; align-items: end;
}

.terrain { position: absolute; inset: 0; z-index: 1; will-change: transform, filter; }
.terrain video {
  width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focus-x, 50%) center;
  opacity: 0; transition: opacity 0.8s ease;
}
.terrain video.is-live { opacity: 1; }
.terrain::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--poster);
  background-size: cover; background-position: var(--focus-x, 50%) center;
}

.haze {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,9,11,0.5) 0%, rgba(8,9,11,0.05) 28%,
                    rgba(8,9,11,0.05) 52%, rgba(8,9,11,0.72) 100%);
}

.plot {
  position: relative; z-index: 3;
  padding: 0 var(--pad) clamp(3.2rem, 9vh, 6.5rem);
  max-width: 74rem;
}
.plot-center { justify-self: center; text-align: center; padding-bottom: clamp(4rem, 12vh, 8rem); }

/* ---------- Type: cartographic ---------- */

.coord {
  font-family: var(--mono); font-weight: 500;
  font-size: 0.68rem; letter-spacing: 0.3em;
  color: var(--teal-bright);
  margin-bottom: 1.2rem;
}
.coord::before {
  content: ''; display: inline-block;
  width: 2.2rem; height: 1px; background: var(--teal);
  vertical-align: middle; margin-right: 0.9rem;
  box-shadow: 0 0 8px var(--teal-glow);
}
.plot-center .coord::after {
  content: ''; display: inline-block;
  width: 2.2rem; height: 1px; background: var(--teal);
  vertical-align: middle; margin-left: 0.9rem;
  box-shadow: 0 0 8px var(--teal-glow);
}
.mono-display {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.3rem, 6.8vw, 5.8rem);
  line-height: 0.98; letter-spacing: 0.005em;
  text-shadow: 0 2px 34px rgba(4, 5, 7, 0.8);
}
.mono-display .dot { color: var(--teal-bright); }
.brief {
  margin-top: 1.4rem;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  color: var(--ink-dim); max-width: 46ch;
  text-shadow: 0 1px 16px rgba(4, 5, 7, 0.9);
}
.plot-center .brief { margin-inline: auto; }

.actions { display: flex; gap: 0.9rem; margin-top: 2.2rem; flex-wrap: wrap; }
.actions-center { justify-content: center; }
.btn-solid, .btn-line {
  font-family: var(--mono); font-weight: 500;
  font-size: 0.72rem; letter-spacing: 0.2em;
  text-decoration: none; padding: 1.05em 1.9em; white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, background 0.35s, color 0.35s, border-color 0.35s;
}
.btn-solid { background: var(--teal); color: #02272a; }
.btn-solid:hover { background: var(--teal-bright); transform: translateY(-2px); box-shadow: 0 8px 30px var(--teal-glow); }
.btn-line { color: var(--ink); border: 1px solid var(--rule); }
.btn-line:hover { border-color: var(--teal); color: var(--teal-bright); transform: translateY(-2px); }

/* ---------- Service ledger ---------- */

.ledger {
  list-style: none; margin-top: 2.4rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 20rem)); gap: 0 2.5rem;
}
.ledger li {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 0.62rem 0.2rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.85rem; letter-spacing: 0.04em;
  transition: color 0.3s, padding-left 0.3s;
}
.ledger li:hover { color: var(--teal-bright); padding-left: 0.7rem; }
.ledger span { color: var(--teal-bright); font-size: 0.68rem; }

/* ---------- Depth rows ---------- */

.rows { margin-top: 2.4rem; display: grid; gap: 1.5rem; max-width: 44rem; }
.row {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.5rem; align-items: start;
  border-top: 1px solid var(--rule); padding-top: 1rem;
}
.coord-s {
  font-size: 0.66rem; letter-spacing: 0.24em; color: var(--teal-bright); padding-top: 0.2rem;
}
.row p { font-size: 0.88rem; color: var(--ink-dim); max-width: 52ch; }

/* ---------- Footer ---------- */

.foot {
  position: relative; z-index: 3;
  padding: 2.6rem var(--pad);
  text-align: center;
  font-size: 0.68rem; letter-spacing: 0.2em; color: var(--ink-dim);
  border-top: 1px solid var(--rule);
}

/* ---------- Family glue ---------- */

.grade {
  position: fixed; inset: 0; z-index: 20; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 50%, rgba(0,0,0,0) 55%, rgba(2, 3, 5, 0.55) 100%),
    linear-gradient(160deg, rgba(15, 181, 186, 0.04), rgba(8, 9, 11, 0) 45%, rgba(10, 22, 26, 0.12) 100%);
}
.grain {
  position: fixed; inset: -100px; z-index: 21; pointer-events: none;
  opacity: 0.07;
  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.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.66s steps(8) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); } 12.5% { transform: translate(-28px, 16px); }
  25% { transform: translate(14px, -30px); } 37.5% { transform: translate(-34px, -8px); }
  50% { transform: translate(22px, 26px); } 62.5% { transform: translate(-12px, 34px); }
  75% { transform: translate(30px, -18px); } 87.5% { transform: translate(-20px, -26px); }
  100% { transform: translate(0, 0); }
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  .ledger { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 0.4rem; }
  #origin { --focus-x: 22%; }   /* teal seam on the nearest slab, left */
  #stack { --focus-x: 52%; }    /* seam between the canyon walls */
  #depth { --focus-x: 50%; }
  #north { --focus-x: 47%; }    /* horizon ember between silhouettes */
}
@media (max-width: 380px) {
  .actions { flex-direction: column; }
  .actions-center { align-items: center; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .mark { height: auto; }
  .fix { position: relative; height: 100vh; }
  .terrain, .plot { transform: none !important; filter: none !important; opacity: 1 !important; }
}
