/* ============ XENIA HOME BUILD - DESIGN SYSTEM ============ */

:root {
  --primary: #1F4E78;
  --primary-dark: #173d5e;
  --primary-light: #2E75B6;
  --accent: #D4A017;
  --accent-light: #F4D068;
  --cream: #FAF7F2;
  --cream-dark: #F0EBE0;
  --text: #1A1A1A;
  --text-soft: #4A4A4A;
  --text-light: #6B7280;
  --border: #E5E1D8;
  --green: #10B981;
  --red: #EF4444;
  --yellow: #FBBF24;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

/* ============ NAVIGATION ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; color: var(--primary);
}
.nav-brand-icon {
  width: 32px; height: 32px;
  background: var(--primary); color: white;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.nav-links {
  display: flex; gap: 8px;
  list-style: none;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--text-soft);
  transition: all 0.15s;
}
.nav-links a:hover { background: rgba(31,78,120,0.08); color: var(--primary); }
.nav-links a.active { background: var(--primary); color: white; }

.nav-toggle {
  display: none;
  background: none; border: none;
  width: 36px; height: 36px;
  cursor: pointer;
  color: var(--primary);
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 12px 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 16px; }
}

/* ============ LAYOUT ============ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }

.page-hero {
  padding: 48px 0 32px;
  text-align: center;
}
.page-hero .eyebrow {
  font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--accent); font-weight: 600;
  margin-bottom: 8px;
}
.page-hero h1 {
  font-size: 48px; margin-bottom: 12px;
  color: var(--primary);
}
.page-hero p {
  font-size: 18px; color: var(--text-soft);
  max-width: 640px; margin: 0 auto;
}

/* ============ GRID ============ */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-auto { grid-template-columns: 1fr; }
}

/* ============ CARDS ============ */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow); }
.card-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-light); font-weight: 600;
  margin-bottom: 12px;
}
.card h2 { font-size: 24px; margin-bottom: 16px; color: var(--primary); }
.card h3 { font-size: 18px; margin-bottom: 12px; color: var(--text); font-family: var(--font-body); font-weight: 600; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: #B58912; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--cream-dark); }

/* ============ STATS ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 700; color: var(--primary);
  line-height: 1.1;
}
.stat-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-light); font-weight: 600;
  margin-top: 6px;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  height: 70vh; min-height: 480px; max-height: 720px;
  overflow: hidden;
  border-radius: 0;
  display: flex; align-items: flex-end;
}
.hero-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
}
.hero-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}
.hero-content {
  position: relative; z-index: 1;
  color: white;
  padding: 64px 24px;
  width: 100%;
}
.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent);
  color: white;
  border-radius: 100px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 56px; color: white; margin-bottom: 16px;
  line-height: 1.05;
}
.hero p { font-size: 20px; opacity: 0.95; max-width: 560px; margin-bottom: 24px; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 32px;
  margin-top: 32px;
}
.hero-stat-value { font-family: var(--font-display); font-size: 32px; font-weight: 700; }
.hero-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; margin-top: 2px; }
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px;
}

@media (max-width: 640px) {
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 16px; }
  .hero-content { padding: 40px 24px; }
  .hero-stats { gap: 20px; }
  .hero-stat-value { font-size: 24px; }
}

/* ============ TABLE ============ */
.table {
  width: 100%; border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table th, .table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table th {
  background: var(--cream-dark);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  font-weight: 600; color: var(--text-soft);
}
.table .amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.table tr.total {
  background: rgba(212, 160, 23, 0.08);
  font-weight: 700;
}
.table tr.total td { border-top: 2px solid var(--accent); font-size: 16px; }
.table tr:last-child td { border-bottom: none; }

/* ============ BADGES ============ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-primary { background: rgba(31,78,120,0.1); color: var(--primary); }
.badge-accent { background: rgba(212,160,23,0.15); color: #8B6614; }
.badge-green { background: rgba(16,185,129,0.12); color: #047857; }
.badge-red { background: rgba(239,68,68,0.12); color: #B91C1C; }

/* ============ GALLERY ============ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--cream-dark);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  font-size: 14px; font-weight: 500;
}

/* ============ LIGHTBOX ============ */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.1);
  color: white; border: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 24px; cursor: pointer;
}

/* ============ TIMELINE ============ */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ''; position: absolute; left: 12px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 28px; }
.timeline-item::before {
  content: '';
  position: absolute; left: -27px; top: 4px;
  width: 18px; height: 18px;
  background: white; border: 3px solid var(--border);
  border-radius: 50%;
}
.timeline-item.done::before { background: var(--green); border-color: var(--green); }
.timeline-item.current::before { background: var(--accent); border-color: var(--accent); }
.timeline-date {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-light); font-weight: 600;
}
.timeline-title { font-size: 16px; font-weight: 600; margin: 2px 0 4px; }
.timeline-desc { font-size: 14px; color: var(--text-soft); }

/* ============ FORM INPUTS ============ */
.input-group label {
  display: block;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-light); font-weight: 600;
  margin-bottom: 6px;
}
.input-group input, .input-group select, .input-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font-body);
  background: white;
  transition: border 0.15s;
}
.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(46,117,182,0.1);
}
.slider-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 0;
}
.slider-row label { font-size: 13px; min-width: 140px; color: var(--text-soft); font-weight: 500; }
.slider-row input[type=range] { flex: 1; accent-color: var(--primary); }
.slider-row .slider-val {
  min-width: 90px; text-align: right;
  font-weight: 600; color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* ============ DECISION CARDS ============ */
.decision-list { display: flex; flex-direction: column; gap: 12px; }
.decision {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; align-items: flex-start; gap: 16px;
}
.decision-checkbox {
  width: 22px; height: 22px;
  margin-top: 2px;
  accent-color: var(--green);
  cursor: pointer;
}
.decision-content { flex: 1; }
.decision-title { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.decision-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--text-light);
}
.decision-note {
  margin-top: 8px;
  font-size: 13px; color: var(--text-soft);
  padding: 8px 12px;
  background: var(--cream);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}
.decision.done .decision-title { text-decoration: line-through; color: var(--text-light); }

/* ============ BUDGET CHART CONTAINER ============ */
.chart-container { position: relative; height: 320px; }

/* ============ FOOTER ============ */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  padding: 48px 0 32px;
  margin-top: 64px;
}
.footer h4 {
  color: white;
  font-family: var(--font-body);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.footer a { color: rgba(255,255,255,0.85); }
.footer a:hover { color: var(--accent-light); }
.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 13px;
  text-align: center;
  opacity: 0.7;
}

/* ============ UTILITIES ============ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-light { color: var(--text-light); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.w-full { width: 100%; }
.hidden { display: none; }
