@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;400;500;600;700&display=swap');

/* System Variables */
:root {
  --bg-main: #0a0908;
  --bg-card: rgba(24, 22, 20, 0.7);
  --bg-card-hover: rgba(32, 29, 26, 0.85);
  --border-card: rgba(226, 168, 80, 0.12);
  --border-glow: rgba(226, 168, 80, 0.25);
  --accent: #e2a850;
  --accent-light: #f7d294;
  --accent-dim: rgba(226, 168, 80, 0.15);
  --text-primary: #f5f4f0;
  --text-secondary: #a3a19b;
  --text-muted: #6e6c66;
  --glow-color: rgba(226, 168, 80, 0.15);
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(226, 168, 80, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Typography Utilities */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
}

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

/* Layout Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Glowing background blobs */
.glow-blob {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

/* Glassmorphism Card style */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 24px rgba(226, 168, 80, 0.05);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: var(--transition-smooth);
}
.navbar.scrolled {
  background: rgba(10, 9, 8, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-card);
  padding: 0.9rem 0;
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo span {
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition-smooth);
}
.nav-links a:hover {
  color: var(--text-primary);
}
.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition-smooth);
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--accent);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--accent);
}

/* Hero Section */
.hero {
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.hero-title span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 580px;
}
.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-primary {
  background-color: var(--accent);
  color: #12100e;
  border: none;
}
.btn-primary:hover {
  background-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(226, 168, 80, 0.3);
}
.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Feature Section */
.features {
  padding: 5rem 0;
  position: relative;
}
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}
.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, var(--text-primary) 0%, #d5d3cc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-header p {
  font-size: 1.05rem;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.feature-icon {
  width: 48px;
  height: 48px;
  background-color: var(--accent-dim);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.feature-card h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
}

/* Configurator/Builder Section */
.builder-section {
  padding: 5rem 0;
  position: relative;
}
.builder-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  align-items: start;
}
.controls-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.control-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.control-label-row span.val {
  color: var(--accent);
  font-weight: 600;
}
.range-slider {
  width: 100%;
  height: 6px;
  background: #1c1a17;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  accent-color: var(--accent);
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #0a0908;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(226, 168, 80, 0.4);
  transition: var(--transition-smooth);
}
.range-slider::-webkit-slider-thumb:hover {
  background: var(--accent-light);
  transform: scale(1.15);
}

/* Tab Selector */
.tabs {
  display: flex;
  gap: 0.5rem;
  background: #151311;
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
}
.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.tab-btn:hover {
  color: var(--text-primary);
}
.tab-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border: 0.5px solid rgba(226, 168, 80, 0.3);
}

