/* Powergen Energy: site styles
   Palette and type follow the v6 investor dashboard (see handoff/spec.md).
   Rule: never use text-transform. SAMtech and HENRItech are written exactly so. */

:root {
  --r-400: #c00000;   /* brand red */
  --r-600: #7a0000;
  --r-800: #2d0000;
  --r-200: #e06060;
  --muted: #c06060;
  --r-100: #f4b8b8;
  --r-020: #fae8e8;
  --border-strong: #e8c8c8;
  --r-010: #fdf5f5;
  --r-000: #ffffff;

  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gutter: clamp(24px, 11.11vw, 160px);
  --arrow-space: 140px;
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--r-800);
  background: var(--r-800);
  -webkit-font-smoothing: antialiased;
}

p, h1, h2, h3, ul, figure { margin: 0; }
img, video, svg { display: block; }

a { color: var(--r-400); }
a:hover { color: var(--r-600); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- Sections ---------- */

.section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 var(--gutter) var(--arrow-space);
}

.light { background: var(--r-010); }
.white { background: var(--r-000); }
.dark { background: var(--r-800); color: var(--r-000); }

.label {
  font-family: var(--mono);
  font-size: clamp(12px, 0.9vw, 13px);
  color: var(--r-400);
}
.dark .label { color: var(--r-200); }

h2 {
  font-size: clamp(30px, 3.06vw, 44px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.stack { display: flex; flex-direction: column; gap: 20px; }

.body-lg { font-size: clamp(17px, 1.39vw, 20px); line-height: 1.6; font-weight: 300; }
.body-md { font-size: clamp(17px, 1.25vw, 18px); line-height: 1.6; font-weight: 300; }

/* 12-column grid on wide screens, stacked below */
.cols { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1024px) {
  .cols {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
  }
  .col-a { grid-column: span 4; }
  .col-b { grid-column: 6 / span 7; }
}

/* ---------- Next-section arrows ---------- */

.next {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 96px;
  height: 96px;
  margin-left: -48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--r-800);
}
.next:hover { color: var(--r-800); }
.hero .next, .headline .next, .hero .next:hover, .headline .next:hover { color: var(--r-000); }
.next svg {
  width: 66px;
  height: 66px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .next svg { transition: transform 0.25s ease; }
}
.next:hover svg { transform: translateY(8px); }

@media (max-width: 767px) {
  .next { width: 72px; height: 72px; margin-left: -36px; bottom: 20px; }
  .next svg { width: 60px; height: 60px; }
}

/* ---------- 1. Hero ---------- */

.hero {
  padding: 40px 80px;
  background: var(--r-800);
  color: var(--r-000);
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
}
.hero-nav { display: flex; align-items: center; gap: 32px; font-size: 15px; }
.hero-nav a { color: var(--r-020); text-decoration: none; }
.hero-nav a:hover { color: var(--r-000); }
.nav-button {
  border: 1px solid var(--muted);
  border-radius: 2px;
  padding: 10px 18px;
}
.nav-button:hover { border-color: var(--r-100); }

/* Logo: about 96% of the screen width (1380 of 1440), centre 40% down */
.hero-logo {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 40%;
  width: 95.833%;
  transform: translate(-50%, -50%);
}
.hero-logo img { width: 100%; height: auto; }

@media (max-width: 767px) {
  .hero { padding: 24px; }
  .hero-nav { gap: 20px; font-size: 14px; }
  .nav-button { padding: 12px 14px; }
  /* Stacked logo, same side margin as desktop, centre 46% down */
  .hero-logo { top: 46%; }
}

/* ---------- 2. Headline ---------- */

.headline {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--arrow-space);
  background: var(--r-400);
  color: var(--r-000);
}
.headline h1 {
  max-width: 1080px;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

/* ---------- 3. What we do ---------- */

.what { padding-top: clamp(80px, 17.8svh, 160px); }
.what .col-b { gap: 24px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}
.tags li {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 8px 14px;
}
@media (max-width: 767px) {
  .what .col-b { gap: 20px; }
  .tags { gap: 8px; margin-top: 0; }
  .tags li { font-size: 12px; padding: 6px 10px; }
}

/* ---------- 4. The inventors ---------- */

.inventors {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--arrow-space);
}
.inventors .cols { align-items: center; }

