/* ===================================================
   DUCHAMP ROMS — REDESIGNED v2.0
   TZ Labs | Space Grotesk + JetBrains Mono
   =================================================== */

/* ---- TOKENS ---- */
:root {
  --bg:         #050709;
  --bg2:        #090c10;
  --surface:    #0e1218;
  --surface2:   #141a22;
  --border:     rgba(100, 220, 180, 0.1);
  --border2:    rgba(100, 220, 180, 0.2);
  --text:       #e8f4f0;
  --text2:      #7a9990;
  --primary:    #5dffc0;
  --primary2:   #40d4ff;
  --hot:        #ff6b47;
  --warn:       #ffd166;
  --purple:     #b07aff;
  --glow-p:     rgba(93, 255, 192, 0.15);
  --glow-b:     rgba(64, 212, 255, 0.12);
  --radius:     12px;
  --radius2:    20px;
  --shadow:     0 32px 80px rgba(0,0,0,0.6);
  --font:       'Space Grotesk', system-ui, sans-serif;
  --mono:       'JetBrains Mono', monospace;
  color-scheme: dark;
}

/* light mode */
body.light {
  --bg:       #f0f6f4;
  --bg2:      #e5efe9;
  --surface:  #ffffff;
  --surface2: #f5faf7;
  --border:   rgba(0,80,60,0.12);
  --border2:  rgba(0,80,60,0.22);
  --text:     #0a1410;
  --text2:    #4a6a60;
  --primary:  #007a58;
  --primary2: #006aaa;
  --hot:      #c03a20;
  --glow-p:   rgba(0,122,88,0.1);
  --shadow:   0 20px 60px rgba(0,20,15,0.14);
  color-scheme: light;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ---- BG CANVAS ---- */
#bgCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

/* ---- CURSOR GLOW ---- */
.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-p) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* ---- LOADER ---- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-logo {
  font-family: var(--mono);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 4px;
  margin-bottom: 32px;
}
.loader-logo span { color: var(--text2); font-size: 0.6em; }
.loader-bar {
  width: min(300px, 70vw);
  height: 3px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto 16px;
}
.loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  transition: width 0.1s ease;
}
.loader-text {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text2);
  letter-spacing: 1px;
}

/* ---- MONO UTILITY ---- */
.mono { font-family: var(--mono); }

/* ---- HEADER ---- */
header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(16px, 4vw, 52px);
  height: 64px;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 7, 9, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: background 0.3s;
}
body.light header { background: rgba(240, 246, 244, 0.8); }
header.scrolled { background: rgba(5, 7, 9, 0.9); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand em { color: var(--primary); font-style: normal; }
.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  position: relative;
  flex-shrink: 0;
}
.brand-icon::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 2px;
  background: var(--bg);
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--surface);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #03120e;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--glow-p); opacity: 0.92; }
.btn-primary.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.btn-primary.btn-sm { padding: 8px 16px; font-size: 13px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  background: var(--surface);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--primary); background: var(--surface2); }
.btn-ghost.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.btn-ghost.btn-sm { padding: 8px 16px; font-size: 13px; }

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, transform 0.2s;
}
.theme-toggle:hover { border-color: var(--primary); transform: rotate(20deg); }
body:not(.light) .sun { display: none; }
body.light .moon { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---- MOBILE MENU ---- */
.mobile-menu {
  position: fixed;
  top: 64px;
  inset-inline: 0;
  z-index: 999;
  background: rgba(5, 7, 9, 0.95);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 20px clamp(16px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.mobile-menu.open { transform: none; opacity: 1; pointer-events: auto; }
.mobile-menu a {
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--text2);
  transition: color 0.2s, background 0.2s;
}
.mobile-menu a:hover { color: var(--text); background: var(--surface); }
.mobile-menu .btn-primary { margin-top: 8px; justify-content: center; }

/* ---- CONTAINER ---- */
.container {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---- SECTION BASE ---- */
.section {
  padding: clamp(60px, 8vw, 100px) 0;
}
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-title em { color: var(--primary); font-style: normal; }
.section-desc {
  font-size: 16px;
  color: var(--text2);
  max-width: 520px;
  margin-bottom: 48px;
  line-height: 1.7;
}

/* ---- REVEAL ANIMATIONS ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  padding-top: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-inline: clamp(20px, 6vw, 72px);
  position: relative;
  overflow: hidden;
}

/* ---- HERO BG IMAGE ---- */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/bg.png') center / cover no-repeat;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}
/* Dark overlay so text stays readable over bg image */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(5,7,9,0.75) 0%,
    rgba(5,7,9,0.5) 50%,
    rgba(5,7,9,0.3) 100%
  );
  pointer-events: none;
  z-index: 0;
}
body.light .hero::before { opacity: 0.10; }
body.light .hero::after  { background: linear-gradient(135deg,rgba(240,246,244,0.82) 0%,rgba(240,246,244,0.6) 100%); }
body.light .hero::before { opacity: 0.08; }

.hero-content { z-index: 2; }
.hero-visual  { z-index: 2; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text2);
  margin-bottom: 24px;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: pulse 2s infinite;
}
.eyebrow-tag {
  background: var(--primary);
  color: #03120e;
  font-weight: 700;
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 2px;
}

