/* ============================================
   BrickLab — Design Interface Styles
   Color: dark navy | bright accent | warm yellow
   ============================================ */

:root {
  --bl-navy: #0D1117;
  --bl-surface: #161B22;
  --bl-surface2: #1C2128;
  --bl-border: #30363D;
  --bl-yellow: #FFD700;
  --bl-yellow-dim: rgba(255, 215, 0, 0.15);
  --bl-red: #E63946;
  --bl-blue: #1D4ED8;
  --bl-teal: #00D4AA;
  --bl-text: #E6EDF3;
  --bl-text-dim: #7D8590;
  --bl-text-muted: #484F58;
  --bl-font-display: 'Syne', sans-serif;
  --bl-font-body: 'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bl-navy);
  color: var(--bl-text);
  font-family: var(--bl-font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ───────────────────────────────────── */
.bl-nav {
  border-bottom: 1px solid var(--bl-border);
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bl-navy);
}
.bl-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 24px;
}
.bl-nav-logo {
  font-family: var(--bl-font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--bl-yellow);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.bl-nav-tagline {
  color: var(--bl-text-muted);
  font-size: 12px;
}
.bl-nav-spacer { flex: 1; }
.bl-nav-links { display: flex; gap: 4px; align-items: center; }
.bl-nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--bl-text-dim);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.bl-nav-link:hover { color: var(--bl-text); background: var(--bl-surface2); }
.bl-nav-link.active { color: var(--bl-yellow); background: var(--bl-yellow-dim); }
.bl-nav-badge {
  font-size: 11px; font-weight: 700;
  background: var(--bl-yellow); color: #000;
  padding: 2px 7px; border-radius: 20px; margin-left: 4px;
}

/* ── PAGE HEADER ────────────────────────────── */
.bl-page-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 40px 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.bl-kicker {
  font-size: 11px; text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--bl-yellow); font-weight: 600; margin-bottom: 10px;
}
.bl-title {
  font-family: var(--bl-font-display);
  font-size: 42px; font-weight: 800; color: var(--bl-text);
  letter-spacing: -1px; line-height: 1.1;
}
.bl-title span { color: var(--bl-yellow); }
.bl-subtitle { margin-top: 10px; font-size: 15px; color: var(--bl-text-dim); max-width: 480px; }

/* ── CTA SECTION (top) ───────────────────────── */
.bl-cta-strip {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.bl-cta-strip p { font-size: 13px; color: var(--bl-text-dim); }
.bl-btn-primary {
  background: var(--bl-yellow); color: #000; font-weight: 700;
  font-size: 13px; padding: 8px 18px; border-radius: 8px;
  text-decoration: none; transition: opacity 0.15s, transform 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
  border: none; cursor: pointer; font-family: var(--bl-font-body);
}
.bl-btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.bl-btn-primary:active { transform: translateY(0); }

/* ── DESIGN GRID ─────────────────────────────── */
.bl-design-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── DESIGN CARD ────────────────────────────── */
.design-card {
  background: var(--bl-surface);
  border: 1px solid var(--bl-border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.design-card:hover {
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,215,0,0.1);
  transform: translateY(-3px);
}

.design-card-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.design-card-image::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(to top, var(--bl-surface) 0%, transparent 100%);
}
.design-card-image-inner {
  font-family: var(--bl-font-display);
  font-size: 64px;
  font-weight: 800;
  color: rgba(255,255,255,0.15);
  text-align: center;
  line-height: 1;
  letter-spacing: -2px;
}

.design-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }

.design-card-theme {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--bl-text-muted);
}
.design-card-name {
  font-family: var(--bl-font-display);
  font-size: 20px; font-weight: 800; color: var(--bl-text);
  letter-spacing: -0.5px; line-height: 1.2;
}
.design-card-tagline { font-size: 13px; color: var(--bl-text-dim); line-height: 1.4; }

.design-card-meta {
  display: flex; gap: 16px; margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--bl-border);
}
.design-meta-item { display: flex; flex-direction: column; gap: 2px; }
.design-meta-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--bl-text-muted); font-weight: 600; }
.design-meta-value { font-size: 15px; font-weight: 700; color: var(--bl-text); }
.design-meta-value.difficulty { color: var(--bl-yellow); }

