/* RawWatts web — tokens mirror the app (rawwatts-ios/RawWatts/UI/Theme.swift) */

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0B0B0C;
  --surface: #17181A;
  --raised: #24262A;
  --line: #2A2C30;
  --text: #F4F4F2;
  --soft: #C9CBCF;
  --muted: #9A9DA3;
  --accent: #D4FF3A;
  --below: #5AA9FF;
  --above: #FF9F43;

  --font-display: "Barlow Condensed", "SF Pro Display Condensed", "Arial Narrow", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --max: 1120px;
  --read: 680px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--text); text-decoration-color: var(--muted); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 max(var(--gutter), 4vw);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Brand ─────────────────────────────────────────────── */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-family: var(--font-display); font-weight: 700;
  font-size: 24px; letter-spacing: 0.01em; line-height: 1;
}
.mark { width: 30px; height: 30px; flex: none; }

.site-header { padding: 22px 0; }

/* ── Shared type ───────────────────────────────────────── */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--soft);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(212, 255, 58, 0.15);
}
.dot-above { background: var(--above); box-shadow: 0 0 0 4px rgba(255, 159, 67, 0.15); }

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.92;
  margin: 22px 0 0;
  font-size: clamp(48px, 8.4vw, 116px);
}
.accent { color: var(--accent); }
h1 .line { white-space: nowrap; }

.lead { font-size: clamp(18px, 2.1vw, 21px); color: var(--soft); max-width: 34em; margin: 28px 0 0; }
.lead strong { color: var(--text); font-weight: 600; }

.link-go {
  font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--accent); padding-bottom: 2px;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero { padding: clamp(40px, 9vh, 110px) 0 clamp(64px, 12vh, 140px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: end;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}

.compat { color: var(--muted); font-size: 15px; margin: 14px 0 0; }

/* Signup */
.signup { margin-top: 40px; max-width: 520px; }
.signup-row { display: flex; gap: 8px; }
.signup input[type="email"] {
  flex: 1; min-width: 0;
  height: 56px; padding: 0 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font: inherit; font-size: 17px;
}
.signup input[type="email"]::placeholder { color: var(--muted); }
.signup input[type="email"]:focus { outline: none; border-color: var(--accent); }
.signup button {
  height: 56px; padding: 0 24px;
  border: 0; border-radius: 14px;
  background: var(--accent); color: var(--bg);
  font-family: var(--font-display); font-weight: 700;
  font-size: 20px; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.signup button:hover { filter: brightness(1.06); }
.signup button:active { transform: scale(0.98); }

.consent {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 14px;
  font-size: 14px; line-height: 1.45; color: var(--muted);
  cursor: pointer;
}
.consent input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.consent a { color: var(--soft); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 480px) {
  .signup-row { flex-direction: column; }
  .signup button { width: 100%; }
}

/* Decorative bars — the app icon, big */
.hero-bars {
  display: none;
  height: 400px;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 16px;
}
@media (min-width: 900px) { .hero-bars { display: flex; } }
.hero-bars span {
  display: block; width: 64px; border-radius: 14px;
  background: var(--raised);
  transform-origin: bottom;
  animation: rise 0.9s cubic-bezier(.2, .8, .2, 1) both;
}
.hero-bars span:nth-child(1) { height: 37%; animation-delay: 0.05s; }
.hero-bars span:nth-child(2) { height: 57%; animation-delay: 0.15s; }
.hero-bars span:nth-child(3) { height: 78%; animation-delay: 0.25s; background: var(--accent); }
.hero-bars span:nth-child(4) { height: 100%; animation-delay: 0.35s; background: var(--accent); }
@keyframes rise { from { transform: scaleY(0.08); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .hero-bars span { animation: none; } }

/* ── Simple message pages (thanks, 404) ────────────────── */
.page-msg { padding-top: clamp(48px, 10vh, 120px); padding-bottom: 120px; }
.page-msg h1 { font-size: clamp(48px, 9vw, 96px); }
.page-msg .lead { margin-bottom: 36px; }

/* ── Legal pages ───────────────────────────────────────── */
.legal {
  max-width: calc(var(--read) + 2 * max(var(--gutter), 4vw));
  padding-top: 48px; padding-bottom: 110px;
}
.legal-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lang-pill {
  font-size: 13px; color: var(--soft); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.lang-pill:hover { border-color: var(--accent); }
.legal h1 { font-size: clamp(44px, 8vw, 72px); }
.legal-meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 20px; padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase;
}
.legal .callout {
  margin-top: 36px; padding: 20px 22px;
  background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 14px 14px 0;
  color: var(--soft);
}
.callout-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.legal-section { margin-top: 40px; scroll-margin-top: 24px; }
.legal-section h2 {
  display: flex; align-items: baseline; gap: 14px;
  margin: 0 0 12px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 26px; letter-spacing: 0.01em; line-height: 1.15;
}
.legal-n { font-size: 15px; color: var(--accent); font-variant-numeric: tabular-nums; }
.legal-section p { margin: 0 0 12px; color: var(--soft); }
.legal-section strong { color: var(--text); font-weight: 600; }
.legal-links {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 15px;
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: #0E0E10;
  padding: 40px 0 32px;
  font-size: 14px;
  color: var(--muted);
}
.footer-top {
  display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding-bottom: 28px; border-bottom: 1px solid var(--line);
}
.footer-brand p { margin: 12px 0 0; }
.footer-brand .brand { font-size: 22px; }
.footer-brand .mark { width: 26px; height: 26px; }
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-content: flex-start;
}
.footer-legal a, .footer-fine a { color: var(--soft); text-decoration: none; }
.footer-legal a:hover, .footer-fine a:hover { color: var(--accent); }
.footer-fine {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 20px; font-size: 13px;
}

/* Homepage: center the hero in the viewport on tall screens */
.home main { display: flex; align-items: center; }
.home .hero { width: 100%; }