.hero-title {
  font-size: clamp(32px, 5.5vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text2);
  max-width: 460px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat-item { text-align: center; }
.stat-num {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-num small { font-size: 0.55em; font-weight: 600; }
.stat-label { font-size: 11px; color: var(--text2); margin-top: 4px; letter-spacing: 0.5px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ---- HERO VISUAL / 3D PHONE ---- */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.phone-wrapper {
  position: relative;
  width: min(300px, 80vw);
}

#phoneCanvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
}

/* CSS fallback phone */
.phone-css {
  position: relative;
  width: 100%;
  padding-top: 210%;
}
.phone-frame {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  border: 2px solid var(--border2);
  background: var(--surface);
  box-shadow: 0 60px 120px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  animation: phoneFloat 5s ease-in-out infinite;
  transform-style: preserve-3d;
}
.phone-punch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #000;
  border: 1.5px solid rgba(255,255,255,0.1);
  z-index: 5;
}
.phone-screen-inner {
  position: absolute;
  inset: 8px;
  border-radius: 30px;
  background: linear-gradient(160deg, #060c14, #0a1220);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 36px 14px 18px;
}
.screen-status {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--primary);
  opacity: 0.7;
}
.screen-orbit {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}
.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(93,255,192,0.25);
  animation: spinOrbit 10s linear infinite;
}
.orbit-label {
  position: absolute;
  font-size: 8px;
  font-family: var(--mono);
  color: var(--primary);
  background: var(--surface);
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.orbit-label[style*="--i:0"] { top: 0; left: 50%; }
.orbit-label[style*="--i:1"] { top: 50%; left: 100%; }
.orbit-label[style*="--i:2"] { top: 100%; left: 50%; }
.orbit-label[style*="--i:3"] { top: 50%; left: 0%; }

.screen-core {
  text-align: center;
}
.core-chip {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--primary2);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.core-text { font-size: 13px; font-weight: 700; color: var(--text); }
.core-sub { font-size: 10px; color: var(--text2); }

.screen-bars { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: flex; align-items: center; gap: 6px; }
.bar-row span { font-size: 8px; font-family: var(--mono); color: var(--text2); width: 24px; }
.bar { flex: 1; height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.bar div { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary2)); border-radius: 2px; }

.phone-btn-r { position: absolute; right: -3px; top: 30%; height: 60px; width: 3px; background: var(--surface2); border-radius: 2px 0 0 2px; }
.phone-btn-l1 { position: absolute; left: -3px; top: 22%; height: 40px; width: 3px; background: var(--surface2); border-radius: 0 2px 2px 0; }
.phone-btn-l2 { position: absolute; left: -3px; top: 37%; height: 60px; width: 3px; background: var(--surface2); border-radius: 0 2px 2px 0; }

