/* ============================================================
   MILA HOMES — DESIGN TOKENS
   AST-MH-2026-01  ·  matches Bricks 2.2 :root spec exactly
   ============================================================ */

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

:root {
  /* Primary */
  --color-solar-fusion:    #cd9f46;
  --color-mahogany:        #3C2410;
  --color-shell:           #FAF6EE;

  /* Secondary */
  --color-kingfisher:      #096872;
  --color-warm-sand:       #E8D0A0;
  --color-seafoam:         #C8E8EC;

  /* Supporting */
  --color-mahogany-deep:   #251608;
  --color-kingfisher-deep: #054d55;
  --color-gold-deep:       #9a7330;
  --color-shell-mid:       #f0e9da;

  /* Type */
  --font-display: 'Cormorant Garamond', Garamond, serif;
  --font-ui:      'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  --text-hero:          clamp(56pt, 5vw, 84px);
  --text-section-title: clamp(36pt, 4vw, 60px);
  --text-card-title:    clamp(18pt, 2vw, 28px);
  --text-eyebrow:       11px;
  --text-body:          15px;
  --text-caption:       12px;
  --text-button:        12px;

  /* Spacing — 8px base */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  16px;
  --space-4:  24px;
  --space-5:  40px;
  --space-6:  80px;
  --space-7:  120px;
  --space-8:  160px;

  /* Layout */
  --grid-max-width:          1440px;
  --grid-gutter-desktop:     24px;
  --grid-gutter-tablet:      20px;
  --grid-gutter-mobile:      16px;
  --section-padding-desktop: 120px;
  --section-padding-mobile:  80px;
  --nav-height:              70px;

  /* Borders */
  --border-color:      var(--color-warm-sand);
  --border-width:      0.5px;
  --radius-default:    4px;
  --radius-hero-image: 4px 140px 4px 4px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  font-size: var(--text-body);
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-mahogany);
  background: var(--color-shell);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ─── Section backgrounds ─── */
.section-shell      { background-color: var(--color-shell);      padding: var(--section-padding-desktop) 0; }
.section-shell-mid  { background-color: var(--color-shell-mid);  padding: var(--section-padding-desktop) 0; }
.section-mahogany   { background-color: var(--color-mahogany-deep); color: var(--color-shell); padding: var(--section-padding-desktop) 0; }
.section-seafoam    { background-color: var(--color-seafoam);    padding: var(--section-padding-desktop) 0; }
@media (max-width: 767px) {
  .section-shell, .section-shell-mid, .section-mahogany, .section-seafoam {
    padding: var(--section-padding-mobile) 0;
  }
}

/* ─── Buttons ─── */
.btn-primary, .btn-secondary, .btn-ghost-dark {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-ui);
  font-size: var(--text-button); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  min-height: 44px; padding: 0 28px;
  border-radius: var(--radius-default);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background-color: var(--color-solar-fusion);
  color: var(--color-mahogany-deep);
  border: none;
}
.btn-primary:hover, .btn-primary:focus-visible {
  background-color: var(--color-gold-deep);
  color: var(--color-shell);
}
.btn-secondary {
  background-color: transparent;
  color: var(--color-mahogany);
  border: var(--border-width) solid var(--color-warm-sand);
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  border-color: var(--color-solar-fusion);
  color: var(--color-solar-fusion);
}
.btn-ghost-dark {
  background-color: transparent;
  color: var(--color-seafoam);
  border: var(--border-width) solid var(--color-seafoam);
}
.btn-ghost-dark:hover, .btn-ghost-dark:focus-visible {
  background-color: var(--color-seafoam);
  color: var(--color-kingfisher-deep);
}

/* ─── Typography presets ─── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-ui);
  font-size: var(--text-eyebrow); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--color-gold-deep);
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: ''; display: block; width: 28px; height: var(--border-width);
  background: var(--color-solar-fusion);
}
.eyebrow.no-rule::before { display: none; }

.text-hero {
  font-family: var(--font-display);
  font-size: var(--text-hero); font-weight: 300;
  color: var(--color-mahogany);
  line-height: 1.05; letter-spacing: -0.01em;
}
.text-hero em { font-style: italic; font-weight: 300; color: var(--color-solar-fusion); }

.text-section-title {
  font-family: var(--font-display);
  font-size: var(--text-section-title); font-weight: 300;
  color: var(--color-mahogany);
  line-height: 1.15;
}
.text-section-title em { font-style: italic; font-weight: 300; color: var(--color-solar-fusion); }

.text-card-title {
  font-family: var(--font-display);
  font-size: var(--text-card-title); font-weight: 400;
  color: var(--color-mahogany);
  line-height: 1.25;
}

.text-body  { font-size: var(--text-body); font-weight: 300; line-height: 1.75; color: var(--color-mahogany); }
.text-body p + p { margin-top: 1.1em; }
.text-caption { font-family: var(--font-ui); font-size: var(--text-caption); color: var(--color-mahogany); opacity: 0.7; line-height: 1.5; }

/* ─── Container ─── */
.container {
  width: 100%;
  max-width: var(--grid-max-width);
  margin: 0 auto;
  padding-left:  var(--grid-gutter-desktop);
  padding-right: var(--grid-gutter-desktop);
}
@media (max-width: 1024px) {
  .container { padding-left: var(--grid-gutter-tablet); padding-right: var(--grid-gutter-tablet); }
}
@media (max-width: 767px) {
  .container { padding-left: var(--grid-gutter-mobile); padding-right: var(--grid-gutter-mobile); }
}

