/* Apollo Homes — site styles. Values from the Apollo Homes Brand System tokens. */
:root {
  --ground: #f3efe8;
  --ground-raised: #ffffff;
  --ground-sunken: #e9e3da;
  --plaster: #e3ddd3;
  --ink: #1c1a17;
  --ink-muted: #6b655c;
  --oxide: #9a4b2a;
  --on-oxide: #f3efe8;
  --oxide-tint: #f1e3da;
  --basalt: #1c1a17;
  --basalt-raised: #262320;
  --basalt-sunken: #141311;
  --basalt-line: #3a3631;
  --tyndall: #f3efe8;
  --tyndall-muted: #b3aba0;
  --clay: #c98a68;
  --font-display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-text: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s12: 48px; --s16: 64px; --s24: 96px; --s32: 128px;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 var(--s6); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; color: inherit; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--s4)); margin-inline: auto; }
@media (min-width: 720px) { .wrap { width: min(var(--wrap), 100% - 2 * var(--s12)); } }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--tyndall); padding: var(--s2) var(--s4); }
.skip:focus { left: var(--s4); top: var(--s4); z-index: 100; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Type styles */
.display-xl { font-family: var(--font-display); font-weight: 600; font-size: clamp(52px, 8vw, 96px); line-height: 0.95; letter-spacing: 0.01em; }
.display-lg { font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 5.5vw, 64px); line-height: 1.0; letter-spacing: 0.01em; }
.h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 4vw, 44px); line-height: 1.08; }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 1.15; }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.25; }
.quote { font-family: var(--font-display); font-weight: 500; font-style: italic; font-size: 28px; line-height: 1.3; }
.lead { font-size: 20px; line-height: 30px; }
.body-sm { font-size: 14px; line-height: 22px; }
.caption { font-size: 12px; line-height: 18px; letter-spacing: 0.01em; color: var(--ink-muted); }
.label-caps { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 var(--s2); }
.measure { max-width: 62ch; }

/* Buttons */
.btn { display: inline-block; font-family: var(--font-text); font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 12px 24px; border: 2px solid transparent; border-radius: 0; cursor: pointer; background: none; color: var(--ink); }
.btn-primary { background: var(--oxide); color: var(--on-oxide); border-color: var(--oxide); }
.btn-primary:hover { filter: brightness(0.92); }
.btn-secondary { border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ground-raised); }
.btn-link { padding: 12px 0; border: 0; border-bottom: 1px solid transparent; }
.btn-link:hover { border-bottom-color: currentColor; }
.dark .btn-primary { background: var(--clay); color: var(--basalt); border-color: var(--clay); }
.dark .btn-secondary { border-color: var(--tyndall); color: var(--tyndall); }
.dark .btn-secondary:hover { background: var(--basalt-raised); }
.dark .btn-link { color: var(--tyndall); }

/* Header */
.site-header { background: var(--ground); border-bottom: 1px solid var(--plaster); }
.site-header--dark { background: var(--basalt); border-bottom-color: var(--basalt-line); color: var(--tyndall); }
.site-header__row { display: flex; align-items: center; justify-content: space-between; min-height: 88px; padding: var(--s4) 0; }
.site-header__logo img { width: 120px; height: auto; }
@media (min-width: 900px) { .site-header__logo img { width: 140px; } }
.nav { display: flex; gap: var(--s8); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; }
.nav a { padding: var(--s2) 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }
.nav-toggle { display: none; }
@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: var(--s2); background: none; border: 0; color: inherit; font: inherit; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; cursor: pointer; padding: var(--s2) 0; }
  .nav-toggle span:not(.nav-toggle__label) { display: block; width: 22px; height: 1.5px; background: currentColor; }
  .nav-toggle span:first-child { margin-right: -22px; transform: translateY(-4px); }
  .nav-toggle span:nth-child(2) { transform: translateY(4px); }
  .nav-toggle__label { margin-left: var(--s4); }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 88px; flex-direction: column; gap: 0; background: var(--ground); border-bottom: 1px solid var(--plaster); padding: var(--s4) var(--s4) var(--s6); z-index: 50; }
  .site-header--dark .nav { background: var(--basalt); border-bottom-color: var(--basalt-line); }
  .nav.is-open { display: flex; }
  .nav a { padding: var(--s3) 0; border-bottom: 1px solid var(--plaster); }
  .site-header--dark .nav a { border-bottom-color: var(--basalt-line); }
  .site-header { position: relative; }
}

