/* ============================================================
   NOTRE VERGER LTÉE — Design System
   Agricultural-natural · warm cream · hand-stamped
   ============================================================ */

/* -------- Tokens (defaults; Tweaks may override on :root) -------- */
:root {
  /* Brand palette — Forest direction (default) */
  --forest:        #165423;
  --forest-deep:   #0F3D1E;
  --sage:          #7D9A57;
  --sage-light:    #DDE8D2;
  --sage-pale:     #EEF3E6;
  --cream:         #F7F4EA;
  --cream-deep:    #EFE9D8;
  --paper:         #FBF8EF;
  --accent:        #C96A00;
  --accent-soft:   #E8A36B;
  --ink:           #1F2A24;
  --ink-soft:      #4A574F;
  --ink-mute:      #8A9189;
  --line:          rgba(31,42,36,0.12);
  --line-strong:   rgba(31,42,36,0.22);

  /* Type */
  --font-display:  "Newsreader", "Source Serif Pro", Georgia, serif;
  --font-accent:   "Instrument Serif", "Newsreader", Georgia, serif;
  --font-body:     "Manrope", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:     "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Scale */
  --step--1: clamp(0.78rem, 0.76rem + 0.10vw, 0.84rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --step-1:  clamp(1.10rem, 1.05rem + 0.25vw, 1.25rem);
  --step-2:  clamp(1.35rem, 1.25rem + 0.50vw, 1.65rem);
  --step-3:  clamp(1.70rem, 1.50rem + 1.00vw, 2.30rem);
  --step-4:  clamp(2.20rem, 1.80rem + 2.00vw, 3.40rem);
  --step-5:  clamp(2.80rem, 2.20rem + 3.00vw, 4.80rem);
  --step-6:  clamp(3.20rem, 2.50rem + 4.00vw, 6.20rem);

  /* Spacing */
  --gap-1: 0.5rem;
  --gap-2: 1rem;
  --gap-3: 1.5rem;
  --gap-4: 2rem;
  --gap-5: 3rem;
  --gap-6: 4.5rem;
  --gap-7: 6.5rem;
  --section-py: clamp(4rem, 7vw, 8rem);

  /* Radius / shadows */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15,61,30,0.06), 0 2px 8px rgba(15,61,30,0.05);
  --shadow-md: 0 6px 24px rgba(15,61,30,0.10), 0 2px 6px rgba(15,61,30,0.06);
  --shadow-lg: 0 18px 50px rgba(15,61,30,0.16), 0 6px 18px rgba(15,61,30,0.08);

  /* Layout */
  --maxw: 1240px;
  --maxw-narrow: 880px;
}

/* Density variants (toggled via data-density on <html>) */
html[data-density="airy"]     { --section-py: clamp(5rem, 9vw, 10rem); }
html[data-density="compact"]  { --section-py: clamp(3rem, 5vw, 5.5rem); }

/* Headline-font variants */
html[data-headline="sans"] {
  --font-display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
}
html[data-headline="serif-tall"] {
  --font-display: "Instrument Serif", "Newsreader", Georgia, serif;
}

/* Palette variants */
html[data-palette="sage-light"] {
  --forest:      #2C6B3A;
  --forest-deep: #1F5429;
  --sage:        #9CB67A;
  --cream:       #FBF9F1;
  --paper:       #FFFEF8;
}
html[data-palette="earth-warm"] {
  --forest:      #2D5235;
  --forest-deep: #1B3722;
  --sage:        #A89B6A;
  --sage-light:  #E8DFC2;
  --sage-pale:   #F0EBD7;
  --cream:       #F6EFDF;
  --cream-deep:  #ECE0C4;
  --paper:       #FBF5E5;
  --accent:      #B85A1F;
}

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 4px; }

