/* ============================================================
   REVOLTECH SMARTIE — Design tokens & core styles
   ============================================================ */

:root {
  /* Color */
  --bg: #0A0E12;
  --bg-raised: #11161C;
  --panel: #1A2129;
  --panel-border: #2A3540;
  --text: #E8EDF0;
  --text-dim: #7A8A94;
  --text-faint: #4D5A63;
  --accent: #5BA3C4;
  --accent-bright: #7FC4E8;
  --accent-dim: #2E4A57;
  --warn: #F0A04B;
  --warn-dim: #4A3A24;
  --good: #6FBF8E;
  --line: #232C34;

  /* Type */
  --font-display: "Space Grotesk", "IBM Plex Sans", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Layout */
  --container: 1180px;
  --gutter: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(91,163,196,0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 110% 10%, rgba(240,160,75,0.04), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

p { color: var(--text-dim); }

.lede {
  font-size: 1.2rem;
  color: var(--text-dim);
  max-width: 640px;
  line-height: 1.6;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,18,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand .brand-mark {
  color: var(--accent-bright);
}

.brand .brand-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-size: 0.88rem;
  color: var(--text-dim);
  transition: color 0.15s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.nav-cta {
  background: var(--accent);
  color: #07111A !important;
  padding: 9px 18px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.nav-cta:hover { background: var(--accent-bright); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--text);
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { 
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 20px var(--gutter) 28px;
    gap: 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.92rem;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #07111A;
}
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--panel-border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

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

section { padding: 96px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

@media (max-width: 700px) {
  section { padding: 64px 0; }
}

/* ---------- Panels / Cards ---------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 28px;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
}

/* ---------- Stat readout (signature element) ---------- */

.readout {
  font-family: var(--font-mono);
  background: var(--bg-raised);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.readout::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.readout-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.readout-value {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--accent-bright);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.readout-value .unit {
  font-size: 1rem;
  color: var(--text-dim);
}

.readout-sub {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 6px;
}

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--good);
  display: inline-block;
  box-shadow: 0 0 6px var(--good);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* sparkline */
.spark {
  width: 100%;
  height: 36px;
  margin-top: 10px;
}
.spark path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0.8;
}
.spark .fill {
  fill: url(#sparkGradient);
  stroke: none;
  opacity: 0.5;
}

/* ---------- Stat strip ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.stat-strip .stat {
  background: var(--bg-raised);
  padding: 26px 20px;
  text-align: center;
}

.stat .num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent-bright);
}

.stat .label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}

@media (max-width: 800px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Numbered list item (process) ---------- */

.step {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.step:first-child { border-top: none; }

.step .step-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.95rem;
  flex-shrink: 0;
  width: 36px;
}

.step h4 { margin-bottom: 6px; }

/* ---------- Feature card ---------- */

.feature {
  padding: 26px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.feature .icon {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent-bright);
}

.feature h4 { margin-bottom: 8px; }
.feature p { font-size: 0.92rem; }

/* ---------- Quote / kernbotschaft ---------- */

.kernbotschaft {
  border-left: 3px solid var(--accent);
  padding: 22px 28px;
  background: var(--bg-raised);
  border-radius: 0 6px 6px 0;
}

.kernbotschaft .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.kernbotschaft p {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ---------- Table ---------- */

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
th { color: var(--text-faint); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
td { color: var(--text-dim); }
tr:hover td { color: var(--text); }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(135deg, var(--bg-raised), var(--panel));
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 56px;
  text-align: center;
}

@media (max-width: 700px) {
  .cta-band { padding: 36px 22px; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
  padding: 56px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-grid h4 {
  font-size: 0.85rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--text-dim); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--accent-bright); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Page hero (sub-pages) ---------- */

.page-hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 { margin-bottom: 18px; }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.tag-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 100px;
  color: var(--text-dim);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 56px 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.logo-chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 10px 16px;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-chip .flag { color: var(--text-faint); font-size: 0.7rem; }

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