/* Sections */
.section { padding: var(--s12) 0; }
@media (min-width: 900px) { .section { padding: var(--s16) 0; } }
.section + .section { border-top: 1px solid var(--plaster); }
.dark { background: var(--basalt); color: var(--tyndall); }
.dark .label-caps, .dark .caption { color: var(--tyndall-muted); }
.dark .section + .section { border-top-color: var(--basalt-line); }
.sunken { background: var(--ground-sunken); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s4) var(--s8); margin-bottom: var(--s8); }
.section__head .h1, .section__head .h2 { margin: 0; }

/* Hero */
.hero { background: var(--basalt); color: var(--tyndall); padding: var(--s12) 0 var(--s12); }
@media (min-width: 900px) { .hero { padding: var(--s16) 0 var(--s16); } }
.hero__grid { display: grid; gap: var(--s12); align-items: end; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 7fr 9fr; gap: var(--s16); } .hero--page .hero__grid { grid-template-columns: 1fr; } }
.hero h1 { color: var(--tyndall); margin: var(--s6) 0; }
.hero .lead { color: var(--tyndall); max-width: 30em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }
.hero__media { margin: 0; background: var(--basalt-sunken); border: 1px solid var(--basalt-line); aspect-ratio: 4 / 3; position: relative; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media .caption { position: absolute; left: var(--s4); bottom: var(--s3); color: var(--tyndall-muted); background: rgba(20,19,17,0.6); padding: 2px 8px; }
.hero--page { padding: var(--s12) 0; }
.hero--page .lead { max-width: 40em; }

/* Tier columns */
.tiers { display: grid; gap: 1px; background: var(--plaster); border: 1px solid var(--plaster); }
@media (min-width: 720px) { .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tier { background: var(--ground); padding: var(--s8) var(--s6); display: flex; flex-direction: column; gap: var(--s3); }
.tier p { margin: 0; }
.tier .btn-link { align-self: flex-start; margin-top: auto; padding-top: var(--s4); }

/* Project cards */
.cards { display: grid; gap: var(--s6); }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { background: var(--ground-raised); border: 1px solid var(--plaster); display: flex; flex-direction: column; }
.card__photo { aspect-ratio: 4 / 3; background: var(--ground-sunken); border-bottom: 1px solid var(--plaster); position: relative; overflow: hidden; }
.card__photo img { width: 100%; height: 100%; object-fit: cover; }
.card__photo .caption { position: absolute; left: var(--s4); bottom: var(--s3); }
.card__body { padding: var(--s6); display: flex; flex-direction: column; gap: var(--s2); flex: 1 1 auto; }
.card__body p { margin: 0; }
.card__body .h3 { margin-bottom: var(--s1); }
.card__credits { margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--plaster); }
.card:hover .h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: var(--s6); }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { border-top: 1px solid var(--ink); padding-top: var(--s4); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.25; color: var(--oxide); margin-bottom: var(--s2); }
.step .h3 { margin-bottom: var(--s2); }
.step p { margin: 0 0 var(--s2); }
.step ul { margin: var(--s2) 0 0; padding-left: 1.1em; }
.step li { margin-bottom: var(--s1); font-size: 14px; line-height: 22px; }
.dark .step { border-top-color: var(--tyndall); }
.dark .step::before { color: var(--clay); }

/* Two-column prose */
.cols { display: grid; gap: var(--s8); }
@media (min-width: 900px) { .cols { grid-template-columns: 5fr 7fr; gap: var(--s16); } .cols--even { grid-template-columns: 1fr 1fr; } }
.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-list li { padding: var(--s3) 0; border-top: 1px solid var(--plaster); }
.rule-list li:last-child { border-bottom: 1px solid var(--plaster); }
.dark .rule-list li { border-color: var(--basalt-line); }

