/* ==========================================================================
   Everglades Communications — "River of Grass" · Title Sequence
   Tokens, layout and motion. No build step; plain CSS.
   ========================================================================== */

:root {
  --paper: #EDF0E9;
  --paper-90: rgba(237, 240, 233, .9);
  --stone: #C9CFC2;
  --saw: #7A6A2F;
  --water: #3A6C63;
  --ink: #18261F;
  --ink-70: #3B4C43;
  --ink-50: #5C6E63;
  --ink-30: #6F7D74;
  --rule: rgba(24, 38, 31, .16);
  --rule-soft: rgba(24, 38, 31, .1);

  --display: "Gloock", Georgia, "Times New Roman", serif;
  --body: "Karla", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 6vw, 88px);
  --measure: 66ch;
  --vh: 100vh;
}
@supports (height: 100svh) { :root { --vh: 100svh; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--water); outline-offset: 3px; }

/* ---------- the landscape sits behind everything ---------- */
#scene {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block; pointer-events: none;
}
#page { position: relative; z-index: 1; }

/* ---------- opening title mask ---------- */
#opening {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 50; pointer-events: none;
  /* Hidden until main.js opts in. Without this the mask covers the whole page
     forever when JavaScript is off, blocked, or fails to load. */
  display: none;
}
#opening.playing { display: block; }
#opening text {
  font-family: var(--display);
  letter-spacing: -.02em;
}
#opening.done { display: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px);
  padding: 18px var(--gutter);
  font-size: 14px;
  transition: background .35s ease, box-shadow .35s ease, opacity .8s ease;
}
.nav.solid { background: rgba(237, 240, 233, .95); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--rule); }
.nav.hidden-until-open { opacity: 0; }
.brand {
  font-family: var(--display); font-size: 21px; letter-spacing: -.01em;
  margin-right: auto; text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.nav-links a { text-decoration: none; color: var(--ink-70); }
.nav-links a:hover { color: var(--ink); }
.nav .btn { padding: 9px 16px; }
@media (max-width: 760px) { .nav-links { display: none; } }
@media (max-width: 560px) {
  .nav { padding: 14px 20px; gap: 10px; }
  .brand { font-size: 17px; }
  .nav .btn { padding: 8px 12px; white-space: nowrap; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-size: 14px; font-weight: 700;
  padding: 13px 22px; border: 1px solid var(--ink); color: var(--ink);
  background: transparent; cursor: pointer; font-family: inherit;
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #22352C; }
.btn:hover { border-color: #22352C; }

/* ---------- hero ---------- */
.hero {
  min-height: var(--vh);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) clamp(40px, 8vh, 80px);
  /* mist rising off the slough — keeps the copy legible over the sawgrass */
  background:
    radial-gradient(ellipse 62% 64% at 20% 92%, rgba(237, 240, 233, .92) 0%, rgba(237, 240, 233, .7) 38%, rgba(237, 240, 233, 0) 72%);
}
@media (max-width: 760px) {
  .hero { background: linear-gradient(to top, rgba(237, 240, 233, .92) 0%, rgba(237, 240, 233, .7) 40%, rgba(237, 240, 233, 0) 70%); }
}
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(42px, 7.4vw, 96px); line-height: .98; letter-spacing: -.025em;
  margin: 0 0 24px; max-width: 13ch; text-wrap: balance;
}
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .1em; margin-bottom: -.1em; }
.hero h1 .w i { display: inline-block; font-style: normal; }
.hero .lede {
  font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; max-width: 46ch;
  margin: 0 0 28px; color: var(--ink-70);
}
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-ui { opacity: 1; transition: opacity 1s ease; }
.hero-ui.pending { opacity: 0; }
.hero .meta {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  margin-top: clamp(40px, 8vh, 80px);
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-70);
}
.hero .meta > span { background: var(--paper-90); padding: 8px 12px; }
.hero .meta .cue { display: flex; align-items: center; gap: 10px; }
.hero .meta .cue i {
  display: block; width: 1px; height: 34px; background: var(--ink-70);
  transform-origin: top; animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue { 0%, 100% { transform: scaleY(.3); opacity: .3 } 50% { transform: scaleY(1); opacity: 1 } }

/* ---------- paper sections and horizon gaps ---------- */
.paper { background: var(--paper); padding: clamp(64px, 10vh, 120px) var(--gutter); }
.paper > .inner { max-width: 1200px; margin: 0 auto; }
.gap {
  height: clamp(280px, 48vh, 520px);
  display: flex; align-items: flex-end; padding: 0 var(--gutter) 22px;
}
.gap .cap {
  background: var(--paper-90); padding: 9px 13px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-70);
}