.phone-glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-p) 0%, transparent 60%);
  pointer-events: none;
  animation: phoneGlow 4s ease-in-out infinite;
}
.phone-shadow {
  position: absolute;
  bottom: -8%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 20px;
  background: rgba(0,0,0,0.6);
  filter: blur(16px);
  border-radius: 50%;
}

/* floating badges */
.float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(14,18,24,0.85);
  backdrop-filter: blur(16px);
  white-space: nowrap;
  pointer-events: none;
}
.badge-icon { font-size: 20px; }
.badge-title { font-size: 13px; font-weight: 700; color: var(--text); }
.badge-sub { font-size: 10px; color: var(--text2); }
.badge-1 { top: 8%; right: -10%; animation: floatY 4s ease-in-out infinite; }
.badge-2 { bottom: 28%; right: -15%; animation: floatY 5s ease-in-out infinite 1s; }
.badge-3 { bottom: 8%; left: -12%; animation: floatY 4.5s ease-in-out infinite 0.5s; }

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text2);
  font-size: 11px;
  letter-spacing: 1px;
}
.scroll-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: scrollBounce 1.5s ease-in-out infinite;
}

/* ---- SPECS ---- */
.spec-section { background: var(--bg2); }
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.spec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 24px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.spec-card:hover { transform: translateY(-6px); border-color: var(--border2); box-shadow: 0 16px 48px rgba(0,0,0,0.4); }
.spec-icon { font-size: 24px; margin-bottom: 12px; }
.spec-label { font-size: 11px; font-family: var(--mono); color: var(--text2); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.spec-value { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.spec-bar-wrap { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.spec-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--primary2)); border-radius: 2px; transition: width 1.2s ease; }
.spec-score { font-size: 11px; font-family: var(--mono); color: var(--primary); }

.antutu-block { text-align: center; padding: 48px; background: var(--surface); border-radius: var(--radius2); border: 1px solid var(--border); }
.antutu-label { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; color: var(--text2); margin-bottom: 12px; }
.antutu-num { font-size: clamp(48px, 8vw, 96px); font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; line-height: 1; }
.antutu-sub { font-size: 14px; color: var(--text2); margin-top: 12px; }

/* ---- AI RECOMMENDER ---- */
.ai-section { background: var(--bg); }
.ai-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  overflow: hidden;
}
.ai-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text2);
}
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px var(--primary); animation: pulse 2s infinite; }
.ai-questions { padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.ai-question { display: none; }
.ai-question.active { display: block; }
.q-label { font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.ai-options { display: flex; flex-wrap: wrap; gap: 10px; }
.ai-opt {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s, border-color 0.2s, color 0.2s, background 0.2s;
}
.ai-opt:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); }
.ai-opt.selected { border-color: var(--primary); background: rgba(93,255,192,0.1); color: var(--primary); }

