/* ==========================================================================
   Clay Estates — site styles
   All brand colours, fonts and spacing live in the :root tokens below.
   Change a token here and it updates everywhere on the site.
   ========================================================================== */

:root {
  /* Brand palette (from Clay Estate Brand Identity.pdf) */
  --charcoal: #181818;
  --stone: #DCD2C6;
  --stone-light: #EDE7DF;
  --stone-pale: #F6F2EE;
  --white: #FFFFFF;
  --ink: #181818;
  --ink-soft: #4A4744;      /* body text on light backgrounds */
  --line: rgba(24, 24, 24, 0.14);
  --line-light: rgba(255, 255, 255, 0.22);

  /* Typography
     Brand fonts are Blacker Pro (headings) and PP Neue Montreal (body).
     Free lookalikes are used until web licences are bought — to switch,
     add @font-face rules for the licensed files and put their names first. */
  --font-heading: "Blacker Pro", "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "PP Neue Montreal", "Inter Tight", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --max-width: 1320px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-space: clamp(80px, 11vw, 160px);
  --header-height: 84px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.6rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); }

/* Logos: drawn with CSS masks so they take the current text colour
   (white over photos / dark sections, charcoal on light backgrounds). */
.logo-word, .logo-mark {
  display: block;
  background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
          mask: var(--logo) center / contain no-repeat;
}
.logo-word { --logo: url("../assets/logo/clay-estates-wordmark.svg"); aspect-ratio: 444 / 37; }
.logo-mark { --logo: url("../assets/logo/clay-estates-logomark.svg"); aspect-ratio: 187 / 191; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mt { margin-top: 2rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--charcoal); color: var(--white); padding: 12px 18px; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-space) 0; }
.section--stone { background: var(--stone); }
.section--pale { background: var(--stone-pale); }
.section--dark { background: var(--charcoal); color: var(--white); }
.section--dark .lead, .section--dark p { color: rgba(255, 255, 255, 0.78); }

/* Small uppercase label used above headings */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}

.lead { font-size: 1.12rem; color: var(--ink-soft); }
.prose { max-width: 60ch; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 50px;
  padding: 0 30px;
  border: 1px solid var(--charcoal);
  background: var(--charcoal);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { background: transparent; color: var(--charcoal); }

.btn--outline { background: transparent; color: var(--charcoal); }
.btn--outline:hover { background: var(--charcoal); color: var(--white); }

.btn--light { background: var(--white); border-color: var(--white); color: var(--charcoal); }
.btn--light:hover { background: transparent; color: var(--white); }

.btn--ghost-light { background: transparent; border-color: var(--white); color: var(--white); }
.btn--ghost-light:hover { background: var(--white); color: var(--charcoal); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.text-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.3s var(--ease);
}
.text-link:hover { opacity: 0.6; }

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-height);
  color: var(--white);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
/* Pages without a full-screen hero, and the header once scrolled */
.site-header.is-solid,
.page--plain .site-header {
  background: var(--white);
  color: var(--charcoal);
  box-shadow: 0 1px 0 var(--line);
}