/* ---------- typography ---------- */
h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(32px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -.02em;
  margin: 0 0 22px; max-width: 20ch; text-wrap: balance;
}
.section-intro { max-width: var(--measure); color: var(--ink-70); font-size: 17.5px; margin: 0 0 40px; }
.cols { columns: 2; column-gap: 40px; max-width: 78ch; color: var(--ink-70); }
.cols p { margin: 0 0 14px; break-inside: avoid; }
@media (max-width: 720px) { .cols { columns: 1; } }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--ink-50); }

/* ---------- stats rule ---------- */
.stats { padding-top: 0; padding-bottom: 0; }
.rule { display: flex; flex-wrap: wrap; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.rule > div { flex: 1 1 200px; padding: 26px 26px 28px 0; border-right: 1px solid var(--rule-soft); }
.rule > div:last-child { border-right: 0; }
@media (max-width: 860px) { .rule > div:nth-child(2n) { border-right: 0; } }
.rule b {
  display: block; font-family: var(--display); font-weight: 400;
  font-size: clamp(32px, 3.6vw, 44px); letter-spacing: -.01em; line-height: 1;
  font-variant-numeric: tabular-nums; margin-bottom: 8px;
}
.rule b sup { font-size: .45em; vertical-align: top; color: var(--saw); margin-left: 2px; }
.rule span { font-size: 14px; color: var(--ink-50); }

/* ---------- what we do (editorial list, not cards) ---------- */
.services { border-top: 1px solid var(--rule); }
.service {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr); gap: 32px;
  padding: 30px 0; border-bottom: 1px solid var(--rule-soft);
}
.service h3 { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.4vw, 30px); margin: 0 0 6px; letter-spacing: -.01em; }
.service .spec { display: block; margin-top: 8px; }
.service p { margin: 0; color: var(--ink-70); max-width: 54ch; }
@media (max-width: 720px) { .service { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- compliance ledger ---------- */
.ledger { margin-top: 36px; border-top: 1px solid var(--rule); max-width: 960px; }
.row {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--rule-soft);
}
.row .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--ink-50); }
.row .v { font-size: 16.5px; }
.row .v small { display: block; font-size: 13.5px; color: var(--ink-50); margin-top: 2px; }
.stamp {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--water);
  border: 1.5px solid var(--water); padding: 5px 10px; white-space: nowrap;
  transform: rotate(-4deg); transform-origin: center; opacity: 1;
}
.stamp.pre { opacity: 0; transform: rotate(-16deg) scale(2.2); }
.stamp.hit { animation: stamp .55s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes stamp {
  0%   { opacity: 0; transform: rotate(-16deg) scale(2.2); }
  55%  { opacity: 1; transform: rotate(-2deg) scale(.92); }
  100% { opacity: 1; transform: rotate(-4deg) scale(1); }
}
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr auto; }
  .row .k { grid-column: 1 / -1; }
}
.needs { margin-top: 44px; max-width: 960px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.needs h3 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0; letter-spacing: -.01em; }
.needs ul { margin: 0; padding: 0; list-style: none; color: var(--ink-70); }
.needs li { padding: 10px 0; border-top: 1px solid var(--rule-soft); }
@media (max-width: 720px) { .needs { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- route ---------- */
.route .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.steps .step {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px;
  padding: 22px 0; border-top: 1px solid var(--rule-soft);
  opacity: .4; transition: opacity .35s ease;
}
.steps .step.on { opacity: 1; }
.steps .step .n { font-family: var(--mono); font-size: 12px; color: var(--saw); padding-top: 4px; }
.steps h3 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--ink-70); font-size: 15.5px; }
.stick { position: sticky; top: 90px; }
.stick canvas { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background: #F3F5F0; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--ink-50); }
.legend i { width: 9px; height: 9px; display: inline-block; margin-right: 7px; vertical-align: middle; }
@media (max-width: 820px) { .route .split { grid-template-columns: 1fr; } .stick { position: static; } }

/* ---------- coverage ---------- */
.pops { width: 100%; border-collapse: collapse; max-width: 960px; font-size: 15.5px; }
.pops th { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-50); font-weight: 400; padding: 0 18px 12px 0; border-bottom: 1px solid var(--rule); }
.pops td { padding: 14px 18px 14px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.pops td.code { font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; }
.pops td.num { font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--water); margin-right: 8px; vertical-align: middle; }
.dot.plan { background: transparent; border: 1px solid var(--ink-30); }
.table-wrap { overflow-x: auto; }

/* ---------- pricing ---------- */
.rates { width: 100%; border-collapse: collapse; max-width: 960px; font-size: 15.5px; margin-bottom: 30px; }
.rates th { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-50); font-weight: 400; padding: 0 18px 12px 0; border-bottom: 1px solid var(--rule); }
.rates td { padding: 14px 18px 14px 0; border-bottom: 1px solid var(--rule-soft); }
.rates td.q { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--water); }

