/* ── Variables ── */
:root {
  --primary: #8eff71;
  --primary-dim: #2be800;
  --surface: #0e0e0e;
  --surface-low: #131313;
  --surface-high: #20201f;
  --surface-highest: #262626;
  --on-surface: #ffffff;
  --on-surface-variant: #adaaaa;
  --secondary: #a68cff;
  --tertiary: #81ecff;
  --error: #ff6e84;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-headline: "Space Grotesk", sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0; }
body { background: var(--surface); color: var(--on-surface); font-family: var(--font-sans); }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--primary); color: #000; }

/* ── Utilities ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.text-primary { color: var(--primary); }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at center, var(--surface-highest) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.2;
}

.crt-scanline {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0.15;
  background: linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,.25) 50%),
              linear-gradient(90deg, rgba(255,0,0,.06), rgba(0,255,0,.02), rgba(0,0,255,.06));
  background-size: 100% 2px, 3px 100%;
}

.action-gradient { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%); }

/* ── Buttons ── */
.btn-primary {
  background: var(--primary); color: #000;
  padding: .5rem 1.5rem; font-family: var(--font-headline);
  font-weight: 700; text-transform: uppercase; font-size: .875rem;
  cursor: pointer; border: none; transition: filter .2s;
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-action {
  display: inline-flex; align-items: center; gap: .75rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: #000; font-weight: 700; font-size: 1.125rem;
  text-transform: uppercase; padding: 1.25rem 2.5rem;
  transition: filter .2s, transform .1s; cursor: pointer;
}
.btn-action:hover { filter: brightness(1.1); }
.btn-action:active { transform: scale(.95); }

.btn-action-xl { font-size: 1.5rem; padding: 2rem 4rem; box-shadow: 0 0 50px rgba(142,255,113,.3); }
.btn-action-xl:hover { transform: scale(1.05); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: .75rem;
  background: var(--surface-highest); color: var(--primary);
  border: 1px solid rgba(142,255,113,.2); font-weight: 700;
  font-size: 1.125rem; text-transform: uppercase; padding: 1.25rem 2.5rem;
  transition: background .2s;
}
.btn-secondary:hover { background: var(--surface-high); }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; height: 4rem;
  background: rgba(14,14,14,.8); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-highest);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem; z-index: 50;
}
.nav-logo-group { display: flex; align-items: center; gap: .5rem; }
.nav-logo-chip { display: inline-block; height: 2rem; width: auto; max-width: none; vertical-align: middle; }
.nav-logo-text { display: inline-block; height: 1rem; width: auto; max-width: none; vertical-align: middle; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { color: var(--on-surface-variant); font-size: .875rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; display: flex; align-items: center; gap: .5rem; transition: color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { font-size: .875rem; }
.footer-logo-group { display: flex; align-items: center; gap: .5rem; }
.footer-logo-chip { display: inline-block; height: 2rem; width: auto; vertical-align: middle; }
.footer-logo-text { display: inline-block; height: 1rem; width: auto; vertical-align: middle; }

/* ── Hero ── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 5rem 1.5rem 0; overflow: hidden; text-align: center;
}
.hero-content { position: relative; z-index: 10; max-width: 64rem; }
.hero-icon { width: 5rem; height: 5rem; background: rgba(142,255,113,.1); border: 1px solid rgba(142,255,113,.2); display: flex; align-items: center; justify-content: center; margin: 0 auto 2rem; }
.hero-icon-inner { width: 2.5rem; height: 2.5rem; background: var(--primary); }
.hero-logo { max-width: min(360px, 90vw); width: 100%; height: auto; margin: 0 auto 1.5rem; }
.hero-title { max-width: min(680px, 90vw); width: 100%; height: auto; margin: 0 auto 1.5rem; }
.hero-subtitle { font-family: var(--font-headline); font-size: clamp(1rem, 2.5vw, 1.875rem); color: var(--on-surface-variant); text-transform: uppercase; letter-spacing: .2em; margin-bottom: 3rem; max-width: 48rem; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 6rem; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem 4rem; opacity: .4; font-family: monospace; font-size: .625rem; text-transform: uppercase; letter-spacing: .4em; }
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 10; opacity: .6;
  animation: bounce 2s ease-in-out infinite;
}
.scroll-hint svg { width: 1.5rem; height: auto; }
.scroll-hint .icon-mouse { display: block; }
.scroll-hint .icon-finger { display: none; }
.scroll-wheel { animation: scroll-wheel 2s ease-in-out infinite; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
.hero-fade { position: absolute; bottom: 0; left: 0; width: 100%; height: 8rem; background: linear-gradient(to top, var(--surface), transparent); }

/* ── Sections ── */
.section { padding: 8rem 1.5rem; }
.section-low { background: var(--surface-low); }
.section-header { text-align: center; margin-bottom: 5rem; }
.section-title { font-family: var(--font-headline); font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 700; text-transform: uppercase; letter-spacing: -.05em; margin-bottom: 1rem; }
.section-desc { color: var(--on-surface-variant); font-size: 1.125rem; line-height: 1.7; max-width: 32rem; }
.section-desc.center { margin: 0 auto; text-align: center; text-transform: uppercase; letter-spacing: .1em; font-size: .875rem; }

.label { font-weight: 700; font-size: .75rem; letter-spacing: .3em; text-transform: uppercase; display: block; margin-bottom: 1rem; }
.label-tertiary { color: var(--tertiary); }
.label-secondary { color: var(--secondary); }

/* ── Two-col layout ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: stretch; }
.two-col.reverse .col-media { order: -1; }
.col-text { display: flex; flex-direction: column; gap: 0; }
.col-text .section-desc { margin-bottom: 2.5rem; }

/* ── Feature list ── */
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2.5rem; }
.feature-list li { display: flex; align-items: center; gap: 1rem; }
.feature-icon { width: 2.5rem; height: 2.5rem; background: rgba(142,255,113,.1); display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; transition: background .2s; }
.feature-list li:hover .feature-icon { background: rgba(142,255,113,.2); }
.feature-list span { font-weight: 500; text-transform: uppercase; letter-spacing: .05em; font-size: .875rem; }

/* ── Media frame ── */
.col-media { position: relative; display: flex; flex-direction: column; }
.media-frame { background: var(--surface-highest); padding: 4px; position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.media-img { width: 100%; flex: 1; object-fit: contain; display: block; min-height: 0; transition: filter .7s, opacity .5s; margin: auto; }
.media-img.grayscale { filter: grayscale(1) brightness(.75); }
.media-frame:hover .media-img.grayscale { filter: grayscale(0) brightness(1); }
.media-img.dim { opacity: .6; }
.media-frame:hover .media-img.dim { opacity: 1; }
.media-bar { display: flex; justify-content: space-between; padding: 1rem; font-family: monospace; font-size: .625rem; color: var(--on-surface-variant); text-transform: uppercase; letter-spacing: .1em; }
.media-border { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.1); pointer-events: none; }
.media-accent { position: absolute; bottom: -2rem; right: -2rem; width: 16rem; height: 16rem; background: rgba(142,255,113,.05); z-index: -1; }

/* ── Hardware Grid ── */
.hardware-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.hardware-card {
  background: var(--surface-low); padding: 3rem 1.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: background .3s, color .3s; gap: 0;
}
.hardware-card svg { opacity: .5; margin-bottom: 1.5rem; transition: opacity .3s; }
.hardware-card:hover svg { opacity: 1; }
.hw-name { font-family: var(--font-headline); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; letter-spacing: -.02em; }
.hw-chip { font-size: .625rem; color: var(--on-surface-variant); text-transform: uppercase; letter-spacing: .3em; margin-top: .75rem; transition: color .3s; }
.card-primary:hover { background: var(--primary); color: #000; }
.card-primary:hover .hw-chip { color: rgba(0,0,0,.6); }
.card-secondary:hover { background: var(--secondary); color: #000; }
.card-secondary:hover .hw-chip { color: rgba(0,0,0,.6); }
.card-tertiary:hover { background: var(--tertiary); color: #000; }
.card-tertiary:hover .hw-chip { color: rgba(0,0,0,.6); }
.card-error:hover { background: var(--error); color: #000; }
.card-error:hover .hw-chip { color: rgba(0,0,0,.6); }

/* ── Features Grid ── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card { background: var(--surface-highest); padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.feature-card h3 { font-family: var(--font-headline); font-size: 1.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: -.02em; margin: 1.5rem 0 1rem; }
.feature-card p { color: var(--on-surface-variant); font-size: .875rem; line-height: 1.7; }
.feature-large { grid-column: span 2; background: var(--surface); }
.feature-large h3 { font-size: 1.875rem; }
.feature-large p { font-size: 1.125rem; max-width: 40rem; }
.border-primary { border-left: 4px solid var(--primary); }
.feature-accent { background: var(--primary); }
.feature-accent h3 { font-family: var(--font-headline); font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: #000; text-transform: uppercase; line-height: .9; letter-spacing: -.05em; margin: 0 0 1.5rem; }
.feature-accent p { color: rgba(0,0,0,.8); font-weight: 500; font-size: 1.125rem; max-width: 36rem; }
.icon-primary { color: var(--primary); }
.icon-secondary { color: var(--secondary); }
.icon-tertiary { color: var(--tertiary); }

/* ── Config items ── */
.config-items { display: flex; flex-direction: column; gap: 2rem; }
.config-item { display: flex; gap: 1.5rem; align-items: flex-start; padding: 1.5rem; background: var(--surface-low); border-left: 2px solid; }
.border-secondary { border-color: rgba(166,140,255,.3); }
.border-tertiary { border-color: rgba(129,236,255,.3); }
.config-icon { padding: .75rem; flex-shrink: 0; }
.icon-bg-secondary { background: rgba(166,140,255,.1); color: var(--secondary); }
.icon-bg-tertiary { background: rgba(129,236,255,.1); color: var(--tertiary); }
.config-item h4 { font-family: var(--font-headline); font-weight: 700; text-transform: uppercase; font-size: .875rem; letter-spacing: .05em; margin-bottom: .5rem; }
.config-item p { font-size: .75rem; color: var(--on-surface-variant); line-height: 1.6; text-transform: uppercase; letter-spacing: .05em; }

/* ── CTA ── */
.cta-section { position: relative; padding: 12rem 1.5rem; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; background: var(--surface-low); }
.cta-content { position: relative; z-index: 10; }
.cta-title { font-family: var(--font-headline); font-size: clamp(3rem, 10vw, 8rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.05em; line-height: .85; margin-bottom: 2rem; }
.cta-desc { color: var(--on-surface-variant); font-size: clamp(1rem, 2vw, 1.5rem); max-width: 40rem; margin: 0 auto 4rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 300; }

/* ── Scroll Animations ── */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.reveal-left { transform: translateX(-40px); }
.reveal.reveal-right { transform: translateX(40px); }
.reveal.visible { opacity: 1; transform: translate(0); }

.reveal-scan {
  opacity: 0; position: relative; overflow: hidden;
  transition: opacity .01s;
}
.reveal-scan.visible { opacity: 1; }
.reveal-scan.visible::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 0%, var(--primary) 50%, transparent 100%);
  opacity: .4;
  animation: scan calc(.6s + var(--scan-delay, 0ms)) ease forwards;
  animation-delay: var(--scan-delay, 0ms);
  pointer-events: none;
}
@keyframes scan {
  0% { transform: translateY(-100%); opacity: .5; }
  100% { transform: translateY(200%); opacity: 0; }
}

.reveal-flicker {
  opacity: 0;
}
.reveal-flicker.visible {
  animation: flicker .5s ease forwards;
  animation-delay: var(--flicker-delay, 0ms);
}
@keyframes flicker {
  0%   { opacity: 0; }
  20%  { opacity: .8; }
  35%  { opacity: 0; }
  55%  { opacity: .9; }
  70%  { opacity: .2; }
  85%  { opacity: 1; }
  100% { opacity: 1; }
}

/* ── Image zoom (CSS-only :target) ── */
.img-zoom-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.9);
  align-items: center; justify-content: center;
  cursor: zoom-out;
}
.img-zoom-overlay:target { display: flex; }
.img-zoom-overlay img { max-width: 90vw; max-height: 90vh; width: auto; height: auto; object-fit: contain; cursor: default; }
.img-zoom-close { position: absolute; inset: 0; }
.media-img { cursor: zoom-in; }

/* ── Footer ── */
.footer { background: var(--surface); border-top: 1px solid var(--surface-highest); padding: 5rem 1.5rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 3rem; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; gap: 1rem; }
.footer-logo { width: 1.5rem; height: 1.5rem; background: var(--primary); }
.footer-name { font-family: var(--font-headline); font-weight: 900; font-size: 1.5rem; letter-spacing: -.05em; text-transform: uppercase; color: var(--primary); }
.footer-copy { font-size: .625rem; color: var(--on-surface-variant); text-transform: uppercase; letter-spacing: .3em; font-family: monospace; }
.footer-links { display: flex; gap: 4rem; }
.footer-col { display: flex; flex-direction: column; gap: 1rem; }
.footer-col a { color: var(--on-surface-variant); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; text-decoration: underline; text-decoration-color: var(--surface-highest); text-underline-offset: .5rem; transition: color .2s, text-decoration-color .2s; }
.footer-col a:hover { color: var(--primary); text-decoration-color: var(--primary); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col.reverse .col-media { order: 0; }
  .hardware-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .feature-large { grid-column: span 1; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 1.5rem; }
  .nav-links { display: none; }
  .nav-logo-chip { height: 1.33rem; width: auto; max-width: none; }
  .nav-logo-text { height: 0.67rem; width: auto; max-width: none; }
  .hero-logo { max-width: none; width: 40vw; margin-top: calc(1.25rem * 2 / 3 * 2 + 1.25rem * 0.5); }
  .hero-title { max-width: none; width: 70vw; }
  .scroll-hint { bottom: calc(2rem + 1.25rem * 1.75 + env(safe-area-inset-bottom, 0px)); }
  .scroll-hint .icon-mouse { display: none; }
  .scroll-hint .icon-finger { display: block; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-action, .btn-secondary { justify-content: center; }
  .btn-action-xl { padding: 1.5rem 2rem; font-size: 1.25rem; }
  .footer-inner { flex-direction: column; }
}
