/* ─────────────────────────────────────────────────────────────
   TheRossies — "The Land, Measured"
   One scroll, one story: pre-dawn veld → sunrise → daylight.
   Palette
     night   #0A100B   deep veld green-black
     dusk    #0E1510
     umber   #171D13
     preglow #232817
     day     #F2E9D5   highveld morning paper
     day-ink #20261C
     green   #22A558   brand (from the diamond)
     copper  #C4763B   Limpopo earth / sunrise
   Type
     Fraunces          display (soft, agricultural-editorial)
     Instrument Sans   body
     Spline Sans Mono  survey readouts / data
   ───────────────────────────────────────────────────────────── */

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

:root {
  --night: #0A100B;
  --dusk: #0E1510;
  --umber: #171D13;
  --preglow: #232817;
  --day: #F2E9D5;
  --day-deep: #E9DEC5;
  --ink: #EFE9DA;
  --ink-dim: #9AA694;
  --day-ink: #20261C;
  --day-dim: #6A6B55;
  --green: #22A558;
  --green-soft: #4DBF77;
  --copper: #C4763B;
  --copper-bright: #E29A5B;
  --error: #C24A3A;
  --disp: 'Fraunces', Georgia, serif;
  --body: 'Instrument Sans', system-ui, sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, monospace;
}

html { scroll-behavior: smooth; }
body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2 { font-family: var(--disp); font-weight: 380; letter-spacing: -0.01em; }
h1 em, h2 em, .sunrise-line em { font-style: italic; font-weight: 420; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 56px; }

a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--green); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 500;
  background: var(--green); color: #fff; padding: 10px 18px; border-radius: 6px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 12px; }

/* ── Buttons ── */
.btn {
  display: inline-block; font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 15px 32px; border-radius: 100px; text-decoration: none; cursor: pointer;
  border: none; letter-spacing: 0.2px;
  transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.22s;
}
.btn:active { transform: scale(0.98); }
.btn-solid { background: var(--green); color: #fff; }
.btn-solid:hover { background: #1E9450; }
.btn-ghost { background: transparent; border: 1.5px solid rgba(239,233,218,0.25); color: var(--ink); }
.btn-ghost:hover { border-color: rgba(239,233,218,0.55); }
.btn-wide { width: 100%; text-align: center; padding: 17px 32px; }

/* ── Nav ── */
nav#siteNav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  display: flex; align-items: center; justify-content: space-between;
  height: 74px; padding: 0 40px;
  color: var(--ink);
  transition: background 0.4s, color 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
nav#siteNav.scrolled {
  background: rgba(10,16,11,0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(239,233,218,0.07);
}
nav#siteNav.daylight {
  color: var(--day-ink);
  background: rgba(242,233,213,0.85);
  border-bottom-color: rgba(32,38,28,0.1);
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--green); }
.brand-text { font-family: var(--disp); font-size: 19px; font-weight: 500; letter-spacing: 0.4px; color: currentColor; line-height: 1; }
nav .brand-text, footer .brand-text { color: inherit; }
.brand-text small { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: 3.5px; text-transform: uppercase; opacity: 0.55; margin-bottom: 3px; }
.brand-text.small { font-size: 16px; }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 14.5px; font-weight: 500; text-decoration: none; opacity: 0.78; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-links a.nav-cta, .mobile-menu a.nav-cta {
  opacity: 1; background: var(--green); color: #fff; padding: 10px 22px; border-radius: 100px;
  font-weight: 600; transition: background 0.2s;
}
.nav-links a.nav-cta:hover { background: #1E9450; }

.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 10px; flex-direction: column; gap: 6px; }
.nav-burger span { width: 24px; height: 2px; background: currentColor; border-radius: 2px; display: block; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 290; background: rgba(10,16,11,0.97);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { color: var(--ink); font-family: var(--disp); font-size: 30px; text-decoration: none; }
.mobile-menu a.nav-cta { font-family: var(--body); font-size: 17px; }

/* ── Hero · pre-dawn ── */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  background: var(--night); overflow: hidden;
  padding: 120px 0 90px;
}
#veld { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-inner { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 0 56px; width: 100%; }

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--ink-dim); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 34px;
}
.eyebrow .pip { width: 7px; height: 7px; background: var(--copper); transform: rotate(45deg); display: inline-block; box-shadow: 0 0 10px rgba(196,118,59,0.8); }

