/* =========================================================
   Tarentina — Glace de Provence
   Shared styles
   ========================================================= */

:root {
  /* Tarentina — palette officielle */
  --bg: #f1e8d3;              /* lin chaud */
  --bg-deep: #e6dabf;          /* lin plus profond */
  --bg-soft: #ebe2cb;
  --gold: #b5402b;             /* terracotta signature */
  --gold-bright: #d4593e;
  --gold-dim: #8a3220;
  --accent-yellow: #e8a73a;    /* moutarde — highlights */
  --cream: #2a1610;            /* terre cuite très foncée */
  --cream-dim: #6b4a3a;
  --line: rgba(42, 22, 16, 0.14);
  --line-strong: rgba(42, 22, 16, 0.38);

  --hero-vignette:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(241,232,211,0.9), transparent 60%),
    radial-gradient(ellipse 100% 50% at 50% 0%, rgba(241,232,211,0.55), transparent 60%),
    linear-gradient(180deg, rgba(241,232,211,0.18), rgba(241,232,211,0.45) 70%);
  --image-bg: #e0d2b2;
  --grain-blend: multiply;

  --font-serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --font-sans: 'Jost', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --max: 1480px;
  --pad: clamp(24px, 5vw, 80px);
  --section-pad: clamp(80px, 12vw, 180px);
}

/* Dark palettes overrides — set by tweaks-app.jsx via [data-palette] */
:root[data-palette="sombre"],
:root[data-palette="abysse"],
:root[data-palette="bouteille"] {
  --hero-vignette:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(26,18,8,0.9), transparent 60%),
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(26,18,8,0.7), transparent 60%),
    linear-gradient(180deg, rgba(26,18,8,0.4), rgba(26,18,8,0.7) 70%);
  --image-bg: #0f0a04;
  --grain-blend: overlay;
}

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

html, body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background: var(--bg);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 80% 0%, var(--ambient-1, rgba(176, 106, 53, 0.08)), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 100%, var(--ambient-2, rgba(176, 106, 53, 0.05)), transparent 60%);
}

/* Subtle film grain across the whole site */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.28;
  mix-blend-mode: var(--grain-blend, multiply);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.35  0 0 0 0 0.18  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: var(--gold); color: var(--bg); }

/* =====================  TYPOGRAPHY  ===================== */

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.serif { font-family: var(--font-serif); }
.italic { font-style: italic; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--cream);
}

h1 { font-size: clamp(48px, 7.2vw, 116px); }
h2 { font-size: clamp(36px, 5vw, 76px); }
h3 { font-size: clamp(26px, 3.2vw, 46px); }
h4 { font-size: clamp(20px, 2.2vw, 28px); font-weight: 500; }

p { color: var(--cream-dim); font-weight: 300; }

.lead {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.45;
  color: var(--cream);
  font-style: italic;
}

/* =====================  LAYOUT  ===================== */

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

section { position: relative; }

.divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}

/* =====================  NAV  ===================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s ease;
  background: linear-gradient(180deg, rgba(239, 230, 210, 0.88), rgba(239, 230, 210, 0));
  backdrop-filter: blur(0px);
}
:root[data-palette="sombre"] .nav,
:root[data-palette="abysse"] .nav,
:root[data-palette="bouteille"] .nav {
  background: linear-gradient(180deg, rgba(26, 18, 8, 0.85), rgba(26, 18, 8, 0));
}
.nav.scrolled {
  padding: 14px var(--pad);
  background: rgba(239, 230, 210, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
:root[data-palette="sombre"] .nav.scrolled,
:root[data-palette="abysse"] .nav.scrolled,
:root[data-palette="bouteille"] .nav.scrolled {
  background: rgba(18, 12, 5, 0.78);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
}
.nav-brand img {
  height: 48px;
  width: auto;
  display: block;
  transition: opacity 0.3s ease, height 0.3s ease;
}
.nav.scrolled .nav-brand img { height: 32px; }
.nav-brand:hover img { opacity: 0.7; }
/* Transparent logo — no filter */
.nav-brand img,
.footer-brand img { filter: none; }
:root[data-palette="sombre"] .nav-brand img,
:root[data-palette="sombre"] .footer-brand img,
:root[data-palette="abysse"] .nav-brand img,
:root[data-palette="abysse"] .footer-brand img,
:root[data-palette="bouteille"] .nav-brand img,
:root[data-palette="bouteille"] .footer-brand img { filter: none; }

