/* ============================================================
   Maison Vaugelas — styles
   ============================================================ */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("/assets/fonts/jost.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ivory: #F4F1E8;
  --ivory-2: #EFEADD;
  --ivory-3: #E7E1D1;
  --green: #22453A;
  --green-deep: #183028;
  --green-soft: #3A5A4E;
  --gold: #B79A5B;
  --gold-soft: #CBB27E;
  --ink: #2B2A24;
  --muted: #6C6960;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Jost", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --max: 1280px;
  --pad: clamp(20px, 4vw, 56px);
  --header-h: 78px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3 { font-weight: 400; }
::selection { background: rgba(183, 154, 91, 0.25); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--green);
  color: var(--ivory);
  padding: 12px 20px;
  font-size: 14px;
}
.skip-link:focus { left: 12px; top: 12px; color: var(--ivory); }

.container { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green-soft);
  margin: 0 0 20px;
}

/* ---------- Reveal on scroll (progressive enhancement) ----------
   Only hidden when JS is active; no-JS visitors see everything. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 13px; white-space: nowrap; }
.brand-mark {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  overflow: hidden; display: inline-flex; flex: 0 0 auto;
}
.brand-mark-green { width: 50%; height: 100%; background: var(--green); }
.brand-mark-gold { width: 50%; height: 100%; background: var(--gold); }
.brand-mark-dot {
  position: absolute; top: 50%; left: 50%; width: 10px; height: 10px;
  border-radius: 50%; background: var(--ivory); transform: translate(-50%, -50%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-top {
  font-family: var(--sans); font-weight: 600; font-size: 10px;
  letter-spacing: 0.46em; text-transform: uppercase; color: var(--green-soft);
  margin-bottom: 5px; padding-left: 2px;
}
.brand-bottom {
  font-family: var(--sans); font-weight: 600; font-size: 20px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--green);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .45s ease, box-shadow .45s ease, border-color .45s ease, backdrop-filter .45s ease;
}
.site-header.scrolled {
  background: rgba(244, 241, 232, 0.9);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: rgba(183, 154, 91, 0.35);
  box-shadow: 0 1px 26px rgba(34, 69, 58, 0.07);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a {
  font-family: var(--sans); font-size: 14px; letter-spacing: 0.02em;
  color: var(--ink); transition: color .3s ease;
}
.main-nav a:hover { color: var(--gold); }
.main-nav .nav-cta { font-weight: 500; letter-spacing: 0.04em; color: var(--green); }

.menu-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 6px;
  width: 44px; height: 44px; background: transparent;
  border: 1px solid rgba(34, 69, 58, 0.25); border-radius: 2px; cursor: pointer; padding: 0 11px;
}
.menu-toggle span { display: block; height: 1.5px; background: var(--green); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1500; background: var(--ivory);
  display: flex; flex-direction: column; padding: 20px var(--pad) 40px;
  transform: translateY(-100%); transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.open { transform: none; }
.mobile-menu-top { display: flex; justify-content: flex-end; padding: 14px 0 40px; }
.menu-close {
  width: 44px; height: 44px; background: transparent;
  border: 1px solid rgba(34, 69, 58, 0.25); border-radius: 2px;
  color: var(--green); font-size: 24px; line-height: 1; cursor: pointer;
}
.mobile-nav { display: flex; flex-direction: column; gap: 8px; }
.mobile-nav a {
  font-family: var(--serif); font-size: clamp(30px, 8vw, 34px); color: var(--green);
  padding: 14px 0; border-bottom: 1px solid rgba(183, 154, 91, 0.3);
}
.mobile-nav a:last-child { border-bottom: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(140px, 17vh, 210px) var(--pad) clamp(70px, 9vh, 120px);
  min-height: 92vh; display: flex; flex-direction: column; justify-content: center;
}
.hero-inner { position: relative; z-index: 1; max-width: var(--max); width: 100%; margin: 0 auto; padding: 0; }
.hero h1 {
  font-family: var(--serif); font-size: clamp(44px, 7.4vw, 108px);
  line-height: 1.0; letter-spacing: -0.02em; color: var(--green);
  margin: 0; max-width: 15ch; text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-lead {
  margin: 36px 0 0; max-width: 50ch;
  font-size: clamp(17px, 1.5vw, 20px); line-height: 1.65; color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 46px; }
.link-arrow {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--green);
  transition: color .3s ease;
}
.link-arrow:hover { color: var(--gold); }

/* hero decor */
.hero-decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-decor span { position: absolute; }
.d-ring {
  top: 13%; right: clamp(-120px, -6vw, -40px);
  width: clamp(190px, 24vw, 320px); height: clamp(190px, 24vw, 320px);
  border: 1.5px solid var(--gold); border-radius: 50%;
}
.d-pill-top {
  top: -76px; right: clamp(18%, 22vw, 27%);
  width: clamp(120px, 15vw, 190px); height: clamp(60px, 7.5vw, 95px);
  background: var(--green); border-bottom-left-radius: 999px; border-bottom-right-radius: 999px;
}
.d-pill-right {
  top: 44%; right: 0;
  width: clamp(90px, 11vw, 150px); height: clamp(200px, 26vw, 340px);
  background: var(--green); border-top-left-radius: 999px; border-bottom-left-radius: 999px;
}
.d-square { bottom: 19%; right: clamp(30%, 32vw, 38%); width: 26px; height: 26px; background: var(--gold); }