h1 { font-size: clamp(44px, 6.6vw, 84px); line-height: 1.04; color: var(--ink); margin-bottom: 30px; max-width: 14em; }
.h1-line { display: block; }
.h1-quiet { font-size: 0.52em; color: var(--ink-dim); font-weight: 340; margin-top: 0.55em; letter-spacing: 0; }
h1 em { color: var(--green-soft); }

.hero-lead { font-size: 17.5px; color: var(--ink-dim); max-width: 540px; margin-bottom: 42px; line-height: 1.75; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ticker of things we measure */
.survey-strip {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  border-top: 1px solid rgba(239,233,218,0.08);
  background: rgba(10,16,11,0.55);
  overflow: hidden; padding: 13px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.survey-track { display: flex; gap: 0; width: max-content; animation: ticker 46s linear infinite; }
.survey-track span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: rgba(154,166,148,0.75); white-space: nowrap; padding: 0 30px; position: relative;
}
.survey-track span + span::before { content: '◆'; position: absolute; left: -6px; font-size: 6px; color: var(--green); top: 4px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Shared section scaffolding ── */
.kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 3.5px; text-transform: uppercase;
  color: var(--copper-bright); margin-bottom: 20px;
}
section h2 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.08; margin-bottom: 26px; }
.section-lead { font-size: 17px; color: var(--ink-dim); max-width: 560px; margin-bottom: 58px; }

/* ── Story · night ── */
.story { background: linear-gradient(var(--night), var(--dusk) 30%, var(--dusk)); padding: 140px 0 130px; }
.story-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 80px; align-items: start; margin-top: 26px; }
.big-p { font-family: var(--disp); font-size: 23px; line-height: 1.5; color: var(--ink); font-weight: 360; margin-bottom: 26px; }
.story-copy p:not(.big-p) { color: var(--ink-dim); margin-bottom: 20px; }
.story-copy em { color: var(--ink); font-style: italic; }

.story-ledger { border-top: 1px solid rgba(239,233,218,0.14); }
.ledger-row {
  display: flex; align-items: baseline; gap: 20px; padding: 22px 4px;
  border-bottom: 1px solid rgba(239,233,218,0.14);
}
.ledger-num { font-family: var(--mono); font-size: 38px; font-weight: 500; color: var(--green-soft); min-width: 2.2em; line-height: 1; }
.ledger-label { font-size: 14px; color: var(--ink-dim); line-height: 1.45; }

/* ── Build · first light ── */
.build { background: linear-gradient(var(--dusk), var(--umber) 40%, var(--umber)); padding: 140px 0 130px; }
.instruments { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.instrument {
  border: 1px solid rgba(239,233,218,0.1); border-radius: 18px; padding: 40px 42px;
  background: rgba(239,233,218,0.025);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.instrument:hover { border-color: rgba(34,165,88,0.45); background: rgba(34,165,88,0.05); transform: translateY(-3px); }
.instrument-name { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--copper-bright); margin-bottom: 16px; }
.instrument h3 { font-family: var(--disp); font-size: 27px; font-weight: 420; color: var(--ink); margin-bottom: 13px; }
.instrument p:not(.instrument-name) { font-size: 15px; color: var(--ink-dim); margin-bottom: 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; }
.chips li {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--green-soft);
  border: 1px solid rgba(34,165,88,0.3); border-radius: 100px; padding: 5px 13px;
}