.nav-links {
  display: flex;
  gap: 36px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  color: var(--cream-dim);
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right 0.35s cubic-bezier(.6,.1,.2,1);
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { right: 0; }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after { right: 0; }

.nav-cta {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  color: var(--cream);
  transition: all 0.3s ease;
}
.nav-cta:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

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

/* =====================  BUTTONS  ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 400;
  border: 1px solid var(--gold);
  color: var(--cream);
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(.6,.1,.2,1);
  z-index: -1;
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--bg); }
.btn .arrow { transition: transform 0.3s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-gold {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.btn-gold::before { background: var(--cream); }
.btn-gold:hover { color: var(--bg); }

/* =====================  REVEAL  ===================== */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(.2,.6,.2,1), transform 1s cubic-bezier(.2,.6,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }


/* =====================  INTRO GALLERY  ===================== */

.intro-gallery {
  padding: 0 0 80px;
}
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 var(--pad);
  max-width: 1400px;
  margin: 0 auto;
}
.ig-item {
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 3 / 4;
}
.ig-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.ig-item:hover img {
  transform: scale(1.04);
}
@media (max-width: 640px) {
  .ig-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 0 12px;
  }
}

/* =====================  FOOTER  ===================== */

.footer {
  border-top: 1px solid var(--line);
  padding: 100px var(--pad) 40px;
  background: var(--bg-deep);
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
}
.footer-brand img {
  height: 56px;
  width: auto;
  display: block;
  margin-bottom: 28px;
}
.footer-brand h3 {
  font-size: clamp(36px, 4vw, 56px);
  margin-bottom: 16px;
}
.footer-brand p {
  max-width: 340px;
  font-size: 14px;
  color: var(--cream-dim);
}
.footer-col h5 {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-col a { color: var(--cream-dim); transition: color 0.25s ease; }
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  max-width: var(--max);
  margin: 80px auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; }
}
@media (max-width: 520px) {
  .footer { padding-top: 72px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { margin-top: 56px; }
}

.gold { color: var(--gold); }
.cream-dim { color: var(--cream-dim); }
.center { text-align: center; }/* Brand arch motif — half-circle with curved text */
.arch {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 32px;
}
.arch-svg {
  width: clamp(220px, 22vw, 380px);
  height: auto;
  display: block;
  overflow: visible;
}
.arch-svg text {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.18em;
  font-size: 11px;
  text-transform: uppercase;
  fill: var(--gold);
}
.arch-svg .dot { fill: var(--gold); }

/* Section title that follows an arc */
.arc-title {
  text-align: center;
  margin-bottom: 80px;
}

/* Yellow highlight for emphasized words */
.hl { color: var(--accent-yellow); font-weight: 500; }

.num-counter {
  font-family: var(--font-serif);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
}

image-slot {
  --is-bg: var(--image-bg, rgba(176, 106, 53, 0.08));
  --is-border: rgba(176, 106, 53, 0.3);
  --is-text: var(--gold-dim);
  font-family: var(--font-mono);
}

/* placeholder image style — updates with palette */
.ph-img {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      rgba(176,106,53,0.08) 0px,
      rgba(176,106,53,0.08) 12px,
      rgba(176,106,53,0.03) 12px,
      rgba(176,106,53,0.03) 24px);
  border: 1px solid var(--line);
}
:root[data-palette="sombre"] .ph-img,
:root[data-palette="abysse"] .ph-img,
:root[data-palette="bouteille"] .ph-img {
  background:
    repeating-linear-gradient(135deg,
      rgba(201,169,110,0.05) 0px,
      rgba(201,169,110,0.05) 12px,
      rgba(201,169,110,0.02) 12px,
      rgba(201,169,110,0.02) 24px);
}
.ph-img {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  overflow: hidden;
}
.ph-img::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--line);
}

/* =====================  MOBILE NAV  ===================== */

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.nav-mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.nav-mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}
.nav-mobile-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(32px, 8vw, 52px);
  color: var(--cream);
  padding: 14px 0;
  text-align: center;
  width: 100%;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease;
}
.nav-mobile-menu a:hover { color: var(--gold); }
.nav-mobile-menu a:first-child { border-top: 1px solid var(--line); }
.nav-mobile-cta {
  margin-top: 32px !important;
  font-family: 'Jost', sans-serif !important;
  font-style: normal !important;
  font-size: 11px !important;
  letter-spacing: 0.3em !important;
  text-transform: uppercase;
  border: 1px solid var(--gold) !important;
  color: var(--gold) !important;
  padding: 14px 36px !important;
  width: auto !important;
}

@media (max-width: 900px) {
  .nav-burger { display: flex; }
  .nav-cta { display: none; }
}

/* OU NOUS TROUVER — simple */
.trouver-simple {
  padding: 120px 0 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trouver-phrase {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(28px, 4vw, 56px);
  color: var(--cream);
  line-height: 1.3;
  margin-bottom: 48px;
}
.trouver-cta {
  display: inline-block;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 16px 40px;
  transition: background 0.3s, color 0.3s;
}
.trouver-cta:hover { background: var(--gold); color: var(--ink); }