/* Materials Selector */
.material-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.material-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  background: #151311;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.material-option:hover {
  border-color: var(--accent-dim);
}
.material-option.active {
  border-color: var(--accent);
  background: rgba(226, 168, 80, 0.05);
}
.material-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
}
.material-option.active .material-circle {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.mat-oak { background: #b8924a; }
.mat-walnut { background: #5a4225; }
.mat-pine { background: #e2cb9b; }

.material-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.material-option.active .material-name {
  color: var(--text-primary);
}

/* Interactive Preview Screen */
.preview-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.canvas-card {
  position: relative;
  background: radial-gradient(circle at center, #1b1916 0%, #0c0b0a 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}
.canvas-card canvas {
  /* Ocupa toda la tarjeta: el motor 3D reencuadra solo con fitView(). */
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
}
.canvas-overlay {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.glass-tag {
  background: rgba(10, 9, 8, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: auto;
}
.glass-tag.btn-interactive {
  cursor: pointer;
  pointer-events: auto;
  transition: var(--transition-smooth);
}
.glass-tag.btn-interactive:hover {
  background: var(--accent);
  color: #12100e;
  border-color: var(--accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.stat-box {
  background: rgba(18, 16, 14, 0.6);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.5rem;
  text-align: center;
}
.stat-number {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Mathematics/Modular Grid Section */
.grid-section {
  padding: 5rem 0;
  background: linear-gradient(180deg, var(--bg-main) 0%, #0d0c0b 50%, var(--bg-main) 100%);
  position: relative;
}
.grid-container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.grid-demo-wrap {
  position: relative;
}
.grid-display {
  aspect-ratio: 4/3;
  background: rgba(226, 168, 80, 0.02);
  border: 1.5px dashed var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1rem;
  position: relative;
  transition: var(--transition-smooth);
}
.grid-item {
  background: rgba(226, 168, 80, 0.05);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-smooth);
  cursor: pointer;
  overflow: hidden;
}
.grid-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(226, 168, 80, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition-smooth);
}
.grid-item:hover {
  border-color: var(--accent);
  background: rgba(226, 168, 80, 0.08);
}
.grid-item:hover::before {
  opacity: 1;
}
.grid-item-name {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.grid-item-dim {
  font-size: 0.75rem;
  color: var(--accent);
}
.grid-item-num {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border-card);
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.grid-item:hover .grid-item-num {
  background: var(--accent);
  color: #12100e;
}

/* Dimensions Info Card */
.grid-math-card {
  padding: 1.5rem;
  background: rgba(10, 9, 8, 0.4);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
}
.math-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
}
.math-row:last-child {
  border-bottom: none;
}
.math-lbl {
  color: var(--text-secondary);
}
.math-val {
  font-weight: 600;
  color: var(--text-primary);
}
.math-val span {
  color: var(--accent);
}

/* Split/Stacked visual toggler */
.grid-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.grid-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.grid-btn.active {
  background: var(--accent);
  color: #12100e;
  border-color: var(--accent);
}

/* Interactive configuration representation */
.grid-display.mode-sub {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
}

/* Assembly and Cut List Panel styling */
.output-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  margin-top: 2rem;
}
.cuts-panel h3, .steps-panel h3 {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cuts-panel h3 span, .steps-panel h3 span {
  color: var(--accent);
}
.cut-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(10, 9, 8, 0.4);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  max-height: 380px;
  overflow-y: auto;
}
.cut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.5rem;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}
.cut-item:last-child {
  border-bottom: none;
}
.cut-title {
  color: var(--text-secondary);
}
.cut-dims {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--text-primary);
}
.cut-qty-badge {
  background: var(--accent-dim);
  border: 0.5px solid rgba(226, 168, 80, 0.2);
  color: var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.assembly-steps-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.5rem;
}
.step-item {
  display: flex;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  transition: var(--transition-smooth);
}
.step-item:hover {
  background: rgba(226, 168, 80, 0.02);
  border-color: rgba(226, 168, 80, 0.1);
}
.step-index {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-body h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.step-body p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Inspiration Cases Section ── */
.inspiration-section {
  padding: 5rem 0;
  position: relative;
}
.inspo-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.inspo-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.inspo-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.inspo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.inspo-card:hover .inspo-img {
  transform: scale(1.04);
}
.inspo-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--accent);
  color: #12100e;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
}
.inspo-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.inspo-body h3 {
  font-size: 1.15rem;
  color: var(--text-primary);
  line-height: 1.3;
}
.inspo-body > p {
  font-size: 0.88rem;
  line-height: 1.6;
}
.inspo-insight {
  background: rgba(226, 168, 80, 0.06);
  border: 1px solid rgba(226, 168, 80, 0.2);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.inspo-insight-label {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
}
.inspo-insight span:not(.inspo-insight-label) {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.inspo-insight strong {
  color: var(--text-primary);
}
.inspo-placeholder {
  aspect-ratio: 1;
  min-height: 280px;
  cursor: default;
}
.inspo-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 100%;
  padding: 2rem;
  text-align: center;
}
.inspo-placeholder-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px dashed var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
}
.inspo-placeholder-inner p {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.inspo-placeholder-inner span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Inspiration Videos Section ── */
.videos-section {
  padding: 5rem 0;
  position: relative;
  background: linear-gradient(180deg, var(--bg-main) 0%, #0d0c0b 50%, var(--bg-main) 100%);
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
}
.videos-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.video-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.video-meta {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.video-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.video-meta h3 {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.35;
}
.video-meta p {
  font-size: 0.83rem;
  line-height: 1.55;
}
.video-placeholder {
  min-height: 240px;
  cursor: default;
}
.video-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 100%;
  padding: 2rem;
  text-align: center;
  min-height: 240px;
}
.video-placeholder-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px dashed var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-muted);
}
.video-placeholder-inner p {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.video-placeholder-inner span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 968px) {
  .inspo-grid,
  .videos-grid {
    grid-template-columns: 1fr;
  }
  .inspo-placeholder {
    aspect-ratio: auto;
    min-height: 180px;
  }
}

/* Call to Action Section */
.cta-section {
  padding: 6rem 0;
  position: relative;
  text-align: center;
}
.cta-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
}
.cta-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.cta-desc {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-card);
  padding: 3rem 0;
  background-color: #050403;
}
.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.footer-links a:hover {
  color: var(--accent);
}

/* Scroll Entrance effects classes for fallback / view-timeline */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes revealUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .scroll-reveal {
      animation: revealUp auto linear forwards;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }
  }
}

/* Fallback reveal class if JS triggers it */
.js-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 9, 8, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-card);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    z-index: 99;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 0.85rem 2rem;
    font-size: 1rem;
    border-bottom: 0.5px solid rgba(255,255,255,0.04);
  }
  .nav-links a::after {
    display: none;
  }
  .navbar {
    position: sticky;
  }
}

