/* --- Quy chuẩn Hệ thống Màu Sáng/Tối (CSS Variables) --- */
:root {
  color-scheme: light;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* --- Màu cam thương hiệu (HDG Orange) --- */
  --orange: #ff6a00;
  --orange-hover: #ff8533;
  --orange-glow: rgba(255, 106, 0, 0.12);
  --orange-d: #fff3eb; /* Nền nhạt màu cam cho header card trong light mode */
  
  /* --- Giao diện sáng (Light mode - MẶC ĐỊNH) --- */
  --bg: #f6f6f9;          /* Nền chính của trang */
  --panel: #ffffff;       /* Nền của sidebar / header / card */
  --line: #e2e8f0;        /* Màu của các đường viền (border) */
  --text: #0f172a;        /* Màu chữ chính */
  --muted: #64748b;       /* Màu chữ phụ / chú thích */
  --field: #f8fafc;       /* Nền ô input / select / switch */
  
  --backdrop: rgba(246, 246, 249, 0.8);
  --card-hover-bg: #f1f5f9;
  --shadow-color: rgba(15, 23, 42, 0.08);
  --border-glow: rgba(255, 106, 0, 0.2);
  --win-bg: #ececf0;
  --vp-bg: #e2e2e8;
}

body.dark {
  color-scheme: dark;
  
  /* --- Giao diện tối (Dark mode) --- */
  --bg: #0b0b0b;          /* Nền chính của trang */
  --panel: #111111;       /* Nền của sidebar / header / card */
  --line: #222222;        /* Màu của các đường viền (border) */
  --text: #f3f4f6;        /* Màu chữ chính */
  --muted: #8892b0;       /* Màu chữ phụ / chú thích */
  --field: #161616;       /* Nền ô input / select / switch */
  
  --orange-d: #2a1405;    /* Nền cam tối cho dark mode */
  --backdrop: rgba(11, 11, 11, 0.8);
  --card-hover-bg: #181818;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --border-glow: rgba(255, 106, 0, 0.4);
  --win-bg: #1e1e24;
  --vp-bg: #121216;
}

/* --- Reset CSS Cơ Bản --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- Navigation Bar --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--backdrop);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s, border-color 0.3s;
}

.logo {
  font-family: 'Space Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: -1.5px;
  text-decoration: none;
  transition: transform 0.2s;
}

.logo span {
  color: var(--text);
  transition: color 0.3s;
}

.logo:hover {
  transform: scale(1.02);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 13.5px;
  transition: color 0.2s;
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-price {
  font-size: 12.5px;
  color: var(--muted);
}

.nav-price strong {
  color: var(--orange);
  font-size: 15px;
  font-weight: 700;
}

.nav-cta {
  background: var(--orange);
  color: #ffffff;
  padding: 9px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.nav-cta:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--orange-glow);
}

/* --- Theme Switch Pill --- */
.theme-switch {
  display: inline-flex;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px;
  height: 32px;
  align-items: center;
  transition: background-color 0.3s, border-color 0.3s;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, transform 0.2s;
}

.theme-btn.active {
  background: var(--orange);
  color: #ffffff;
}

.theme-btn:hover:not(.active) {
  color: var(--text);
  transform: scale(1.05);
}

.theme-icon {
  width: 14px;
  height: 14px;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 48px 60px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 80% 35%, var(--orange-glow), transparent 45%), var(--bg);
  transition: background 0.4s ease;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: 
    linear-gradient(var(--orange) 1px, transparent 1px),
    linear-gradient(90deg, var(--orange) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-drift 24s linear infinite;
  pointer-events: none;
}

@keyframes grid-drift {
  0% { transform: translateY(0); }
  100% { transform: translateY(50px); }
}

.hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-left {
  animation: fade-up 0.6s ease both;
}

.hero-tag {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--orange);
  border: 1px solid var(--orange);
  background: var(--orange-glow);
  padding: 6px 14px;
  border-radius: 4px;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
  color: var(--text);
  transition: color 0.3s;
}

.hero h1 em {
  font-style: normal;
  color: var(--orange);
}

.hero-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.65;
  margin-bottom: 36px;
  font-weight: 400;
  transition: color 0.3s;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn-primary {
  background: var(--orange);
  color: #ffffff;
  padding: 13px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--orange-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  padding: 13px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--line);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-glow);
  transform: translateY(-2px);
}

