/* ==========================================================
   Blenheim Bespoke Homes — main stylesheet
   ========================================================== */

:root {
  --green: #1f2b24;        /* Blenheim deep green */
  --green-2: #2c3b31;
  --stone: #f5f2eb;        /* warm stone background */
  --stone-2: #ebe5d8;
  --brass: #b08d57;        /* brass accent */
  --brass-dark: #8f703f;
  --ink: #1c1c1a;
  --muted: #5f5f58;
  --white: #ffffff;
  --line: rgba(31, 43, 36, 0.14);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 140px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--stone);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--green);
}
h1 { font-size: clamp(2.8rem, 6.5vw, 5.6rem); }
h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
p  { margin: 0 0 1.2em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--dark { background: var(--green); color: rgba(255,255,255,0.82); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--sand { background: var(--stone-2); }
.section--white { background: var(--white); }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.2rem;
}
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 46ch; }
.section--dark .lead { color: rgba(255,255,255,0.75); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 1em 2em;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--brass);
  background: var(--brass);
  color: var(--white);
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { background: var(--brass-dark); border-color: var(--brass-dark); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,0.6); }
.btn--ghost:hover { background: var(--white); color: var(--green); border-color: var(--white); }
.btn--outline { background: transparent; color: var(--green); border-color: var(--green); }
.btn--outline:hover { background: var(--green); color: var(--white); }

.link-arrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
}
.link-arrow::after { content: " \2192"; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s;
  padding: 26px 0;
}
.header.is-solid,
.header--solid {
  background: var(--green);
  padding: 14px 0;
  box-shadow: 0 6px 30px rgba(0,0,0,0.15);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; flex-direction: column; line-height: 1; color: var(--white); }
.logo__name { font-family: var(--serif); font-size: 1.9rem; font-weight: 500; letter-spacing: 0.14em; }
.logo__sub { font-size: 0.62rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--brass); margin-top: 6px; }

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  color: rgba(255,255,255,0.88);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1px; background: var(--brass);
  transition: width 0.3s;
}
.nav a:not(.btn):hover::after,
.nav a[aria-current="page"]::after { width: 100%; }
.nav .btn { padding: 0.8em 1.5em; color: var(--white); }

