/* ============================================================
   BlueVolume — design tokens
   Ink & signal: a deep navy ground with a bright "volume" blue,
   plus a single warm amber spark for the loudest moment on the page.
   ============================================================ */
:root {
  --ink: #0b1220;
  --paper: #eff4fb;
  --signal: #2fa8ff;
  --signal-deep: #145ca6;
  --spark: #ff7a45;
}

/* Light (default) */
:root,
[data-theme="light"] {
  --bg: var(--paper);
  --surface: #ffffff;
  --text: var(--ink);
  --text-muted: #55678a;
  --border: rgba(11, 18, 32, 0.1);
  --accent: var(--signal-deep);
  --accent-hover: #0e4a87;
  --cta-bg: var(--signal-deep);
  --cta-text: #ffffff;
}

/* Dark */
[data-theme="dark"] {
  --bg: var(--ink);
  --surface: #121b2e;
  --text: #eaf2ff;
  --text-muted: #8ca3c6;
  --border: rgba(234, 242, 255, 0.1);
  --accent: var(--signal);
  --accent-hover: #6cc4ff;
  --cta-bg: var(--signal);
  --cta-text: var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink);
    --surface: #121b2e;
    --text: #eaf2ff;
    --text-muted: #8ca3c6;
    --border: rgba(234, 242, 255, 0.1);
    --accent: var(--signal);
    --accent-hover: #6cc4ff;
    --cta-bg: var(--signal);
    --cta-text: var(--ink);
  }
}

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

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

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(color-mix(in srgb, var(--text-muted) 14%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3 {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  margin: 0;
}

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

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  color: var(--text);
}

.logo:hover {
  text-decoration: none;
}

.logo .weight-strong {
  font-weight: 800;
  color: var(--signal);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header nav a {
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-header nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9375rem;
  transition: color 0.15s, border-color 0.15s;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--signal);
}

.theme-icon {
  display: none;
}

.theme-icon.active {
  display: inline;
}

/* ============================================================
   Volume meter mark — small recurring signature icon
   ============================================================ */
@keyframes meter-pulse {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.22); }
}

.meter-mini {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.15rem;
  height: 0.75rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.meter-mini span {
  width: 0.1875rem;
  border-radius: 999px;
  background: var(--signal);
  animation: meter-pulse 2.2s ease-in-out infinite;
}

.meter-mini span:nth-child(1) { height: 45%; animation-delay: 0s; }
.meter-mini span:nth-child(2) { height: 100%; background: var(--spark); animation-delay: 0.2s; }
.meter-mini span:nth-child(3) { height: 65%; animation-delay: 0.1s; }

@media (prefers-reduced-motion: reduce) {
  .meter-mini span {
    animation: none;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1;
  width: 100%;
  scroll-margin-top: 4.5rem;
}

.hero::before {
  content: "";
  position: absolute;
  top: -25%;
  right: -15%;
  width: 50rem;
  height: 50rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--signal) 14%, transparent), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

#software {
  scroll-margin-top: 4.5rem;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(2rem, 6vw, 3rem);
  max-width: 68rem;
  width: 100%;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
}

.hero-copy {
  max-width: 34rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  margin: 0 0 1.25rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.hero-title .weight-strong {
  font-weight: 800;
  color: var(--signal);
}

.hero-tagline {
  margin: 0 0 1.25rem;
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  font-weight: 600;
  color: var(--text);
}

.hero-intro {
  margin: 0 0 2rem;
  max-width: 38ch;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.cta {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--cta-bg);
  color: var(--cta-text) !important;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px var(--signal);
}

/* ============================================================
   Software section
   ============================================================ */
.software {
  position: relative;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.software-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 5.5rem) 1.5rem;
}

.software h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.section-intro {
  margin: 0 0 2.5rem;
  max-width: 42ch;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.product-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.product-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--bg);
  transition: border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--signal), var(--signal-deep));
  z-index: 1;
}

.product-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--spark), #c24e1f);
}

.product-card:hover {
  border-color: var(--signal);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -22px color-mix(in srgb, var(--signal) 55%, transparent);
}

.product-card:nth-child(2):hover {
  box-shadow: 0 20px 40px -22px color-mix(in srgb, var(--spark) 55%, transparent);
}

.product-card:hover .product-kind {
  color: var(--text);
}

.product-card:hover .product-link {
  transform: translateX(3px);
}

.product-kind {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.product-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.product-tagline {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent);
}

.product-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.product-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.product-link {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.product-link-secondary {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.product-link-secondary:hover {
  color: var(--accent);
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   Page content (privacy, etc.)
   ============================================================ */
.page-content {
  flex: 1;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  width: 100%;
}

.page-content h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 500;
}

.page-content .updated {
  margin: 0 0 2rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.page-content section {
  margin-bottom: 1.75rem;
}

.page-content section h2 {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-content section p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-signature {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.site-footer p {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 640px) {
  .site-header {
    padding: 1.25rem 2rem;
  }

  .page-content {
    padding: 3rem 2rem 4rem;
  }

  .site-footer {
    padding: 1.5rem 2rem;
  }
}

/* ============================================================
   Scroll reveal
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--reveal-i, 0) * 0.08s);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