.design-card-actions { padding: 0 20px 20px; display: flex; gap: 8px; }
.bl-btn-sm {
  background: var(--bl-surface2); color: var(--bl-text); font-weight: 600;
  font-size: 12px; padding: 6px 14px; border-radius: 7px;
  text-decoration: none; transition: background 0.15s, color 0.15s;
  border: 1px solid var(--bl-border); cursor: pointer;
  font-family: var(--bl-font-body); display: inline-flex; align-items: center; gap: 5px;
}
.bl-btn-sm:hover { background: var(--bl-border); color: var(--bl-text); }
.bl-btn-sm.yellow {
  background: var(--bl-yellow); color: #000; border-color: var(--bl-yellow);
}
.bl-btn-sm.yellow:hover { background: #ffe033; border-color: #ffe033; }

/* ── EXAMPLE PROMPT CHIPS ─────────────────────── */
.prompt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.prompt-chip {
  background: var(--bl-surface2); border: 1px solid var(--bl-border);
  color: var(--bl-text-dim); font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 20px; cursor: pointer;
  transition: all 0.15s; font-family: var(--bl-font-body);
}
.prompt-chip:hover { border-color: var(--bl-yellow); color: var(--bl-yellow); background: var(--bl-yellow-dim); }

/* ── PROMPT MODAL ────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.8); z-index: 200;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bl-surface); border: 1px solid var(--bl-border);
  border-radius: 20px; width: 100%; max-width: 600px;
  overflow: hidden; box-shadow: 0 32px 80px rgba(0,0,0,0.8);
  animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  background: var(--bl-surface2); padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--bl-border);
}
.modal-header h2 {
  font-family: var(--bl-font-display); font-size: 18px; font-weight: 800;
  color: var(--bl-text); letter-spacing: -0.3px;
}
.modal-close {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: var(--bl-border); color: var(--bl-text-dim);
  cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; line-height: 1;
}
.modal-close:hover { background: var(--bl-border); color: var(--bl-text); }

.modal-body { padding: 24px; }
.modal-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--bl-text-muted); margin-bottom: 8px;
}
.modal-input {
  width: 100%; background: var(--bl-navy); border: 1px solid var(--bl-border);
  color: var(--bl-text); font-family: var(--bl-font-body); font-size: 15px;
  padding: 12px 16px; border-radius: 10px; outline: none;
  transition: border-color 0.15s;
}
.modal-input::placeholder { color: var(--bl-text-muted); }
.modal-input:focus { border-color: var(--bl-yellow); }

.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-btn {
  flex: 1; padding: 12px 20px; border-radius: 10px; font-weight: 700;
  font-size: 14px; font-family: var(--bl-font-body); cursor: pointer; border: none;
  transition: opacity 0.15s, transform 0.15s;
}
.modal-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.modal-btn:active { transform: translateY(0); }
.modal-btn-primary { background: var(--bl-yellow); color: #000; }
.modal-btn-secondary { background: var(--bl-surface2); color: var(--bl-text-dim); border: 1px solid var(--bl-border); }

.modal-placeholder {
  margin-top: 16px; padding: 16px; background: var(--bl-yellow-dim);
  border: 1px solid rgba(255,215,0,0.2); border-radius: 10px;
  font-size: 13px; color: var(--bl-text-dim); line-height: 1.5; display: none;
}
.modal-placeholder.show { display: block; }

/* ── DESIGN DETAIL PAGE ───────────────────────── */
.detail-hero {
  height: 280px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.detail-hero-inner {
  font-family: var(--bl-font-display); font-size: 96px; font-weight: 800;
  color: rgba(255,255,255,0.12); letter-spacing: -3px; line-height: 1;
}
.detail-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bl-navy) 0%, transparent 60%);
}

.detail-content { max-width: 1200px; margin: 0 auto; padding: 0 40px 80px; }
.detail-title {
  font-family: var(--bl-font-display); font-size: 36px; font-weight: 800;
  color: var(--bl-text); letter-spacing: -1px; margin-bottom: 6px;
}
.detail-tagline { font-size: 16px; color: var(--bl-text-dim); margin-bottom: 32px; }

.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 48px; }

.detail-meta-row {
  display: flex; gap: 32px; margin-bottom: 32px; padding: 20px 24px;
  background: var(--bl-surface); border: 1px solid var(--bl-border); border-radius: 12px;
}
.detail-meta-item { display: flex; flex-direction: column; gap: 4px; }
.detail-meta-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--bl-text-muted); font-weight: 600; }
.detail-meta-value { font-size: 20px; font-weight: 800; color: var(--bl-text); font-family: var(--bl-font-display); }
.detail-meta-value.yellow { color: var(--bl-yellow); }

.detail-description { font-size: 15px; color: var(--bl-text-dim); line-height: 1.7; margin-bottom: 32px; }

