/* ============================================
   ATELIER GRAV'ART — DESIGN SYSTEM
   "Atelier Éditorial" — Editorial × Artisan Premium
   ============================================ */

@font-face {
  font-family: 'Woodland';
  src: url('../fonts/PPWoodland-Ultralight.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Woodland';
  src: url('../fonts/PPWoodland-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'League Spartan';
  src: url('../fonts/League_Spartan/LeagueSpartan-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* — Palette — */
  --ink: #0E0A07;
  --ink-2: #15100A;
  --ash: #1A130E;
  --bone: #F4EFE6;
  --bone-2: #EDE5D6;
  --paper: #FBF7EE;
  --walnut: #3A2516;
  --ember: #6B3F1E;
  --brass: #C9A06B;
  --brass-soft: #E4C994;
  --brass-deep: #8E6A3A;

  --fg: #15100A;
  --fg-2: #4A3826;
  --fg-3: #8A7558;
  --fg-inv: #F4EFE6;
  --fg-inv-2: #B8A988;
  --fg-inv-3: #786650;

  --line: rgba(20, 14, 8, 0.12);
  --line-soft: rgba(20, 14, 8, 0.06);
  --line-inv: rgba(244, 239, 230, 0.14);
  --line-inv-soft: rgba(244, 239, 230, 0.08);

  /* — Type — */
  --display: 'Woodland', 'Fraunces', Georgia, serif;
  --serif: 'Instrument Serif', 'Fraunces', Georgia, serif;
  --sans: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* — Motion — */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-fast: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 280ms;
  --t-med: 600ms;
  --t-slow: 900ms;

  /* — Layout — */
  --max: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bone);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
ul, ol { list-style: none; }

/* Selection */
::selection { background: var(--brass); color: var(--ink); }

/* ============================================
   GRAIN OVERLAY (universal)
   ============================================ */
.grain::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0 0.04 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.grain.grain-light::before { mix-blend-mode: screen; opacity: 0.04; }

/* ============================================
   TYPE SCALE
   ============================================ */
.t-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
}
.t-eyebrow.on-dark { color: var(--fg-inv-2); }

.t-section-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--brass);
  font-weight: 500;
}

.t-display {
  font-family: var(--display);
  font-weight: 200;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.t-h2 {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.t-h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.t-h2.on-dark { color: var(--bone); }

.t-h3 {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.t-lead {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.45;
  color: var(--fg-2);
}

.t-body {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--fg-2);
}
.t-body.on-dark { color: var(--fg-inv-2); }

.t-caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  text-transform: uppercase;
}

/* ============================================
   CONTAINERS
   ============================================ */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}
.wrap-narrow { max-width: 1100px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn-fill {
  background: var(--ink);
  color: var(--bone);
  border: 1px solid var(--ink);
}
.btn-fill:hover { background: var(--brass); border-color: var(--brass); transform: translateY(-1px); color: var(--ink); }

.btn-line {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-line:hover { background: var(--ink); color: var(--bone); }

.btn-line.on-dark {
  color: var(--bone);
  border-color: rgba(244, 239, 230, 0.3);
}
.btn-line.on-dark:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }

.btn-ghost {
  padding: 10px 0;
  border-radius: 0;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}
.btn-ghost:hover { color: var(--brass-deep); border-color: var(--brass); }
.btn-ghost.on-dark { color: var(--bone); border-color: var(--bone); }
.btn-ghost.on-dark:hover { color: var(--brass-soft); border-color: var(--brass); }

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* Mask reveal — for headings (lines that "engrave") */
.mask-reveal {
  display: inline-block;
  overflow: hidden;
}
.mask-reveal > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease);
}
.mask-reveal.in > span { transform: translateY(0); }
.mask-reveal.d1 > span { transition-delay: 0.1s; }
.mask-reveal.d2 > span { transition-delay: 0.2s; }
.mask-reveal.d3 > span { transition-delay: 0.3s; }

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor-dot, .cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  mix-blend-mode: difference;
  transition: transform 0.1s linear, width 0.3s var(--ease), height 0.3s var(--ease);
  top: 0; left: 0;
}
.cursor-dot { width: 6px; height: 6px; background: var(--bone); transform: translate(-50%, -50%); }
.cursor-ring { width: 36px; height: 36px; border: 1px solid var(--bone); transform: translate(-50%, -50%); transition: transform 0.25s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease); }
.cursor-ring.hover { width: 64px; height: 64px; border-color: var(--brass); }
@media (max-width: 900px) { .cursor-dot, .cursor-ring { display: none; } }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: all 0.4s var(--ease);
}
.nav.scrolled {
  background: rgba(244, 239, 230, 0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.nav.over-dark:not(.scrolled) { color: var(--bone); }
.nav.over-dark:not(.scrolled) .nav-link { color: var(--bone); }
.nav.over-dark:not(.scrolled) .nav-logo-mark { color: var(--bone); }
.nav.over-dark:not(.scrolled) .btn-line { border-color: rgba(244, 239, 230, 0.4); color: var(--bone); }

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 40px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 200;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.nav-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.nav-logo-mark {
  font-family: 'League Spartan', var(--display);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex;
  align-items: center;
}
.nav-logo-mark em { font-family: 'League Spartan', var(--display); font-style: normal; font-weight: 500; color: var(--brass-deep); }

.nav-links {
  display: flex;
  gap: 36px;
  justify-content: center;
}
.nav-link {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding: 8px 0;
}
.nav-link::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--brass);
  transition: width 0.4s var(--ease);
}
.nav-link:hover::after { width: 100%; }
.nav-link.active::after { width: 100%; }

