/* =======================================================================
   Miravalle Construction LLC — design system
   Dark Editorial Gallery. Plain CSS, custom properties, no frameworks.
   ======================================================================= */

:root {
  --ink:        #0a0a0a;   /* page background */
  --ink-soft:   #141414;   /* panels, cards */
  --ink-line:   #1f1f1f;   /* hairline borders */
  --ink-hover:  #1a1a1a;   /* card hover bg */

  --gold:       #d4af6a;   /* primary accent */
  --gold-light: #e8d285;
  --gold-dark:  #a8842f;

  --cream:      #f5f1e8;
  --bone:       #e8e3d5;
  --smoke:      #8a8480;
  --whisper:    #5a554f;

  --radius-btn:  2px;
  --radius-card: 4px;
  --shadow:      0 8px 40px rgba(0,0,0,.4);
  --shadow-gold: 0 0 40px rgba(212,175,106,.15);
  --transition:  .5s cubic-bezier(.22,.61,.36,1);

  --container:   1180px;
  --gap:         24px;
}

/* ---------- base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }

/* ---------- ambient glow layer ---------- */
.ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(circle at 20% 30%, rgba(212,175,106,0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(212,175,106,0.04) 0%, transparent 40%);
  animation: ambientShift 14s ease-in-out infinite;
}
@keyframes ambientShift {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.05); }
}

/* ---------- typography shared ---------- */
.section-kicker {
  font-family: 'Inter', sans-serif;
  font-size: 11px; letter-spacing: 6px; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 36px;
  letter-spacing: -0.5px;
}
.section-head {
  text-align: center;
  margin-bottom: 56px;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 48px;
  background: rgba(10,10,10,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-line);
  animation: navFadeIn 1s ease 0.3s both;
}
@keyframes navFadeIn { from { opacity: 0; } to { opacity: 1; } }

.nav-logo {
  height: 56px;
  width: auto;
  display: block;
  aspect-ratio: 1120 / 488;
}

.nav-links {
  display: flex; gap: 32px; align-items: center;
}
.nav-links a {
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; font-weight: 500;
  color: var(--bone);
  transition: color .3s ease;
}
.nav-links a:hover { color: var(--gold); }

.nav-cta {
  color: var(--gold) !important;
  border: 1px solid var(--gold);
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  transition: all .35s ease;
}
.nav-cta:hover { background: var(--gold); color: var(--ink) !important; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 140px 24px 72px;
  position: relative;
  z-index: 2;
}
.hero-kicker {
  font-size: 11px; letter-spacing: 7px; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeIn 0.9s ease 0.4s both;
}
.hero-mark {
  display: block;
  height: clamp(200px, 30vw, 380px);
  width: auto;
  aspect-ratio: 1120 / 488;
  margin: 0 auto 28px;
  opacity: 0;
  animation: markReveal 1.4s cubic-bezier(.22,.61,.36,1) 0.6s both;
}
@keyframes markReveal {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.hero-tagline {
  font-size: 12px; letter-spacing: 10px; text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 56px;
  opacity: 0;
  animation: fadeIn 0.9s ease 1.3s both;
}
.hero-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--bone);
  max-width: 680px;
  margin: 0 auto 36px;
  opacity: 0;
  animation: fadeIn 0.9s ease 1.6s both;
}
.hero-headline em {
  font-style: italic;
  color: var(--gold-light);
  font-weight: 500;
}
.hero-rule {
  width: 1px; height: 64px; background: var(--gold);
  margin: 16px auto 32px;
  transform-origin: top;
  transform: scaleY(0);
  animation: ruleDrop 1s cubic-bezier(.22,.61,.36,1) 2s both;
}
@keyframes ruleDrop { to { transform: scaleY(1); } }
@keyframes fadeIn   { to { opacity: 1; } }

/* teaser card */
.hero-teaser {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 22px;
  align-items: center;
  width: min(100%, 540px);
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  padding: 22px 26px 22px 22px;
  margin: 0 auto;
  text-align: left;
  border-radius: var(--radius-card);
  opacity: 0;
  transform: translateY(20px);
  animation: teaserRise 1s cubic-bezier(.22,.61,.36,1) 2.3s both;
  position: relative;
  overflow: hidden;
  transition: border-color .35s ease, transform .35s ease;
}
.hero-teaser::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--gold);
  transform-origin: left;
  transform: scaleX(0);
  animation: ruleDraw 0.8s cubic-bezier(.22,.61,.36,1) 2.5s both;
}
.hero-teaser:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
@keyframes teaserRise { to { opacity: 1; transform: translateY(0); } }
@keyframes ruleDraw   { to { transform: scaleX(1); } }