/* -------- Typography -------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0;
  color: var(--forest-deep);
  text-wrap: balance;
}
h1 { font-size: var(--step-5); letter-spacing: -0.025em; }
h2 { font-size: var(--step-4); letter-spacing: -0.02em; }
h3 { font-size: var(--step-2); line-height: 1.2; }
h4 { font-size: var(--step-1); line-height: 1.3; }
p  { margin: 0; text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.eyebrow.no-rule::before { display: none; }

.accent-italic {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--forest);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* -------- Layout primitives -------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.container.narrow { max-width: var(--maxw-narrow); }
section { padding-block: var(--section-py); position: relative; }
.section-tight { padding-block: clamp(2.5rem, 4vw, 4rem); }

/* -------- Header / Nav -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--cream) 90%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in oklab, var(--cream) 96%, transparent);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-3);
  padding-block: 0.9rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--forest-deep);
  font-weight: 600;
}
.brand img {
  width: 42px; height: 42px;
  border-radius: 999px;
  object-fit: cover;
  background: #fff;
}
.brand .brand-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
  margin-top: 2px;
}
.brand-text { line-height: 1; }
.brand-text .brand-main { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--r-pill);
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: var(--sage-pale); color: var(--forest-deep); }
.nav-links a.active { color: var(--forest-deep); background: var(--sage-light); }
.nav-cta { margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  color: var(--forest-deep);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .nav-links, .nav .btn { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(.7,0,.2,1);
  visibility: hidden;
}
.mobile-drawer.open { transform: translateY(0); visibility: visible; }
.mobile-drawer .nav { padding-block: 1rem; }
.mobile-drawer-body {
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex; flex-direction: column; gap: 0.25rem;
  overflow-y: auto;
}
.mobile-drawer-body a {
  font-family: var(--font-display);
  font-size: 1.7rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--forest-deep);
}
.mobile-drawer-body .btn { margin-top: 1.5rem; align-self: flex-start; }

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--forest-deep);
  color: var(--cream);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn--primary:hover { background: var(--forest); box-shadow: var(--shadow-md); }
.btn--secondary {
  background: transparent;
  border-color: var(--forest-deep);
  color: var(--forest-deep);
}
.btn--secondary:hover { background: var(--forest-deep); color: var(--cream); }
.btn--ghost {
  background: transparent;
  color: var(--forest-deep);
  padding: 0.7rem 0.4rem;
}
.btn--ghost:hover { color: var(--accent); }
.btn--accent {
  background: var(--accent);
  color: var(--cream);
}
.btn--accent:hover { background: #B05B00; }
.btn--small { padding: 0.55rem 1rem; font-size: 0.85rem; }
.btn--large { padding: 1.05rem 1.7rem; font-size: 1rem; }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* -------- Stamps / circular badges -------- */
.stamp {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 110px; height: 110px;
  border-radius: 999px;
  border: 1.5px solid var(--forest);
  color: var(--forest-deep);
  text-align: center;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.1;
  padding: 0.5rem;
  position: relative;
  background: var(--paper);
  transform: rotate(-6deg);
}
.stamp::before {
  content: "";
  position: absolute; inset: 5px;
  border-radius: 999px;
  border: 1px solid var(--sage);
}
.stamp strong {
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Circular stamp for "Since 1980s" hero usage */
.seal {
  --size: 150px;
  width: var(--size); height: var(--size);
  position: relative;
}
.seal svg { width: 100%; height: 100%; }
.seal-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  color: var(--forest-deep);
  font-family: var(--font-display);
}
.seal-center small {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
}
.seal-center strong {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 2px;
}

/* -------- Cards -------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--gap-4);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card--quiet { background: transparent; border: 1px dashed var(--line-strong); }

/* -------- Forms -------- */
.field {
  display: flex; flex-direction: column;
  gap: 0.4rem;
}
.field label, .field .label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.field .label .required { color: var(--accent); margin-left: 0.2rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--forest);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(125,154,87,0.18);
}
.field .help {
  font-size: 0.78rem;
  color: var(--ink-mute);
}
.field.error input, .field.error select, .field.error textarea {
  border-color: #B23A1A;
  background: #FBEDE7;
}
.field .err-msg { font-size: 0.78rem; color: #B23A1A; }

/* Chip-style multi-select */
.chip-group {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.85rem; font-weight: 500;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
.chip input { display: none; }
.chip:hover { border-color: var(--forest); color: var(--forest-deep); }
.chip.checked {
  background: var(--forest-deep);
  border-color: var(--forest-deep);
  color: var(--cream);
}
.chip.checked .check { opacity: 1; transform: scale(1); }
.chip .check {
  width: 14px; height: 14px; opacity: 0; transform: scale(0.7);
  transition: opacity 0.15s, transform 0.15s;
}

/* Radio segmented */
.radio-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.radio-row label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-pill);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.radio-row input { accent-color: var(--forest); }
.radio-row label:has(input:checked) {
  background: var(--sage-light);
  border-color: var(--forest);
  color: var(--forest-deep);
  font-weight: 600;
}

/* File input */
.file-drop {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 1.25rem;
  text-align: center;
  background: var(--cream);
  cursor: pointer;
  transition: all 0.2s;
}
.file-drop:hover, .file-drop.dragging {
  border-color: var(--forest);
  background: var(--sage-pale);
}
.file-drop input { display: none; }
.file-drop .file-icon {
  width: 36px; height: 36px;
  margin: 0 auto 0.5rem;
  color: var(--forest);
}
.file-drop .filename {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--forest-deep);
  font-weight: 600;
}