/* ---------- Section heads ---------- */
h2 {
  font-family: var(--serif); font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.05; letter-spacing: -0.01em; color: var(--green); margin: 0;
}

/* ---------- Réalisations ---------- */
.realisations { padding: clamp(60px, 8vh, 110px) 0; border-top: 1px solid rgba(183, 154, 91, 0.25); scroll-margin-top: 90px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.section-head .eyebrow { margin-bottom: 16px; }
.section-head-note { max-width: 34ch; font-size: 15px; color: var(--muted); margin: 0 0 6px; }

.carousel { position: relative; margin-top: 48px; }
.car-viewport { overflow: hidden; width: 100%; padding: 8px 0; cursor: grab; user-select: none; touch-action: pan-y; }
.car-viewport.grabbing { cursor: grabbing; }
.car-track {
  display: flex; gap: 24px; padding: 0 var(--pad); margin: 0; list-style: none;
  will-change: transform;
}
.car-card {
  flex: 0 0 auto; width: clamp(280px, 34vw, 440px); margin: 0; padding: 12px;
  background: var(--ivory); border: 1px solid var(--gold); border-radius: 4px;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease;
}
.car-card:hover { transform: translateY(-8px); box-shadow: 0 22px 44px rgba(34, 69, 58, 0.13); }
.car-card .frame { border: 1px solid rgba(34, 69, 58, 0.4); border-radius: 2px; overflow: hidden; }
.car-card .ratio { aspect-ratio: 16 / 10; width: 100%; overflow: hidden; background: var(--ivory-2); }
.car-card img { width: 100%; height: 100%; object-fit: cover; }

.car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(244, 241, 232, 0.9); border: 1px solid rgba(34, 69, 58, 0.35);
  color: var(--green); font-size: 18px; cursor: pointer; opacity: 0;
  transition: opacity .35s ease, background .35s ease, border-color .35s ease, color .35s ease;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.carousel:hover .car-arrow, .car-arrow:focus-visible { opacity: 1; }
.car-arrow:hover { background: var(--green); color: var(--ivory); border-color: var(--green); }
.car-prev { left: clamp(12px, 3vw, 40px); }
.car-next { right: clamp(12px, 3vw, 40px); }

/* ---------- À propos ---------- */
.apropos { padding: clamp(70px, 10vh, 130px) 0; border-top: 1px solid rgba(183, 154, 91, 0.25); scroll-margin-top: 90px; }
.apropos-inner {
  display: flex; flex-wrap: wrap; gap: clamp(40px, 6vw, 96px); align-items: center;
  max-width: 1200px;
}
.apropos-text { flex: 1 1 440px; min-width: 280px; }
.apropos-text h2 { margin: 0 0 30px; font-size: clamp(32px, 4.6vw, 58px); }
.apropos-text p { font-size: 17px; color: var(--ink); margin: 0 0 20px; max-width: 54ch; }
.apropos-text p.muted { color: var(--muted); margin-bottom: 0; }
.apropos-media { flex: 1 1 300px; min-width: 260px; position: relative; }
.am-square { position: absolute; top: -18px; left: -18px; width: 88px; height: 88px; background: var(--green); z-index: 0; }
.am-circle { position: absolute; bottom: -16px; right: -16px; width: 64px; height: 64px; border: 1.5px solid var(--gold); border-radius: 50%; z-index: 0; }
.am-frame { position: relative; z-index: 1; margin: 0; padding: 12px; background: var(--ivory); border: 1px solid var(--gold); }
.am-frame picture { display: block; border: 1px solid rgba(34, 69, 58, 0.35); overflow: hidden; }
.am-frame img { aspect-ratio: 4 / 5; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Services ---------- */
.services {
  position: relative; overflow: hidden; padding: clamp(70px, 10vh, 130px) 0;
  background: var(--ivory-2);
  border-top: 1px solid rgba(183, 154, 91, 0.25);
  border-bottom: 1px solid rgba(183, 154, 91, 0.25);
  scroll-margin-top: 90px;
}
.services-decor {
  position: absolute; top: -70px; right: -70px; width: 220px; height: 220px;
  border: 1.5px solid rgba(183, 154, 91, 0.5); border-radius: 50%; pointer-events: none;
}
.services-head { max-width: 700px; margin-bottom: 56px; position: relative; }
.services-head h2 { font-size: clamp(32px, 4.6vw, 58px); line-height: 1.04; }

.services-grid {
  display: grid; grid-template-columns: repeat(3, minmax(180px, 300px));
  gap: 20px; align-items: stretch; justify-content: center;
  list-style: none; margin: 0; padding: 0;
}
.service-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--ivory); border: 1px solid var(--gold); padding: 30px 26px;
  transition: transform .4s ease, border-color .4s ease;
}
.service-card:hover { transform: translateY(-6px); border-color: var(--green); }
.service-top { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; }
.service-num { font-family: var(--sans); font-weight: 500; font-size: 26px; color: var(--green); letter-spacing: 0.02em; }
.service-glyph { display: block; }
.glyph-square { width: 26px; height: 26px; background: var(--green); }
.glyph-circle { width: 26px; height: 26px; border-radius: 50%; background: var(--green); }
.glyph-arch { width: 30px; height: 15px; background: var(--green); border-top-left-radius: 15px; border-top-right-radius: 15px; }
.glyph-triangle { width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-bottom: 26px solid var(--gold); }
.service-card h3 { font-family: var(--serif); font-size: 23px; line-height: 1.2; color: var(--green); margin: 0 0 12px; }
.service-card > p { font-size: 14.5px; color: var(--muted); margin: 0 0 24px; max-width: 30ch; }
.service-list { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 11px; }
.service-list li { position: relative; padding-left: 17px; font-size: 14px; color: var(--ink); }
.service-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; background: var(--green); }
.service-list-gold li::before { background: var(--gold); }

