/* ==========================================================================
   GeoParcels — geoparcels.com
   Static site, no build step. Tokens first, both themes first-class.
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
  /* brand constants */
  --navy: #1B2B5E;
  --navy-deep: #0E1A3C;
  --gold: #C6A24E;
  --green: #3F7D53;
  --slate: #64748B;
  --paper: #F4F6FA;
  --ink: #14203A;

  /* light theme (default) */
  --bg: var(--paper);
  --bg-raise: #FFFFFF;
  --bg-band: #E9EDF5;
  --text: var(--ink);
  --text-muted: #46536E;
  --heading: var(--navy);
  --link: var(--navy);
  --border: #D6DDEA;
  --accent-text: #8A6B24;       /* gold, darkened for AA on light bg */
  --green-text: #2F6B43;
  --btn-bg: var(--navy);
  --btn-text: #FFFFFF;
  --btn-hover-accent: var(--gold);
  --chip-bg: #EDF0F7;
  --cad-line: rgba(27, 43, 94, 0.20);
  --cad-gold: rgba(198, 162, 78, 0.55);
  --cad-fill-gold: rgba(198, 162, 78, 0.10);
  --cad-fill-green: rgba(63, 125, 83, 0.12);
  --header-bg: rgba(244, 246, 250, 0.82);
  --shadow: 0 18px 44px -18px rgba(14, 26, 60, 0.28);
  --focus-ring: #1B2B5E;

  color-scheme: light;
}

/* dark tokens, applied two ways: OS preference (unless the user forced light),
   and an explicit toggle choice */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1430;
    --bg-raise: #121F44;
    --bg-band: #0E1A3C;
    --text: #EEF1F8;
    --text-muted: #A7B2CC;
    --heading: #F4F6FC;
    --link: #B9C8F2;
    --border: #26335C;
    --accent-text: #D9BC77;
    --green-text: #8CC7A0;
    --btn-bg: var(--gold);
    --btn-text: #0E1A3C;
    --btn-hover-accent: #0E1A3C;
    --chip-bg: #1A2850;
    --cad-line: rgba(185, 200, 242, 0.16);
    --cad-gold: rgba(217, 188, 119, 0.50);
    --cad-fill-gold: rgba(198, 162, 78, 0.10);
    --cad-fill-green: rgba(101, 178, 128, 0.12);
    --header-bg: rgba(11, 20, 48, 0.80);
    --shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.6);
    --focus-ring: #D9BC77;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0B1430;
  --bg-raise: #121F44;
  --bg-band: #0E1A3C;
  --text: #EEF1F8;
  --text-muted: #A7B2CC;
  --heading: #F4F6FC;
  --link: #B9C8F2;
  --border: #26335C;
  --accent-text: #D9BC77;
  --green-text: #8CC7A0;
  --btn-bg: var(--gold);
  --btn-text: #0E1A3C;
  --btn-hover-accent: #0E1A3C;
  --chip-bg: #1A2850;
  --cad-line: rgba(185, 200, 242, 0.16);
  --cad-gold: rgba(217, 188, 119, 0.50);
  --cad-fill-gold: rgba(198, 162, 78, 0.10);
  --cad-fill-green: rgba(101, 178, 128, 0.12);
  --header-bg: rgba(11, 20, 48, 0.80);
  --shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.6);
  --focus-ring: #D9BC77;
  color-scheme: dark;
}

/* type + spacing scale */
:root {
  --font-display: "Space Grotesk", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step-0: 1rem;                                   /* 16 body   */
  --step-1: clamp(1.125rem, 1rem + 0.5vw, 1.3rem);  /* lede      */
  --step-2: clamp(1.35rem, 1.15rem + 1vw, 1.75rem); /* h3 / card */
  --step-3: clamp(1.7rem, 1.35rem + 1.7vw, 2.4rem); /* h2        */
  --step-4: clamp(2.1rem, 1.5rem + 3vw, 3.35rem);   /* h1        */

  --space-section: clamp(4rem, 3rem + 5vw, 7.5rem);
  --radius: 14px;
  --radius-sm: 8px;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; height: auto; display: block; }

[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); font-weight: 600; }
h3 { font-size: var(--step-2); font-weight: 600; }

p { margin: 0 0 1em; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }

ul { padding: 0; margin: 0; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: min(1160px, 100% - 3rem);
  margin-inline: auto;
}

