/* ============ Tokens ============ */
:root {
  --maroon: #9b1c2c;
  --maroon-dark: #7a1522;
  --navy: #1b2436;
  --navy-2: #232e44;
  --ink: #161a22;
  --muted: #5d6472;
  --line: #e4e1dc;
  --bg: #ffffff;
  --bg-alt: #f6f3ee;
  --sand: #e9dfcf;
  --gold: #f2c230;
  --radius: 14px;
  --radius-sm: 10px;
  --display: "Bebas Neue", "Oswald", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 68px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(64px, 9vw, 112px);
  --col-gap: clamp(32px, 5vw, 72px);
  --grid-gap: clamp(12px, 2vw, 24px);
  --card-pad: clamp(20px, 2.5vw, 28px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-hover: 0 14px 28px -16px rgba(22, 26, 34, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

:focus-visible { outline: 2px solid var(--maroon); outline-offset: 3px; }
.hero :focus-visible, .section--dark :focus-visible, .footer :focus-visible { outline-color: var(--gold); }

/* ============ Type ============ */
.display {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  letter-spacing: .02em; line-height: .92; margin: 0 0 var(--space-4);
  font-size: clamp(56px, 11vw, 132px);
}
.display--md { font-size: clamp(44px, 6.5vw, 76px); }
.display--sm { font-size: clamp(32px, 4vw, 44px); margin-bottom: var(--space-2); }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--maroon); margin: 0 0 var(--space-3);
}
.eyebrow--light { color: var(--gold); }
.lead { font-size: 18px; color: var(--muted); max-width: 56ch; margin: 0 0 var(--space-5); }
.lead--light { color: rgba(255,255,255,.75); }
.subhead {
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  margin: var(--space-8) 0 var(--space-4); color: var(--muted);
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 10px var(--space-5); border-radius: 999px; text-align: center; line-height: 1.3; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; font-family: inherit;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(0) scale(.98); }
.btn--primary { background: var(--maroon); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--maroon); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .2s, color .2s; }

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
  .btn--primary:hover { background: var(--maroon-dark); }
  .btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
  .link-btn:hover { text-decoration-color: currentColor; }
}

/* ============ Nav ============ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  transition: background .25s, box-shadow .25s;
}
.nav.is-solid, .nav.is-open { background: rgba(255,255,255,.97); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(8px); }
.nav__inner { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); }
.nav__brand {
  font-family: var(--display); font-size: 28px; letter-spacing: .04em; text-decoration: none; color: #fff;
  transition: color .25s, opacity .2s; white-space: nowrap;
}
.nav__links { display: flex; align-items: center; gap: var(--space-5); }
.nav__links a {
  position: relative; text-decoration: none; font-size: 14px; font-weight: 500; color: #fff; opacity: .88;
  padding: var(--space-2) 0; transition: color .25s, opacity .2s;
}
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav__links a.is-active { opacity: 1; }
.nav__links a.is-active:not(.nav__cta)::after { transform: scaleX(1); }
.nav__cta { border: 1.5px solid currentColor; border-radius: 999px; padding: var(--space-2) var(--space-4) !important; transition: background-color .2s, color .2s, border-color .2s; }
.nav.is-solid .nav__brand, .nav.is-solid .nav__links a,
.nav.is-open .nav__brand, .nav.is-open .nav__links a { color: var(--ink); }
.nav.is-solid .nav__cta { background: var(--maroon); color: #fff !important; border-color: var(--maroon); }
.nav__toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; border-radius: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: #fff; transition: transform .25s, opacity .2s, background .25s; }
.nav.is-solid .nav__toggle span, .nav.is-open .nav__toggle span { background: var(--ink); }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (hover: hover) {
  .nav__brand:hover { opacity: .75; }
  .nav__links a:hover { opacity: 1; }
  .nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); }
  .nav:not(.is-solid):not(.is-open) .nav__cta:hover { background: #fff; color: var(--ink); border-color: #fff; }
  .nav.is-solid .nav__cta:hover { background: var(--maroon-dark); border-color: var(--maroon-dark); }
  .nav__toggle:hover { background: rgba(127,127,127,.12); }
}

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: var(--space-2) var(--gutter) var(--space-5); box-shadow: 0 12px 24px rgba(0,0,0,.08);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity .2s, transform .2s, visibility 0s; }
  .nav__links a { padding: var(--space-4) 0; border-bottom: 1px solid var(--line); font-size: 16px; transition: color .2s, padding-left .2s var(--ease); }
  .nav__links a:not(.nav__cta)::after { display: none; }
  .nav__links a.is-active:not(.nav__cta) { color: var(--maroon) !important; }
  .nav__cta { margin-top: var(--space-4); text-align: center; background: var(--maroon); color: #fff !important; border-color: var(--maroon); padding: var(--space-3) !important; }
}
@media (max-width: 900px) and (hover: hover) {
  .nav__links a:not(.nav__cta):hover { color: var(--maroon) !important; padding-left: var(--space-2); }
}
.is-resizing .nav, .is-resizing .nav__links { transition: none !important; }

/* Logged-in admin bar */
.admin-bar .nav { top: 32px; }
@media (max-width: 900px) { .admin-bar .nav__links { top: calc(var(--nav-h) + 32px); } }
@media (max-width: 782px) {
  .admin-bar .nav { top: 46px; }
  .admin-bar .nav__links { top: calc(var(--nav-h) + 46px); }
}

