/* =========================================================
   BLACKPLUG STUDIO — Design Tokens
   Near-black charcoal surfaces + electric gold/amber accent
   ========================================================= */

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

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  /* ---- BlackPlug Brand Palette ---- */
  /* Near-black charcoal surfaces — matched to blackplug.online */
  --black-950: #000000;   /* pure black — primary surface */
  --black-900: #050505;
  --black-850: #0d0d0d;
  --black-800: #1a1a1a;   /* panel / card background */
  --black-750: #202020;
  --black-700: #262626;
  --black-600: #333333;
  --black-500: #404040;
  --black-border: #2b2b2b;

  /* Bright gold-yellow accent — matched to blackplug.online */
  --gold-700: #b38f00;
  --gold-600: #d9ac00;
  --gold-500: #ffcc00;   /* primary brand gold */
  --gold-400: #ffd633;
  --gold-300: #ffe066;
  --gold-100: #fff6cc;

  /* Semantic surface roles (dark-first brand) */
  --color-bg: var(--black-950);
  --color-surface: var(--black-800);
  --color-surface-2: var(--black-750);
  --color-surface-3: var(--black-700);
  --color-border: var(--black-border);
  --color-border-strong: var(--black-600);
  --color-divider: var(--black-700);

  --color-text: #f5f5f5;
  --color-text-muted: #a7a7a7;
  --color-text-faint: #6f6f6f;
  --color-text-on-gold: #171105;

  --color-accent: var(--gold-500);
  --color-accent-hover: var(--gold-400);
  --color-accent-active: var(--gold-600);

  --color-success: #3ecf78;
  --color-error: #ff5c5c;

  --radius-sm: 0.4rem;
  --radius-md: 0.65rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px rgba(246, 196, 0, 0.15), 0 12px 32px rgba(246, 196, 0, 0.18);

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Clash Display', 'General Sans', sans-serif;
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;

  --content-wide: 1280px;
}

body {
  min-height: 100dvh;
  line-height: 1.55;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
ul[role='list'], ol[role='list'] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 { text-wrap: balance; line-height: 1.1; font-family: var(--font-display); color: var(--color-text); }
p, li { text-wrap: pretty; }

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

::selection { background: rgba(246, 196, 0, 0.28); color: var(--color-text); }

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

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

button { cursor: pointer; background: none; border: none; }

a, button, [role='button'], input, textarea, select {
  transition: color var(--transition-interactive), background var(--transition-interactive),
    border-color var(--transition-interactive), box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--color-accent); color: var(--color-text-on-gold); padding: var(--space-3) var(--space-4);
  border-radius: 0 0 var(--radius-md) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #000000;
  border-bottom: 3px solid var(--color-accent);
}

.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex; align-items: center; gap: var(--space-6);
  padding: var(--space-3) var(--space-6);
}

.brand-mark { display: flex; align-items: center; flex-shrink: 0; }
.logo-svg { height: 34px; width: auto; }
.logo-svg.small { height: 30px; }

.tagline {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.03em;
  display: none;
}
@media (min-width: 900px) { .tagline { display: block; } }

.header-nav {
  margin-left: auto;
  display: flex; align-items: center; gap: var(--space-6);
}
.header-nav a:not(.btn) {
  font-size: var(--text-sm); font-weight: 600; color: var(--color-text);
  position: relative;
}
.header-nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--color-accent); transition: width var(--transition-interactive);
}
.header-nav a:not(.btn):hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; margin-left: auto;
  border-radius: var(--radius-md);
}
.nav-toggle span { width: 22px; height: 2px; background: var(--color-text); border-radius: 2px; }
.nav-toggle:hover { background: var(--color-surface-2); }

@media (max-width: 780px) {
  .header-nav {
    position: fixed; top: 60px; left: 0; right: 0;
    background: var(--color-surface);
    flex-direction: column; align-items: stretch;
    padding: var(--space-4) var(--space-6) var(--space-6);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform var(--transition-interactive), opacity var(--transition-interactive);
  }
  .header-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .header-nav a { padding: var(--space-3) 0; border-bottom: 1px solid var(--color-divider); }
  .nav-toggle { display: flex; }
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-weight: 700; font-size: var(--text-sm);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  min-height: 44px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent); color: var(--color-text-on-gold);
  box-shadow: 0 6px 18px rgba(246, 196, 0, 0.28);
}
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); }
.btn-primary:active { background: var(--color-accent-active); transform: translateY(0); }

