@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/outfit-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1080px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
}

[data-theme="light"] {
  --bg: #fafaf8;
  --bg-alt: #f0f0ec;
  --surface: #ffffff;
  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.12);
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --accent: #d97706;
  --accent-hover: #b45309;
  --accent-glow: rgba(217, 119, 6, 0.1);
  --tag-bg: rgba(217, 119, 6, 0.06);
  --tag-text: #b45309;
  --tag-border: rgba(217, 119, 6, 0.15);
  --card-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
  --header-bg: rgba(250, 250, 248, 0.85);
  --hero-glow: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(217, 119, 6, 0.04) 0%, transparent 70%);
}

[data-theme="dark"] {
  --bg: #0e0e10;
  --bg-alt: #141418;
  --surface: #1a1a1e;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #e8e8e0;
  --text-muted: #7a7a6e;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.12);
  --tag-bg: rgba(245, 158, 11, 0.06);
  --tag-text: #fbbf24;
  --tag-border: rgba(245, 158, 11, 0.15);
  --card-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  --header-bg: rgba(14, 14, 16, 0.85);
  --hero-glow: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-icon {
  color: var(--accent);
  flex-shrink: 0;
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: color var(--transition);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color var(--transition), border-color var(--transition);
}

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

[data-theme="dark"] .icon-sun { display: inline; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: inline; }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 28px 80px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
}

.hero-content {
  position: relative;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 44px;
  letter-spacing: 0.3px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-1px);
}

/* Sections */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.section-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: -32px;
  margin-bottom: 40px;
  max-width: 640px;
  line-height: 1.6;
}

/* About */
.about-content {
  max-width: 700px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.about-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.75;
}

.about-highlights {
  display: flex;
  gap: 40px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.highlight {
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.highlight.visible {
  opacity: 1;
  transform: translateY(0);
}

.highlight-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
}

.highlight-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(16px);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.feature-card-icon {
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

.feature-card h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.feature-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Machines */
.machines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.machine-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(16px);
}

.machine-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.machine-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.machine-card-icon {
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

.machine-card h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.machine-card .machine-type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--tag-text);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 12px;
}

.machine-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Download section */
.download-hero {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.download-hero .download-version {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--tag-text);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 4px 12px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 20px;
}

.download-hero p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 28px;
  line-height: 1.7;
}

.download-hero .download-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.download-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 32px;
}

.download-tech span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 4px 10px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--tag-border);
  border-radius: 6px;
  font-weight: 500;
}

/* Contact */
.contact-text {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 28px;
}

.contact-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all var(--transition);
}

.contact-link:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: var(--card-shadow);
}

/* Footer */
.accent-link {
  color: var(--accent);
  text-decoration: none;
}

.footer {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

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

.footer a:hover {
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open { max-height: 320px; }
  .nav-links li { width: 100%; }

  .nav-links a,
  .nav-links button {
    width: 100%;
    padding: 14px 28px;
    display: block;
    text-align: left;
  }

  .nav-links li:last-child { padding: 8px 16px; }
  .features-grid { grid-template-columns: 1fr; }
  .machines-grid { grid-template-columns: 1fr; }
  .about-highlights { gap: 28px; }
  .hero { padding: 100px 28px 60px; }
  .section { padding: 64px 0; }
}

/* Motion + polish */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  z-index: 200;
  transition: width 0.1s linear;
}

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

@keyframes heroIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-content > * {
  opacity: 0;
  animation: heroIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-tag      { animation-delay: 0.05s; }
.hero-subtitle { animation-delay: 0.28s; }
.hero-actions  { animation-delay: 0.40s; }

.hero-name {
  background: linear-gradient(100deg, var(--text) 28%, var(--accent) 50%, var(--text) 72%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: heroIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s forwards,
             shimmer 7s linear infinite 0.9s;
}
@keyframes shimmer { to { background-position: 200% center; } }

@media (prefers-reduced-motion: reduce) {
  .hero-content > *, .hero-name { animation: none !important; opacity: 1 !important; }
  .hero-name { -webkit-text-fill-color: currentColor; color: var(--text); background: none; }
  .scroll-progress { transition: none; }
}