/* =========================================
   OPEN HOMES — Studio & Interiors
   Design System
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --charcoal: #1C1C1E;
  --ivory: #F7F3EE;
  --gold: #C9A84C;
  --gold-light: #E8D5A3;
  --sage: #8FA98C;
  --white: #FFFFFF;
  --text-muted: #6B6B6B;
  --border: #E2DDD8;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --max-w: 1280px;
  --section-pad: 100px 40px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--charcoal);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
}

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.2rem; }

p { font-size: 1rem; line-height: 1.75; color: var(--text-muted); }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(247, 243, 238, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
}

.nav-brand {
  display: flex; flex-direction: column;
  text-decoration: none;
}
.nav-brand .brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: 0.02em;
}
.nav-brand .brand-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-weight: 500;
}

.nav-links {
  display: flex; gap: 40px; list-style: none;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--charcoal);
  color: var(--ivory) !important;
  padding: 10px 24px;
  border-radius: 2px;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--gold) !important; }
.nav-cta::after { display: none !important; }

/* hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 24px; height: 1.5px;
  background: var(--charcoal); transition: all 0.3s;
}
.mobile-menu {
  display: none; position: fixed;
  top: 72px; left: 0; right: 0;
  background: var(--ivory);
  padding: 24px 40px 32px;
  border-bottom: 1px solid var(--border);
  z-index: 999;
  flex-direction: column; gap: 20px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none; font-size: 1.1rem;
  font-weight: 500; color: var(--charcoal);
  letter-spacing: 0.05em;
}

/* ─── THRESHOLD LINE (signature element) ─── */
.threshold {
  width: 60px; height: 2px;
  background: var(--gold);
  margin: 24px 0;
}

.threshold-center {
  width: 60px; height: 2px;
  background: var(--gold);
  margin: 24px auto;
}

/* ─── SECTION WRAPPER ─── */
.section { padding: var(--section-pad); }
.container { max-width: var(--max-w); margin: 0 auto; }

.section-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 12px;
}

/* ─── HERO / STORY SECTION ─── */
#home {
  padding-top: 0;
  min-height: 100vh;
  display: flex; align-items: center;
  background: var(--charcoal);
  color: var(--ivory);
  overflow: hidden;
  position: relative;
}

.hero-bg-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(8rem, 20vw, 18rem);
  color: rgba(255,255,255,0.025);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.02em;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 140px 40px 80px;
  width: 100%;
}

.hero-story { position: relative; z-index: 1; }
.hero-story .section-eyebrow { color: var(--gold); }
.hero-story h1 {
  color: var(--ivory);
  font-style: italic;
  margin-bottom: 24px;
}
.hero-story h1 span { color: var(--gold); font-style: normal; }
.hero-story p { color: rgba(247,243,238,0.7); }

.hero-tagline {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-tagline .big-tag {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-style: italic;
  color: var(--gold-light);
  letter-spacing: 0.02em;
}

/* Hero gallery */
.hero-gallery {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.gallery-card {
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.gallery-card-img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.gallery-card:hover .gallery-card-img { transform: scale(1.04); }

.gallery-card.tall { grid-row: span 2; }
.gallery-card.tall .gallery-card-img { aspect-ratio: 3/4; height: 100%; }

.gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 16px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--ivory);
}
.gallery-caption h4 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 400;
  margin-bottom: 2px;
}
.gallery-caption p {
  font-size: 0.72rem; color: rgba(247,243,238,0.65);
  text-transform: uppercase; letter-spacing: 0.1em;
  line-height: 1.3;
}

/* placeholder gradients for images */
.img-placeholder {
  width: 100%; height: 100%;
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(255,255,255,0.25);
  font-size: 0.85rem;
}

