/* =========================================================================
   Château de Roche — shared design system
   Airy editorial (Belmond-inspired): white/bone, Montserrat, gold accent,
   full-bleed photography, thin uppercase tracked display.
   ========================================================================= */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/Montserrat-var.woff2') format('woff2');
}

:root {
  --paper: #ffffff;
  --bone: #f6f2ea;      /* warm off-white section fill */
  --sand: #ece5d8;      /* deeper warm band */
  --ink: #1b1712;       /* warm near-black */
  --muted: #493f36;     /* body text (darkened for readability) */
  --faint: #6f665b;     /* captions, meta */
  --line: rgba(27, 23, 18, 0.14);
  --gold: #9a7b4f;      /* antique gold — for light backgrounds */
  --gold-light: #cbab74; /* brighter gold — for dark / transparent backgrounds */
  --maroon: #5a0e07;    /* deep brand accent, sparing */
  --carbon: #14110d;    /* dark section */

  --wrap: 1240px;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --nav-h: 172px;       /* fixed header height — drawings sit clear of it */

  --step: 0.16em;       /* display letter-spacing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* Display headings follow edenroche.com: Montserrat 700, sentence case, tight
   negative tracking. Small UI labels (eyebrow, nav, buttons, card/footer labels)
   stay uppercase + positive tracking as accents. */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.035em;
  text-transform: none;
  margin: 0;
}

p { margin: 0 0 1.15em; }

/* ---- shared type helpers -------------------------------------------------- */

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before { content: none; }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.7;
  font-weight: 400;
  color: var(--ink);
}

.muted { color: var(--muted); }

.diamond-rule {
  border: 0;
  text-align: center;
  overflow: visible;
  margin: 3.5rem auto;
  width: 100%;
}
.diamond-rule::before {
  content: '◆';
  color: var(--gold);
  font-size: 0.7rem;
  background: transparent;
  padding: 0 1rem;
  position: relative;
  top: -0.7rem;
}
.diamond-rule::after {
  content: '';
  display: block;
  border-top: 1px solid var(--line);
  margin-top: -0.35rem;
}

