/* =========================================================
   THEME COLOR PALETTES
   ========================================================= */

/* 1. DARK THEME (Deep Obsidian + Neon Laser Green) */
[data-theme="dark"] {
  --bg: #0A1128;
  --bg-soft: #111B36;
  --nav-grey: #172448;
  --ink: #F8FAFC;
  --muted: #94A3B8;
  --line: #1E293B;
  --accent: #00FF66; /* Neon Green Accent */
  --accent-dim: rgba(0, 255, 102, 0.15);
  --btn-ink: #0A1128;
}

/* 2. LIGHT THEME (Off-White + Bamboo Green) */
[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-soft: #F7F7F5;
  --nav-grey: #D3D3D3;
  --ink: #0B0B0A;
  --muted: #6E6E6B;
  --line: #E4E4E1;
  --accent: #00FF66; /* Bamboo Green Accent */
  --accent-dim: #E6F4EA;
  --btn-ink: #FFFFFF;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

img, svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.tag-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brandtype {
  font-family: 'Inter', sans-serif;
  letter-spacing: .04em;
}

/* =========================================================
   HEADER
   ========================================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-grey);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s ease;
}

nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand .mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.brand .word {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--ink);
  text-transform: lowercase;
}

.brand .word .accent-dot {
  color: var(--accent);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle Pill Switch */
.theme-toggle-btn {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--accent);
}

.kebab-wrap {
  position: relative;
}

.kebab-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}

.kebab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.kebab-btn svg {
  width: 4px;
  height: 18px;
}

.kebab-dots circle {
  fill: var(--ink);
}

.kebab-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 160px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.kebab-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.kebab-menu a {
  display: block;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: background .12s ease;
}

.kebab-menu a:hover {
  background: var(--bg);
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 120px 32px 80px;
  background: var(--bg);
  overflow: hidden;
}

.hero-bg-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(90vw, 900px);
  height: min(90vw, 900px);
  transform: translate(-50%, -50%);
  opacity: 0.04;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero .eyebrow {
  color: var(--accent);
  margin-bottom: 26px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.hero .eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  overflow: hidden;
}

.hero h1 .line {
  display: block;
  overflow: hidden;
}

.hero h1 .line span {
  display: block;
  will-change: transform;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .subcap {
  font-size: 18px;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto 44px;
  line-height: 1.5;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--btn-ink);
  font-size: 15px;
  font-weight: 700;
  padding: 17px 30px;
  border-radius: 100px;
  box-shadow: 0 0 20px var(--accent-dim);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-dim);
}

.cta-btn svg {
  width: 16px;
  height: 16px;
  transition: transform .18s ease;
}

.cta-btn:hover svg {
  transform: translateX(3px);
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.scroll-cue .stem {
  width: 1px;
  height: 34px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.scroll-cue .stem::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollcue 1.8s ease-in-out infinite;
}

@keyframes scrollcue {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* =========================================================
   ABOUT SECTION
   ========================================================= */
#about {
  padding: 120px 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-line {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(24px, 3.6vw, 42px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.about-line .fade-word {
  opacity: 0.2;
  transition: opacity .4s ease;
}

.about-line .fade-word.lit {
  opacity: 1;
}

/* =========================================================
   PROCESS (ANIMATED LAYER BUILD)
   ========================================================= */
#process {
  position: relative;
  background: var(--bg-soft);
  color: var(--ink);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.process-pin {
  min-height: 680px;
  padding: 110px 0;
  display: flex;
  align-items: center;
}

.process-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.process-visual {
  aspect-ratio: 1/1;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.process-visual svg {
  width: 100%;
  height: 100%;
}

.layer-stroke {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.layer-stroke.hot {
  stroke: var(--accent);
}

.process-copy .tag-mono {
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}

.process-steps {
  position: relative;
  height: 170px;
}

.process-step {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease;
}

.process-step.active {
  opacity: 1;
  transform: translateY(0);
}

.process-step .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
}

.process-step h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 28px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.process-step p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 380px;
}

.process-progress {
  display: flex;
  gap: 8px;
  margin-top: 36px;
}

.process-progress .dot {
  height: 2px;
  flex: 1;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.process-progress .dot i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
}

/* =========================================================
   FEATURES SECTION
   ========================================================= */
#features {
  background: var(--bg);
  position: relative;
}

.feature-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.feature-bg {
  position: absolute;
  inset: -10% -5%;
  opacity: 0.25;
  will-change: transform;
}

.feature-bg svg {
  width: 100%;
  height: 100%;
}

.feature-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
  opacity: 0;
  transform: translateY(36px);
}

.feature-copy .tag-mono {
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.feature-copy h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.08;
}

.feature-copy p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 420px;
}

.feature-panel.right .feature-copy {
  margin-left: auto;
  text-align: right;
}

.feature-panel.right .feature-copy p {
  margin-left: auto;
}

/* =========================================================
   FOOTER & CTA
   ========================================================= */
#contact {
  padding: 150px 0 100px;
  text-align: center;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

#contact h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 52px);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

#contact p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 40px;
}

footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.foot-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.foot-brand {
  font-size: 14px;
}

.foot-links {
  display: flex;
  gap: 26px;
  font-size: 13.5px;
  color: var(--muted);
}

.foot-links a:hover {
  color: var(--ink);
}

.foot-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--muted);
}

/* Responsive Adjustments */
@media (max-width: 900px) {
  .process-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .process-steps {
    text-align: center;
  }

  .process-step p {
    margin: 0 auto;
  }

  .process-visual {
    margin: 0 auto;
    max-width: 280px;
  }

  .feature-panel.right .feature-copy {
    margin-left: 0;
    text-align: left;
  }

  .feature-panel.right .feature-copy p {
    margin-left: 0;
  }
}

.printer {
  aspect-ratio: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.printer svg { width: 100%; height: 100%; display: block; overflow: visible; }
.print-base { fill: none; stroke: var(--muted); stroke-width: 4; stroke-linecap: round; }
.layer-stack { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; filter: url(#filamentGlow); }
.printed-layer { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; filter: url(#filamentGlow); }
.print-head { filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .24)); }
.head-body { fill: var(--ink); stroke: var(--line); stroke-width: 3; }
.head-hotend { fill: #ff7a00; stroke: #ffb26b; stroke-width: 2; }
.live-filament { stroke: var(--accent); stroke-width: 7; stroke-linecap: round; filter: url(#filamentGlow); }

@media (max-width: 900px) {
  .printer { max-width: 280px; }
}
