/* electram.cm: inherits SmartSana Energies' "Grid at Night" (solar.smartsana.com DESIGN.md) */
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-latin-ext.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-latin.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Quicksand"; src: url("/assets/fonts/quicksand-latin-ext.woff2") format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Quicksand"; src: url("/assets/fonts/quicksand-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --space: #04060B;
  --deep: #0A0F1A;
  --line: #5B6B85;
  --rule: rgba(91, 107, 133, 0.45);
  --gold: #FFC857;
  --gold-hover: #FFD47A;
  --gold-ink: #1A1204;
  --text: #E6EDF5;
  --text-2: #A5B1C4;
  --text-3: #7D8AA0;
  --gutter: clamp(16px, 4vw, 64px);
  --section: clamp(72px, 11vh, 128px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --display: "Quicksand", "Nunito", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) var(--space); background: var(--space); }
body { margin: 0; background: var(--space); color: var(--text); font: 400 1.0625rem/1.62 "Nunito", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--gold); color: var(--space); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--space); }
::-webkit-scrollbar-thumb { background: var(--line); border: 3px solid var(--space); border-radius: 999px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
a { color: inherit; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
img { display: block; max-width: 100%; }
h1, h2 { font-family: var(--display); font-weight: 700; text-wrap: balance; margin: 0; }
.ico { width: 18px; height: 18px; flex: none; }

/* language switch */
.top { position: absolute; top: 0; right: 0; padding: 18px var(--gutter); z-index: 2; }
.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: rgba(10, 15, 26, 0.6); }
.lang a { font: 700 0.82rem/1 var(--display); letter-spacing: 0.06em; padding: 8px 12px; min-width: 44px; text-align: center; border-radius: 999px; text-decoration: none; color: var(--text-2); transition: color 200ms ease, background-color 200ms ease; }
.lang a[aria-current] { background: var(--text); color: var(--space); }

/* hero: the stage where the old name goes dark and SmartSana Energies lights up */
.hero { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(84px, 14vh, 150px) var(--gutter) 0; }
.stage { position: relative; width: clamp(240px, 40vw, 520px); aspect-ratio: 1040 / 302; container-type: inline-size; }
.old, .new, .new img { position: absolute; inset: 0; width: 100%; height: 100%; }
.old { display: grid; place-items: center; }
.old-word { display: grid; justify-items: center; font-family: var(--display); line-height: 1; color: var(--text); }
.ow-name { font-size: 14.5cqi; font-weight: 700; letter-spacing: 0.1em; margin-right: -0.1em; white-space: nowrap; }
.ow-name span { display: inline-block; }
.ow-sub { font-size: 4.4cqi; font-weight: 600; letter-spacing: 0.55em; margin-right: -0.55em; margin-top: 3cqi; color: var(--text-2); }
.old-logo { width: 100%; height: 100%; object-fit: contain;
  -webkit-mask-image: linear-gradient(90deg, transparent var(--off), #000 calc(var(--off) + 22%)); mask-image: linear-gradient(90deg, transparent var(--off), #000 calc(var(--off) + 22%)); }
@property --off { syntax: "<percentage>"; inherits: false; initial-value: -22%; }
@property --rev { syntax: "<percentage>"; inherits: false; initial-value: 108%; }
.l-word { -webkit-mask-image: linear-gradient(90deg, #000 var(--rev), transparent calc(var(--rev) + 8%)); mask-image: linear-gradient(90deg, #000 var(--rev), transparent calc(var(--rev) + 8%)); }
.bloom { position: absolute; left: calc(11% - 34cqi); top: calc(50% - 34cqi); width: 68cqi; height: 68cqi; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 227, 163, 0.55), rgba(255, 200, 87, 0.22) 45%, rgba(255, 138, 61, 0) 100%); opacity: 0.28; }
.l-mark { transform-origin: 11% 50%; }

.formerly { margin: 18px 0 0; font: 700 0.8rem/1.4 var(--display); letter-spacing: 0.12em; text-transform: lowercase; color: var(--text-3); }
.hero h1 { margin-top: clamp(26px, 4.4vh, 44px); max-width: 20ch; font-size: clamp(1.9rem, 3.4vw, 3.2rem); line-height: 1.06; letter-spacing: -0.015em; }
.lead { margin: 18px 0 0; max-width: 60ch; font-size: 1.1rem; color: var(--text-2); }
.acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; font: 700 1rem/1.2 var(--display); text-decoration: none; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease; }
.btn:active { transform: scale(0.97); }
.btn-go { background: var(--gold); color: var(--gold-ink); }
.btn-go .ico { transition: transform 200ms var(--ease-out); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(10, 15, 26, 0.5); }
.replay { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--rule); border-radius: 999px; background: none; color: var(--text-3);
  font: 700 0.8rem/1 var(--display); letter-spacing: 0.12em; cursor: pointer; transition: color 200ms ease, border-color 200ms ease, transform 160ms var(--ease-out); }
.replay .ico { width: 15px; height: 15px; }
.replay:active { transform: scale(0.97); }
.replay[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  .btn-go:hover { background: var(--gold-hover); }
  .btn-go:hover .ico { transform: translateX(4px); }
  .btn-ghost:hover { border-color: var(--text-2); }
  .lang a:not([aria-current]):hover { color: var(--text); }
  .replay:hover { color: var(--gold); border-color: rgba(255, 200, 87, 0.5); }
  .rows a:hover { color: var(--gold); text-decoration-color: var(--gold); }
}

/* the night horizon: Cameroon from orbit, our office lit */
.night { position: relative; margin: clamp(-48px, -3vw, -16px) 0 0; height: clamp(260px, 40vh, 440px); }
.night svg { display: block; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 38%, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 38%, #000 72%, transparent 100%); }
.night image { opacity: 0.85; }
.borders path { fill: none; stroke: var(--rule); stroke-width: 0.7; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.borders .cemac { stroke-dasharray: 3 3; }
.borders .home { stroke: var(--text); stroke-width: 1.3; fill: rgba(255, 200, 87, 0.025); stroke-dasharray: none; }
.hq circle { transform-box: fill-box; transform-origin: center; }
.hq-core { fill: #FFF4D6; }
.hq-ring { fill: none; stroke: var(--gold); stroke-width: 1.6; opacity: 0; }
.chip { position: absolute; left: var(--gutter); bottom: 24px; transform: translateY(-50%); margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(4, 6, 11, 0.8); box-shadow: inset 0 0 0 1px var(--rule);
  font: 700 0.78rem/1.2 var(--display); letter-spacing: 0.1em; color: var(--gold); white-space: nowrap; }
.chip.placed { bottom: auto; }

/* rows between hairlines */
.contact, .faq { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 5vw, 80px); max-width: 1180px; margin: 0 auto; padding: var(--section) var(--gutter) 0; }
.contact h2, .faq h2 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.06; letter-spacing: -0.015em; }
.rows { margin: 0; border-bottom: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: minmax(190px, 2fr) 5fr; gap: 8px 24px; padding: 18px 0; border-top: 1px solid var(--rule); }
.row dt { font: 700 0.8rem/1.6 var(--display); letter-spacing: 0.12em; text-transform: lowercase; color: var(--gold); padding-top: 2px; }
.row dd { margin: 0; font: 700 1.05rem/1.5 var(--display); color: var(--text); }
.rows a { text-decoration-color: rgba(255, 200, 87, 0.45); transition: color 200ms ease, text-decoration-color 200ms ease; }
.qa .row { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
.qa dt { font: 700 1.1rem/1.4 var(--display); letter-spacing: 0; text-transform: none; color: var(--text); padding: 0; }
.qa dd { font: 400 1.0625rem/1.62 "Nunito", system-ui, sans-serif; color: var(--text-2); max-width: 64ch; }

.foot { max-width: 1180px; margin: var(--section) auto 0; padding: 40px var(--gutter) 48px; border-top: 1px solid var(--rule); color: var(--text-3); font-size: 0.86rem; }
.foot img { width: 150px; height: auto; margin-bottom: 18px; }
.foot p { margin: 4px 0 0; }

/* ignition: runs once on load (body.play), replayable */
.play .old { animation: appear 420ms var(--ease-out) both 120ms; }
.play .ow-name span { animation: off 520ms var(--ease-out) both; animation-delay: calc(900ms + var(--i) * 45ms); }
.play .ow-sub { animation: off 520ms var(--ease-out) both 1180ms; }
.play .old-logo { animation: logo-off 820ms var(--ease-in-out) both 950ms; }
.play .bloom { animation: bloom 1600ms var(--ease-out) both 1240ms; }
.play .l-mark { animation: ignite 680ms var(--ease-out) both 1300ms; }
.play .l-word { animation: sweep 780ms var(--ease-in-out) both 1580ms; }
.play .l-energies { animation: rise 480ms var(--ease-out) both 2200ms; }
.play .formerly { animation: rise 420ms var(--ease-out) both 2480ms; }
.play .hq-bloom { animation: ignite-hq 900ms var(--ease-out) both 1300ms; }
.play .hq-core { animation: ignite-hq 500ms var(--ease-out) both 1300ms; }
.play .hq-ring { animation: ping 1600ms var(--ease-out) 3 1800ms; }
.play .replay { animation: rise 400ms var(--ease-out) both 2900ms; }
/* the old name is gone once the sequence ends (kept for replay) */
.old .ow-name span, .old .ow-sub, .old .old-logo { opacity: 0; }

@keyframes appear { from { opacity: 0; filter: blur(6px); transform: scale(0.97); } }
@keyframes off { 0% { opacity: 1; filter: none; transform: none; } 40% { opacity: 0.5; color: var(--line); } 100% { opacity: 0; filter: blur(8px); transform: translateY(-3px); } }
@keyframes ignite { from { opacity: 0; transform: scale(0.94); filter: blur(10px) brightness(1.8); } }
@keyframes bloom { 0% { opacity: 0; transform: scale(0.5); } 35% { opacity: 0.95; transform: scale(1); } 100% { opacity: 0.28; transform: scale(1.12); } }
@keyframes sweep { 0% { --rev: 14%; filter: blur(3px); opacity: 0; } 12% { opacity: 1; } 100% { --rev: 108%; filter: none; opacity: 1; } }
@keyframes logo-off { 0% { --off: -22%; opacity: 1; filter: none; } 100% { --off: 100%; opacity: 0.3; filter: blur(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(7px); filter: blur(2px); } }
@keyframes ignite-hq { from { opacity: 0; transform: scale(0.3); } }
@keyframes ping { 0% { opacity: 0.75; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }

@media (prefers-reduced-motion: reduce) {
  .play *, .play *::before { animation: none !important; }
  .old { display: none; }
  .replay { display: none !important; }
  .btn, .btn .ico { transition: none; }
}

@media (max-width: 760px) {
  .hero { padding-top: 92px; }
  .stage { width: min(78vw, 360px); }
  .formerly { font-size: 0.8rem; letter-spacing: 0.1em; }
  .hero h1 { font-size: clamp(1.75rem, 8.4vw, 2.3rem); }
  .lead { font-size: 1.04rem; }
  .acts { flex-direction: column; align-self: stretch; }
  .night { height: 300px; margin-top: 4px; }
  .contact, .faq { grid-template-columns: 1fr; padding-top: 64px; gap: 22px; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .foot { margin-top: 72px; }
}