/* ---------- contact ---------- */
.contact .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(32px, 5vw, 72px); }
@media (max-width: 820px) { .contact .split { grid-template-columns: 1fr; } }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
form .full { grid-column: 1 / -1; }
label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-50); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--ink-30);
  padding: 10px 0; border-radius: 0;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { border-bottom-color: var(--ink); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--water); outline-offset: 3px;
}
.form-note { grid-column: 1 / -1; font-size: 14px; color: var(--ink-50); margin: 0; }
.form-notice {
  grid-column: 1 / -1; display: none; padding: 14px 16px; font-size: 14.5px;
  border: 1px solid var(--saw); color: var(--ink);
}
.form-notice.show { display: block; }
@media (max-width: 560px) { form { grid-template-columns: 1fr; } }
.contact-aside p { color: var(--ink-70); max-width: 40ch; }
.contact-aside .mono { display: block; margin-top: 18px; line-height: 2; }

/* ---------- footer ---------- */
.footer {
  background: rgba(24, 38, 31, .9); color: var(--paper);
  padding: 64px var(--gutter) 40px; margin-top: clamp(200px, 40vh, 420px);
}
.footer .inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.footer .brand { font-size: 26px; margin: 0 0 12px; display: block; }
.footer p { margin: 0 0 8px; font-size: 14.5px; color: #C7D0C8; max-width: 44ch; }
.footer h4 { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .12em; color: #93A198; margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { padding: 4px 0; font-size: 15px; }
.footer a { color: #DCE3DB; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer .legal {
  max-width: 1200px; margin: 48px auto 0; padding-top: 22px; border-top: 1px solid rgba(237, 240, 233, .16);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: #93A198; line-height: 1.9;
}
@media (max-width: 720px) { .footer .inner { grid-template-columns: 1fr; } }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero .meta .cue i { animation: none; transform: none; }
  .stamp.pre { opacity: 1; transform: rotate(-4deg); }
  .stamp.hit { animation: none; }
  .steps .step { opacity: 1; }
  .hero-ui.pending { opacity: 1; }
  .nav.hidden-until-open { opacity: 1; }
}

/* Netlify Forms honeypot - never shown to a human. */
.bot-field { display: none; }


/* ---------- skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 18px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- homepage additions ---------- */
.ledger-lead { margin: 0 0 14px; color: var(--ink-50); }
.needs-more { margin: 18px 0 0; font-size: 15px; }
.needs-more a { color: var(--water); }
.table-note {
  margin: 14px 0 0; max-width: 68ch; font-size: 14px;
  line-height: 1.6; color: var(--ink-50);
}
.form-consent {
  grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-50);
}
.form-consent a { color: var(--water); }
.legend .sw-idle { border: 1px solid var(--ink-50); }

/* Footer column headings carry the old h4 styling at the correct level. */
.footer .foot-h {
  font-family: var(--mono); font-weight: 400; font-size: 11px;
  letter-spacing: .12em; color: #AEB9B0; margin: 0 0 14px;
}

/* ---------- footer legibility ---------- */
/* #93A198 on the composited footer ground measured 4.42:1 at 11px - the entity
   name, formation date and registered address are the lines a compliance
   reader is here for. */
.footer .legal { color: #AEB9B0; }
.footer :focus-visible { outline-color: #DCE3DB; }

/* Casing belongs in CSS: literal all-caps is spelled out by some screen
   readers and cannot be copied in its real form. */
label, .footer .legal, .pops th, .rates th, .ledger-lead { text-transform: uppercase; }


/* ---------- interop spec sheet ---------- */
.specs { width: 100%; border-collapse: collapse; max-width: 860px; font-size: 15.5px; }
.specs td {
  padding: 13px 18px 13px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top;
}
.specs tr:first-child td { border-top: 1px solid var(--rule); }
.specs td:first-child {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-50);
  width: 34%; white-space: nowrap; padding-top: 16px;
}
.specs td.v { color: var(--ink-70); }
@media (max-width: 620px) {
  .specs td, .specs td:first-child { display: block; width: auto; white-space: normal; }
  .specs td:first-child { border-bottom: 0; padding: 14px 0 2px; }
  .specs td.v { padding-top: 0; }
  .specs tr:first-child td:first-child { border-top: 1px solid var(--rule); }
}

/* ---------- sent modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: var(--gutter); background: rgba(24, 38, 31, .55);
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--paper); color: var(--ink); border: 1px solid var(--ink);
  padding: 36px 40px; max-width: 440px; width: 100%; text-align: center;
  animation: modal-in .35s cubic-bezier(.16,.84,.3,1);
}
.modal-card .mono { display: block; margin-bottom: 14px; }
.modal-card h3 { font-family: var(--display); font-weight: 400; font-size: 32px; margin: 0 0 10px; letter-spacing: -.01em; }
.modal-card p { color: var(--ink-70); margin: 0 0 24px; font-size: 17px; }
body.modal-open { overflow: hidden; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-card { animation: none; } }