section { scroll-margin-top: 5.5rem; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

/* mono eyebrow / labels — the product's own vernacular */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 1rem;
}

.value-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 0.35rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
}
.btn-primary:hover {
  box-shadow: inset 0 -3px 0 var(--btn-hover-accent), 0 6px 18px -8px rgba(14, 26, 60, 0.5);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.55);
}

.btn-lg { padding: 0.8rem 1.6rem; font-size: 1.05rem; }

.link-arrow {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--link);
}
.link-arrow span { color: var(--accent-text); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-mark { width: 30px; height: 37.5px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--heading);
}

.site-nav { margin-left: auto; }
.nav-list {
  display: flex;
  gap: 1.6rem;
  list-style: none;
}
.nav-list a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--gold); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--accent-text); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
.theme-dark .theme-toggle .icon-sun { display: block; }
.theme-dark .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease;
}
.nav-open .nav-toggle-bar:first-child { transform: translateY(4px) rotate(45deg); }
.nav-open .nav-toggle-bar:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-section) 0 calc(var(--space-section) * 0.9);
}

.cadastral {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cad-line {
  fill: none;
  stroke: var(--cad-line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.cad-line.cad-gold { stroke: var(--cad-gold); }
.cad-cell { stroke: none; }
.cad-cell-gold { fill: var(--cad-fill-gold); }
.cad-cell-green { fill: var(--cad-fill-green); }

/* single restrained motion moment: linework draws on, cells fill in */
@media (prefers-reduced-motion: no-preference) {
  .js .cadastral .cad-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }
  .js .cadastral .cad-cell { opacity: 0; }
  .js.is-loaded .cadastral .cad-line {
    animation: cad-draw 1.4s ease-out forwards;
  }
  .js.is-loaded .cadastral .cad-line:nth-of-type(2n) { animation-delay: 0.15s; }
  .js.is-loaded .cadastral .cad-line:nth-of-type(3n) { animation-delay: 0.3s; }
  .js.is-loaded .cadastral .cad-cell {
    animation: cad-fill 0.9s ease-out 1s forwards;
  }
}
@keyframes cad-draw { to { stroke-dashoffset: 0; } }
@keyframes cad-fill { to { opacity: 1; } }

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6.5fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.hero-sub {
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 34em;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* framed screenshot */
.browser-frame {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-raise);
  box-shadow: var(--shadow);
}
.browser-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.browser-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}
.browser-chrome .browser-dot:first-child { background: var(--gold); }
.browser-url {
  margin-left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--chip-bg);
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
}

/* ---------- Positioning strip ---------- */

.positioning {
  background: var(--bg-band);
  border-block: 1px solid var(--border);
  padding: calc(var(--space-section) * 0.7) 0;
}
.positioning-lede {
  max-width: 52em;
  color: var(--text-muted);
  font-size: var(--step-1);
}
.value-points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}
.value-points p { margin: 0; color: var(--text-muted); }

/* ---------- Divider motif ---------- */

.divider {
  display: flex;
  justify-content: center;
  color: var(--cad-line);
  margin: calc(var(--space-section) * 0.45) 0 0;
}
.divider .divider-gold { stroke: var(--cad-gold); }

/* ---------- Interfaces showcase ---------- */

.interfaces { padding: calc(var(--space-section) * 0.6) 0 var(--space-section); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2vw, 2rem);
  margin-top: 2.5rem;
}

.viewer-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.viewer-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.card-media { position: relative; }
.shots {
  aspect-ratio: 1152 / 880;
  background: var(--bg-band);
}
.shots img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.shot-nav {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.35rem;
}
.shot-nav button {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(14, 26, 60, 0.62);
  color: #EEF1F8;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.shot-nav button:hover { border-color: var(--gold); }
.shot-nav button[aria-pressed="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-deep);
  font-weight: 600;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem 1.5rem 1.6rem;
}
.card-body h3 { margin-bottom: 0.5rem; }
.card-body > p { color: var(--text-muted); font-size: 0.95rem; }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.25rem 0 1.4rem;
}
.chips li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.65rem;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  white-space: nowrap;
}

.demo-link {
  margin-top: auto;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green-text);
  text-decoration: none;
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
}
.demo-link:hover { text-decoration: underline; text-decoration-color: var(--green-text); }
.demo-link span { transition: transform 0.15s ease; display: inline-block; }
.demo-link:hover span { transform: translateX(3px); }