.video-figure { display: flex; flex-direction: column; gap: 12px; }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--r-800);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.caption {
  font-family: var(--mono);
  font-size: clamp(12px, 0.9vw, 13px);
  color: var(--r-600);
}

@media (max-width: 1023px) {
  .inventors { justify-content: flex-start; padding-top: 80px; }
}

/* ---------- 5. Technologies ---------- */

.downloads {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: clamp(80px, 13.3svh, 120px);
}

.cards { display: grid; gap: 24px; }
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px;
  background: var(--r-400);
  color: var(--r-000);
}
.card-label { font-family: var(--mono); font-size: 13px; color: var(--r-020); }
.card h3 { font-size: 40px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }

.stats {
  display: flex;
  gap: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-size: 36px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.stat-label { font-size: 14px; color: var(--r-020); }

/* Audio player: no download button, right-click blocked in site.js */
.player {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--r-600);
}
.play {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--r-000);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.play svg { width: 16px; height: 16px; fill: var(--r-600); }
.play .icon-pause { display: none; }
.player.is-playing .icon-play { display: none; }
.player.is-playing .icon-pause { display: block; }

.player-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.player-title { font-size: 15px; font-weight: 500; }
.track {
  position: relative;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}
/* Bigger hit area for the thin bar */
.track::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
.fill { width: 0%; height: 100%; background: var(--r-000); }
.player-time {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--r-020);
  font-variant-numeric: tabular-nums;
}

.sheet-button {
  align-self: flex-start;
  border: 0;
  border-radius: 2px;
  padding: 14px 24px;
  background: var(--r-000);
  color: var(--r-600);
  font: 500 15px var(--sans);
  cursor: pointer;
}
.sheet-button:hover { background: var(--r-020); }

@media (max-width: 767px) {
  .downloads { gap: 20px; }
  .cards { gap: 20px; }
  .card { gap: 18px; padding: 24px; }
  .card-label { font-size: 12px; }
  .card h3 { font-size: 30px; }
  .stats { flex-wrap: wrap; gap: 16px 24px; padding-top: 16px; }
  .stat { flex: 1 1 120px; }
  .stat-value { font-size: 26px; }
  .stat-label { font-size: 13px; }
  .player { gap: 12px; padding: 12px; }
  .play svg { width: 14px; height: 14px; }
  .player-main { gap: 6px; }
  .player-title { font-size: 14px; }
  .player-time { font-size: 12px; }
  .sheet-button { align-self: stretch; padding: 14px 20px; }
}

/* ---------- 6. Contact ---------- */

.contact {
  display: flex;
  flex-direction: column;
  padding-top: clamp(64px, 17.8svh, 160px);
  padding-bottom: 40px;
}
.contact-cols { flex-grow: 1; }
@media (min-width: 1024px) {
  .contact-cols .col-a { grid-column: span 5; }
  .contact-cols .col-b { grid-column: 7 / span 6; }
}

.contact h2 { font-size: clamp(36px, 3.9vw, 56px); letter-spacing: -0.02em; }
.contact .intro { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.6; font-weight: 300; color: var(--r-100); }
.details { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; font-size: clamp(16px, 1.25vw, 18px); }
.details a, .details a:hover { color: var(--r-000); }
.details .phone { text-decoration: none; }
.details p { color: var(--r-100); }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.name-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--r-100);
}
.contact-form input, .contact-form textarea {
  height: 48px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 2px;
  color: var(--r-000);
  font: 16px var(--sans);
}
.contact-form textarea { height: 160px; padding: 14px; resize: none; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--r-100); }