/* ---- layout --------------------------------------------------------------- */

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section--bone { background: var(--bone); }
.section--sand { background: var(--sand); }
.section--carbon { background: var(--carbon); color: #efe9de; }
.section--carbon .muted { color: #b3aa9c; }
.section--carbon h1, .section--carbon h2, .section--carbon h3 { color: #f4efe6; }
.section--carbon .link-underline { color: #efe9de; border-bottom-color: var(--gold-light); }
.section--carbon .eyebrow, .section--carbon .eyebrow::before { color: var(--gold-light); }

/* ---- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 1.05em 2.2em;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--light { border-color: rgba(255,255,255,0.7); color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--gold { border-color: var(--gold); color: var(--gold); }
.btn--gold:hover { background: var(--gold); color: #fff; }

.link-underline {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--gold);
  transition: gap 0.35s var(--ease);
}
.link-underline:hover { gap: 1.1em; }

/* ===========================================================================
   HEADER  (injected by app.js)
   =========================================================================== */

.topbar {
  background: var(--carbon);
  color: #e6ded0;
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.65rem 1rem;
}
.topbar a { color: var(--gold-light); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
/* hero pages: header overlays the hero (fixed, out of flow) */
.site-header.is-fixed {
  position: fixed;
  top: 0; left: 0; right: 0;
}
/* transparent over hero on home */
.site-header.is-transparent {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
  color: var(--ink);
}
.site-header .topbar { transition: opacity 0.4s var(--ease); }
/* the hero is a LIGHT drawing, so the transparent header uses dark text/logo */
.site-header.is-transparent .nav a,
.site-header.is-transparent .header-left a,
.site-header.is-transparent .header-right a { color: #fff; }
.site-header.is-transparent .lang,
.site-header.is-transparent .nav .sep { color: var(--gold-light); }
/* over the hero, drop the topbar so the drawing has the full height */
.site-header.is-transparent .topbar { display: none; }

/* Everything in the bar is absolutely positioned so the move between the two
   states (big centred wordmark + nav below  <->  small monogram left + nav
   centred inline) can be a smooth transition rather than a flex reflow. */
.site-header__bar {
  position: relative;
  height: 64px;
  padding: 0 var(--gutter);
  transition: height 0.55s var(--ease);
}
/* brand link covers the bar but is click-through; only the marks catch clicks */
.brand { position: absolute; inset: 0; display: block; pointer-events: none; }
.brand__logo, .brand__mark {
  position: absolute; top: 50%; width: auto; pointer-events: auto;
  transition: opacity 0.55s var(--ease), height 0.55s var(--ease), top 0.55s var(--ease), transform 0.55s var(--ease);
}
/* default (scrolled/interior): monogram pinned left-middle, wordmark faded out */
.brand__mark { left: var(--gutter); transform: translateY(-50%); height: 38px; opacity: 1; }
.brand__logo { left: 50%; transform: translate(-50%, -50%); height: 52px; opacity: 0; }
.header-right {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 1.3rem;
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  transition: top 0.55s var(--ease), transform 0.55s var(--ease);
}
.header-right .lang { color: var(--gold); }

.nav {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: max-content; max-width: calc(100vw - 2 * var(--gutter));
  display: flex; justify-content: center; align-items: center;
  gap: clamp(1.2rem, 2vw, 2.2rem);
  transition: top 0.55s var(--ease), transform 0.55s var(--ease), opacity 0.4s var(--ease);
}
.nav a { white-space: nowrap; }

/* home hero, at the top: large wordmark centred, larger nav on the line below.
   on scroll (.is-scrolled) it eases to monogram-left + smaller nav inline. */
.site-header.is-fixed:not(.is-scrolled) .site-header__bar { height: 138px; }
.site-header.is-fixed:not(.is-scrolled) .brand__mark { opacity: 0; }
.site-header.is-fixed:not(.is-scrolled) .brand__logo {
  opacity: 1; top: 52px; height: clamp(54px, 6.2vw, 78px);
}
.site-header.is-fixed:not(.is-scrolled) .nav { top: 102px; opacity: 0; pointer-events: none; }
.site-header.is-fixed:not(.is-scrolled) .header-right { top: 30px; }
.site-header.is-transparent .nav { border-top-color: rgba(255,255,255,0.28); }
.nav a {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.3s var(--ease);
}
.nav a[aria-current="page"] { color: var(--gold); }
.nav a:hover { color: var(--gold); }
.nav .sep { color: var(--gold); font-size: 0.42rem; padding: 0 1.35rem; opacity: 0.8; }

.nav-toggle { display: none; }
.nav-close { display: none; }

/* ===========================================================================
   HERO
   =========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.hero__media, .hero__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.15) 38%, rgba(0,0,0,0.5) 100%);
}
.hero__inner { position: relative; z-index: 2; padding: 8rem 1.5rem 4rem; max-width: 60rem; }
.hero__inner .eyebrow { color: #fff; }
.hero__inner .eyebrow::before { color: var(--gold-light); }
.band .eyebrow::before { color: var(--gold-light); }
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.4);
}
.hero__sub {
  max-width: 34rem;
  margin: 1.8rem auto 2.6rem;
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.7;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7), 0 2px 22px rgba(0,0,0,0.6);
}
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  background: rgba(25,20,15,0.28);
  backdrop-filter: blur(2px);
  display: grid; place-items: center;
  color: #fff;
  cursor: pointer;
  animation: bob 2.4s var(--ease) infinite;
}
@keyframes bob { 0%,100%{ transform: translate(-50%, 0);} 50%{ transform: translate(-50%, 8px);} }

/* ===========================================================================
   EDITORIAL BLOCKS
   =========================================================================== */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}
.split--wide-text { grid-template-columns: 1.1fr 0.9fr; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__body h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); margin-bottom: 1.6rem; }

.figure-caption { font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); margin-top: 0.9rem; }

/* engraving showcase (sepia line art on bone) */
.engraving { background: var(--bone); }
.engraving img { mix-blend-mode: multiply; }

/* ---- label reveal: façade holds; cutaway wipes in from the bottom on scroll --
   A tall section with a pinned stage; the façade sits behind, the cutaway (same
   framing, building locked) is clipped from the top and revealed upward from the
   bottom as you scroll — so the top of the cutaway appears last. */
.label-media { position: absolute; inset: 0; z-index: 0; }
.label-reveal { position: relative; height: 220vh; background: #f9f6f0; }
.label-reveal .label-sticky {
  position: sticky; top: 0;
  height: 100vh;
  min-height: 0;
}
.label-back {
  clip-path: inset(100% 0 0 0);   /* start fully clipped; JS reveals from bottom */
  will-change: clip-path;
}
/* reduced-motion: no wipe — just show the cutaway */
.label-reveal.is-static .label-back { clip-path: inset(0 0 0 0); }
.label-face {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;               /* full-bleed */
  object-position: center center;  /* same anchor for both faces so the roofs stay aligned */
  transform: scale(1.16);          /* zoom in past the cream margins: bigger, wider, taller */
  transform-origin: center center; /* identical on both faces, so the building stays registered */
  will-change: opacity;
}
/* lift + soften the engraving on the hero so the title reads cleanly on top */
.hero .label-face { filter: brightness(1.14) contrast(0.78); }
/* soft scrim across the very top only, so the white logo + nav read against the
   light drawing; fades to nothing well before the building so the hero stays airy */
.hero__veil {
  display: block;
  position: absolute; left: 0; right: 0; top: 0; height: 34vh;
  background: linear-gradient(180deg, rgba(24,18,12,0.42) 0%, rgba(24,18,12,0.18) 40%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
[data-hero-fade] { will-change: opacity; }

/* ---- estate grid (cards to sections) ------------------------------------- */

.estate-head { text-align: center; max-width: 44rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.estate-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.8rem); margin-bottom: 1.3rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 4; background: var(--sand); }
.card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.card:hover img { transform: scale(1.06); }
.card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 34%, rgba(0,0,0,0.28) 62%, rgba(0,0,0,0.74) 100%);
}
.card__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 1.6rem 1.5rem;
  color: #fff;
  text-align: center;
}
.card__label .eyebrow { color: rgba(255,255,255,0.8); margin: 0 0 0.5rem; }
.card__label h3 { font-size: 1.15rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; }

/* ---- full-bleed quote band ----------------------------------------------- */

.band {
  position: relative;
  min-height: 68vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.band__media, .band__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band__media::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.band__inner { position: relative; z-index: 2; max-width: 46rem; padding: 3rem 1.5rem; }
.band blockquote {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.02em;
  text-transform: none;
  text-shadow: 0 2px 24px rgba(0,0,0,0.4);
}
.band cite { display: block; margin-top: 1.8rem; font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase; font-style: normal; color: rgba(255,255,255,0.85); }

/* ===========================================================================
   FOOTER  (injected by app.js)
   =========================================================================== */

.site-footer { background: var(--carbon); color: #cfc7b8; padding-block: clamp(3.5rem, 6vw, 5rem); }
.site-footer a { color: #cfc7b8; transition: color 0.3s var(--ease); }
.site-footer a:hover { color: var(--gold); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2.5rem;
}
.footer-brand__logo { height: 42px; filter: brightness(0) invert(1); opacity: 0.92; margin-bottom: 1.4rem; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; color: #a79e8f; max-width: 22rem; }
.footer-col h4 { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 1.2rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.7rem; font-size: 0.82rem; letter-spacing: 0.06em; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.8rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: #8b8375;
}

/* ===========================================================================
   MOTION
   =========================================================================== */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */

@media (max-width: 900px) {
  .split, .split--wide-text { grid-template-columns: 1fr; }
  .split__media { order: -1; }
  .cards { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  :root { --nav-h: 118px; }
  .nav { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; cursor: pointer; padding: 0.4rem;
    color: inherit;
  }
  .nav-toggle svg { width: 26px; height: 26px; }
  .nav.is-open {
    display: flex; flex-direction: column; gap: 0.4rem;
    position: fixed; inset: 0; z-index: 60;
    background: var(--carbon); color: #fff;
    justify-content: center; align-items: center;
    border: 0;
  }
  .nav.is-open a { color: #fff; font-size: 1rem; padding: 0.7rem; }
  .nav.is-open .sep { display: none; }
  .nav.is-open .nav-close { display: block; position: fixed; top: 1.4rem; right: 1.4rem; z-index: 61; background: none; border: 0; color: #fff; cursor: pointer; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 88vh; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .scroll-cue { animation: none; }
  .card:hover img { transform: none; }
}
