/* =============================================================
   Eight Energy — shared stylesheet
   The brand design system. Every page inherits from this.
   Colours, type and spacing are fixed here — don't override
   them ad hoc on individual pages.
   ============================================================= */

/* ---- Design tokens ---------------------------------------- */
:root {
  /* Brand colours — see brand guidelines */
  --charcoal:  #1C1F24;
  --off-white: #F6F2EA;
  --copper:    #C1652E;
  --copper-dk: #A9531F; /* hover/pressed only, derived from copper */
  --slate:     #6B7280;
  --green:     #4C7A5E; /* status/success only — never decorative */

  /* Tints derived from the brand set (no new hues) */
  --charcoal-80: rgba(28, 31, 36, 0.80);
  --charcoal-06: rgba(28, 31, 36, 0.06);
  --off-white-70: rgba(246, 242, 234, 0.70);
  --line: rgba(28, 31, 36, 0.12);
  --line-dark: rgba(246, 242, 234, 0.14);

  /* Type */
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Fluid type scale */
  --step--1: clamp(0.83rem, 0.79rem + 0.20vw, 0.94rem);
  --step-0:  clamp(1.00rem, 0.94rem + 0.30vw, 1.15rem);
  --step-1:  clamp(1.25rem, 1.14rem + 0.55vw, 1.55rem);
  --step-2:  clamp(1.56rem, 1.35rem + 1.05vw, 2.20rem);
  --step-3:  clamp(1.95rem, 1.60rem + 1.75vw, 3.05rem);
  --step-4:  clamp(2.44rem, 1.85rem + 2.95vw, 4.20rem);

  /* Spacing */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4.5rem;
  --sp-7: 7rem;

  --maxw: 1120px;
  --maxw-narrow: 720px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28,31,36,0.06), 0 8px 30px rgba(28,31,36,0.08);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Reset / base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p { text-wrap: pretty; }

a { color: var(--copper); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

/* ---- Layout helpers --------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}
.narrow { max-width: var(--maxw-narrow); }

.section { padding-block: var(--sp-7); }
.section--tight { padding-block: var(--sp-6); }

.eyebrow {
  font-family: var(--font-head);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: var(--sp-2);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--slate);
}

.muted { color: var(--slate); }

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease),
              border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--copper); color: var(--off-white); }
.btn--primary:hover { background: var(--copper-dk); color: var(--off-white); }

.btn--ghost {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--charcoal); background: var(--charcoal-06); }

/* On dark backgrounds */
.on-dark .btn--ghost { color: var(--off-white); border-color: var(--line-dark); }
.on-dark .btn--ghost:hover { border-color: var(--off-white); background: rgba(246,242,234,0.08); }

.btn--lg { padding: 1.1rem 1.8rem; font-size: var(--step-1); }

/* ---- Header ----------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--off-white-70);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--charcoal);
}
.brand:hover { text-decoration: none; }
.brand__mark { width: 30px; height: 30px; flex: none; }

.nav { display: flex; align-items: center; gap: var(--sp-3); }
.nav__links { display: flex; align-items: center; gap: var(--sp-3); list-style: none; padding: 0; }
.nav__links a {
  color: var(--charcoal);
  font-size: var(--step--1);
  font-weight: 500;
}
.nav__links a:hover { color: var(--copper); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav__links, .nav .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav--open .nav__links {
    display: flex;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--off-white);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-2) var(--sp-3) var(--sp-3);
  }
  .nav--open .nav__links a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: var(--step-0); }
  .nav--open .nav__links .btn { display: inline-flex; margin-top: var(--sp-2); justify-content: center; }
}

/* ---- Hero ------------------------------------------------- */
.hero {
  position: relative;
  background: var(--charcoal);
  color: var(--off-white);
  overflow: hidden;
}
.hero__curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}
.hero__inner {
  position: relative;
  padding-block: var(--sp-7);
  max-width: 760px;
}
.hero h1 { color: var(--off-white); }
.hero .eyebrow { color: var(--copper); }
.hero__sub {
  margin-top: var(--sp-3);
  font-size: var(--step-1);
  line-height: 1.5;
  color: rgba(246,242,234,0.82);
  max-width: 60ch;
}
.hero__cta {
  margin-top: var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.hero__note {
  margin-top: var(--sp-3);
  font-size: var(--step--1);
  color: rgba(246,242,234,0.6);
}

/* ---- Generic dark section --------------------------------- */
.on-dark {
  background: var(--charcoal);
  color: var(--off-white);
}
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--off-white); }
.on-dark .lede { color: rgba(246,242,234,0.78); }
.on-dark .muted { color: rgba(246,242,234,0.6); }

/* ---- Trust strip ------------------------------------------ */
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.trust__item { display: flex; gap: var(--sp-2); align-items: flex-start; }
.trust__icon {
  flex: none;
  width: 40px; height: 40px;
  color: var(--copper);
}
.trust__item h3 { font-size: var(--step-0); margin-bottom: 0.25rem; }
.trust__item p { font-size: var(--step--1); color: var(--slate); }

@media (max-width: 720px) {
  .trust { grid-template-columns: 1fr; gap: var(--sp-3); }
}

/* ---- Section heading block -------------------------------- */
.section-head { max-width: 62ch; margin-bottom: var(--sp-5); }
.section-head p { margin-top: var(--sp-2); }