/* ============ Hero ============ */
.hero {
  position: relative; width: 100%; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--navy);
}
.hero__media, .hero__overlay { position: absolute; inset: 0; }
.hero__img, .hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center center;
}
.hero__img:not([src]) { display: none; }
.hero__video { opacity: 0; transition: opacity .6s; pointer-events: none; }
.hero__video.is-ready { opacity: 1; }
.hero__overlay { background: linear-gradient(180deg, rgba(15,20,32,.45) 0%, rgba(15,20,32,.15) 35%, rgba(15,20,32,.8) 100%); }
@media (max-aspect-ratio: 4/5) {
  .hero__overlay { background: linear-gradient(180deg, rgba(15,20,32,.45) 0%, rgba(15,20,32,.2) 28%, rgba(15,20,32,.72) 52%, rgba(15,20,32,.9) 100%); }
}
.hero__content { position: relative; padding-bottom: clamp(72px, 12vh, 120px); padding-top: calc(var(--nav-h) + var(--space-6)); }
.hero__sub { font-size: clamp(16px, 2vw, 20px); max-width: 52ch; color: rgba(255,255,255,.88); margin: 0 0 var(--space-6); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: var(--space-6); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; color: rgba(255,255,255,.7); writing-mode: vertical-rl; padding: var(--space-2); transition: color .2s;
}
@media (hover: hover) { .hero__scroll:hover { color: #fff; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ============ Sections ============ */
.section { padding: var(--section-y) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--navy); color: #fff; }
.section__head { margin-bottom: var(--space-7); }
.section__head .lead { margin-bottom: 0; }

/* About */
.about { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--col-gap); align-items: center; }
.about--solo { grid-template-columns: minmax(0, 760px); }
.about__body p { margin: 0 0 var(--space-4); color: var(--muted); }
.about__media { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin: var(--space-6) 0 0; padding-top: var(--space-5); border-top: 1px solid var(--line); }
.stats div { margin: 0; }
.stats dt { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--maroon); }
.stats dd { margin: var(--space-2) 0 0; font-size: 13px; color: var(--muted); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--grid-gap); }
.project { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 0 var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.project__img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.project__img--empty { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, var(--maroon-dark) 140%); }
.project__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.badge {
  position: absolute; top: var(--space-4); left: var(--space-4); background: #fff; color: var(--ink); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px;
}
.badge--live { background: var(--gold); }
.project__body { padding: var(--card-pad); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.project__name { font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1; margin: 0; letter-spacing: .02em; }
.project__loc { font-size: 13px; color: var(--muted); margin: 0; }
.project__summary { margin: var(--space-1) 0; color: var(--muted); }
.project__meta { display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: 14px; }
.project__price { font-weight: 700; color: var(--maroon); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-3); }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 3/4; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: var(--space-6) var(--space-3) var(--space-3); font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
}