.btn-secondary {
  background: var(--color-surface-2); color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}
.btn-secondary:hover { background: var(--black-700); border-color: var(--gold-600); }

.btn-ghost {
  background: transparent; color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn-ghost:hover { background: rgba(246, 196, 0, 0.1); }

.btn-small { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); min-height: 38px; }
.btn-full { width: 100%; }
.btn-upload { cursor: pointer; }

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(var(--space-16), 10vw, var(--space-32)) var(--space-6) clamp(var(--space-12), 8vw, var(--space-24));
  background: radial-gradient(circle at 20% 15%, var(--black-800) 0%, var(--black-950) 60%);
  border-bottom: 1px solid var(--color-border);
}
.hero-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-glow::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 12%, rgba(255,204,0,0.10) 0, transparent 32%),
    radial-gradient(circle at 8% 78%, rgba(255,204,0,0.06) 0, transparent 28%);
}
.hero-glow::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.025 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
  opacity: 0.6;
}

.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--content-wide);
  margin: 0 auto;
}
.eyebrow {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-accent);
}
.hero-title {
  font-size: var(--text-3xl); font-weight: 600; color: #fff;
  margin-top: var(--space-4);
  max-width: 18ch;
}
.hero-title .highlight { color: var(--color-accent); }
.hero-sub {
  margin-top: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: 46ch;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  margin-top: var(--space-8);
}

.hero-stats {
  display: flex; gap: var(--space-10);
  margin-top: var(--space-16);
  flex-wrap: wrap;
}
.hero-stats li { display: flex; flex-direction: column; gap: var(--space-1); }
.hero-stats strong { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-accent); font-weight: 600; }
.hero-stats span { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* =========================================================
   SECTION HEAD
   ========================================================= */

.designer-section {
  padding: clamp(var(--space-16), 8vw, var(--space-24)) var(--space-6);
  max-width: var(--content-wide);
  margin: 0 auto;
}
.designer-section.alt { background: var(--color-surface); max-width: none; border-radius: var(--radius-xl); margin: 0 var(--space-6); padding: clamp(var(--space-16), 8vw, var(--space-24)) clamp(var(--space-6), 4vw, var(--space-10)); border: 1px solid var(--color-border); }
.designer-section.alt .section-head, .designer-section.alt .app-shell { max-width: var(--content-wide); margin-inline: auto; }

.section-head { max-width: 60ch; margin-bottom: var(--space-10); }
.section-head h2 { font-size: var(--text-2xl); font-weight: 600; margin-top: var(--space-2); }
.section-sub { color: var(--color-text-muted); font-size: var(--text-base); margin-top: var(--space-3); }

/* =========================================================
   APP SHELL — Product Designer Layout
   ========================================================= */

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  gap: var(--space-5);
  align-items: start;
}

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.panel-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.panel-block { margin-top: var(--space-6); }
.panel-block:first-child { margin-top: 0; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.print-grid { grid-template-columns: 1fr; }

.product-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1);
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: left;
  min-height: 64px;
}
.product-card svg { width: 22px; height: 22px; color: var(--color-accent); }
.product-card .p-name { font-size: var(--text-xs); font-weight: 700; color: var(--color-text); }
.product-card .p-group { font-size: 10px; color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.05em; }

.product-card:hover { border-color: var(--gold-600); background: var(--color-surface-3); }
.product-card.active {
  border-color: var(--color-accent);
  background: rgba(246, 196, 0, 0.1);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}
.product-card.active .p-name { color: var(--color-accent); }

/* Segmented control */
.segmented {
  display: flex; gap: var(--space-1);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 4px;
}
.segmented-btn {
  flex: 1;
  font-size: var(--text-xs); font-weight: 700;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  text-align: center;
}
.segmented-btn.active { background: var(--color-accent); color: var(--color-text-on-gold); box-shadow: var(--shadow-sm); }
.segmented-btn:not(.active):hover { color: var(--color-text); }