.button-primary {
  align-self: flex-start;
  border: 0;
  border-radius: 2px;
  padding: 16px 32px;
  background: var(--r-400);
  color: var(--r-000);
  font: 500 15px var(--sans);
  cursor: pointer;
}
.button-primary:hover { background: var(--r-600); }
.button-primary:disabled { opacity: 0.6; cursor: wait; }

/* Messages after sending the contact form or the IP notice */
.form-status:empty { display: none; }
.form-status { font-size: 15px; line-height: 1.5; }
.contact-form .form-status { color: var(--r-000); }
.contact-form .form-status.is-error { color: var(--r-100); }
.notice .form-status.is-error { color: var(--r-400); font-weight: 500; }

.turnstile:empty { display: none; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--r-600);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.site-footer a, .site-footer a:hover { color: var(--r-100); }

@media (max-width: 767px) {
  .contact { padding-bottom: 32px; }
  .contact .stack { gap: 16px; }
  .details { gap: 8px; margin-top: 0; }
  .contact-cols { gap: 24px; }
  .contact-form { gap: 14px; }
  .name-row { grid-template-columns: 1fr; gap: 14px; }
  .contact-form label { gap: 6px; font-size: 13px; }
  .contact-form input { height: 44px; padding: 0 12px; }
  .contact-form textarea { height: 96px; padding: 12px; }
  .contact-form .button-primary { align-self: stretch; padding: 14px; }
  .site-footer { margin-top: 48px; font-size: 12px; }
}

/* ---------- Frosted panel (dashboard style) ---------- */

.notice, .toast {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.80) 0%, rgba(255, 255, 255, 0.65) 100%);
  -webkit-backdrop-filter: blur(64px) saturate(1.8);
  backdrop-filter: blur(64px) saturate(1.8);
  border-radius: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.85);
  border-left: 1px solid rgba(255, 255, 255, 0.85);
  border-right: 1px solid rgba(255, 255, 255, 0.30);
  border-bottom: 1px solid rgba(255, 255, 255, 0.30);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
  color: var(--r-800);
}

/* ---------- IP notice popup ---------- */

.notice {
  width: min(600px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  overflow: auto;
}
.notice::backdrop { background: rgba(45, 0, 0, 0.18); }

.notice-form { display: flex; flex-direction: column; gap: 20px; padding: 40px; }
.notice-top { display: flex; justify-content: space-between; align-items: center; margin: -12px -12px -8px 0; }
.notice-product { font-family: var(--mono); font-size: 13px; color: var(--r-600); }
.notice-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--r-400);
  cursor: pointer;
}
.notice-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.notice h2 { font-size: 28px; font-weight: 500; letter-spacing: 0; }
.notice p { font-size: 15px; line-height: 1.6; }
.notice .notice-lead { font-weight: 500; }
.notice ul { padding-left: 20px; font-size: 14px; line-height: 1.6; display: flex; flex-direction: column; gap: 4px; }

.notice-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.notice-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--r-600); }
.notice-fields input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--r-800);
  font: 15px var(--sans);
}
.notice-fields input:focus { outline: none; border-color: var(--r-400); }

.notice .notice-small { font-size: 13px; color: var(--r-600); }

.notice-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.notice-actions .button-primary { padding: 14px 24px; }
.button-pale {
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 14px 24px;
  background: var(--r-010);
  color: var(--r-400);
  font: 400 15px var(--sans);
  cursor: pointer;
}
.button-pale:hover { background: var(--r-020); }

@media (max-width: 639px) {
  .notice-form { padding: 24px; gap: 16px; }
  .notice-top { margin-right: -8px; }
  .notice h2 { font-size: 24px; }
  .notice-fields { grid-template-columns: 1fr; }
  .notice-actions > * { flex: 1 1 100%; }
}

/* ---------- Investor note ---------- */

.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 24px;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.5;
}