.interfaces-note {
  margin: 2.5rem auto 0;
  max-width: 46em;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Features ---------- */

.features {
  background: var(--bg-band);
  border-block: 1px solid var(--border);
  padding: var(--space-section) 0;
}

.feature-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.feature-grid li {
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.1rem;
  position: relative;
}
/* parcel-corner mark, drawn from the map-frame in the logo */
.feature-grid li::before {
  content: "";
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  opacity: 0.8;
}
.feature-grid h3 {
  font-size: 1.02rem;
  margin-bottom: 0.4rem;
}
.feature-grid p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.integrations {
  margin-top: 2.5rem;
  padding: 1.4rem 1.6rem;
  border: 1px dashed var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--bg-raise);
  max-width: 56em;
}
.integrations p { margin: 0; color: var(--text-muted); }

/* ---------- Credibility ---------- */

.credibility {
  background: var(--navy-deep);
  color: #DDE4F5;
  padding: var(--space-section) 0;
}
.credibility .eyebrow { color: #D9BC77; }
.credibility h2 { color: #F4F6FC; }
.credibility-copy {
  max-width: 52em;
  color: #C0CBE4;
  font-size: var(--step-1);
}
.credibility strong { color: #F4F6FC; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 3rem 0 0;
  border-top: 1px solid rgba(198, 162, 78, 0.3);
  padding-top: 2rem;
}
.stat dt {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #93A2C7;
  margin-bottom: 0.3rem;
}
.stat dd {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  color: #D9BC77;
}

/* ---------- About ---------- */

.about { padding: var(--space-section) 0; }
.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.about-copy p:last-child { color: var(--text-muted); margin-bottom: 0; }
.about-copy strong { color: var(--heading); }

/* gctlogo.png is navy-on-transparent: keep it on a light chip in BOTH themes */
.gct-chip {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  box-shadow: var(--shadow);
}
.gct-chip img { width: 100%; max-width: 320px; margin-inline: auto; }

/* ---------- Contact ---------- */

.contact {
  background: var(--bg-band);
  border-top: 1px solid var(--border);
  padding: var(--space-section) 0;
}
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.contact-copy p {
  color: var(--text-muted);
  font-size: var(--step-1);
  max-width: 30em;
  margin-bottom: 1.8rem;
}
.contact-details {
  font-style: normal;
  border-left: 2px solid var(--gold);
  padding-left: 1.5rem;
}
.contact-details p { margin-bottom: 1.1rem; }
.contact-details p:last-child { margin-bottom: 0; }
.contact-details a {
  font-family: var(--font-mono);
  font-size: 0.98rem;
}

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

.site-footer {
  background: var(--navy-deep);
  color: #C0CBE4;
  padding: 3.5rem 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.site-footer .brand-name { color: #F4F6FC; }
.footer-tagline { margin-top: 1rem; font-size: 0.92rem; }

.footer-nav ul {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.footer-nav a,
.footer-contact a {
  color: #C0CBE4;
  text-decoration: none;
}
.footer-nav a:hover,
.footer-contact a:hover {
  color: #D9BC77;
  text-decoration: underline;
}
.footer-contact p { margin-bottom: 0.55rem; font-size: 0.92rem; }
.footer-contact a { font-family: var(--font-mono); font-size: 0.9rem; }

.footer-legal {
  border-top: 1px solid rgba(192, 203, 228, 0.18);
  padding-block: 1.4rem;
  font-size: 0.85rem;
}
.footer-legal p { margin: 0; color: #93A2C7; }

.site-footer :focus-visible { outline-color: #D9BC77; }
.credibility :focus-visible { outline-color: #D9BC77; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 640px; }
  .about-inner,
  .contact-inner { grid-template-columns: 1fr; }
  .gct-chip { max-width: 420px; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-raise);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
    padding: 1rem 1.5rem 1.4rem;
  }
  .nav-open .site-nav { display: block; }
  .nav-list {
    flex-direction: column;
    gap: 0.4rem;
  }
  .nav-list a {
    display: block;
    padding: 0.6rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-list li:last-child a { border-bottom: none; }
}

@media (max-width: 760px) {
  .card-grid { grid-template-columns: 1fr; }
  .value-points { grid-template-columns: 1fr; gap: 1.25rem; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-ctas { gap: 1rem; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