.menu-toggle {
  display: none;
  background: none; border: 0; padding: 8px; cursor: pointer;
  width: 44px; height: 44px; position: relative; z-index: 110;
}
.menu-toggle span {
  display: block; width: 26px; height: 1.5px; background: var(--white);
  margin: 6px auto; transition: transform 0.3s, opacity 0.3s;
}
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: 0;
    background: var(--green);
    flex-direction: column; justify-content: center; gap: 30px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.35s;
  }
  .nav a { font-size: 1rem; }
  .menu-open .nav { opacity: 1; pointer-events: auto; }
  .menu-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.06);
  animation: heroZoom 14s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,22,18,0.55) 0%, rgba(15,22,18,0.15) 40%, rgba(15,22,18,0.75) 100%);
}
.hero__content { position: relative; z-index: 2; padding-bottom: clamp(70px, 12vh, 140px); width: 100%; }
.hero h1 { color: var(--white); max-width: 14ch; }
.hero p { font-size: clamp(1.05rem, 1.5vw, 1.25rem); max-width: 48ch; color: rgba(255,255,255,0.85); margin-bottom: 2.2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__scroll {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 40px;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  writing-mode: vertical-rl; color: rgba(255,255,255,0.7);
}
.hero__scroll::after {
  content: ""; display: inline-block; width: 1px; height: 60px;
  background: rgba(255,255,255,0.6); margin-top: 14px;
}

/* Page hero (inner pages) */
.page-hero { min-height: 68vh; }
.page-hero h1 { max-width: 18ch; }

/* ---------- Split (image + text) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}
.split--reverse .split__media { order: 2; }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split__media--frame::before {
  content: ""; position: absolute;
  inset: 28px -28px -28px 28px;
  border: 1px solid var(--brass);
  z-index: -1;
}
.split--reverse .split__media--frame::before { inset: 28px 28px -28px -28px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .split__media--frame::before { display: none; }
  .split__media img { aspect-ratio: 4 / 3; }
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 70px;
}
.stat { padding: 34px 20px 0 0; }
.stat__num { font-family: var(--serif); font-size: clamp(2.6rem, 4vw, 3.6rem); color: var(--green); line-height: 1; }
.stat__label { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); row-gap: 20px; } }

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 60px;
}
.card { position: relative; overflow: hidden; background: var(--green); color: var(--white); display: block; }
.card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 0.9s ease, opacity 0.5s; opacity: 0.82; }
.card:hover img { transform: scale(1.06); opacity: 0.6; }
.card__body {
  position: absolute; inset: auto 0 0 0; padding: 34px 30px;
  background: linear-gradient(0deg, rgba(15,22,18,0.92), rgba(15,22,18,0));
}
.card__num { font-family: var(--serif); color: var(--brass); font-size: 1.1rem; }
.card h3 { color: var(--white); margin: 6px 0 10px; }
.card p { font-size: 0.95rem; color: rgba(255,255,255,0.78); margin: 0; max-height: 0; overflow: hidden; transition: max-height 0.5s ease; }
.card:hover p, .card:focus p { max-height: 140px; }
@media (hover: none) { .card p { max-height: none; } }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } .card img { aspect-ratio: 4 / 3; } }

/* ---------- Process ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 70px;
  counter-reset: step;
}
.step { padding: 40px 32px 10px 0; border-top: 1px solid rgba(255,255,255,0.2); position: relative; }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--serif); font-size: 3.2rem; color: var(--brass); line-height: 1;
  display: block; margin-bottom: 18px;
}
.step::after {
  content: ""; position: absolute; top: -4px; left: 0;
  width: 7px; height: 7px; border-radius: 50%; background: var(--brass);
}
.step p { font-size: 0.97rem; }
.section--sand .step, .section--white .step { border-top-color: var(--line); }
@media (max-width: 960px) { .process { grid-template-columns: 1fr 1fr; row-gap: 20px; } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
  margin-top: 60px;
}
.project { grid-column: span 6; display: block; }
.project--wide { grid-column: span 12; }
.project--wide .project__img img { aspect-ratio: 21 / 9; }
.project--third { grid-column: span 4; }
.project__img { overflow: hidden; }
.project__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1s ease; }
.project:hover .project__img img { transform: scale(1.04); }
.project__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 20px; }
.project__meta h3 { margin: 0; }
.project__tag { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); white-space: nowrap; }
.project__loc { font-size: 0.9rem; color: var(--muted); margin-top: 4px; }
@media (max-width: 760px) {
  .project, .project--third { grid-column: span 12; }
  .project--wide .project__img img { aspect-ratio: 4 / 3; }
}

.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 40px; }
.filter {
  background: transparent; border: 1px solid var(--line); color: var(--green);
  padding: 0.7em 1.4em; font-family: var(--sans); font-size: 0.75rem;
  letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer;
  transition: all 0.25s;
}
.filter:hover, .filter.is-active { background: var(--green); color: var(--white); border-color: var(--green); }
.project.is-hidden { display: none; }

/* ---------- Testimonials ---------- */
.quote-slider { position: relative; max-width: 900px; margin: 50px auto 0; text-align: center; }
.quote { display: none; }
.quote.is-active { display: block; animation: fadeUp 0.7s ease; }
.quote blockquote {
  margin: 0; font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.35; color: var(--white);
}
.quote blockquote::before { content: "\201C"; display: block; font-size: 4.5rem; line-height: 0.6; color: var(--brass); margin-bottom: 20px; font-style: normal; }
.quote cite { display: block; margin-top: 28px; font-style: normal; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); }
.quote-dots { display: flex; justify-content: center; gap: 12px; margin-top: 40px; }
.quote-dots button {
  width: 34px; height: 2px; padding: 0; border: 0; cursor: pointer;
  background: rgba(255,255,255,0.3); transition: background 0.3s;
}
.quote-dots button.is-active { background: var(--brass); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Feature list ---------- */
.ticks { list-style: none; padding: 0; margin: 30px 0 36px; display: grid; gap: 14px; }
.ticks li { padding-left: 34px; position: relative; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.75em;
  width: 18px; height: 1px; background: var(--brass);
}

/* ---------- Values grid ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; margin-top: 60px; }
.value h3 { font-size: 1.6rem; }
.value__icon { width: 46px; height: 46px; color: var(--brass); margin-bottom: 22px; }
@media (max-width: 860px) { .values { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Image band ---------- */
.band {
  position: relative; min-height: 70vh; display: flex; align-items: center;
  background-size: cover; background-position: center; background-attachment: fixed;
  color: var(--white);
}
.band::before { content: ""; position: absolute; inset: 0; background: rgba(15,22,18,0.55); }
.band .wrap { position: relative; z-index: 1; }
.band h2 { color: var(--white); max-width: 18ch; }
@media (max-width: 960px) { .band { background-attachment: scroll; } }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta h2 { max-width: 20ch; margin-left: auto; margin-right: auto; }

/* ---------- Accreditations ---------- */
.accreds {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 50px;
  font-family: var(--serif); font-size: 1.3rem; color: var(--muted);
}
.accreds span { opacity: 0.75; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(40px, 7vw, 100px); }
.contact-detail { margin-bottom: 30px; }
.contact-detail h4 { font-family: var(--sans); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); margin-bottom: 6px; }
.contact-detail a, .contact-detail p { font-family: var(--serif); font-size: 1.5rem; color: var(--green); margin: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 0; font: inherit; font-size: 1rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid rgba(31,43,36,0.3);
  border-radius: 0; outline: none; transition: border-color 0.3s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--brass); }
.checkbox { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); }
.checkbox input { margin-top: 6px; accent-color: var(--brass); }
.form-note { font-size: 0.85rem; color: var(--muted); }
.form-success { display: none; padding: 30px; background: var(--white); border-left: 3px solid var(--brass); }
.form-success.is-visible { display: block; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 50px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 24px 0; }
.faq summary {
  cursor: pointer; list-style: none; font-family: var(--serif); font-size: 1.45rem;
  color: var(--green); display: flex; justify-content: space-between; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brass); font-size: 1.8rem; line-height: 1; transition: transform 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 16px 0 0; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: #141c17; color: rgba(255,255,255,0.7); padding: 90px 0 30px; font-size: 0.95rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 50px; }
.footer h4 { font-family: var(--sans); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); margin-bottom: 20px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a:hover { color: var(--white); }
.footer .logo { margin-bottom: 22px; }
.footer__bottom {
  margin-top: 70px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 0.82rem;
}
.socials { display: flex; gap: 14px; margin-top: 22px; }
.socials a {
  width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%;
  display: grid; place-items: center; transition: all 0.3s;
}
.socials a:hover { background: var(--brass); border-color: var(--brass); }
.socials svg { width: 16px; height: 16px; fill: currentColor; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