.ai-result-box { padding: 24px; border-top: 1px solid var(--border); display: none; }
.ai-result-box.show { display: block; }
.ai-thinking { display: flex; align-items: center; gap: 12px; color: var(--text2); font-size: 14px; }
.ai-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.ai-result { display: none; }
.ai-result.show { display: block; }
.ai-result-name { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.ai-result-why { font-size: 14px; color: var(--text2); line-height: 1.7; margin-bottom: 16px; }
.ai-result-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-result-tag { padding: 4px 12px; border-radius: 6px; border: 1px solid var(--border2); font-size: 12px; font-family: var(--mono); color: var(--text); }

/* ---- VIDEOS ---- */
.video-section { background: var(--bg2); }
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.video-side { display: flex; flex-direction: column; gap: 20px; }
.video-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius2); overflow: hidden; transition: transform 0.25s, border-color 0.25s; }
.video-card:hover { transform: translateY(-4px); border-color: var(--border2); }
.video-wrap { position: relative; padding-top: 56.25%; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-info { padding: 14px 18px; }
.video-tag { display: inline-block; padding: 3px 9px; border-radius: 5px; background: rgba(93,255,192,0.1); border: 1px solid var(--border2); color: var(--primary); font-size: 11px; font-family: var(--mono); margin-bottom: 6px; }
.video-info h3 { font-size: 14px; font-weight: 600; }

/* ---- GALLERY ---- */
.gallery-section { background: var(--bg); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
  margin-bottom: 32px;
}
.gallery-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
  background: var(--surface);
}
.gallery-card.tall { grid-row: span 2; aspect-ratio: auto; }
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, opacity 0.4s ease;
  opacity: 0;
}
.gallery-card img.loaded { opacity: 1; }
.gallery-card:hover img { transform: scale(1.06); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,7,9,0.9) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-card:hover .gallery-overlay { opacity: 1; }
.gallery-tag { font-size: 10px; font-family: var(--mono); color: var(--primary); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.gallery-name { font-size: 15px; font-weight: 700; }
.gallery-arrow { position: absolute; top: 12px; right: 12px; font-size: 20px; }
.gallery-cta { text-align: center; }

/* ---- COMPARE ---- */
.compare-section { background: var(--bg2); }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.compare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 28px;
  transition: transform 0.25s, border-color 0.25s;
}
.compare-card:hover { transform: translateY(-4px); }
.compare-card.winner { border-color: var(--primary); background: linear-gradient(160deg, rgba(93,255,192,0.06), var(--surface)); }
.compare-badge { display: inline-block; padding: 5px 12px; border-radius: 7px; background: rgba(93,255,192,0.1); border: 1px solid var(--border2); font-size: 11px; font-weight: 700; color: var(--primary); margin-bottom: 14px; }
.compare-badge.alt { background: rgba(255,107,71,0.1); border-color: rgba(255,107,71,0.3); color: var(--hot); }
.compare-name { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.compare-base { font-size: 12px; color: var(--text2); font-family: var(--mono); margin-bottom: 20px; }
.compare-meters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.meter-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.meter-row span { width: 80px; color: var(--text2); flex-shrink: 0; }
.meter { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.meter div { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary2)); border-radius: 2px; }
.meter-row b { width: 28px; text-align: right; font-family: var(--mono); font-size: 11px; color: var(--primary); }

/* ---- FEATURED ROM ---- */
.featured-section { background: var(--bg); }
.featured-rom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: clamp(28px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}
.featured-rom::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(93,255,192,0.05), transparent);
  pointer-events: none;
}
.featured-label { font-family: var(--mono); font-size: 11px; color: var(--primary); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
.featured-name { font-size: clamp(28px, 4vw, 48px); font-weight: 800; line-height: 1.1; margin-bottom: 16px; }
.featured-desc { font-size: 15px; color: var(--text2); line-height: 1.7; margin-bottom: 28px; max-width: 440px; }
.featured-stats { display: flex; gap: 28px; margin-bottom: 28px; }
.feat-stat {}
.feat-num { font-size: clamp(22px, 3vw, 32px); font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.feat-label { font-size: 12px; color: var(--text2); margin-top: 4px; }
.featured-right { position: relative; }
.featured-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}
.tag.hot { border-color: rgba(255,107,71,0.4); color: var(--hot); background: rgba(255,107,71,0.1); }
.tag.new { border-color: var(--border2); color: var(--primary); background: rgba(93,255,192,0.1); }
.featured-img-wrap img { width: 100%; border-radius: var(--radius2); border: 1px solid var(--border); }

/* ---- GUIDES ---- */
.guides-section { background: var(--bg2); }
.guides-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.guide-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 28px;
  position: relative;
  transition: transform 0.25s, border-color 0.25s;
}
.guide-card:hover { transform: translateY(-6px); border-color: var(--border2); }
.guide-num { font-family: var(--mono); font-size: 11px; color: var(--text2); margin-bottom: 14px; }
.guide-icon { font-size: 28px; margin-bottom: 14px; }
.guide-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.guide-desc { font-size: 13px; color: var(--text2); line-height: 1.65; flex: 1; margin-bottom: 20px; }
.guide-arrow { font-size: 20px; color: var(--primary); transition: transform 0.2s; }
.guide-card:hover .guide-arrow { transform: translateX(4px); }