.service-featured { grid-column: 2; position: relative; border-width: 2px; padding: 29px 25px; }
.service-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--green-deep); font-family: var(--sans);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 5px 11px; font-weight: 600; white-space: nowrap;
}

/* ---------- Contact ---------- */
.contact {
  position: relative; overflow: hidden;
  padding: clamp(90px, 14vh, 180px) 0 60px;
  border-top: 1px solid rgba(183, 154, 91, 0.25); scroll-margin-top: 90px;
}
.contact-decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.contact-decor span { position: absolute; }
.c-pill { top: 12%; right: 0; width: clamp(110px, 13vw, 170px); height: clamp(200px, 26vw, 320px); background: var(--green); border-top-left-radius: 999px; border-bottom-left-radius: 999px; }
.c-ring { top: 6%; right: clamp(130px, 17vw, 240px); width: clamp(120px, 15vw, 200px); height: clamp(120px, 15vw, 200px); border: 1.5px solid var(--gold); border-radius: 50%; }
.c-square { top: 52%; right: clamp(120px, 16vw, 230px); width: 26px; height: 26px; background: var(--gold); }
.contact .container { position: relative; z-index: 1; }
.contact h2 {
  font-family: var(--serif); font-size: clamp(40px, 7vw, 92px); line-height: 1.0;
  letter-spacing: -0.02em; margin: 0 0 26px; max-width: 13ch; text-wrap: balance;
}
.contact h2 em { font-style: italic; color: var(--gold); }
.contact .eyebrow { margin-bottom: 28px; }
.contact-lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); margin: 0 0 50px; max-width: 42ch; }
.contact-block { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.contact-role { font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--green-soft); }
.contact-links { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.contact-links a {
  font-family: var(--serif); font-size: clamp(24px, 3.6vw, 42px); line-height: 1.2;
  color: var(--green); transition: color .3s ease; word-break: break-word;
}
.contact-links a:hover { color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 1; }
.footer-inner {
  max-width: var(--max); margin: clamp(80px, 12vh, 140px) auto 0;
  padding-top: 34px; border-top: 1px solid rgba(183, 154, 91, 0.3);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-legal { display: flex; flex-direction: column; gap: 4px; }
.footer-legal span { font-family: var(--sans); font-size: 13px; color: var(--muted); }

/* ---------- Custom cursor ---------- */
.mv-cursor { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; border-radius: 50%; will-change: transform; opacity: 0; }
.mv-ring { width: 34px; height: 34px; border: 1px solid rgba(34, 69, 58, 0.5); transition: border-color .3s ease; }
.mv-dot { width: 5px; height: 5px; background: var(--green); }
body.cursor-active .mv-cursor { opacity: 1; }
@media (pointer: fine) { body.cursor-active { cursor: none; } }
@media (pointer: coarse) { .mv-cursor { display: none !important; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 899px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 300px)); }
  .service-featured { grid-column: auto; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .services-grid { grid-template-columns: minmax(0, 340px); }
  .section-head { align-items: flex-start; }
  .hero { min-height: 88vh; }
  .car-card { width: clamp(260px, 80vw, 340px); }
}

@media (min-width: 900px) {
  .mobile-menu { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .mv-cursor { display: none !important; }
  body.cursor-active { cursor: auto !important; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