/* Facts table */
.facts { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 22px; }
.facts th, .facts td { text-align: left; padding: var(--s3) 0; border-top: 1px solid var(--plaster); vertical-align: top; }
.facts th { font-weight: 500; color: var(--ink-muted); width: 40%; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 1px solid var(--plaster); }

/* Gallery */
.gallery { display: grid; gap: var(--s4); }
@media (min-width: 720px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ground-sunken); border: 1px solid var(--plaster); }
.gallery figcaption { margin-top: var(--s2); }
@media (min-width: 900px) { .gallery--plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery--plans img { aspect-ratio: 3 / 4; object-fit: contain; background: var(--ground-raised); padding: var(--s2); }
.photo-full { margin: 0; }
.photo-full img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ground-sunken); border: 1px solid var(--plaster); }
.photo-full figcaption { margin-top: var(--s2); }
.placeholder { aspect-ratio: 4 / 3; background: var(--ground-sunken); border: 1px solid var(--plaster); display: flex; align-items: flex-end; padding: var(--s4); }

/* Portrait */
.portrait { max-width: 420px; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--ground-sunken); border: 1px solid var(--plaster); }

/* Form */
.form { display: grid; gap: var(--s4); max-width: 640px; }
.form label { display: block; font-size: 14px; line-height: 22px; font-weight: 500; margin-bottom: var(--s1); }
.form input, .form select, .form textarea { width: 100%; font: inherit; font-size: 16px; line-height: 24px; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 2px; background: var(--ground-raised); color: var(--ink); }
.form textarea { min-height: 160px; resize: vertical; }
.form__row { display: grid; gap: var(--s4); }
@media (min-width: 720px) { .form__row { grid-template-columns: 1fr 1fr; } }
.form__note { font-size: 12px; line-height: 18px; color: var(--ink-muted); }
.form__status { font-size: 14px; line-height: 22px; min-height: 22px; }
.form__status--bad { color: #8c2f25; }
.hp { position: absolute; left: -9999px; }

/* Contact band */
.band { background: var(--basalt); color: var(--tyndall); padding: var(--s16) 0; }
.band__grid { display: grid; gap: var(--s8); align-items: center; }
@media (min-width: 900px) { .band__grid { grid-template-columns: 2fr 1fr; } .band__actions { justify-self: end; } }
.band h2 { color: var(--tyndall); }
.band__actions { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }

/* Footer */
.site-footer { background: var(--basalt); color: var(--tyndall); padding: var(--s12) 0 var(--s8); margin-top: 0; }
.site-footer__grid { display: grid; gap: var(--s8); }
@media (min-width: 900px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; align-items: start; } }
.site-footer__logo { width: 120px; height: auto; }
.site-footer__tag { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 22px; line-height: 1.3; margin: var(--s4) 0 0; color: var(--tyndall); }
.site-footer__col p { margin: 0; font-size: 14px; line-height: 24px; }
.site-footer__col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer .label-caps { color: var(--tyndall-muted); }
.site-footer__badges { display: flex; gap: var(--s4); flex-wrap: wrap; align-items: center; }
.site-footer__badges img { height: 56px; width: auto; background: var(--tyndall); padding: 4px; }
.site-footer__foot { display: flex; justify-content: space-between; gap: var(--s4); margin-top: var(--s12); padding-top: var(--s4); border-top: 1px solid var(--basalt-line); font-size: 12px; line-height: 18px; color: var(--tyndall-muted); }
.site-footer__foot a:hover { text-decoration: underline; }

/* Utilities */
.mt-6 { margin-top: var(--s6); } .mt-8 { margin-top: var(--s8); } .mb-6 { margin-bottom: var(--s6); } .mb-8 { margin-bottom: var(--s8); }
.stack > * + * { margin-top: var(--s4); }
.muted { color: var(--ink-muted); }
.dark .muted { color: var(--tyndall-muted); }
