/* ==========================================================================
   kegeos — design system
   Dark, high-tech, geospatial. Slate-teal structure, cream accent.
   Single accent (cream #FBE7C0) over a slate-teal scale.
   ========================================================================== */

/* ---- tokens ------------------------------------------------------------ */
:root {
  /* surfaces — slate-teal scale */
  --bg:        #0c151a;
  --bg-2:      #122027;
  --surface:   #172831;
  --surface-2: #1d333d;
  --border:    #24414b;
  --border-2:  #33525e;

  /* text */
  --text:       #e9efe6;
  --text-muted: #a9bab7;
  --text-dim:   #718488;

  /* accent + tints */
  --accent:      #fbe7c0;   /* cream — the single accent */
  --accent-soft: rgba(251, 231, 192, 0.55);
  --slate:       #21333d;   /* structural teal */
  --slate-light: #8fb7c0;   /* cool tint */

  --grad-accent: linear-gradient(135deg, #fbe7c0, #e6c89a);

  /* geometry */
  --radius:    14px;
  --radius-lg: 20px;
  --maxw:      1160px;
  --header-h:  72px;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* ---- reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 18px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
::selection { background: rgba(251, 231, 192, 0.28); color: #0c151a; }

/* ---- layout helpers ----------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.section--tint { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* grid + geospatial backdrop texture — slate-toned, referencing logo geometry */
.grid-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(143, 183, 192, 0.10), transparent 42%),
    radial-gradient(circle at 85% 0%, rgba(251, 231, 192, 0.05), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(33, 51, 61, 0.55), transparent 48%),
    linear-gradient(rgba(143, 183, 192, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 183, 192, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 44px 44px, 44px 44px;
  mask-image: linear-gradient(#000 0%, transparent 78%);
  -webkit-mask-image: linear-gradient(#000 0%, transparent 78%);
}
main { position: relative; z-index: 1; }

/* ---- typography --------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow--green { color: var(--slate-light); }
.eyebrow--orange { color: var(--slate-light); }
.display {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.display .grad, .hero h1 .grad { background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--text-muted); max-width: 58ch; }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em; }
.section-sub { color: var(--text-muted); max-width: 62ch; margin-top: 14px; font-size: 1.1rem; }
.mono { font-family: var(--font-mono); }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem;
  padding: 13px 22px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent); color: #0c151a; box-shadow: 0 8px 30px rgba(251, 231, 192, 0.18);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(251, 231, 192, 0.28); }
.btn--ghost { background: transparent; border-color: var(--border-2); color: var(--slate-light); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---- header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 21, 26, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.site-footer .brand-mark { width: 30px; height: 30px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 9px 15px; border-radius: 9px; font-size: 1rem; color: var(--text-muted);
  transition: color .15s ease, background .15s ease;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a.active { color: var(--text); }
.site-nav a.nav-cta {
  margin-left: 10px; color: #0c151a; font-weight: 600; background: var(--accent);
  box-shadow: 0 6px 22px rgba(251, 231, 192, 0.16);
}
.site-nav a.nav-cta:hover { color: #0c151a; background: var(--accent); filter: brightness(1.06); }
.nav-toggle {
  display: none; background: var(--surface); border: 1px solid var(--border-2); color: var(--text);
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer; font-size: 1.2rem; line-height: 1;
}

/* ---- hero --------------------------------------------------------------- */
.hero { padding: 104px 0 80px; position: relative; overflow: hidden; }
.hero-inner { max-width: 860px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); font-weight: 700; letter-spacing: -0.035em; }
.hero p { margin-top: 24px; font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--text-muted); max-width: 60ch; }
.hero-actions { margin-top: 36px; }
.hero-meta { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.06em;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border-2);
  color: var(--text-muted); background: rgba(23, 40, 49, 0.6);
}
.chip b { color: var(--accent); font-weight: 600; }

/* hero backdrop — concentric rings + crosshair referencing the logo geometry */
.hero-backdrop {
  position: absolute; top: -40px; right: -60px; width: 560px; height: 560px;
  pointer-events: none; color: var(--slate-light); opacity: 0.5;
}
.hero-backdrop .ring { fill: none; stroke: currentColor; }
.hero-backdrop .arc { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }

/* ---- stat strip --------------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat { background: var(--surface); padding: 28px 26px; }
.stat .num { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; letter-spacing: -0.03em; }
.stat .num.cyan, .stat .num.green, .stat .num.orange { color: var(--accent); }
.stat .lbl { color: var(--text-muted); font-size: 1rem; margin-top: 6px; }

/* ---- flow (how it connects) --------------------------------------------- */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 18px; align-items: stretch; margin-top: 48px; }
.flow-step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 26px; position: relative; overflow: hidden;
}
.flow-step::after {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--accent); opacity: 0.9;
}
.flow-step:nth-child(3)::after { opacity: 0.7; }
.flow-step:nth-child(5)::after { opacity: 0.5; }
.flow-icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--accent); margin-bottom: 18px;
}
.flow-icon svg { width: 22px; height: 22px; }
.flow-step h3 { font-size: 1.3rem; margin-top: 12px; }
.flow-step p { color: var(--text-muted); font-size: 1.05rem; margin-top: 10px; }
.flow-tag { display: inline-block; margin-top: 18px; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.flow-step:nth-child(3) .flow-tag { opacity: 0.75; }
.flow-step:nth-child(5) .flow-tag { opacity: 0.6; }
.flow-arrow { align-self: center; color: var(--text-dim); font-size: 1.7rem; font-family: var(--font-mono); }

/* ---- cards / grids ------------------------------------------------------ */
.grid { display: grid; gap: 22px; margin-top: 48px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 28px; position: relative; transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45); }
.card .kicker { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.card h3 { font-size: 1.4rem; margin-top: 14px; }
.card p { color: var(--text-muted); font-size: 1.05rem; margin-top: 12px; flex: 1; }
.card .more { margin-top: 22px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent); }
.card .more:hover { text-decoration: underline; }
.card--cyan .kicker, .card--green .kicker, .card--orange .kicker { color: var(--accent); }