/* ── Method · dawn breaks ── */
.method { background: linear-gradient(var(--umber), var(--preglow) 45%, var(--preglow)); padding: 140px 0 120px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; margin-top: 30px; }
.step { border-top: 2px solid rgba(196,118,59,0.5); padding-top: 24px; }
.step-num { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: var(--copper-bright); margin-bottom: 14px; }
.step h3 { font-family: var(--disp); font-size: 22px; font-weight: 420; color: var(--ink); margin-bottom: 10px; }
.step p:not(.step-num) { font-size: 14.5px; color: var(--ink-dim); }

/* ── Sunrise · the turn ── */
.sunrise {
  position: relative; min-height: 88vh; overflow: hidden;
  background: linear-gradient(
    var(--preglow) 0%,
    #3D3A22 22%,
    #7A5C33 42%,
    #C98D4E 56%,
    #E8C388 66%,
    #F0DDB4 78%,
    var(--day) 100%
  );
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 32px 96px;
}
.sun {
  position: absolute; left: 50%; top: 46%; transform: translateX(-50%);
  width: min(30vw, 300px); height: min(30vw, 300px); border-radius: 50%;
  background: radial-gradient(circle, #FBE7BC 0%, #EDAE62 55%, rgba(237,174,98,0) 72%);
  filter: blur(2px);
  animation: sunrise-rise 1.6s ease-out both;
  animation-play-state: paused;
}
.sunrise.lit .sun { animation-play-state: running; }
@keyframes sunrise-rise { from { top: 62%; opacity: 0.4; } to { top: 46%; opacity: 1; } }
.horizon {
  position: absolute; left: 0; right: 0; top: 58%;
  border-top: 1.5px solid rgba(32,38,28,0.28);
}
.horizon::before {
  content: ''; position: absolute; left: 50%; top: -5px; width: 9px; height: 9px;
  background: var(--day-ink); transform: translateX(-50%) rotate(45deg);
}
.sunrise-line {
  position: relative; z-index: 2; text-align: center;
  font-family: var(--disp); font-size: clamp(30px, 4vw, 50px); line-height: 1.2; color: var(--day-ink);
}
.sunrise-line span { display: block; font-family: var(--body); font-size: 16.5px; color: #5C5236; margin-top: 18px; max-width: 460px; margin-left: auto; margin-right: auto; }

/* ── Contact · daylight ── */
.contact { background: var(--day); color: var(--day-ink); padding: 120px 0 140px; }
.contact .kicker { color: #A5652F; }
.contact h2 { color: var(--day-ink); }
.contact h2 em { color: #187A42; }
.contact .section-lead { color: var(--day-dim); }

.contact-grid { display: grid; grid-template-columns: 0.85fr 1.6fr; gap: 72px; align-items: start; }

.aside-block { margin-bottom: 34px; }
.aside-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 3px; text-transform: uppercase; color: #A5652F; margin-bottom: 8px; }
.aside-block p:not(.aside-label) { font-size: 15.5px; line-height: 1.65; color: var(--day-ink); }
.aside-block a { color: #187A42; text-decoration-color: rgba(24,122,66,0.35); }
.coords .mono { font-family: var(--mono); font-size: 14px; letter-spacing: 1px; color: var(--day-dim); }

.contact-form-wrap { background: #FBF6E9; border: 1px solid rgba(32,38,28,0.12); border-radius: 20px; padding: 44px 46px; box-shadow: 0 24px 60px -30px rgba(60,48,20,0.25); }
#contactForm { display: flex; flex-direction: column; gap: 20px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label, .captcha label {
  display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.6px;
  color: #4C523F; margin-bottom: 7px;
}
.field input, .field select, .field textarea, .captcha input {
  width: 100%; background: #fff; border: 1px solid rgba(32,38,28,0.18); border-radius: 10px;
  padding: 13px 15px; font-family: var(--body); font-size: 15.5px; color: var(--day-ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field select { cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus, .captcha input:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3.5px rgba(34,165,88,0.16);
}
input::placeholder, textarea::placeholder { color: rgba(106,107,85,0.55); }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.captcha { background: rgba(32,38,28,0.045); border-radius: 12px; padding: 18px 20px; }
.captcha label { margin-bottom: 10px; font-weight: 500; }
.captcha label .mono { font-family: var(--mono); font-weight: 600; font-size: 15px; color: var(--day-ink); margin-right: 6px; }
.captcha input { max-width: 130px; font-family: var(--mono); text-align: center; }
.captcha.shake { animation: shake 0.4s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.field-error { font-size: 13.5px; color: var(--error); }
#formError { text-align: center; background: rgba(194,74,58,0.08); border: 1px solid rgba(194,74,58,0.25); border-radius: 9px; padding: 12px; }
.form-note { font-size: 12.5px; color: var(--day-dim); text-align: center; }

.form-success { text-align: center; padding: 48px 20px; color: var(--day-ink); }
.form-success svg { color: var(--green); margin-bottom: 18px; }
.form-success h3 { font-family: var(--disp); font-size: 30px; font-weight: 420; margin-bottom: 10px; }
.form-success p { color: var(--day-dim); max-width: 330px; margin: 0 auto; }

/* ── Footer · the ground ── */
footer { background: var(--day-deep); color: var(--day-ink); border-top: 1px solid rgba(32,38,28,0.12); padding: 34px 0; }
.footer-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.footer-brand { color: var(--day-ink); }
.footer-copy { font-size: 13px; color: var(--day-dim); }
.footer-copy a { color: inherit; }

/* ── Reveal choreography ── */
/* hidden-until-revealed only when JS is present (html.js set in script.js) */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s cubic-bezier(0.2,0.6,0.2,1), transform 0.8s cubic-bezier(0.2,0.6,0.2,1); }
html.js .reveal.in { opacity: 1; transform: none; }
.instruments .instrument:nth-child(2), .steps .step:nth-child(2) { transition-delay: 0.1s; }
.instruments .instrument:nth-child(3), .steps .step:nth-child(3) { transition-delay: 0.2s; }
.instruments .instrument:nth-child(4), .steps .step:nth-child(4) { transition-delay: 0.3s; }

/* hero entrance */
.hero .h1-line, .hero .eyebrow, .hero .hero-lead, .hero .hero-actions {
  opacity: 0; transform: translateY(24px);
  animation: hero-in 1s cubic-bezier(0.2,0.6,0.2,1) forwards;
}
.hero .eyebrow { animation-delay: 0.15s; }
.hero .h1-line:nth-child(1) { animation-delay: 0.3s; }
.hero .h1-line:nth-child(2) { animation-delay: 0.42s; }
.hero .h1-line:nth-child(3) { animation-delay: 0.6s; }
.hero .hero-lead { animation-delay: 0.75s; }
.hero .hero-actions { animation-delay: 0.9s; }
@keyframes hero-in { to { opacity: 1; transform: none; } }

/* ── Motion respect ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .hero .h1-line, .hero .eyebrow, .hero .hero-lead, .hero .hero-actions { animation: none; opacity: 1; transform: none; }
  .survey-track { animation: none; }
  .sun { animation: none; top: 46%; opacity: 1; }
  .instrument, .btn { transition: none; }
}

/* ── Responsive ── */
@media (max-width: 1000px) {
  .instruments { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .story-cols { grid-template-columns: 1fr; gap: 48px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 768px) {
  .wrap, .hero-inner { padding-left: 24px; padding-right: 24px; }
  nav#siteNav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .hero { padding: 110px 0 80px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .story, .build, .method { padding: 90px 0 84px; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .contact { padding: 84px 0 96px; }
  .contact-form-wrap { padding: 30px 22px; }
  .two-col { grid-template-columns: 1fr; }
  .sunrise { min-height: 70vh; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}
