/* ============================================
   MTG — Marbrerie Terre Granit
   Design system
   ============================================ */

:root {
  /* Palette — beige chaud / noir profond / bois / rouge logo en accent */
  --cream: #f5f2ec;
  --cream-2: #ebe6dc;
  --cream-3: #e2dbce;
  --ink: #1a1917;
  --ink-2: #2b2a27;
  --stone: #6b5d4a;
  --stone-2: #a89276;
  --bone: #d9cfbc;
  --accent: #8a1a1a;        /* rouge sombre dérivé du logo (évite l'agressivité) */
  --accent-hover: #6b1414;
  --line: rgba(26, 25, 23, 0.12);
  --line-strong: rgba(26, 25, 23, 0.22);

  /* Type */
  --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Spacing */
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(64px, 10vh, 140px);
  --radius: 2px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ---- Typography ---- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 144;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

h1 { font-size: clamp(44px, 7vw, 96px); }
h2 { font-size: clamp(34px, 5vw, 64px); }
h3 { font-size: clamp(22px, 2.4vw, 32px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--stone);
  font-weight: 500;
}

.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
}

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: var(--section-y) 0; }

.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--cream) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
  min-height: 72px;
  position: relative;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  position: relative;
  height: 44px;
  width: 440px;
  flex-shrink: 0;
}
.nav .nav-brand .nav-logo-img {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 300px;
  width: auto;
  display: block;
  object-fit: contain;
  pointer-events: none;
  max-width: 520px;
}
.nav .nav-brand .monogram { display: none; }
.nav .nav-brand .wordmark { display: none; }
/* Footer keeps text-based brand */
.foot-brand .nav-brand .monogram {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--brand-red);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.foot-brand .nav-brand .wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.foot-brand .nav-brand .wordmark .name {
  font-size: 15px;
  letter-spacing: 0.01em;
  font-weight: 500;
}
.foot-brand .nav-brand .wordmark .sub {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  color: var(--ink-2);
  padding: 8px 0;
  position: relative;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 2px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
}

.nav-cta {
  padding: 10px 18px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all .25s ease;
  font-family: var(--font-body);
}
.nav-cta:hover {
  background: var(--ink);
  color: var(--cream);
}

@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid var(--ink);
  transition: all .25s ease;
  font-family: var(--font-body);
  background: transparent;
  color: var(--ink);
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.btn:hover { transform: translateY(-1px); }
.btn svg { transition: transform .25s ease; }
.btn:hover svg { transform: translateX(4px); }

/* ---- Footer ---- */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 80px 0 32px;
  margin-top: 120px;
}
footer .foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--stone-2);
  font-weight: 500;
  margin-bottom: 18px;
}
footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; }
footer ul a {
  font-size: 14px;
  color: var(--cream);
  opacity: 0.75;
  transition: opacity .2s;
}
footer ul a:hover { opacity: 1; }
footer .foot-brand { max-width: 360px; }
footer .foot-brand p { font-size: 14px; opacity: 0.7; margin-top: 16px; line-height: 1.6; }
footer .foot-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid rgba(245, 242, 236, 0.12);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--stone-2);
}
@media (max-width: 720px) {
  footer .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  footer .foot-bottom { flex-direction: column; gap: 12px; }
}

/* ---- Reveal on scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

/* ---- Utility ---- */
.stone-tex {
  background-image:
    radial-gradient(1200px 300px at 30% 20%, rgba(168,146,118,.08), transparent 60%),
    radial-gradient(900px 400px at 80% 80%, rgba(107,93,74,.06), transparent 60%);
}

.rule-serif {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--ink);
  vertical-align: middle;
  margin: 0 10px 6px 0;
}