.nav-cta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}
.nav-cta .btn { padding: 12px 22px; font-size: 0.78rem; }

.nav-burger {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 22px; height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--ink);
  color: var(--bone);
  z-index: 99;
  padding: 100px 32px 40px;
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 1.1;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-inv-soft);
  color: var(--bone);
}
.mobile-menu nav a em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--brass-soft); }
.mobile-menu-cta { margin-top: auto; padding-top: 32px; }

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .nav-burger { display: flex; }
  .nav-inner { grid-template-columns: 1fr auto; }
}

/* ============================================
   SECTIONS BASE
   ============================================ */
section { position: relative; }

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 80px;
  row-gap: 0;
  align-items: end;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.section-head .num-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.section-head .num-block .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--brass);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-head .num-block .num::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--brass);
}
.section-head .num-block .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.section-head h2 {
  margin: 0;
  max-width: 16ch;
}
.section-head .sub {
  grid-column: 2;
  margin-top: 8px;
  max-width: 50ch;
}

@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; column-gap: 24px; row-gap: 0; padding-bottom: 20px; margin-bottom: 28px; }
  .section-head .sub { grid-column: 1; margin-top: 4px; }
}

.section-head.on-dark { border-color: var(--line-inv); }
.section-head.on-dark h2 { color: var(--bone); }
.section-head.on-dark .num-block .label { color: var(--fg-inv-3); }

/* ============================================
   IMAGE PLACEHOLDER (when image missing)
   ============================================ */
.img-placeholder {
  background:
    linear-gradient(135deg, transparent 25%, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.04) 50%, transparent 50%, transparent 75%, rgba(0,0,0,0.04) 75%) 0 0 / 12px 12px,
    var(--bone-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--ink);
  color: var(--fg-inv);
  padding: 100px 0 40px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201, 160, 107, 0.18), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.footer-mega {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(4rem, 16vw, 16rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--bone);
  white-space: nowrap;
  margin: 60px 0;
  display: flex;
  align-items: center;
  gap: 40px;
}
.footer-mega em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--brass); }
.footer-mega .dot {
  width: 16px; height: 16px;
  background: var(--brass);
  border-radius: 50%;
  flex-shrink: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 64px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line-inv);
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 24px;
  font-weight: 500;
}
.footer-col a {
  display: block;
  padding: 6px 0;
  color: var(--fg-inv-2);
  font-size: 0.92rem;
  transition: color 0.3s var(--ease);
}
.footer-col a:hover { color: var(--bone); }
.footer-about p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--fg-inv-2);
  max-width: 32ch;
  margin-top: 16px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-inv-3);
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-mega { font-size: 3.4rem; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ============================================
   SHARED UTILITIES
   ============================================ */
.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}
.divider.on-dark { background: var(--line-inv); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  background: rgba(255,255,255,0.4);
}
.tag.on-dark {
  border-color: var(--line-inv);
  background: rgba(255,255,255,0.04);
  color: var(--fg-inv-2);
}
.tag .dot {
  width: 6px; height: 6px;
  background: var(--brass);
  border-radius: 50%;
}

/* Spec line — fiche produit luxe */
.spec-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.spec-line .k { color: var(--fg-3); text-transform: uppercase; }
.spec-line .v { color: var(--fg); font-weight: 500; }
.spec-line.on-dark { border-color: var(--line-inv); }
.spec-line.on-dark .k { color: var(--fg-inv-3); }
.spec-line.on-dark .v { color: var(--bone); }