.teaser-photo {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #2a1f15 0%, #1a1410 100%);
  border: 1px solid var(--ink-line);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.teaser-photo-label {
  position: absolute; top: 6px; right: 6px;
  font-size: 8px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(212,175,106,0.5);
}
.teaser-photo img { width: 100%; height: 100%; object-fit: cover; }

.teaser-meta-kicker {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.teaser-meta-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px; color: #fff; line-height: 1.1;
  margin-bottom: 4px;
}
.teaser-meta-sub {
  font-size: 11px; letter-spacing: 1.5px; color: var(--smoke);
}

.hero-scroll {
  margin-top: 48px;
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--smoke);
  opacity: 0;
  animation: fadeIn 0.8s ease 2.8s both, scrollBounce 2s ease 3s infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* ---------- scroll animations ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
[data-animate].in-view {
  opacity: 1;
  transform: translateY(0);
}
[data-animate-delay="1"] { transition-delay: .1s; }
[data-animate-delay="2"] { transition-delay: .2s; }
[data-animate-delay="3"] { transition-delay: .3s; }

/* ---------- A Closer Look (featured build) ---------- */
.closer {
  padding: 120px 40px 100px;
  border-top: 1px solid var(--ink-line);
  background: var(--ink);
  position: relative;
  z-index: 2;
}
.closer-head {
  max-width: var(--container); margin: 0 auto 48px;
  text-align: center;
}
.closer-photo {
  max-width: var(--container); margin: 0 auto 48px;
  aspect-ratio: 16/9;
  background: linear-gradient(180deg, rgba(10,10,10,0) 50%, rgba(10,10,10,0.5) 100%),
              linear-gradient(135deg, #2a1f15 0%, #1a1410 60%, #0f0a07 100%);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
}
.closer-photo > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.closer-photo .photo-label {
  position: absolute; top: 20px; right: 20px;
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(212,175,106,0.6);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  max-width: var(--container);
  margin: 0 auto 48px;
}
.stat {
  padding: 36px 24px;
  text-align: center;
  border-right: 1px solid var(--ink-line);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 3.5vw, 44px);
  color: var(--gold);
  line-height: 1;
  font-weight: 400;
}
.stat-label {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--smoke);
  margin-top: 10px;
}

.closer-intro {
  max-width: 760px; margin: 0 auto;
  font-size: 16px; line-height: 1.8;
  color: var(--bone);
  text-align: center;
  font-weight: 300;
}

/* ---------- gallery ---------- */
.gallery-section {
  padding: 100px 40px;
  background: var(--ink);
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--ink-line);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap);
  max-width: var(--container);
  margin: 0 auto;
}
.gallery-item {
  grid-column: span 2;
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--ink-line);
  background: linear-gradient(135deg, #1f1812 0%, #13100c 100%);
  cursor: default;
  transition: transform .5s ease, border-color .35s ease, box-shadow .5s ease;
}
.gallery-item.feature {
  grid-column: span 3;
  aspect-ratio: 16/9;
}
.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.gallery-item > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s ease;
}
.gallery-item:hover > img {
  transform: scale(1.04);
}
.gallery-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 16px;
}
.gallery-placeholder-label {
  font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase;
  color: rgba(212,175,106,0.45);
}
.gallery-placeholder-label::before { content: "\25A9  "; color: rgba(212,175,106,0.6); }

.gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 18px 20px 16px;
  background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0.9) 100%);
}
.gallery-caption-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: #fff;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 4px;
}
.gallery-caption-detail {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold);
}

/* staggered gallery reveal */
.gallery-item[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}
.gallery-item[data-animate].in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- craftsmanship ---------- */
.craft {
  padding: 100px 40px;
  background: var(--ink);
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--ink-line);
}
.craft-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  max-width: var(--container);
  margin: 0 auto;
}
.craft-card {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  padding: 28px 26px;
  border-radius: var(--radius-card);
  transition: border-color .35s ease, transform .35s ease, background .35s ease;
  position: relative;
  overflow: hidden;
}
.craft-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--gold);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .6s ease;
}
.craft-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  background: var(--ink-hover);
}
.craft-card:hover::before { transform: scaleX(1); }
.craft-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 500;
}
.craft-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: #fff;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.2;
}
.craft-body {
  font-size: 14px; line-height: 1.65;
  color: var(--bone);
  font-weight: 300;
}

/* ---------- about ---------- */
.about {
  padding: 120px 40px;
  background: var(--ink);
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--ink-line);
  text-align: center;
}
.about-inner { max-width: 760px; margin: 0 auto; }
.about-body {
  font-size: 18px; line-height: 1.75;
  color: var(--bone);
  font-weight: 300;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
}