.site-header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand__mark { width: 30px; height: auto; }
.brand__word { width: 168px; height: auto; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav a {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  padding: 6px 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:not(.btn):hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav .btn { min-height: 42px; padding: 0 20px; border-color: currentColor; background: transparent; color: inherit; }
.nav .btn:hover { background: currentColor; }
.nav .btn:hover span { color: var(--charcoal); }
.site-header.is-solid .nav .btn:hover span,
.page--plain .nav .btn:hover span { color: var(--white); }

.nav-toggle {
  display: none;
  background: none; border: 0; color: inherit; cursor: pointer;
  width: 44px; height: 44px; padding: 10px;
}
.nav-toggle span {
  display: block; height: 1px; background: currentColor; margin: 7px 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

@media (max-width: 960px) {
  .nav-toggle { display: block; position: relative; z-index: 2; }
  .nav {
    position: fixed; inset: 0;
    flex-direction: column; justify-content: center; gap: 28px;
    background: var(--charcoal); color: var(--white);
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
  }
  .nav a { font-size: 0.9rem; }
  .nav .btn { margin-top: 12px; }
  .nav .btn:hover span { color: var(--charcoal) !important; }
  .nav-open .nav { opacity: 1; visibility: visible; }
  .nav-open .site-header { color: var(--white); background: transparent; box-shadow: none; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav-open .brand { position: relative; z-index: 2; }
  .brand__word { width: 140px; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--white);
  background: var(--charcoal);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  animation: hero-zoom 14s var(--ease) both;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(24,24,24,0.45) 0%, rgba(24,24,24,0.05) 35%, rgba(24,24,24,0.65) 100%);
}
.hero__content {
  position: relative; z-index: 1;
  padding-bottom: clamp(56px, 10vh, 120px);
}
.hero__wordmark { width: min(760px, 88vw); margin-bottom: clamp(28px, 5vh, 48px); }
.hero__tagline {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 2rem;
}
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Page hero for inner pages */
.page-hero {
  padding: calc(var(--header-height) + clamp(64px, 9vw, 120px)) 0 clamp(48px, 6vw, 80px);
  background: var(--stone-pale);
}
.page-hero h1 { max-width: 16ch; margin-bottom: 0.4em; }
.page-hero .lead { max-width: 58ch; }
.page-hero--tall { min-height: 75vh; display: flex; align-items: center; }
.intro__mark--left { margin: 0 0 2rem; }
.split.split--top { align-items: start; }

/* --------------------------------------------------------------------------
   Content layouts
   -------------------------------------------------------------------------- */
.intro { text-align: center; }
.intro__mark { width: 44px; margin: 0 auto 2.4rem; }
.intro h2 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.intro .lead { max-width: 62ch; margin: 0 auto; }

/* Two column: image + text */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 120px);
  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--wide img { aspect-ratio: 4 / 3; }
.split__caption {
  position: absolute; left: 0; bottom: 0;
  background: var(--charcoal); color: var(--white);
  padding: 14px 22px;
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 300;
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

/* Founder quote */
.quote {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(1.45rem, 2.6vw, 2.2rem);
  line-height: 1.35;
  margin: 0 0 2rem;
}
.quote-attribution {
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase;
}
.quote-attribution span { display: block; opacity: 0.6; margin-top: 4px; letter-spacing: 0.16em; }

/* Section heading row (heading left, link right) */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-head h2 { margin: 0; }

/* --------------------------------------------------------------------------
   Property cards
   -------------------------------------------------------------------------- */
.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 36px);
}
@media (max-width: 960px) { .property-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .property-grid { grid-template-columns: 1fr; } }

.property-card { text-decoration: none; display: block; }
.property-card__media { position: relative; overflow: hidden; background: var(--stone); }
.property-card__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.property-card:hover .property-card__media img { transform: scale(1.04); }
.property-card__status {
  position: absolute; top: 16px; left: 16px;
  background: var(--white); color: var(--charcoal);
  padding: 6px 12px;
  font-size: 0.66rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
}
.property-card__status--dark { background: var(--charcoal); color: var(--white); }
.property-card__body {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 18px;
}
.property-card__title { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 300; margin: 0 0 2px; }
.property-card__location, .property-card__meta { font-size: 0.86rem; color: var(--ink-soft); margin: 0; }
.property-card__price { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 300; margin: 0; text-align: right; white-space: nowrap; }

.property-card__price small {
  display: block;
  font-family: var(--font-body); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft);
}
.property-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Property details page (property.html)
   -------------------------------------------------------------------------- */
