/*
 * WattVibe website. The look is the showcase presentation's (ems-prototype, showcase/src/index.css,
 * dark theme): a near-black canvas, one energy accent from the bolt, Manrope headlines over Inter
 * text, panels with a hairline border, motion only where power flows. Blue means energy (driver app
 * foundations, UXUI-Draft-MW D35), so the main buttons are neutral: white on dark.
 */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  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-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  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: 'Manrope Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/manrope-latin-ext-wght-normal.woff2) format('woff2-variations');
  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-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/manrope-latin-wght-normal.woff2) format('woff2-variations');
  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 {
  color-scheme: dark;
  --font-sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Manrope Variable', 'Inter Variable', ui-sans-serif, system-ui, sans-serif;

  /* Ink and roles, as in the showcase's dark theme. */
  --ink-950: #0c0e13;
  --ink-900: #12151c;
  --ink-700: #2a303c;
  --ink-400: #8a93a6;
  --ink-200: #d9dee7;
  --ink-50: #f6f8fb;

  --canvas: #07090d;
  --surface: var(--ink-900);
  --line: #222834;
  --line-strong: #323a48;
  --fg: var(--ink-50);
  --fg-2: var(--ink-200);
  --muted: var(--ink-400);

  /* The wordmark's "vibe" blue, for the headline's last word, as the logo pairs white and blue. */
  --brand-cyan: #28c5fd;
  /* The bolt's blue, for energy only. The wave's pulse uses the full energy gradient (wave.mjs). */
  --energy: #3e89f9;
  --energy-ink: #7fb2ff;
  --energy-soft: color-mix(in oklab, var(--energy) 16%, transparent);
  /* Idle bars, as the showcase's price bars. */
  --bar: var(--ink-700);

  --radius-stage: 20px;
  --radius-panel: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--fg);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--energy-ink);
  text-decoration: none;
}

img,
svg {
  display: block;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--ink-950);
  font-weight: 600;
}
.skip:focus {
  top: 16px;
}

.wrap {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

.label-caps {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 36em;
  color: var(--fg-2);
  font-size: clamp(17px, 1.4vw, 19px);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font: 600 15px/1 var(--font-sans);
  white-space: nowrap;
  transition: background-color 0.15s;
}
.btn--primary {
  background: var(--fg);
  color: var(--ink-950);
}
.btn--primary:hover {
  background: #fff;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-stage);
  background: var(--surface);
}

/* Header */
.top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.top__logo img {
  width: auto;
  height: 28px;
}
.top__nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.top__nav a {
  color: var(--fg-2);
  font-size: 15px;
  font-weight: 500;
}
.top__nav a:hover {
  color: var(--fg);
}
.top__nav .top__lang {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.top__lang:hover {
  background: var(--surface);
}

/* Hero: the first screen, under the header, with the energy wave along its foot */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin-top: -80px;
  padding-top: 80px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -20% 0;
  background: radial-gradient(
    ellipse at 26% 34%,
    color-mix(in oklab, var(--energy) 18%, transparent),
    transparent 55%
  );
  pointer-events: none;
}
.hero__copy {
  position: relative;
  padding-block: clamp(32px, 7vh, 96px) 48px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--fg-2);
  font-size: 13.5px;
  font-weight: 600;
}
h1 {
  max-width: 13em;
  font-size: clamp(40px, 5.2vw + 6px, 88px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
h1 span {
  color: var(--brand-cyan);
}
.hero .lead {
  margin-top: 28px;
}
.hero .btn {
  margin-top: 36px;
}

/*
 * The energy wave: idle bars like the showcase's price bars, and a pulse in the energy gradient
 * running left to right through them every 7 s. Each bar's height (--h), pulse colour (--c) and
 * delay come from src/wave.mjs.
 */
.wave {
  position: relative;
  display: grid;
  grid-template-columns: repeat(64, minmax(0, 1fr));
  align-items: end;
  gap: clamp(3px, 0.5vw, 8px);
  height: clamp(88px, 17vh, 170px);
  margin-top: auto;
  padding-inline: clamp(8px, 2vw, 24px);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.wave span {
  height: calc(var(--h) * 100%);
  border-radius: 3px 3px 0 0;
  background-color: var(--bar);
  transform-origin: 50% 100%;
  animation: wv-flow 7s linear infinite;
}
@keyframes wv-flow {
  0% {
    background-color: var(--bar);
    transform: none;
  }
  5%,
  10% {
    background-color: var(--c);
    transform: scaleY(1.06);
  }
  28%,
  100% {
    background-color: var(--bar);
    transform: none;
  }
}

/* Sections */
.section {
  padding: 120px 0;
}
.section__head {
  max-width: 820px;
}
.section__head h2 {
  margin-top: 12px;
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 800;
  line-height: 1.06;
}
.section__head .lead {
  margin-top: 20px;
}
.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}
.card h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card p {
  color: var(--fg-2);
  font-size: 15.5px;
}
.tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--energy-soft);
  color: var(--energy-ink);
}

/* Contact */
.section--contact {
  padding-top: 0;
}
.contact {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 5vw, 64px);
}
.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 12% 0%,
    color-mix(in oklab, var(--energy) 18%, transparent),
    transparent 60%
  );
  pointer-events: none;
}
.contact > * {
  position: relative;
}
.contact h2 {
  margin-top: 12px;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.06;
}
.contact .lead {
  margin-top: 16px;
}
.contact .btn {
  margin-top: 32px;
}

/* Footer */
.foot {
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
}
.foot__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  color: var(--muted);
  font-size: 14px;
}
.foot__bar img {
  width: auto;
  height: 22px;
}
.foot__bar a {
  margin-left: auto;
  color: var(--fg-2);
}
.foot__legal {
  max-width: 72em;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .pillars {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(1200px, 100% - 32px);
  }
  .section {
    padding: 80px 0;
  }
  .section--contact {
    padding-top: 0;
  }
  .wave {
    grid-template-columns: repeat(32, minmax(0, 1fr));
  }
  .wave span:nth-child(2n) {
    display: none;
  }
  .card {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .wave span {
    animation: none;
  }
  .btn {
    transition: none;
  }
}