/* pillar icon inside a card */
.card-icon {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--accent); margin-bottom: 20px;
}
.card-icon svg { width: 24px; height: 24px; }

/* accent top bar per card */
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; opacity: 0; transition: opacity .2s ease; background: var(--accent); }
.card:hover::before { opacity: 1; }

/* sub-service list item */
.svc { padding: 22px 0; border-top: 1px solid var(--border); }
.svc:first-of-type { border-top: 0; }
.svc h4 { font-size: 1.15rem; }
.svc p { color: var(--text-muted); font-size: 1.02rem; margin-top: 7px; }

/* ---- solutions rows ------------------------------------------------------ */
.sol { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 30px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.sol + .sol { margin-top: 18px; }
.sol-icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--accent); }
.sol-icon svg { width: 22px; height: 22px; }
.sol h3 { font-size: 1.35rem; }
.sol p { color: var(--text-muted); margin-top: 9px; }
.sol .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sol .tags span { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.05em; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }

/* ---- CTA band ------------------------------------------------------------ */
.cta-band {
  background: linear-gradient(135deg, rgba(251, 231, 192, 0.08), rgba(143, 183, 192, 0.06)), var(--bg-2);
  border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  padding: 56px 48px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center;
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { color: var(--text-muted); margin-top: 12px; max-width: 50ch; }
.cta-band .btn-row { justify-content: flex-end; margin-top: 0; }

/* ---- page hero (interior) ------------------------------------------------ */
.page-hero { padding: 80px 0 24px; }
.page-hero .display { max-width: 20ch; }
.page-hero .lead { margin-top: 20px; }

/* ---- forms --------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 0.95rem; color: var(--text-muted); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px;
  color: var(--text); font-family: var(--font-sans); font-size: 1.05rem; padding: 13px 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(251, 231, 192, 0.14);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.form-note { color: var(--text-dim); font-size: 0.95rem; margin-top: 16px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 22px; }
.contact-info .item { display: flex; gap: 14px; align-items: flex-start; }
.contact-info .item svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent); }
.contact-info .item h4 { font-size: 1.1rem; }
.contact-info .item p { color: var(--text-muted); font-size: 1.02rem; }

/* ---- note / marker -------------------------------------------------------- */
.note {
  margin-top: 48px; padding: 18px 22px; border: 1px dashed var(--border-2); border-radius: var(--radius);
  color: var(--text-dim); font-size: 0.95rem; font-family: var(--font-mono);
}

/* ---- footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--text-muted); margin-top: 16px; max-width: 34ch; font-size: 1.02rem; }
.footer-col h4 { font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 18px; }
.footer-col a { display: block; color: var(--text-muted); padding: 5px 0; font-size: 1rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 56px; padding: 24px 0; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--text-dim); font-size: 0.9rem; }

/* ---- reveal animation ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- responsive ------------------------------------------------------------- */
@media (max-width: 900px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); text-align: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cta-band, .contact-grid { grid-template-columns: 1fr; }
  .cta-band .btn-row { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-backdrop { width: 380px; height: 380px; top: -20px; right: -40px; }
}
@media (max-width: 640px) {
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 20px 20px;
    background: rgba(12, 21, 26, 0.97); border-bottom: 1px solid var(--border);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 14px; }
  .site-nav a.nav-cta { margin-left: 0; text-align: center; }
  .nav-toggle { display: grid; place-items: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 72px 0 56px; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-backdrop { display: none; }
}