.ph-1 { background: linear-gradient(135deg, #2a2318 0%, #3d3020 50%, #1a1810 100%); }
.ph-2 { background: linear-gradient(135deg, #1e2820 0%, #253022 100%); }
.ph-3 { background: linear-gradient(135deg, #1d1f2a 0%, #252730 100%); }
.ph-4 { background: linear-gradient(135deg, #2a1e1a 0%, #321e18 100%); }

/* ─── OFFERINGS SECTION ─── */
#offerings {
  background: var(--white);
  padding: 100px 40px;
}

.offerings-header { text-align: center; margin-bottom: 64px; }
.offerings-header h2 span { color: var(--gold); }

.packages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.package-card {
  background: var(--white);
  padding: 40px 28px;
  position: relative;
  transition: background 0.3s;
  cursor: default;
  display: flex; flex-direction: column;
}

.package-card.featured {
  background: var(--charcoal);
}

.package-card:hover { background: var(--ivory); }
.package-card.featured:hover { background: #2a2a2c; }

.package-tier {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 16px;
}

.package-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--charcoal);
}

.package-card.featured .package-name { color: var(--ivory); }

.package-price {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.package-card.featured .package-price { color: rgba(247,243,238,0.5); border-color: rgba(255,255,255,0.1); }

.package-price strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--charcoal);
  font-weight: 500;
  margin-bottom: 2px;
}
.package-card.featured .package-price strong { color: var(--gold); }

.package-features { list-style: none; flex: 1; }
.package-features li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 8px;
  line-height: 1.4;
}
.package-card.featured .package-features li { color: rgba(247,243,238,0.65); border-color: rgba(255,255,255,0.08); }

.package-features li::before {
  content: '—';
  color: var(--gold);
  flex-shrink: 0;
  font-size: 0.75rem;
  margin-top: 2px;
}

.package-cta {
  margin-top: 32px;
  display: inline-block;
  padding: 12px 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  transition: color 0.2s, border-color 0.2s;
  cursor: pointer;
  background: none; border-left: none; border-top: none; border-right: none;
}
.package-cta:hover { color: var(--charcoal); border-color: var(--charcoal); }
.package-card.featured .package-cta:hover { color: var(--ivory); border-color: var(--ivory); }

/* ─── CONTACT SECTION ─── */
#contact-section, #contact {
  background: var(--ivory);
  padding: 100px 40px;
}

#contact { background: var(--charcoal); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  max-width: var(--max-w);
  margin: 0 auto;
  align-items: start;
}

.contact-info .section-eyebrow { }

.contact-info h2 { margin-bottom: 16px; }

#contact .contact-info h2 { color: var(--ivory); }
#contact .contact-info p { color: rgba(247,243,238,0.6); }
#contact .section-eyebrow { color: var(--gold); }

.contact-detail {
  margin-top: 40px;
  display: flex; flex-direction: column; gap: 20px;
}

.contact-item {
  display: flex; align-items: flex-start; gap: 16px;
}

.contact-icon {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.1rem; border-radius: 2px;
}

#contact .contact-icon {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

.contact-item-text strong {
  display: block; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gold); margin-bottom: 4px; font-weight: 600;
}

.contact-item-text span {
  font-size: 0.92rem; color: var(--text-muted);
}

#contact .contact-item-text span { color: rgba(247,243,238,0.6); }

/* form */
.contact-form {
  background: var(--white);
  padding: 48px 44px;
  border-radius: 3px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.08);
}

#contact .contact-form {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: none;
}

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

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

.form-group label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
}

#contact .form-group label { color: rgba(247,243,238,0.7); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

#contact .form-group input,
#contact .form-group select,
#contact .form-group textarea {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  color: var(--ivory);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); }

.form-group textarea { height: 120px; resize: none; }

.form-group select option { background: var(--charcoal); color: var(--ivory); }

.form-submit {
  width: 100%;
  padding: 16px;
  background: var(--charcoal);
  color: var(--ivory);
  border: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.25s;
}
.form-submit:hover { background: var(--gold); }

#contact .form-submit { background: var(--gold); color: var(--charcoal); }
#contact .form-submit:hover { background: var(--ivory); }

.form-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
}
#contact .form-note { color: rgba(247,243,238,0.35); }

.form-success {
  display: none;
  text-align: center;
  padding: 40px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  font-style: italic;
}

/* ─── FOOTER ─── */
footer {
  background: #111;
  color: rgba(247,243,238,0.4);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

footer .footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: rgba(247,243,238,0.6);
}

/* ─── PAGE: ABOUT ─── */
#about-hero {
  padding: 160px 40px 80px;
  background: var(--charcoal);
  text-align: center;
}
#about-hero h1 { color: var(--ivory); font-style: italic; }
#about-hero p { color: rgba(247,243,238,0.6); max-width: 560px; margin: 20px auto 0; }

#about-story {
  padding: 100px 40px;
  background: var(--ivory);
}

.about-story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: var(--max-w);
  margin: 0 auto 80px;
  align-items: center;
}

.about-story-grid.reverse { direction: rtl; }
.about-story-grid.reverse > * { direction: ltr; }