.detail-actions { display: flex; flex-direction: column; gap: 12px; }
.detail-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 10px; font-weight: 700;
  font-size: 14px; font-family: var(--bl-font-body); text-decoration: none;
  border: none; cursor: pointer; transition: opacity 0.15s, transform 0.15s;
}
.detail-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.detail-btn-yellow { background: var(--bl-yellow); color: #000; }
.detail-btn-gray { background: var(--bl-surface2); color: var(--bl-text); border: 1px solid var(--bl-border); }
.detail-btn-red { background: var(--bl-red); color: #fff; }
.detail-btn:hover { text-decoration: none; color: inherit; }

.detail-sticky { position: sticky; top: 80px; }

/* ── INSTRUCTIONS PAGE ───────────────────────── */
.instructions-header {
  max-width: 900px; margin: 0 auto; padding: 48px 40px 32px;
}
.instructions-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--bl-text-muted); margin-bottom: 20px; }
.instructions-breadcrumb a { color: var(--bl-text-dim); text-decoration: none; }
.instructions-breadcrumb a:hover { color: var(--bl-yellow); }
.instructions-title {
  font-family: var(--bl-font-display); font-size: 32px; font-weight: 800;
  color: var(--bl-text); letter-spacing: -1px; margin-bottom: 8px;
}
.instructions-meta { display: flex; gap: 20px; font-size: 13px; color: var(--bl-text-dim); }

.instructions-content { max-width: 900px; margin: 0 auto; padding: 0 40px 80px; }

.steps-list { display: flex; flex-direction: column; gap: 16px; }
.step-card {
  background: var(--bl-surface); border: 1px solid var(--bl-border);
  border-radius: 14px; overflow: hidden;
  transition: border-color 0.2s;
}
.step-card:hover { border-color: rgba(255,215,0,0.3); }
.step-header {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--bl-border);
  background: var(--bl-surface2);
}
.step-number {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--bl-yellow); color: #000;
  font-family: var(--bl-font-display); font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step-title-text { font-family: var(--bl-font-display); font-size: 16px; font-weight: 800; color: var(--bl-text); }
.step-body { padding: 16px 20px; display: flex; gap: 20px; align-items: flex-start; }
.step-description { flex: 1; font-size: 14px; color: var(--bl-text-dim); line-height: 1.6; }
.step-bricks { flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.brick-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--bl-text-dim); }
.brick-swatch { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.brick-count { font-weight: 700; color: var(--bl-text); margin-left: auto; }

.parts-summary {
  background: var(--bl-surface); border: 1px solid var(--bl-border);
  border-radius: 14px; padding: 24px; margin-top: 32px;
}
.parts-summary h3 { font-family: var(--bl-font-display); font-size: 18px; font-weight: 800; color: var(--bl-text); margin-bottom: 16px; }
.parts-grid { display: flex; flex-direction: column; gap: 8px; }
.parts-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bl-surface2); border-radius: 8px; }
.parts-color { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.parts-name { flex: 1; font-size: 13px; color: var(--bl-text); }
.parts-count { font-size: 13px; font-weight: 700; color: var(--bl-yellow); }

.instructions-order {
  margin-top: 32px; text-align: center;
  padding: 32px; background: var(--bl-yellow-dim);
  border: 1px solid rgba(255,215,0,0.2); border-radius: 14px;
}
.instructions-order h3 { font-family: var(--bl-font-display); font-size: 20px; font-weight: 800; color: var(--bl-text); margin-bottom: 8px; }
.instructions-order p { font-size: 14px; color: var(--bl-text-dim); margin-bottom: 20px; }
.instructions-order-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bl-yellow); color: #000; font-weight: 700;
  font-size: 14px; padding: 12px 28px; border-radius: 10px;
  text-decoration: none; transition: opacity 0.15s, transform 0.15s;
  font-family: var(--bl-font-body); border: none; cursor: pointer;
}
.instructions-order-btn:hover { opacity: 0.85; transform: translateY(-1px); text-decoration: none; color: #000; }

/* ── FOOTER ─────────────────────────────────── */
.bl-footer {
  border-top: 1px solid var(--bl-border);
  padding: 32px 40px;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto;
}
.bl-footer-brand { font-family: var(--bl-font-display); font-size: 16px; font-weight: 800; color: var(--bl-yellow); }
.bl-footer-tag { font-size: 12px; color: var(--bl-text-muted); }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1000px) {
  .bl-design-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-sticky { position: static; }
}
@media (max-width: 700px) {
  .bl-design-grid { grid-template-columns: 1fr; }
  .bl-page-header { padding: 40px 20px 28px; }
  .bl-page-header { flex-direction: column; align-items: flex-start; }
  .bl-title { font-size: 32px; }
  .bl-design-grid, .bl-cta-strip, .detail-content, .instructions-content, .instructions-header { padding-left: 20px; padding-right: 20px; }
  .bl-nav { padding: 0 20px; }
  .bl-footer { padding: 24px 20px; flex-direction: column; gap: 8px; text-align: center; }
  .step-body { flex-direction: column; }
  .step-bricks { min-width: unset; }
  .detail-meta-row { flex-wrap: wrap; }
}

/* ── ANIMATIONS ──────────────────────────────── */
.fade-section { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-section.visible { opacity: 1; transform: translateY(0); }