/* ---- TZ LABS ---- */
.tzlabs-section { background: var(--bg); }
.tzlabs-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  background: linear-gradient(135deg, var(--surface), var(--surface2));
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: clamp(28px, 5vw, 56px);
}
.tzlabs-card h2 { font-size: clamp(22px, 3vw, 36px); margin-bottom: 14px; }
.tzlabs-card p { font-size: 15px; color: var(--text2); line-height: 1.7; max-width: 480px; margin-bottom: 24px; }
.tzlabs-devices { display: flex; flex-direction: column; gap: 10px; }
.tz-device {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text2);
  white-space: nowrap;
}

/* ---- CONTACT ---- */
.contact-section { background: var(--bg2); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--border2); }
.contact-card.telegram:hover { border-color: rgba(39,174,246,0.5); box-shadow: 0 12px 36px rgba(39,174,246,0.1); }
.contact-card.insta:hover { border-color: rgba(240,71,109,0.5); box-shadow: 0 12px 36px rgba(240,71,109,0.1); }
.contact-card.fb:hover { border-color: rgba(66,103,178,0.5); box-shadow: 0 12px 36px rgba(66,103,178,0.1); }
.contact-icon { font-size: 22px; flex-shrink: 0; }
.contact-info { flex: 1; }
.contact-name { font-size: 14px; font-weight: 700; }
.contact-handle { font-size: 11px; color: var(--text2); font-family: var(--mono); }
.contact-arrow { font-size: 18px; color: var(--text2); }

/* ---- FOOTER ---- */
.footer { padding: 60px 0 32px; border-top: 1px solid var(--border); background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 13px; color: var(--text2); line-height: 1.65; max-width: 260px; margin-bottom: 8px; }
.footer-copy { font-size: 11px; color: var(--text2); margin-top: 16px; }
.footer-col-title { font-size: 11px; font-family: var(--mono); letter-spacing: 2px; text-transform: uppercase; color: var(--text2); margin-bottom: 14px; }
.footer-links-col { display: flex; flex-direction: column; gap: 8px; }
.footer-links-col a { font-size: 13px; color: var(--text2); transition: color 0.2s; }
.footer-links-col a:hover { color: var(--primary); }

/* ---- FAB ---- */
.fab-donate {
  position: fixed;
  right: 20px;
  bottom: 70px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--hot);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(255,107,71,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.fab-donate:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(255,107,71,0.5); }

.back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.2s;
}
.back-top.visible { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); border-color: var(--primary); }

/* ---- KEYFRAMES ---- */
@keyframes phoneFloat {
  0%,100% { transform: perspective(900px) rotateX(5deg) rotateY(-15deg) rotateZ(2deg) translateY(0); }
  50% { transform: perspective(900px) rotateX(9deg) rotateY(-8deg) rotateZ(-1deg) translateY(-14px); }
}
@keyframes phoneGlow {
  0%,100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes spinOrbit { to { transform: rotate(360deg); } }
@keyframes floatY {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes scrollBounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 8px var(--primary); }
  50% { box-shadow: 0 0 18px var(--primary); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-card.tall { grid-row: span 1; aspect-ratio: 16/10; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .featured-rom { grid-template-columns: 1fr; }
  .tzlabs-card { grid-template-columns: 1fr; }
  .tzlabs-devices { flex-direction: row; flex-wrap: wrap; }
  .badge-1, .badge-2, .badge-3 { display: none; }
}

@media (max-width: 820px) {
  nav { display: none; }
  .hamburger { display: flex; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 80px; padding-bottom: 60px; }
  .hero-visual { display: none; }
  .video-grid { grid-template-columns: 1fr; }
  .video-side { gap: 16px; }
  .compare-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .hero-title { font-size: clamp(28px, 8vw, 42px); }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .btn-primary.btn-lg, .btn-ghost.btn-lg { width: 100%; justify-content: center; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .guides-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 14px; }
}

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