/* ==========================================================================
   LA SANTOLINE — feuille de style
   Palette de marque : crème #E2D195 · ocre #E9BC37 · terracotta #C35A2B ·
   vert pin #284D35 · encre #16261A · papier #FBF6E8
   Typo : Fraunces (titres) + Archivo (texte courant)
   ========================================================================== */

:root {
  --cream:  #e2d195;
  --paper:  #fbf6e8;
  --ochre:  #e9bc37;
  --ochre-deep: #cf9c1f;
  --terra:  #c35a2b;
  --terra-deep: #a4481f;
  --pine:   #284d35;
  --pine-deep: #1c3626;
  --ink:    #16261a;

  --text-on-cream: #23331f;
  --text-on-dark: #f1ead2;
  --text-muted-cream: #5a5233;
  --text-muted-dark: #c9c2a4;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --max-width: 1180px;
  --radius: 4px;
  --shadow-soft: 0 18px 40px -20px rgba(22, 38, 26, 0.45);

  color-scheme: light;
}

/* La Santoline commits deliberately to a single warm, sunlit world in both
   themes — the palette above is the brand's own identity, not a default. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-on-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h2 { font-size: clamp(2rem, 3.2vw, 2.85rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); font-weight: 600; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.75em 1.2em; z-index: 999; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2.5px solid var(--ochre);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra);
  margin: 0 0 0.9em;
}
.eyebrow--light { color: var(--ochre); }

/* ---------------------------------- Header ---------------------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.3s ease;
  padding: 1.35rem 0;
}
.site-header.is-scrolled {
  background: rgba(22, 38, 26, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 30px -15px rgba(0,0,0,0.5);
  padding: 0.85rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--paper);
}
.brand-mark { color: var(--ochre); display: inline-flex; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: 0.01em;
}

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav a {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 0.2em 0;
}
.main-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -3px;
  height: 1.5px; background: var(--ochre);
  transition: right 0.25s ease;
}
.main-nav a:not(.nav-cta):hover::after { right: 0; }

.nav-cta {
  background: var(--ochre);
  color: var(--ink) !important;
  padding: 0.55em 1.2em !important;
  border-radius: 999px;
  font-weight: 700 !important;
}
.nav-cta:hover { background: var(--paper); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--paper); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--pine-deep);
  padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
}
.mobile-nav a {
  color: var(--paper); text-decoration: none;
  padding: 0.9em 0; border-bottom: 1px solid rgba(241,234,210,0.12);
  font-size: 1.02rem;
}
.mobile-nav.is-open { display: flex; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------------------------------- Buttons ---------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9em 1.7em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--ochre); color: var(--ink); }
.btn--primary:hover { background: var(--paper); }
.btn--ghost {
  background: transparent;
  border-color: rgba(241,234,210,0.55);
  color: var(--paper);
}
.btn--ghost:hover { border-color: var(--ochre); color: var(--ochre); }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------------------------------- Hero -------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--paper);
}
.hero-media {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-video, .hero-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,38,26,0.35) 0%, rgba(22,38,26,0.35) 45%, rgba(16,26,18,0.92) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  padding-bottom: clamp(4rem, 9vw, 7rem);
  padding-top: 8rem;
}
.hero-title {
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  margin: 0;
  letter-spacing: -0.01em;
}
.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--text-on-dark);
  max-width: 30ch;
  margin: 0.5em 0 1.8em;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 1.6rem; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 26px; height: 42px;
  border: 1.5px solid rgba(241,234,210,0.6);
  border-radius: 999px;
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%;
  width: 4px; height: 8px; margin-left: -2px;
  background: var(--ochre); border-radius: 999px;
  animation: cue 1.8s ease infinite;
}
@keyframes cue {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; }
}

/* ---------------------------------- Sections ---------------------------- */

.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section--cream { background: var(--cream); color: var(--text-on-cream); }
.section--dark  { background: var(--pine); color: var(--text-on-dark); }
.section--dark h2, .section--dark h3 { color: var(--paper); }
.section--dark p { color: var(--text-muted-dark); }

.section-head { max-width: 640px; margin: 0 0 3.5rem; }
.section-intro { font-size: 1.08rem; }
.section--cream .section-intro { color: var(--text-muted-cream); }

/* ---------------------------------- Histoire ---------------------------- */

.histoire-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.histoire-media { position: relative; }
.histoire-media img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.histoire-portrait {
  position: absolute;
  bottom: -8%; left: -12%;
  width: 42%;
  margin: 0;
  border: 6px solid var(--paper);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 14px 30px -12px rgba(22,38,26,0.5);
  aspect-ratio: 1 / 1;
}
.histoire-portrait img { width: 100%; height: 100%; object-fit: cover; }

.histoire-text h2 { color: var(--text-on-cream); }
.histoire-video-card {
  margin-top: 2.2rem;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
}
.histoire-video-card video { border-radius: 2px; background: var(--ink); }
.video-caption {
  font-size: 0.88rem;
  color: var(--text-muted-cream);
  margin: 0.7em 0 0;
}

@media (max-width: 860px) {
  .histoire-grid { grid-template-columns: 1fr; }
  .histoire-portrait { width: 38%; }
}

/* ---------------------------------- Huiles ------------------------------ */

.huiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}
.huile-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text-on-cream);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
.huile-card-media { aspect-ratio: 4 / 3; overflow: hidden; }
.huile-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.huile-card:hover .huile-card-media img { transform: scale(1.04); }
.huile-card-body { padding: 1.8rem 1.9rem 2.1rem; }
.huile-card-body h3 { margin-top: 0.5em; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.4em 0.9em;
  border-radius: 999px;
}
.tag--vert { background: rgba(40,77,53,0.12); color: var(--pine); }
.tag--noir { background: rgba(22,38,26,0.9); color: var(--ochre); }