/* ---------- inquire ---------- */
.inquire {
  padding: 120px 40px;
  background: var(--ink);
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--ink-line);
  text-align: center;
}
.inquire-inner { max-width: 640px; margin: 0 auto; }
.inquire-subline {
  font-size: 15px; line-height: 1.7;
  color: var(--bone);
  margin-bottom: 48px;
  font-weight: 300;
}

.inquire-form {
  text-align: left;
}
.form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
.form-field { display: flex; flex-direction: column; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 8px;
  font-weight: 500;
}
.form-field label .req { color: var(--gold); margin-left: 4px; }
.form-field input,
.form-field textarea {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  color: var(--bone);
  padding: 14px 16px;
  font-size: 15px;
  border-radius: var(--radius-btn);
  width: 100%;
  transition: border-color .25s ease;
  font-family: 'Inter', sans-serif;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.form-field textarea { resize: vertical; min-height: 120px; }

.btn {
  display: inline-block;
  padding: 16px 36px;
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase; font-weight: 600;
  border-radius: var(--radius-btn);
  transition: all 0.4s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--gold); color: var(--ink);
  border: 1px solid var(--gold);
}
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); }
.form-submit { width: 100%; margin-top: 8px; }

.form-error {
  background: rgba(180, 60, 60, 0.12);
  border: 1px solid rgba(180, 60, 60, 0.4);
  color: #f5c2c2;
  padding: 14px 18px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  margin-top: 16px;
}
.form-error a { color: var(--gold); text-decoration: underline; }

.form-success {
  padding: 40px 28px;
  background: var(--ink-soft);
  border: 1px solid var(--gold);
  border-radius: var(--radius-card);
  text-align: center;
}
.form-success-mark {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gold); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 600;
  margin: 0 auto 18px;
}
.form-success-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; color: #fff; margin-bottom: 8px;
  font-weight: 500;
}
.form-success-body {
  font-size: 14px; color: var(--bone); line-height: 1.6;
}

.inquire-alt {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 22px;
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--ink-line);
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--smoke);
}
.inquire-alt a {
  color: var(--gold);
  font-weight: 500;
  transition: color .25s ease;
}
.inquire-alt a:hover { color: var(--gold-light); }

/* ---------- footer ---------- */
.footer {
  padding: 48px 40px;
  background: #070707;
  border-top: 1px solid var(--ink-line);
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.footer-logo {
  height: 40px;
  width: auto;
  aspect-ratio: 1120 / 488;
  opacity: 0.85;
}
.footer-meta {
  display: flex;
  gap: 18px;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--smoke);
}

/* =======================================================================
   Responsive
   ======================================================================= */

@media (max-width: 1100px) {
  .nav-links { gap: 22px; }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-item { grid-column: span 2; }
  .gallery-item.feature { grid-column: span 4; }
  .craft-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav {
    padding: 10px 18px;
    flex-wrap: wrap;
  }
  .nav-logo { height: 46px; }
  .nav-links {
    gap: 14px;
    font-size: 10px;
  }
  .nav-links li:nth-child(1),
  .nav-links li:nth-child(2),
  .nav-links li:nth-child(3),
  .nav-links li:nth-child(4) { display: none; }

  .hero { padding: 120px 20px 60px; min-height: auto; }
  .hero-kicker { letter-spacing: 4px; margin-bottom: 28px; }
  .hero-mark { margin-bottom: 20px; }
  .hero-tagline { letter-spacing: 5px; margin-bottom: 36px; font-size: 11px; }
  .hero-headline { font-size: 19px; margin-bottom: 28px; }
  .hero-rule { height: 48px; margin: 8px auto 24px; }

  .hero-teaser {
    grid-template-columns: 90px 1fr;
    gap: 16px;
    padding: 16px 18px 16px 16px;
  }
  .teaser-meta-title { font-size: 20px; }

  .closer,
  .gallery-section,
  .craft,
  .about,
  .inquire { padding: 72px 20px; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--ink-line); }

  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item,
  .gallery-item.feature { grid-column: span 1; aspect-ratio: 4/3; }

  .craft-grid { grid-template-columns: 1fr; }

  .section-title { font-size: 28px; margin-bottom: 28px; }
  .section-kicker { letter-spacing: 4px; font-size: 10px; }
  .section-head { margin-bottom: 40px; }

  .form-fields { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-meta { flex-direction: column; gap: 8px; }
}

/* =======================================================================
   Print (just in case)
   ======================================================================= */
@media print {
  .ambient, .nav, .hero-scroll, .inquire, .footer { display: none; }
  body { background: #fff; color: #000; }
}