/* Progress updates */
.updates-wrap { margin-top: var(--space-8); }
.section__head--row { display: flex; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.updates { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); }
.update { background: #fff; border-radius: var(--radius); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.update img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.update__body { padding: var(--card-pad); }
.update__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.update__meta span + span { color: var(--maroon); font-weight: 600; }
.update__title { font-size: 17px; margin: var(--space-2) 0; line-height: 1.35; }
.update__title a { text-decoration: none; }
.update__text { font-size: 14px; color: var(--muted); margin: 0; }

@media (hover: hover) {
  .project:hover, .update:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
  .project:hover .project__img img { transform: scale(1.04); }
  .gallery figure:hover img { transform: scale(1.05); }
  .update__title a:hover { color: var(--maroon); }
}

/* Forms */
.form { display: grid; gap: var(--space-4); position: relative; }
.form label { display: grid; gap: var(--space-2); font-size: 13px; font-weight: 600; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; font-size: 16px; padding: var(--space-3) 14px; min-height: 48px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff; color: var(--ink); width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.form textarea { min-height: 0; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--maroon); outline-offset: 1px; border-color: transparent; }
@media (hover: hover) { .form input:hover:not(:focus), .form textarea:hover:not(:focus) { border-color: #c9c3b9; } }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form__status { font-size: 14px; margin: 0; min-height: 1.4em; color: #1e6b41; }
.form__error { color: #c0392b; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Sales */
.sales { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--grid-gap); align-items: stretch; }
.prices { display: grid; gap: var(--grid-gap); align-content: start; }
.price {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap;
  padding: var(--card-pad); border-radius: var(--radius); background: var(--navy-2); border: 1px solid rgba(255,255,255,.08);
}
.price__label { font-size: 16px; color: rgba(255,255,255,.8); }
.price__value { font-family: var(--display); font-size: clamp(34px, 4vw, 48px); line-height: 1; color: var(--gold); }
.contact-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: var(--card-pad); display: flex; flex-direction: column; gap: var(--space-4); }
.contact-card .eyebrow { margin: 0; }
.contact-card__who { display: flex; align-items: center; gap: var(--space-4); }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--sand); display: grid; place-items: center;
  font-family: var(--display); font-size: 24px; color: var(--maroon); overflow: hidden; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.contact-card__name { font-weight: 700; margin: 0; }
.contact-card__role { font-size: 13px; color: var(--muted); margin: 0; }
.contact-card__links { display: grid; }
.contact-card__links a { display: flex; gap: var(--space-3); align-items: center; text-decoration: none; font-size: 15px; padding: var(--space-3) 0; min-height: 44px; border-bottom: 1px solid var(--line); transition: color .2s, padding-left .2s var(--ease); }
@media (hover: hover) { .contact-card__links a:hover { color: var(--maroon); padding-left: var(--space-1); } }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--col-gap); align-items: start; }
.contact__list { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: grid; gap: var(--space-4); }
.contact__list span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact__list a { display: inline-block; padding: var(--space-1) 0; text-decoration: none; font-size: 18px; text-decoration-line: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s; }
@media (hover: hover) { .contact__list a:hover { color: var(--maroon); text-decoration-color: currentColor; } }
.contact .form { background: #fff; padding: var(--card-pad); border-radius: var(--radius); }

/* Inner pages, posts and archives */
.page { padding: calc(var(--nav-h) + var(--space-7)) 0 var(--section-y); background: var(--bg-alt); min-height: 70vh; }
.entry { max-width: 760px; }
.entry__media { margin: 0 0 var(--space-6); border-radius: var(--radius); overflow: hidden; }
.entry__media img { width: 100%; height: auto; }
.entry__content { font-size: 17px; }
.entry__content > * { margin: 0 0 var(--space-4); }
.entry__content h2, .entry__content h3 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; line-height: 1; margin-top: var(--space-6); }
.entry__content h2 { font-size: 40px; }
.entry__content h3 { font-size: 30px; }
.entry__content img { height: auto; border-radius: var(--radius-sm); }
.entry__content a { color: var(--maroon); }
.entry__back { margin-top: var(--space-6); }
.pagination .nav-links { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-7); }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 var(--space-3); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 600; font-size: 14px; }
.pagination .page-numbers.current { background: var(--maroon); color: #fff; }

/* Footer */
.footer { background: var(--ink); color: rgba(255,255,255,.6); font-size: 13px; padding: var(--space-6) 0; }
.footer__inner { display: flex; justify-content: space-between; gap: var(--space-3) var(--space-5); flex-wrap: wrap; align-items: center; }
.footer__brand { font-family: var(--display); font-size: 22px; color: #fff; letter-spacing: .04em; }
.footer__end { display: inline-flex; align-items: center; gap: var(--space-5); }
.footer__staff { color: rgba(255,255,255,.6); text-decoration: none; padding: var(--space-2) 0; border-bottom: 1px solid rgba(255,255,255,.25); transition: color .2s, border-color .2s; }
@media (hover: hover) { .footer__staff:hover { color: #fff; border-color: #fff; } }

/* Reveal on scroll (only once the script has started, so content never hides without it) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .btn:hover, .project:hover, .update:hover { transform: none !important; }
  .project:hover .project__img img, .gallery figure:hover img { transform: none !important; }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .gallery { grid-template-columns: repeat(6, 1fr); }
  .gallery figure { grid-column: span 2; }
  .gallery figure:nth-child(3n+1):nth-last-child(2), .gallery figure:nth-child(3n+2):last-child { grid-column: span 3; aspect-ratio: 4/3; }
  .gallery figure:nth-child(3n+1):last-child { grid-column: span 6; aspect-ratio: 16/7; }
  .updates { grid-template-columns: repeat(2, 1fr); }
  .prices { grid-auto-rows: 1fr; }
  .price { flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--space-2); }
}
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  .about__media { aspect-ratio: 16/10; order: -1; }
  .contact { grid-template-columns: 1fr; }
  .contact .form { max-width: 640px; }
}
@media (max-width: 700px) {
  .sales { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .projects { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery figure:nth-child(n):nth-last-child(n) { grid-column: span 1; aspect-ratio: 3/4; }
  .gallery figure:nth-child(odd):last-child { grid-column: span 2; aspect-ratio: 16/9; }
  .updates { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .stats dt { font-size: 36px; }
  .hero__scroll { display: none; }
  .hero__ctas .btn { flex: 1 1 auto; }
  .lead { font-size: 17px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
