/* EPG Connect public site.
   Layout: "switchboard" scroll. Open light sections alternate with charcoal console bands;
   content sits on a left-aligned 12-column grid, max 1180px, with a 20px side gutter.
   Brand values come from the app (mobile/src/brand.tsx): green #12D66B, green dark #0B7A3E,
   green light #E7FAEF, charcoal #2A2D31. Type: Poppins (brand), Public Sans (reading), JetBrains Mono (data). */

:root {
  --bg: #F6F8F7;
  --surface: #FFFFFF;
  --surface-2: #EEF2F0;
  --ink: #17191B;
  --muted: #56605B;
  --line: #DDE3E0;
  --green: #12D66B;
  --green-ink: #0B7A3E;
  --green-tint: #E7FAEF;
  --on-green: #0D1F15;
  --chrome: #2A2D31;
  --chrome-2: #33373C;
  --chrome-line: #44494F;
  --chrome-ink: #F2F4F3;
  --chrome-muted: #A8B0AC;
  --amber: #A86412;
  --amber-tint: #FCEFD9;
  --blue: #2F62C9;
  --blue-tint: #E3EBFB;
  --red: #B42318;
  --red-tint: #FDE7E5;
  --grey-dot: #8A938F;
  --shadow: 0 1px 2px rgba(23, 25, 27, .06), 0 8px 24px rgba(23, 25, 27, .06);

  --f-display: "Poppins", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --t-xs: .78rem;
  --t-sm: .9rem;
  --t-md: 1.05rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.45rem, 1.1rem + 1.2vw, 1.9rem);
  --t-2xl: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem);
  --t-3xl: clamp(2.4rem, 1.4rem + 4.4vw, 4.6rem);

  --wrap: 1180px;
  --gutter: 20px;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141618;
    --surface: #1C1F22;
    --surface-2: #23272B;
    --ink: #EDF0EE;
    --muted: #A2ABA6;
    --line: #2F3438;
    --green-ink: #3FE08D;
    --green-tint: #123222;
    --chrome: #0E1012;
    --chrome-2: #191C1F;
    --chrome-line: #2C3135;
    --amber: #F0B45A;
    --amber-tint: #3A2A12;
    --blue: #8AAEF5;
    --blue-tint: #1A2740;
    --red: #F2867C;
    --red-tint: #3D1A17;
    --grey-dot: #7C8580;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141618;
  --surface: #1C1F22;
  --surface-2: #23272B;
  --ink: #EDF0EE;
  --muted: #A2ABA6;
  --line: #2F3438;
  --green-ink: #3FE08D;
  --green-tint: #123222;
  --chrome: #0E1012;
  --chrome-2: #191C1F;
  --chrome-line: #2C3135;
  --amber: #F0B45A;
  --amber-tint: #3A2A12;
  --blue: #8AAEF5;
  --blue-tint: #1A2740;
  --red: #F2867C;
  --red-tint: #3D1A17;
  --grey-dot: #7C8580;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--green-ink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}
h1, h2, h3, h4 {
  font-family: var(--f-display);
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -.015em;
}
h1 { font-size: var(--t-3xl); font-weight: 700; letter-spacing: -.03em; }
h2 { font-size: var(--t-2xl); font-weight: 650; letter-spacing: -.025em; }
h3 { font-size: var(--t-lg); font-weight: 600; }
h4 { font-size: var(--t-md); font-weight: 600; }
p { margin: 0; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-ink);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  flex: none;
}
.lede { font-size: var(--t-md); color: var(--muted); max-width: 62ch; }
.lede-lg { font-size: clamp(1.05rem, .95rem + .5vw, 1.25rem); color: var(--muted); max-width: 58ch; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  flex: none;
}
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand b { font-weight: 600; color: var(--green-ink); }
.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--t-sm);
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.topbar-actions { display: flex; gap: 10px; align-items: center; flex: none; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: var(--t-sm);
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-green { background: var(--green); color: var(--on-green); }
.btn-green:hover { filter: brightness(1.05); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); }
@media (max-width: 1020px) { .nav { display: none; } .topbar-actions { margin-left: auto; } }
@media (max-width: 460px) { .hide-sm { display: none; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 8vw, 120px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 4vw, 56px); max-width: 780px; }

.console {
  background: var(--chrome);
  color: var(--chrome-ink);
}
.console .lede, .console .lede-lg { color: var(--chrome-muted); }
.console .eyebrow { color: var(--green); }
.console a:not(.btn):not(.app):not(.mod) { color: var(--green); }
.section.console + .section { border-top: 0; }

.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .grid-12 { grid-template-columns: minmax(0, 1fr); } .grid-12 > * { grid-column: auto !important; } }

/* ---------- Footer ---------- */
.footer {
  background: var(--chrome);
  color: var(--chrome-muted);
  padding-block: 56px;
  font-size: var(--t-sm);
}
.footer .wrap { display: grid; gap: 32px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer h4 { color: var(--chrome-ink); font-size: var(--t-sm); margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer a { color: var(--chrome-muted); text-decoration: none; }
.footer a:hover { color: var(--chrome-ink); }
.footer .brand { color: var(--chrome-ink); }
.footer .brand b { color: var(--green); }
.footer .legal {
  grid-column: 1 / -1;
  border-top: 1px solid var(--chrome-line);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: var(--t-xs);
}
@media (max-width: 760px) { .footer .wrap { grid-template-columns: 1fr 1fr; } .footer .wrap > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