.huiles-story {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  background: rgba(251,246,232,0.05);
  border: 1px solid rgba(241,234,210,0.14);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.huiles-story-media img { border-radius: 3px; }
.huiles-story-text .link-arrow { margin-top: 0.8em; display: inline-block; }
.pressage-video { margin-top: 1.2rem; border-radius: 3px; overflow: hidden; background: var(--ink); }
.pressage-video video { width: 100%; }

@media (max-width: 860px) {
  .huiles-grid { grid-template-columns: 1fr; }
  .huiles-story { grid-template-columns: 1fr; }
}

.link-arrow {
  color: var(--ochre);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.2s ease;
}
.link-arrow:hover { border-color: var(--ochre); }

.separator-branch {
  display: block;
  height: clamp(90px, 12vw, 160px);
  overflow: hidden;
}
.separator-branch img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }

/* ---------------------------------- Terroir stats ------------------------ */

.terroir-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(35,51,31,0.14);
  border-top: 1.5px solid rgba(35,51,31,0.18);
  border-bottom: 1.5px solid rgba(35,51,31,0.18);
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}
.terroir-stat {
  background: var(--cream);
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.terroir-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terra);
}
.terroir-stat-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--pine);
  line-height: 1.3;
}

@media (max-width: 860px) {
  .terroir-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------- Domaine / galerie -------------------- */

.galerie-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 1rem;
}
.galerie-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.galerie-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.galerie-item:hover img { transform: scale(1.05); }
.galerie-item--large { grid-column: span 2; grid-row: span 2; }
.galerie-item--video { grid-column: span 2; background: var(--ink); display: flex; flex-direction: column; }
.galerie-item--video video { flex: 1; width: 100%; height: 100%; object-fit: cover; }
.galerie-item--video figcaption {
  position: absolute; left: 0.9rem; bottom: 0.8rem;
  color: var(--paper); font-size: 0.82rem;
  background: rgba(22,38,26,0.55); padding: 0.3em 0.7em; border-radius: 999px;
  pointer-events: none;
}

@media (max-width: 860px) {
  .galerie-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .galerie-item--large { grid-column: span 2; grid-row: span 1; aspect-ratio: 16/9; height: auto; }
  .galerie-item--video { grid-column: span 2; }
}

/* ---------------------------------- Actualités --------------------------- */

.actualites-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.actu-card {
  background: rgba(251,246,232,0.06);
  border: 1px solid rgba(241,234,210,0.14);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.actu-card:hover { transform: translateY(-4px); border-color: rgba(233,188,55,0.5); }
.actu-card-media { aspect-ratio: 4/3; overflow: hidden; background: var(--ink); }
.actu-card-media img { width: 100%; height: 100%; object-fit: cover; }
.actu-card-body { padding: 1.5rem 1.6rem 1.8rem; }
.actu-date {
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ochre); font-weight: 700; margin-bottom: 0.6em;
}
.actu-card h3 { color: var(--paper); margin-bottom: 0.4em; }
.actu-card p { color: var(--text-muted-dark); font-size: 0.95rem; }

@media (max-width: 900px) {
  .actualites-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------- Contact ------------------------------ */

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 5rem);
}
.contact-intro h2 { color: var(--text-on-cream); }
.contact-details {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  display: flex; flex-direction: column; gap: 0.6rem;
  font-size: 0.96rem;
}
.contact-details strong { color: var(--pine); }

.contact-form {
  background: var(--paper);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
.form-row { display: flex; flex-direction: column; gap: 0.45rem; }
.form-row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.form-row--triple { grid-template-columns: repeat(3, 1fr); }
.form-row--split > div { display: flex; flex-direction: column; gap: 0.45rem; }

label { font-size: 0.85rem; font-weight: 600; color: var(--text-on-cream); }
.optional { font-weight: 400; color: var(--text-muted-cream); }

input, select, textarea {
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 0.75em 0.9em;
  border: 1.5px solid rgba(35,51,31,0.18);
  border-radius: 3px;
  background: var(--cream-soft, #fffdf6);
  color: var(--text-on-cream);
  transition: border-color 0.2s ease;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2323331f' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9em center; padding-right: 2.2em; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--terra);
}
textarea { resize: vertical; min-height: 6em; }

.form-note { font-size: 0.88rem; min-height: 1.2em; margin: 0; color: var(--pine); font-weight: 600; }
.form-note.is-error { color: var(--terra-deep); }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row--split, .form-row--triple { grid-template-columns: 1fr; }
}

/* ---------------------------------- Footer -------------------------------- */

.site-footer { background: var(--ink); color: var(--text-muted-dark); padding-top: 3.5rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 2.5rem;
  justify-content: space-between;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(241,234,210,0.1);
}
.footer-brand .brand-name { color: var(--paper); font-size: 1.3rem; }
.footer-brand p { max-width: 30ch; margin-top: 0.5em; font-size: 0.92rem; }
.footer-nav, .footer-social { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-nav a, .footer-social a { text-decoration: none; color: var(--text-muted-dark); font-size: 0.92rem; }
.footer-nav a:hover, .footer-social a:hover { color: var(--ochre); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  padding: 1.5rem 0 2rem; font-size: 0.8rem; color: rgba(201,194,164,0.7);
}

/* ---------------------------------- Reveal animation ---------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