.property-hero { padding: calc(var(--header-height) + 32px) 0 0; }
.property-back { margin-bottom: 20px; }
.property-gallery__main { position: relative; background: var(--stone); }
.property-gallery__main img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.property-gallery__main .property-card__status { position: absolute; top: 20px; left: 20px; }
.property-gallery__thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px; margin-top: 10px;
}
.property-gallery__thumbs button {
  padding: 0; border: 0; background: none; cursor: pointer;
  opacity: 0.6; transition: opacity 0.3s var(--ease);
}
.property-gallery__thumbs button:hover,
.property-gallery__thumbs button[aria-current="true"] { opacity: 1; }
.property-gallery__thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.property-info { padding-top: clamp(48px, 6vw, 80px); }
.property-layout { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(40px, 6vw, 100px); align-items: start; }
.property-price { font-family: var(--font-heading); font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 300; margin-bottom: 1.6rem; }
.property-price small { font-size: 0.55em; color: var(--ink-soft); }
.property-stats {
  display: flex; flex-wrap: wrap; gap: 0; list-style: none; padding: 0; margin: 0 0 2.4rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.property-stats li { padding: 18px 32px 18px 0; margin-right: 32px; }
.property-stats li + li { padding-left: 32px; border-left: 1px solid var(--line); margin-right: 0; }
.property-stats strong { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 300; display: block; line-height: 1.1; }
.property-stats span { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.property-subhead { font-size: 1.6rem; margin-top: 2.4rem; }
.property-features { columns: 2; column-gap: 32px; padding-left: 1.1em; color: var(--ink-soft); }
.property-features li { margin-bottom: 0.5rem; break-inside: avoid; }
.property-material { list-style: none; padding: 0; margin: 0; }
.property-material li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.property-material span { color: var(--ink-soft); }
.property-enquire { background: var(--stone-pale); padding: 36px; position: sticky; top: calc(var(--header-height) + 24px); }
.property-enquire .btn { width: 100%; margin: 0.6rem 0 1.6rem; }
@media (max-width: 860px) {
  .property-layout { grid-template-columns: 1fr; }
  .property-enquire { position: static; }
  .property-features { columns: 1; }
}

/* --------------------------------------------------------------------------
   Full-width statement band
   -------------------------------------------------------------------------- */
.statement {
  position: relative;
  min-height: 70vh;
  display: flex; align-items: center;
  color: var(--white);
  overflow: hidden;
}
.statement__media { position: absolute; inset: 0; }
.statement__media img { width: 100%; height: 100%; object-fit: cover; }
.statement::after { content: ""; position: absolute; inset: 0; background: rgba(24, 24, 24, 0.55); }
.statement .container { position: relative; z-index: 1; text-align: center; }
.statement h2 { max-width: 18ch; margin: 0 auto 2rem; }

/* --------------------------------------------------------------------------
   Testimonials slider
   -------------------------------------------------------------------------- */
.testimonials {
  display: grid; grid-template-columns: 5fr 7fr;
  min-height: 640px;
}
.testimonials__media { position: relative; }
.testimonials__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.testimonials__body {
  background: var(--stone);
  padding: clamp(48px, 7vw, 110px) clamp(28px, 7vw, 110px);
  display: flex; flex-direction: column; justify-content: center;
}
.slider { position: relative; max-width: 640px; }
.slide { display: none; }
.slide.is-active { display: block; animation: fade-in 0.7s var(--ease); }
.slide blockquote { margin: 0; }
.slide .quote { font-size: clamp(1.25rem, 2vw, 1.75rem); }
.slider__controls { display: flex; align-items: center; gap: 18px; margin-top: 2.4rem; }
.slider__btn {
  width: 48px; height: 48px;
  border: 1px solid var(--charcoal); border-radius: 50%;
  background: transparent; color: var(--charcoal); cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.slider__btn:hover { background: var(--charcoal); color: var(--white); }
.slider__count { font-size: 0.8rem; letter-spacing: 0.16em; }
@media (max-width: 860px) {
  .testimonials { grid-template-columns: 1fr; }
  .testimonials__media img { position: static; aspect-ratio: 16 / 10; }
}
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Valuation CTA band
   -------------------------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 24ch; margin-left: auto; margin-right: auto; }
.cta-band .lead { max-width: 52ch; margin: 0 auto 2.4rem; }
.cta-band .btn-row { justify-content: center; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 16px;
  transition: border-color 0.3s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--charcoal); }
.form-note { font-size: 0.86rem; color: var(--ink-soft); }
.hidden { position: absolute; left: -9999px; }

.contact-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.contact-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list span {
  display: block;
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 2px;
}
.contact-list a { text-decoration: none; font-family: var(--font-heading); font-size: 1.3rem; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* --------------------------------------------------------------------------
   Legal / long-form pages
   -------------------------------------------------------------------------- */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.7rem; margin-top: 2.2em; }
.legal p, .legal li { color: var(--ink-soft); }
.placeholder-note {
  background: var(--stone-pale); border-left: 3px solid var(--stone);
  padding: 16px 20px; font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--charcoal); color: var(--white); padding: clamp(64px, 8vw, 110px) 0 36px; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--line-light);
}
.footer-brand .brand__word { width: 220px; margin-bottom: 1.4rem; }
.footer-brand p { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 300; line-height: 1.35; max-width: 18ch; color: rgba(255,255,255,0.85); }
.footer-col h4 {
  font-family: var(--font-body); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); margin-bottom: 1.2rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { text-decoration: none; color: rgba(255,255,255,0.88); font-size: 0.95rem; }
.footer-col a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px;
  padding-top: 28px;
  font-size: 0.8rem; color: rgba(255,255,255,0.55);
}
.footer-bottom a { color: inherit; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Scroll reveal (added by js/main.js)
   -------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