.method-note {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--gold-100);
  background: rgba(246, 196, 0, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  line-height: 1.5;
}

/* Color row */
.color-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
input[type="color"] {
  width: 44px; height: 44px; padding: 3px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface-2);
  flex-shrink: 0;
}
.swatch-list { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.swatch {
  width: 26px; height: 26px; border-radius: var(--radius-full);
  border: 2px solid var(--color-surface);
  outline: 1px solid var(--color-border);
  flex-shrink: 0;
}
.swatch:hover { outline-color: var(--color-accent); }
.swatch.active { outline: 2px solid var(--color-accent); outline-offset: 1px; }

select {
  width: 100%;
  padding: var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
  color: var(--color-text);
}

/* Canvas column */
.canvas-col {
  display: flex; flex-direction: column; gap: var(--space-4);
  min-width: 0;
}
.canvas-bar {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap;
}
.canvas-bar strong { display: block; font-size: var(--text-base); font-weight: 700; font-family: var(--font-body); color: var(--color-text); }
.canvas-bar span { display: block; font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px; }
.canvas-bar-actions { display: flex; gap: var(--space-2); }

.canvas-shell {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 560px;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  background-color: var(--black-950);
  background-image:
    linear-gradient(45deg, var(--black-800) 25%, transparent 25%),
    linear-gradient(-45deg, var(--black-800) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--black-800) 75%),
    linear-gradient(-45deg, transparent 75%, var(--black-800) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  border: 1.5px dashed var(--color-border-strong);
  overflow: auto;
}

.artboard {
  position: relative;
  width: 480px; height: 560px;
  max-width: 100%;
  background: #fff;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.print-artboard { width: 480px; height: 274px; }

.garment-layer {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6);
}
.garment-layer svg { width: 100%; height: 100%; }
.garment-layer img.real-photo-mockup {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.design-layer { position: absolute; inset: 0; z-index: 5; }

.design-object {
  position: absolute;
  cursor: move;
  user-select: none;
  min-width: 24px; min-height: 24px;
  transform-origin: center;
}
.design-object.selected {
  outline: 2px dashed var(--color-accent);
  outline-offset: 6px;
  border-radius: var(--radius-sm);
}
.design-object .resize-handle {
  position: absolute; right: -9px; bottom: -9px;
  width: 18px; height: 18px;
  background: var(--color-accent);
  border: 2px solid #fff;
  border-radius: var(--radius-full);
  cursor: nwse-resize;
  display: none;
  box-shadow: var(--shadow-sm);
}
.design-object.selected .resize-handle { display: block; }

.text-object {
  font-weight: 800;
  white-space: pre-wrap;
  line-height: 1.05;
  padding: var(--space-1);
  outline: none;
}
.image-object img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; display: block; }

.canvas-hint { font-size: var(--text-xs); color: var(--color-text-faint); text-align: center; }

/* Right panel: selected controls */
.field-row { margin-top: var(--space-3); }
.field-row:first-child { margin-top: 0; }
.field-row label {
  display: block; font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.field-row input[type="text"], .field-row textarea {
  width: 100%;
  padding: var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: var(--text-sm);
}
.field-row textarea { resize: vertical; min-height: 60px; }
.field-row input[type="range"] { width: 100%; accent-color: var(--color-accent); }
.field-row select { padding: var(--space-2) var(--space-3); }

.tool-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2);
}
.tool-row .btn { font-size: var(--text-xs); padding: var(--space-3) var(--space-2); text-align: center; }

.control-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2);
  margin-top: var(--space-4);
}

.hint { font-size: var(--text-xs); color: var(--color-text-faint); line-height: 1.5; }

.selected-heading {
  font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--color-accent); margin-bottom: var(--space-3);
}