.hero-stat {
  display: flex;
  gap: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.stat-item .num {
  font-family: 'Space Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1.1;
}

.stat-item .lbl {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}

/* --- Hero Right: Interactive SketchUp Window Mockup --- */
.hero-right {
  animation: fade-up 0.6s 0.2s ease both;
  display: flex;
  justify-content: center;
}

.sketchup-window {
  width: 100%;
  max-width: 460px;
  background: var(--win-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px var(--shadow-color);
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.win-header {
  height: 36px;
  padding: 0 16px;
  background: var(--panel);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.win-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.close { background: #ff5f56; }
.dot.minimize { background: #ffbd2e; }
.dot.maximize { background: #27c93f; }

.win-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.win-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.viewport-area {
  height: 250px;
  background: var(--vp-bg);
  border-radius: 8px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.grid-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(0,0,0,0.05), transparent);
  opacity: 0.5;
}

/* 3D simulated cabinet panels */
.cabinet-3d {
  position: relative;
  width: 120px;
  height: 180px;
  border: 2px solid var(--text);
  border-radius: 4px;
  background: rgba(0,0,0,0.03);
  transition: all 0.5s ease;
  transform: rotateX(10deg) rotateY(-10deg);
  transform-style: preserve-3d;
}

.panel-left, .panel-right, .panel-top, .panel-bottom, .panel-shelf, .panel-back {
  position: absolute;
  border: 1px solid var(--text);
  background: rgba(255, 106, 0, 0.05);
  font-size: 8px;
  color: var(--text);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
}

.panel-left { top: 0; bottom: 0; left: 0; width: 14px; border-right: 2px solid var(--text); }
.panel-right { top: 0; bottom: 0; right: 0; width: 14px; border-left: 2px solid var(--text); }
.panel-top { top: 0; left: 14px; right: 14px; height: 14px; border-bottom: 2px solid var(--text); }
.panel-bottom { bottom: 0; left: 14px; right: 14px; height: 14px; border-top: 2px solid var(--text); }
.panel-shelf { top: 80px; left: 14px; right: 14px; height: 12px; border-bottom: 2px solid var(--text); }
.panel-back { top: 14px; bottom: 14px; left: 14px; right: 14px; background: rgba(0,0,0,0.05); z-index: -1; font-size: 0; }

/* Interactive simulator behaviors class */
.viewport-area.sim-nest .cabinet-3d {
  transform: scale(0.6) translate(-60px, -40px);
  opacity: 0;
}
.viewport-area.sim-nest::after {
  content: "🛠️ Đang Xếp Ván...";
  position: absolute;
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
  background: var(--panel);
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--orange);
  animation: pulse 1s infinite;
}

.viewport-area.sim-mortise .panel-shelf {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 0 10px var(--orange);
}
.viewport-area.sim-scale .cabinet-3d {
  width: 160px;
}
.viewport-area.sim-banding .panel-left, .viewport-area.sim-banding .panel-right {
  border: 2px solid var(--orange);
  background: var(--orange-glow);
}
.viewport-area.sim-label::after {
  content: "🏷️ Tem Nhãn ID: T-01";
  position: absolute;
  font-size: 10px;
  font-weight: 700;
  background: #fff;
  color: #000;
  padding: 4px 8px;
  border-radius: 2px;
  border: 1px solid #000;
  transform: rotate(-5deg);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.viewport-area.sim-clean .panel-back {
  background: transparent;
  border: 1px dashed var(--muted);
}

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

.viewport-tooltip {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  text-align: center;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Toolbar mock */
.hdg-toolbar-mock {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tb-title {
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.tb-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tb-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.tb-btn:hover, .tb-btn.active {
  border-color: var(--orange);
  background: var(--orange-glow);
  transform: scale(1.08);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Ticker (Marquee) --- */
.ticker {
  background: var(--orange-d);
  padding: 16px 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s, border-color 0.3s;
}

.ticker-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: ticker-anim 35s linear infinite;
}

.ticker-item {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 1.5px;
  white-space: nowrap;
}

.ticker-item::before {
  content: "✦ ";
  opacity: 0.6;
}

@keyframes ticker-anim {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Content Sections --- */
.section {
  padding: 100px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--orange);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 700;
}

.section-title {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1.5px;
  margin-bottom: 56px;
  color: var(--text);
  transition: color 0.3s;
}

/* --- Bento Grid (Value Propositions) --- */
.bento-section {
  position: relative;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 16px;
}

.col-span-2 { grid-column: span 2; }
.col-span-1 { grid-column: span 1; }
.row-span-2 { grid-row: span 2; }

.bento-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.bento-card-bg {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  transition: transform 0.5s ease;
}

.bg-nesting {
  background-image: radial-gradient(circle, var(--orange) 10%, transparent 11%), radial-gradient(circle, var(--orange) 10%, transparent 11%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--orange);
  box-shadow: 0 12px 24px var(--shadow-color), 0 0 0 1px var(--orange-glow);
}

.bento-card:hover .bento-card-bg {
  transform: scale(1.05);
}

.bento-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--orange-glow);
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.bento-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.bento-content {
  z-index: 1;
}

.bento-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.bento-card p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

.bento-extra {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.tag-glow {
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--orange-glow);
}

/* --- Features Tab-Showcase --- */
.showcase-section {
  background: var(--field);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s, border-color 0.3s;
}

.showcase-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 40px;
  margin-top: 20px;
}

.showcase-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-tab {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px var(--shadow-color);
}

.showcase-tab:hover {
  border-color: var(--orange);
  color: var(--text);
  transform: translateX(4px);
}

.showcase-tab.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #ffffff;
  box-shadow: 0 8px 20px var(--orange-glow);
}

.tab-number {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  opacity: 0.6;
}

.showcase-tab.active .tab-number {
  opacity: 1;
}

.tab-title {
  font-size: 14px;
  font-weight: 700;
}

.showcase-display {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 40px;
  min-height: 400px;
  display: flex;
  position: relative;
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: background-color 0.3s, border-color 0.3s;
}

.showcase-panel {
  display: none;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  width: 100%;
  animation: fadeIn 0.4s ease;
}

.showcase-panel.active {
  display: grid;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-info h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
}

.panel-info p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 24px;
}

.panel-bullet-points {
  list-style: none;
}

.panel-bullet-points li {
  padding: 8px 0;
  font-size: 13.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-bullet-points li::before {
  content: "✦";
  color: var(--orange);
  font-weight: bold;
}

.panel-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  min-height: 250px;
}

/* Graphics simulations inside showcase panels */
.nest-grid-preview {
  width: 100%;
  max-width: 260px;
}

.sheet-border {
  border: 2px solid var(--text);
  aspect-ratio: 1.6;
  position: relative;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  background: rgba(0,0,0,0.02);
}

.nest-box {
  background: var(--orange-glow);
  border: 1.5px solid var(--orange);
  border-radius: 3px;
  font-size: 8px;
  font-weight: bold;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  text-align: center;
}

.box-1 { grid-row: span 2; grid-column: span 2; }
.box-2 { grid-row: span 2; }
.box-3 { grid-row: span 2; }
.box-4 { grid-column: span 2; }

/* Joint preview graphic */
.joint-preview-graphic {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 180px;
  height: 180px;
}

.joint-panel-vertical {
  width: 24px;
  height: 120px;
  border: 2px solid var(--text);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: bold;
  z-index: 2;
}

.joint-panel-horizontal {
  width: 100px;
  height: 24px;
  border: 2px solid var(--text);
  background: var(--orange-glow);
  border-left: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: bold;
  position: relative;
  margin-left: -2px;
}

.tenon-peg {
  position: absolute;
  left: -6px;
  width: 6px;
  height: 8px;
  background: var(--orange);
  border: 1px solid var(--text);
  border-right: none;
}
.tenon-peg:nth-child(1) { top: 4px; }
.tenon-peg:nth-child(2) { bottom: 4px; }

/* Scale Graphic */
.scale-preview-graphic {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cabinet-scale-box {
  width: 100px;
  height: 150px;
  border: 2px dashed var(--orange);
  background: var(--orange-glow);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleCabinet 3s infinite ease-in-out;
}

.scale-arrow {
  position: absolute;
  background: var(--orange);
}

.arrow-x {
  width: 40px;
  height: 3px;
  top: 50%;
  left: -20px;
}
.arrow-x::before, .arrow-x::after {
  content: "";
  position: absolute;
  border: 4px solid transparent;
}
.arrow-x::before { border-right-color: var(--orange); left: -4px; top: -3px; }
.arrow-x::after { border-left-color: var(--orange); right: -4px; top: -3px; }

.scale-indicator-text {
  font-size: 8px;
  background: var(--panel);
  padding: 2px 4px;
  border: 1px solid var(--line);
  font-weight: 700;
  border-radius: 2px;
}

@keyframes scaleCabinet {
  0% { width: 100px; }
  50% { width: 150px; }
  100% { width: 100px; }
}

/* Banding Graphic */
.wood-board-preview {
  width: 140px;
  height: 100px;
  border: 2px solid var(--text);
  background: var(--panel);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 10px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
}

.banding-edge {
  position: absolute;
  background: var(--orange);
  font-size: 7px;
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edge-top { top: -4px; left: -2px; right: -2px; height: 4px; }
.edge-right { right: -4px; top: -2px; bottom: -2px; width: 4px; }

.khau-goc-circle {
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--orange-glow);
  border: 1.5px dashed var(--orange);
  font-size: 7px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Labeling Graphic */
.labeled-board {
  width: 150px;
  height: 100px;
  border: 2px solid var(--text);
  background: var(--panel);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 10px;
}

.board-label-tem {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ffffff;
  border: 1px solid #000;
  color: #000;
  width: 70px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.tem-header { font-size: 6px; font-weight: bold; border-bottom: 0.5px solid #000; text-align: center; }
.tem-barcode { font-size: 5px; text-align: center; letter-spacing: 0.5px; }
.tem-info { font-size: 5px; }

/* --- Pricing Section --- */
.pricing-section {
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 20px;
}

.price-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px var(--shadow-color);
}

.price-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px var(--shadow-color);
}

.pro-featured {
  border-color: var(--orange);
  transform: scale(1.03);
  box-shadow: 0 16px 40px var(--orange-glow), 0 4px 12px var(--shadow-color);
  background: radial-gradient(circle at 50% 0%, var(--orange-glow), transparent 60%), var(--panel);
}

.pro-featured:hover {
  transform: scale(1.03) translateY(-6px);
  box-shadow: 0 20px 48px var(--orange-glow), 0 8px 20px var(--shadow-color);
}

.featured-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.price-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 28px;
}

.plan-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}

.plan-price {
  font-family: 'Space Mono', monospace;
  font-size: 40px;
  font-weight: 800;
  color: var(--text);
  margin: 12px 0 6px;
  line-height: 1;
}

.plan-price sub {
  font-size: 13px;
  color: var(--muted);
  vertical-align: middle;
  font-weight: 500;
  margin-left: 2px;
}

.plan-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.price-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.plan-features {
  list-style: none;
  text-align: left;
  margin-bottom: 36px;
  flex-grow: 1;
}

.plan-features li {
  padding: 10px 0;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-features li::before {
  content: "✓";
  color: var(--orange);
  font-weight: bold;
}

.btn-price-card {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-price-card:hover {
  border-color: var(--orange);
  background: var(--field);
  color: var(--orange);
}

.btn-price-card.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #ffffff;
}

.btn-price-card.primary:hover {
  background: var(--orange-hover);
  border-color: var(--orange-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--orange-glow);
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--line);
  padding: 60px 48px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: var(--panel);
  transition: border-color 0.3s, color 0.3s, background-color 0.3s;
}

footer span {
  color: var(--orange);
  font-weight: 600;
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

body.dark .modal-overlay {
  background: rgba(0, 0, 0, 0.75);
}

.modal-overlay.show {
  display: flex;
}

/* Split screen layout for 1-click checkout */
.modal-box.split-modal {
  max-width: 800px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 30px 60px var(--shadow-color);
  background: var(--panel);
  border: 1px solid var(--line);
  position: relative;
  animation: fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 10;
  transition: all 0.2s;
}

.modal-close:hover {
  color: var(--text);
  background: var(--line);
}

.modal-left {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-right {
  padding: 40px;
  background: var(--field);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, border-color 0.3s;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.modal-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 20px;
  width: 100%;
}

.form-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 700;
}

.form-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.3s, color 0.3s;
}

.form-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

.plan-summary-box {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}

.summary-row span {
  color: var(--muted);
}

.summary-row strong {
  color: var(--text);
}

.btn-action {
  background: var(--orange);
  color: #ffffff;
  border: 1px solid var(--orange);
  border-radius: 6px;
  height: 46px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-action:hover {
  background: var(--orange-hover);
  border-color: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--orange-glow);
}

/* QR Code area split modal */
.qr-box-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.qr-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 220px;
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: background-color 0.3s, border-color 0.3s;
}

.qr-loading {
  color: var(--muted);
  font-size: 12px;
  padding: 20px;
  text-align: center;
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 4px solid var(--panel);
}

.status-badge {
  display: inline-block;
  background: var(--orange-glow);
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  font-family: 'Space Mono', monospace;
  margin: 12px 0 0;
  border: 1px solid rgba(255, 106, 0, 0.2);
}

.key-display {
  background: var(--panel);
  border: 1px dashed var(--orange);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  margin: 12px 0;
  width: 100%;
}

.key-value {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

/* --- Media Queries (Responsive Layouts) --- */
@media (max-width: 1024px) {
  .hero {
    padding: 100px 32px 48px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-right {
    order: -1; /* Đưa mô phỏng UI lên đầu trên tablet/mobile */
  }
  .sketchup-window {
    max-width: 480px;
  }
  .showcase-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .col-span-2 {
    grid-column: span 2;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 40px auto 0;
  }
  .pro-featured {
    transform: none;
  }
  .pro-featured:hover {
    transform: translateY(-6px);
  }
  .modal-box.split-modal {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  .modal-right {
    border-left: none;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 768px) {
  nav {
    padding: 12px 24px;
  }
  .nav-links {
    display: none; /* Ẩn menu links trên mobile để tránh tràn */
  }
  .hero {
    padding: 80px 24px 36px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero-sub {
    font-size: 14.5px;
  }
  .hero-stat {
    gap: 20px;
  }
  .stat-item .num {
    font-size: 24px;
  }
  .section {
    padding: 60px 24px;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .col-span-2 {
    grid-column: span 1;
  }
  .showcase-display {
    padding: 24px;
  }
  .showcase-panel {
    grid-template-columns: 1fr;
  }
  .panel-preview {
    order: -1;
  }
  footer {
    padding: 40px 24px;
  }
}

/* --- Success Screen inside Modal --- */
.payment-success-screen {
  grid-column: span 2; /* Chiếm trọn 2 cột của Split Modal */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  width: 100%;
  animation: fade-up 0.4s ease both;
  background: var(--panel);
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(39, 201, 63, 0.12);
  color: #27c93f;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid rgba(39, 201, 63, 0.2);
  animation: scalePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes scalePop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.key-display-success {
  background: var(--field);
  border: 1.5px dashed var(--orange);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin: 16px 0 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.key-title {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 2px;
}

.key-value-large {
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--orange);
  margin: 16px 0;
  letter-spacing: 1.5px;
  word-break: break-all;
}

.btn-copy-large {
  min-width: 180px;
  height: 40px;
}

.success-details {
  width: 100%;
  max-width: 480px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 6px 0;
}

.detail-row span {
  color: var(--muted);
}

.detail-row strong {
  color: var(--text);
}

/* Responsive adjustment for Success Screen in Mobile */
@media (max-width: 1024px) {
  .payment-success-screen {
    grid-column: span 1;
    padding: 32px 20px;
  }
  .key-value-large {
    font-size: 16px;
  }
}

/* --- Support & Bug Report Section --- */
.support-section {
  position: relative;
  background: var(--bg);
}

.support-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-top: 16px;
}

.support-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: all 0.3s;
}

.support-card:hover {
  border-color: var(--orange);
  box-shadow: 0 8px 24px var(--shadow-color), 0 0 0 1px var(--orange-glow);
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card-header-orange h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.card-header-orange p {
  color: var(--muted);
  font-size: 13.5px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group-sub {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-sub label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.support-input {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
  width: 100%;
  transition: all 0.2s;
}

.support-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

textarea.support-input {
  resize: vertical;
}

.btn-support-submit {
  background: var(--orange);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
  align-self: flex-start;
}

.btn-support-submit:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--orange-glow);
}

.info-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.info-desc {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 24px;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.channel-item.non-link {
  cursor: default;
}

a.channel-item:hover {
  border-color: var(--orange);
  transform: translateX(4px);
  background: var(--panel);
}

.channel-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--orange-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.icon-zalo {
  background: rgba(0, 104, 255, 0.1);
  color: #0068ff;
}

.channel-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.channel-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.channel-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.channel-action {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
}

.bugsplat-tip {
  background: var(--orange-glow);
  border: 1px dashed var(--orange);
  border-radius: 10px;
  padding: 16px 20px;
}

.bugsplat-tip h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 6px;
}

.bugsplat-tip p {
  font-size: 12.5px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.5;
}

.bugsplat-tip ul {
  padding-left: 16px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Responsive adjustment */
@media (max-width: 1024px) {
  .support-grid {
    grid-template-columns: 1fr;
  }
}