.about-img-block {
  background: var(--charcoal);
  aspect-ratio: 4/5;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(247,243,238,0.2);
  font-size: 0.9rem;
  position: relative; overflow: hidden;
}

.about-img-block::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 4px; background: var(--gold);
}

.about-text h2 { margin-bottom: 16px; }
.about-text p { margin-bottom: 16px; }

.philosophy-grid {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}

.philosophy-card {
  padding: 36px 28px;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.philosophy-card .icon { font-size: 1.8rem; margin-bottom: 16px; }
.philosophy-card h4 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 10px; }

/* ─── PAGE: PAST WORK ─── */
#work-hero {
  padding: 160px 40px 80px;
  background: var(--charcoal); text-align: center;
}
#work-hero h1 { color: var(--ivory); font-style: italic; }
#work-hero p { color: rgba(247,243,238,0.6); max-width: 480px; margin: 16px auto 0; }

#work-grid { padding: 80px 40px 100px; }

.work-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: var(--max-w); margin: 0 auto;
}

.work-tile {
  position: relative; overflow: hidden;
  border-radius: 3px; cursor: pointer;
  background: var(--charcoal);
  aspect-ratio: 16/10;
  transition: transform 0.3s;
}

.work-tile:hover { transform: translateY(-4px); }
.work-tile:hover .work-tile-overlay { opacity: 1; }

.work-tile-bg {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.5s;
}
.work-tile:hover .work-tile-bg { transform: scale(1.04); }

.work-tile-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(255,255,255,0.15);
}

.work-tile-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 32px 28px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: var(--ivory);
}

.work-tile-info .work-type {
  font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--gold); margin-bottom: 6px; display: block;
}

.work-tile-info h3 {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 400; color: var(--ivory);
}

.work-tile-overlay {
  position: absolute; inset: 0;
  background: rgba(201,168,76,0.12);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}

.overlay-btn {
  padding: 12px 28px;
  border: 1px solid rgba(255,255,255,0.7);
  color: var(--ivory);
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 600;
  border-radius: 2px; background: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s, color 0.2s;
}
.overlay-btn:hover { background: var(--ivory); color: var(--charcoal); }

/* ─── MODAL ─── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); z-index: 2000;
  padding: 40px; overflow-y: auto;
  backdrop-filter: blur(6px);
}

.modal-overlay.open { display: flex; align-items: flex-start; justify-content: center; }

.modal {
  background: var(--ivory);
  max-width: 900px; width: 100%;
  border-radius: 4px; overflow: hidden;
  position: relative;
  margin: auto;
}

.modal-close {
  position: absolute; top: 20px; right: 20px;
  background: rgba(0,0,0,0.15); border: none;
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; font-size: 1.1rem;
  color: var(--charcoal); z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(0,0,0,0.3); color: white; }

.modal-hero {
  background: var(--charcoal);
  padding: 52px 48px 40px;
}

.modal-hero .work-type {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--gold); margin-bottom: 10px; display: block;
}

.modal-hero h2 { color: var(--ivory); font-style: italic; margin-bottom: 10px; }
.modal-hero p { color: rgba(247,243,238,0.6); max-width: 600px; }

.modal-body { padding: 48px; }

.modal-section { margin-bottom: 36px; }
.modal-section h4 {
  font-family: var(--font-display); font-size: 1.2rem;
  margin-bottom: 14px; color: var(--charcoal);
}

.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-tag {
  padding: 6px 14px;
  border: 1px solid var(--border);
  font-size: 0.78rem; border-radius: 2px;
  color: var(--text-muted);
}
.modal-tag.highlight {
  background: var(--gold); color: var(--charcoal);
  border-color: var(--gold); font-weight: 600;
}

/* ─── UTILITIES ─── */
.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: var(--gold);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: #b8942e; transform: translateY(-1px); }

.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .packages-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-pad: 72px 24px; }

  nav { padding: 18px 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 120px 24px 60px;
    gap: 48px;
  }
  .hero-gallery { grid-template-columns: 1fr 1fr; }
  .gallery-card.tall { grid-row: auto; }
  .gallery-card.tall .gallery-card-img { aspect-ratio: 4/3; height: auto; }

  .packages-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .contact-form { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }

  .about-story-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-story-grid.reverse { direction: ltr; }
  .philosophy-grid { grid-template-columns: 1fr; }
  .work-tiles { grid-template-columns: 1fr; }

  footer { flex-direction: column; gap: 12px; text-align: center; }
  .modal-hero { padding: 40px 28px 32px; }
  .modal-body { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