/* Layers */
.layers-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.layers-head .panel-title { margin-bottom: 0; }
.layers-count {
  font-size: var(--text-xs); font-weight: 700; color: var(--color-text-on-gold);
  background: var(--color-accent);
  border-radius: var(--radius-full);
  min-width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  padding: 0 var(--space-2);
}
.layers-list { display: flex; flex-direction: column; gap: var(--space-2); max-height: 240px; overflow-y: auto; }
.layer-row {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}
.layer-row.selected { border-color: var(--color-accent); background: rgba(246, 196, 0, 0.08); }
.layer-row .layer-name {
  flex: 1; font-size: var(--text-xs); font-weight: 600; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: none; border: none; color: var(--color-text);
}
.layer-row button.layer-icon-btn {
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted); flex-shrink: 0;
}
.layer-row button.layer-icon-btn:hover { background: var(--color-surface-3); color: var(--color-text); }
.layer-row button.layer-delete:hover { color: var(--color-error); background: rgba(255,92,92,0.12); }
.layers-empty { font-size: var(--text-xs); color: var(--color-text-faint); }

/* Responsive app shell */
@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .panel-left, .panel-right { order: 2; }
  .canvas-col { order: 1; }
}

/* =========================================================
   INFO STRIP
   ========================================================= */
.info-strip { padding: clamp(var(--space-16), 8vw, var(--space-20)) var(--space-6); }
.info-strip-inner {
  max-width: var(--content-wide); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8);
}
.info-item h3 { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-3); color: var(--color-accent); }
.info-item p { color: var(--color-text-muted); font-size: var(--text-sm); }
@media (max-width: 860px) { .info-strip-inner { grid-template-columns: 1fr; gap: var(--space-8); } }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--black-950);
  color: var(--color-text-muted);
  padding: var(--space-16) var(--space-6) var(--space-10);
  border-top: 1px solid var(--color-border);
}
.footer-inner { max-width: var(--content-wide); margin: 0 auto; }
.footer-brand { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-brand p { font-size: var(--text-sm); color: var(--color-text-muted); }
.footer-links {
  display: flex; gap: var(--space-6); flex-wrap: wrap;
  margin-top: var(--space-8); padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}
.footer-links a { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
.footer-links a:hover { color: var(--color-accent); }
.footer-copy { margin-top: var(--space-8); font-size: var(--text-xs); color: var(--color-text-faint); }

/* =========================================================
   MODAL
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, 0.72);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6);
  backdrop-filter: blur(3px);
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 460px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  width: 36px; height: 36px; border-radius: var(--radius-full);
  font-size: 1.5rem; line-height: 1; color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--color-surface-2); color: var(--color-text); }
.modal h3 { font-size: var(--text-lg); margin-top: var(--space-2); font-weight: 600; }
.modal-sub { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-2); margin-bottom: var(--space-5); }

#quoteForm label { display: block; font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted); margin: var(--space-4) 0 var(--space-2); }
#quoteForm label:first-of-type { margin-top: 0; }
#quoteForm input, #quoteForm textarea {
  width: 100%; padding: var(--space-3); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-text); font-size: var(--text-sm);
}
#quoteForm textarea { resize: vertical; }
#quoteForm .btn { margin-top: var(--space-6); }

.confirm-summary {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  display: grid; gap: var(--space-2);
  font-size: var(--text-sm);
}
.confirm-summary div { display: flex; justify-content: space-between; gap: var(--space-4); }
.confirm-summary dt, .confirm-summary .k { color: var(--color-text-muted); font-weight: 600; }
.confirm-summary .v { color: var(--color-accent); font-weight: 700; text-align: right; }

/* =========================================================
   RESPONSIVE — Mobile
   ========================================================= */
@media (max-width: 640px) {
  .header-inner { padding: var(--space-3) var(--space-4); gap: var(--space-3); }
  .hero { padding: var(--space-12) var(--space-4) var(--space-10); }
  .designer-section { padding: var(--space-12) var(--space-4); }
  .designer-section.alt { margin: 0 var(--space-4); padding: var(--space-12) var(--space-4); }
  .canvas-shell { padding: var(--space-4); min-height: 420px; }
  .artboard { transform: scale(0.82); }
  .hero-stats { gap: var(--space-6); }
  .modal { padding: var(--space-6); }
}