/* -------- Footer -------- */
.site-footer {
  background: var(--forest-deep);
  color: var(--sage-light);
  padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem;
  position: relative;
  overflow: hidden;
}
.site-footer h4 {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  margin-bottom: 1rem;
}
.site-footer a { color: var(--sage-light); transition: color 0.15s; }
.site-footer a:hover { color: var(--cream); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--gap-5);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--gap-4); }
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.95rem; }
.footer-brand img { width: 56px; height: 56px; border-radius: 999px; background: var(--cream); padding: 4px; }
.footer-brand p { color: var(--sage-light); font-size: 0.93rem; margin-top: 1rem; max-width: 32ch; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(221,232,210,0.18);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-size: 0.82rem; color: rgba(221,232,210,0.7);
}

/* -------- Reveal animations -------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* -------- Tweaks panel -------- */
.tweaks-panel {
  position: fixed;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  z-index: 200;
  width: 280px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.1rem 1.1rem 1.2rem;
  font-size: 0.85rem;
  display: none;
}
.tweaks-panel.visible { display: block; }
.tweaks-panel h5 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.85rem;
  color: var(--forest-deep);
  display: flex; align-items: center; justify-content: space-between;
}
.tweak-section { margin-top: 1rem; }
.tweak-section .lbl {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.45rem;
}
.tweak-row { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.tweak-row button {
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--cream);
  transition: all 0.15s;
}
.tweak-row button[aria-pressed="true"] {
  background: var(--forest-deep);
  color: var(--cream);
  border-color: var(--forest-deep);
}
.tweak-row .swatch {
  width: 28px; height: 28px;
  padding: 0;
  border-radius: 999px;
  position: relative;
}
.tweak-row .swatch[aria-pressed="true"]::after {
  content: "";
  position: absolute; inset: -4px;
  border: 1.5px solid var(--forest-deep);
  border-radius: 999px;
}

/* -------- Decorative bits -------- */
.deco-divider {
  display: flex; align-items: center; gap: 1rem;
  color: var(--sage);
}
.deco-divider::before, .deco-divider::after {
  content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.5;
}
.deco-divider svg { width: 18px; height: 18px; }

/* Section eyebrow row (eyebrow + section number) */
.section-head {
  display: flex; justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: var(--gap-3);
}
.section-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--sage);
  letter-spacing: 0.08em;
}

/* Tiny decorative leaf vine background */
.leaf-bg {
  position: absolute;
  pointer-events: none;
  opacity: 0.08;
  color: var(--forest);
}

/* Anchor offset (sticky header) */
[id] { scroll-margin-top: 90px; }

/* Utility */
.center { text-align: center; }
.muted  { color: var(--ink-soft); }
.row    { display: flex; gap: var(--gap-3); flex-wrap: wrap; align-items: center; }
.stack-2 > * + * { margin-top: var(--gap-2); }
.stack-3 > * + * { margin-top: var(--gap-3); }
.stack-4 > * + * { margin-top: var(--gap-4); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-3); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

/* Selection */
::selection { background: var(--forest-deep); color: var(--cream); }

/* Print */
@media print {
  .site-header, .site-footer, .tweaks-panel, .mobile-drawer { display: none !important; }
}