.divider { border: none; border-top: var(--border-width) solid var(--color-warm-sand); margin: 0; }
.hero-image-frame { border-radius: var(--radius-hero-image); overflow: hidden; }

/* ─── Nav (shared across all pages) ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(250, 246, 238, 0.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: var(--border-width) solid rgba(232, 208, 160, 0.4);
}
.nav-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 400;
  color: var(--color-mahogany);
  letter-spacing: 0.04em;
}
.nav-logo em { font-style: italic; color: var(--color-solar-fusion); font-weight: 400; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-logo { white-space: nowrap; }
@media (max-width: 1180px) { .nav-links { gap: 20px; } .nav-link { font-size: 12px; } }
@media (max-width: 1024px) { .nav-links { display: none; } }
.nav-link {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 400;
  color: #4a4a4a;
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link[aria-current="page"] { color: var(--color-mahogany); }
.nav-link:hover, .nav-link:focus-visible {
  color: var(--color-kingfisher);
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
@media (max-width: 767px) { .nav-links { display: none; } }

/* ─── Footer (shared) ─── */
.site-footer {
  background: var(--color-mahogany-deep);
  color: rgba(250, 246, 238, 0.55);
  padding: 56px 0 40px;
}
.site-footer .footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 40px;
  border-bottom: var(--border-width) solid rgba(232, 208, 160, 0.15);
}
.site-footer .footer-logo {
  font-family: var(--font-display);
  font-size: 24px; color: var(--color-shell);
  margin-bottom: 16px; letter-spacing: 0.04em;
}
.site-footer .footer-logo em { font-style: italic; color: var(--color-solar-fusion); }
.site-footer p { font-size: 13px; line-height: 1.7; max-width: 32ch; }
.site-footer h4 {
  font-family: var(--font-ui); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--color-warm-sand);
  margin-bottom: 18px;
}
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { font-size: 13px; color: rgba(250, 246, 238, 0.6); transition: color 0.2s; }
.site-footer a:hover { color: var(--color-shell); }
.site-footer .footer-meta {
  padding-top: 32px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-size: 12px; color: rgba(250, 246, 238, 0.4);
}
@media (max-width: 767px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Status pills (shared) ─── */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px;
  border: var(--border-width) solid;
  border-radius: 2px;
}
.status-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
}
.status-available { color: #2D7A4F; border-color: rgba(45,122,79,0.35); background: rgba(45,122,79,0.06); }
.status-available::before { background: #4CAF50; }
.status-reserved { color: #8B6914; border-color: rgba(139,105,20,0.35); background: rgba(139,105,20,0.06); }
.status-reserved::before { background: #C99A2B; }
.status-sold { color: #6b6b6b; border-color: rgba(107,107,107,0.35); background: rgba(107,107,107,0.06); }
.status-sold::before { background: #9e9e9e; }
.status-construction { color: var(--color-kingfisher-deep); border-color: rgba(5,77,85,0.35); background: rgba(200,232,236,0.4); }
.status-construction::before { background: var(--color-kingfisher); }

/* ─── Energy badge ─── */
.energy-badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-ui); font-size: 11px; font-weight: 500;
  padding: 3px 10px;
  background: #2D7A4F; color: var(--color-shell);
  border-radius: 2px; letter-spacing: 0.04em;
}

/* ─── Annotation chip (used on placeholder images, toggleable) ─── */
.acf-tag {
  position: absolute; bottom: 12px; left: 12px; z-index: 2;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px; letter-spacing: 0.04em;
  color: rgba(250,246,238,0.85);
  background: rgba(37,22,8,0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 4px 8px; border-radius: 2px;
  pointer-events: none;
}
body.acf-off .acf-tag { display: none; }

/* ─── Page-body offset for fixed nav ─── */
.page { padding-top: var(--nav-height); }

/* ─── Form controls (shared base) ─── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label {
  font-family: var(--font-ui);
  font-size: 10px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-mahogany); opacity: 0.55;
}
.field-input, .field-select, .field-textarea {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 300;
  color: var(--color-mahogany);
  background: var(--color-shell);
  border: var(--border-width) solid var(--color-warm-sand);
  border-radius: var(--radius-default);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
}
.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--color-solar-fusion);
}
.field-textarea { resize: vertical; min-height: 96px; }
.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239a7330' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px;
}

/* ─── Annotation toggle (small floating helper for designers) ─── */
.acf-toggle {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px; letter-spacing: 0.04em;
  background: var(--color-mahogany-deep); color: var(--color-shell);
  padding: 8px 14px; border-radius: 999px;
  border: var(--border-width) solid rgba(232,208,160,0.25);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s;
}
.acf-toggle:hover { opacity: 1; }
.acf-toggle .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-solar-fusion);
}
body.acf-off .acf-toggle .dot { background: rgba(232,208,160,0.4); }
