/* Energybackers — shared design system
   v3: deep teal + soft aqua. No orange/yellow, no heavy dark backgrounds.
   The legacy G-globe mark has been recolored from navy/green to deep teal
   (shape) + soft aqua (globe), and that same deep teal now anchors the
   whole site instead of navy. Note: CSS custom-property names (--amber,
   --brand-navy) are left over from earlier iterations — their *values*
   are teal/aqua now, renaming would just churn every rule below. */

:root {
  --ink: #1c3335;         /* dark teal-charcoal — body text, headings */
  --ink-soft: #3f5658;
  --paper: #f7fafa;       /* light, cool background */
  --paper-dim: #eaf1f1;
  --line: #d7e3e3;
  --amber: #4fc3c3;       /* soft aqua — primary accent (var name is legacy) */
  --amber-dark: #2fa3a3;
  --teal: #0f5c5c;        /* deep teal — secondary accent / links */
  --muted: #5f7476;
  --white: #ffffff;
  --brand-navy: #0f5c5c;  /* deep teal — matches recolored logo mark */
  --brand-green: #4fc3c3; /* legacy globe fill — now soft aqua */
  --max: 1180px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }
.muted { color: var(--muted); font-size: 0.9rem; }

/* Reusable responsive 16:9 video embed (Vimeo/YouTube iframe) */
.video-embed { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; border-radius: var(--radius); overflow: hidden; margin: 28px 0; background: var(--paper-dim); }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Reusable circular photo, e.g. team bios */
.avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  display: block; margin: 0 auto 16px;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
header.site .bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; max-width: var(--max); margin: 0 auto;
}
.logo { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 600; color: var(--ink); display: inline-flex; align-items: baseline; text-transform: uppercase; letter-spacing: 0.03em; }
.logo span { color: var(--amber-dark); }
/* g-mark-wrap: the "g" glyph is built from two aligned layers so the
   G-ring always matches the surrounding wordmark color (dark in the
   header, white in the footer) while the globe stays fixed aqua.
   - g-globe-layer: fixed-color aqua globe (plain image, bottom layer)
   - g-ring-layer: the G ring/bar shape, painted with currentColor via
     a CSS mask (top layer) — so it always matches the adjacent letters */
.logo .g-mark-wrap {
  position: relative; display: inline-block;
  height: 0.7em; width: 0.7em; vertical-align: baseline;
  margin: 0 0.01em;
}
.logo .g-mark-wrap .g-globe-layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.logo .g-mark-wrap .g-ring-layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background-color: currentColor;
  -webkit-mask-image: url(../assets/g-ring-mask.png);
  -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center;
  mask-image: url(../assets/g-ring-mask.png);
  mask-size: contain; mask-repeat: no-repeat; mask-position: center;
}
footer.site .logo { color: var(--white); }
footer.site .logo span { color: var(--amber); }
nav.primary ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
nav.primary a { color: var(--ink-soft); font-size: 0.95rem; font-weight: 500; }
nav.primary a:hover { color: var(--amber-dark); text-decoration: none; }
.cta-btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  background: var(--ink); color: var(--white) !important; font-size: 0.9rem;
  font-weight: 600; white-space: nowrap;
}
.cta-btn:hover { background: var(--amber-dark); text-decoration: none; }
.cta-btn.outline { background: transparent; color: var(--ink) !important; border: 1.5px solid var(--ink); }
.cta-btn.outline:hover { background: var(--ink); color: var(--white) !important; }

/* ---------- Banner placeholder (top, below header) ---------- */
.banner-placeholder {
  width: 100%; height: 320px; overflow: hidden;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.banner-placeholder img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  display: block;
}
.banner-placeholder .label {
  position: absolute; bottom: 14px; right: 14px;
  background: rgba(255,255,255,0.9); border-radius: 6px;
  padding: 6px 12px; font-size: 0.72rem; color: var(--muted); font-weight: 600;
}

/* ---------- Banner video (top, below header) ---------- */
.banner-video {
  width: 100%; position: relative; padding-bottom: 42%; height: 0;
  overflow: hidden; border-bottom: 1px solid var(--line); background: var(--ink);
}
.banner-video iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
@media (max-width: 700px) {
  .banner-video { padding-bottom: 75%; }
}

/* ---------- Stat buttons ---------- */
/* Same left/right edges as the rest of the page content (matches .wrap)
   — not full browser-width, just a full row of three separate buttons. */