@media (max-width: 968px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .btn-group {
    justify-content: center;
  }
  .builder-layout {
    grid-template-columns: 1fr;
  }
  .output-card {
    grid-template-columns: 1fr;
  }
  .grid-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .stat-number {
    font-size: 1.1rem;
  }
  .stat-label {
    font-size: 0.65rem;
  }
  .container {
    padding: 0 1.25rem;
  }
}

/* ============================================================
   Reconfigurador Modular — presets, ejes, specs y cotas
   ============================================================ */

.preset-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.preset-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.75rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  color: var(--text-secondary);
  font-family: var(--font-body);
  transition: var(--transition-smooth);
  overflow: hidden;
}

.preset-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, var(--glow-color), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.preset-btn:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.preset-btn.active {
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--accent-dim), 0 8px 24px -12px var(--accent);
}

.preset-btn.active::after { opacity: 1; }

.preset-icon { font-size: 1.15rem; line-height: 1.2; }

.preset-name {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.preset-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.preset-btn.active .preset-meta { color: var(--accent); }

/* Cabecera del panel de configuración */
.asm-head {
  border-bottom: 1.5px solid var(--border-card);
  padding-bottom: 0.7rem;
  margin-bottom: 0.35rem;
}

.asm-head h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.asm-head p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.ctl-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.ctl-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* Retícula X / Z / Y */
.axis-grid {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.axis-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.axis-body { flex: 1; min-width: 0; }

.axis-tag {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border-card);
}

.axis-x { color: #e2a850; background: rgba(226, 168, 80, 0.12); }
.axis-z { color: #7fc4d8; background: rgba(127, 196, 216, 0.12); }
.axis-y { color: #9fd67f; background: rgba(159, 214, 127, 0.12); }

.axis-row input[disabled] { opacity: 0.35; pointer-events: none; }

/* Botones de puerta por módulo */
.door-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.4rem;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 2px;
}

.door-grid::-webkit-scrollbar { width: 5px; }
.door-grid::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 3px; }

.door-btn {
  font-size: 0.75rem;
  padding: 0.45rem 0.4rem;
}

.door-ico { opacity: 0.6; margin-left: 0.15rem; }

.btn-sm {
  flex: 1;
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
}

/* Tarjeta de especificaciones */
.spec-card { margin-top: 1rem; padding: 1rem; }
.spec-card .math-val { text-align: right; }
.spec-card .math-val small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 1px;
}

.asm-warning {
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(226, 168, 80, 0.08);
  border: 1px solid var(--border-card);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.btn-blueprint {
  width: 100%;
  margin-top: 1rem;
  justify-content: center;
}

.export-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.export-row .btn {
  flex: 1;
  font-size: 0.8rem;
  padding: 0.65rem 0.5rem;
  justify-content: center;
  text-align: center;
}

/* ============================================================
   Modal de planos técnicos
   ============================================================ */

.bp-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(5, 4, 4, 0.82);
  backdrop-filter: blur(6px);
}

.bp-modal.open { display: flex; animation: bpFade 0.25s ease; }

@keyframes bpFade { from { opacity: 0; } to { opacity: 1; } }

.bp-dialog {
  width: min(1080px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #17151300;
  background-color: rgba(20, 18, 16, 0.96);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}

.bp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-card);
}

.bp-header h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.bp-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bp-close {
  background: none;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.bp-close:hover { color: var(--accent); border-color: var(--border-glow); }

.bp-body {
  flex: 1;
  overflow: auto;
  padding: 1.2rem;
  background: repeating-linear-gradient(45deg, #131211, #131211 10px, #161513 10px, #161513 20px);
}

.bp-paper {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  margin: 0 auto;
  max-width: 900px;
}

.bp-paper svg { display: block; width: 100%; height: auto; }

.bp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.4rem;
  border-top: 1px solid var(--border-card);
}

.bp-note { font-size: 0.75rem; color: var(--text-muted); }

.bp-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.bp-actions .btn { flex: 0 0 auto; }

@media (max-width: 700px) {
  .preset-bar { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .bp-modal { padding: 0.75rem; }
  .bp-footer { flex-direction: column; align-items: stretch; }
  .bp-actions { justify-content: stretch; }
  .bp-actions .btn { flex: 1; }
  .export-row { flex-direction: column; }
}

/* El visor 3D acompaña al usuario mientras recorre los controles largos
   del reconfigurador, en vez de dejar media tarjeta vacía. */
@media (min-width: 969px) {
  .builder-layout .preview-container {
    position: sticky;
    top: 88px;
    align-self: start;
    height: auto;
  }
  .builder-layout .canvas-card {
    min-height: 520px;
    max-height: calc(100vh - 132px);
  }
}