/* ---- Benefit cards ---------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  box-shadow: var(--shadow);
}
.card__icon { width: 34px; height: 34px; color: var(--copper); margin-bottom: var(--sp-2); }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--slate); font-size: var(--step-0); }

@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

/* ---- Process / steps -------------------------------------- */
.steps { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  border-top: 1px solid var(--line-dark);
  align-items: baseline;
}
.step:last-child { border-bottom: 1px solid var(--line-dark); }
.step__num {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step-1);
  color: var(--copper);
}
.step h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.step p { color: rgba(246,242,234,0.7); font-size: var(--step-0); max-width: 60ch; }

/* ---- FAQ (accordion) -------------------------------------- */
.faq { display: grid; gap: 0; max-width: var(--maxw-narrow); }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-3) 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step-1);
  color: var(--charcoal);
}
.faq__q:hover { color: var(--copper); }
.faq__sign { flex: none; width: 22px; height: 22px; color: var(--copper); transition: transform 0.25s var(--ease); }
.faq__item[open] .faq__sign { transform: rotate(45deg); }
.faq__a { padding: 0 0 var(--sp-3); color: var(--slate); max-width: 66ch; }
.faq__a p + p { margin-top: var(--sp-2); }
/* details marker off */
.faq__item summary { list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }

/* ---- CTA band --------------------------------------------- */
.cta-band { text-align: center; }
.cta-band .container { max-width: var(--maxw-narrow); }
.cta-band h2 { margin-bottom: var(--sp-2); }
.cta-band .btn { margin-top: var(--sp-3); }

/* ---- Footer ----------------------------------------------- */
.site-footer {
  background: var(--charcoal);
  color: rgba(246,242,234,0.7);
  padding-block: var(--sp-6) var(--sp-4);
  font-size: var(--step--1);
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-4);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line-dark);
}
.footer__brand .brand { color: var(--off-white); margin-bottom: var(--sp-2); }
.footer__brand p { max-width: 34ch; color: rgba(246,242,234,0.6); }
.footer__col h4 {
  font-family: var(--font-head);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(246,242,234,0.5);
  margin-bottom: var(--sp-2);
}
.footer__col ul { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.footer__col a { color: rgba(246,242,234,0.82); }
.footer__col a:hover { color: var(--copper); text-decoration: none; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-2);
  padding-top: var(--sp-3);
  color: rgba(246,242,234,0.5);
}
@media (max-width: 860px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer__top { grid-template-columns: 1fr; }
}

/* ---- Image slot (honest placeholder for real photography) --- */
/* Used where a real photo will go. Never a stock image. */
.img-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    repeating-linear-gradient(135deg, var(--charcoal-06) 0 2px, transparent 2px 14px),
    var(--off-white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--slate);
  font-size: var(--step--1);
  padding: var(--sp-4);
  min-height: 260px;
}

/* ---- Shared content patterns (product & content pages) ---- */
/* Two-column media/text split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: center; }
.split--narrow-media { grid-template-columns: 1.15fr 0.85fr; }
.split--wide-text { grid-template-columns: 1.2fr 0.8fr; }
@media (max-width: 860px) { .split, .split--narrow-media, .split--wide-text { grid-template-columns: 1fr; gap: var(--sp-4); } }

/* Body prose */
.prose p { margin-bottom: var(--sp-3); color: var(--slate); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--charcoal); font-weight: 600; }
.on-dark .prose p { color: rgba(246,242,234,0.82); }
.on-dark .prose strong { color: var(--off-white); }

/* Icon + text value list */
.value-list { list-style: none; padding: 0; display: grid; gap: var(--sp-3); }
.value-list > li { display: grid; grid-template-columns: 40px 1fr; gap: var(--sp-2); align-items: start; }
.value-list svg { width: 26px; height: 26px; color: var(--copper); margin-top: 3px; flex: none; }
.value-list h3 { font-size: var(--step-0); margin-bottom: 0.15rem; }
.value-list p { color: var(--slate); font-size: var(--step--1); }

/* Ticked checklist */
.checklist { list-style: none; padding: 0; display: grid; gap: var(--sp-2); }
.checklist li { display: grid; grid-template-columns: 26px 1fr; gap: var(--sp-2); align-items: start; color: var(--slate); }
.checklist li::before {
  content: ""; width: 20px; height: 20px; margin-top: 3px; flex: none;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C1652E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}
.on-dark .checklist li { color: rgba(246,242,234,0.8); }

/* Status pill (e.g. "Not yet live", "In progress") — uses green sparingly for status only */
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-head); font-weight: 600; font-size: var(--step--1);
  padding: 0.3rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--slate); background: #fff;
}
.pill--status { color: var(--green); border-color: rgba(76,122,94,0.35); background: rgba(76,122,94,0.08); }
.on-dark .pill { background: rgba(246,242,234,0.06); border-color: var(--line-dark); color: rgba(246,242,234,0.75); }

/* Definition-style plain box */
.plain-box {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--copper);
  border-radius: var(--radius); padding: var(--sp-4); box-shadow: var(--shadow);
}
.plain-box h3 { margin-bottom: 0.5rem; }
.plain-box p { color: var(--slate); }
.plain-box p + p { margin-top: var(--sp-2); }

/* Notice band (honest caveats, "not yet live", etc.) */
.notice {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  background: var(--charcoal-06); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-3) var(--sp-4);
}
.notice svg { width: 24px; height: 24px; color: var(--copper); flex: none; }
.notice p { color: var(--slate); font-size: var(--step--1); }

/* Two-up product feature grid reuses .cards/.card */

/* ---- Motion preferences ----------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* Reveal-on-scroll (progressive; no-JS shows everything) */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