.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin: 36px auto 0; max-width: var(--max); padding: 0 28px;
}
.stat-btn {
  background: var(--brand-navy); border-radius: 14px; padding: 32px 20px;
  text-align: center; color: var(--white);
}
.stat-btn .num {
  font-family: Georgia, serif; font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 600; color: var(--white); line-height: 1; margin-bottom: 10px;
}
.stat-btn .label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: #bfe0e0; font-weight: 600;
}
@media (max-width: 860px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 90px 0 70px; background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
}
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem;
  color: var(--amber-dark); font-weight: 700; margin-bottom: 14px;
}
.hero p.lead { font-size: 1.15rem; max-width: 640px; }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.tint { background: var(--paper-dim); }
section.dark { background: var(--brand-navy); color: var(--white); }
section.dark h2, section.dark h3, section.dark p { color: var(--white); }
section.dark .muted { color: #bfe0e0; }

.section-head { max-width: 620px; margin-bottom: 40px; }
.eyebrow-sm {
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem;
  color: var(--teal); font-weight: 700; margin-bottom: 10px; display: block;
}

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  nav.primary { display: none; }
}

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; height: 100%;
}
.card .tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--amber-dark); background: #fbe9d4;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { display: flex; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: none; }
.step .num {
  counter-increment: step; font-family: Georgia, serif; font-size: 1.6rem; color: var(--amber);
  width: 46px; flex-shrink: 0;
}
.step .num::before { content: counter(step, decimal-leading-zero); }

/* ---------- Table (evolution / comparison) ---------- */
table.evolve { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
table.evolve th, table.evolve td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.92rem; }
table.evolve th { background: var(--ink); color: var(--white); font-weight: 600; }
table.evolve td:first-child { font-weight: 600; color: var(--ink); width: 20%; }
table.evolve tr:last-child td { border-bottom: none; }

/* ---------- Footer ---------- */
footer.site { background: var(--brand-navy); color: #bfe0e0; padding: 50px 0 30px; margin-top: 40px; }
footer.site .cols { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 30px; }
footer.site h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
footer.site a { color: #bfe0e0; }
footer.site a:hover { color: var(--amber); }
footer.site .fine { font-size: 0.78rem; color: #8fb8b8; border-top: 1px solid #1c7373; padding-top: 20px; }
.placeholder { color: #9aa5ad; font-style: italic; }

/* ---------- Forms ---------- */
form.stack { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
label { font-size: 0.85rem; font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 0.95rem; background: var(--white);
}
button.submit {
  padding: 12px 22px; border-radius: 999px; border: none; background: var(--amber);
  color: var(--ink); font-weight: 700; cursor: pointer; align-self: flex-start;
}
button.submit:hover { background: var(--amber-dark); color: var(--white); }

/* ---------- Portal (dealroom) ---------- */
.portal-shell { display: flex; min-height: 100vh; }
.portal-nav {
  width: 230px; background: var(--ink); color: var(--white); padding: 26px 18px; flex-shrink: 0;
}
.portal-nav .logo { color: var(--white); font-size: 1.1rem; margin-bottom: 30px; display: block; }
.portal-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.portal-nav a { color: #b7c0c7; padding: 9px 12px; border-radius: 8px; display: block; font-size: 0.9rem; }
.portal-nav a:hover, .portal-nav a.active { background: var(--ink-soft); color: var(--white); text-decoration: none; }
.portal-main { flex: 1; padding: 34px 40px; background: var(--paper); }
.portal-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.status-pill { font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.status-pill.review { background: #fbe9d4; color: var(--amber-dark); }
.status-pill.progress { background: #e3e7ec; color: var(--teal); }
.status-pill.committed { background: #dbf0d8; color: #2f7a2b; }
.status-pill.passed { background: #eee; color: #888; }

.deal-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.deal-row .meta { color: var(--muted); font-size: 0.85rem; }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); }
.login-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 44px; width: 380px; }
.login-toggle { display: flex; gap: 8px; margin-bottom: 24px; background: var(--paper-dim); padding: 4px; border-radius: 999px; }
.login-toggle button { flex: 1; padding: 8px; border: none; background: transparent; border-radius: 999px; font-weight: 600; font-size: 0.85rem; cursor: pointer; color: var(--muted); }
.login-toggle button.active { background: var(--ink); color: var(--white); }
