/*
 * Amicale des Vieilles Soupapes — modern heritage design system.
 * Hand-written, dependency-free. Palette: "Harvest".
 */

/* ---------------------------------------------------------------- Fonts */

@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/self/fraunces-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: Fraunces;
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/self/fraunces-wght-italic.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/self/inter-wght-normal.woff2") format("woff2");
}

/* --------------------------------------------------------------- Tokens */

:root {
  /* Harvest palette */
  --bg: #f6efe0;          /* warm cream */
  --surface: #fbf7ef;     /* raised card */
  --surface-2: #efe6d2;   /* sunk / alternate band */
  --ink: #2a241c;         /* dark umber — body text */
  --ink-soft: #5c5347;    /* muted text */
  --olive: #55532a;       /* primary */
  --olive-deep: #3b3a1d;  /* dark sections */
  --ochre: #c6892b;       /* accent — decoration only, never text on cream */
  --barn: #9e3b2e;        /* links / strong accent */
  --barn-dark: #7f2d22;
  --line: rgba(42, 36, 28, 0.14);
  --line-strong: rgba(42, 36, 28, 0.28);
  --font-display: "Fraunces", georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", roboto, sans-serif;
  --wrap: 1120px;
  --wrap-narrow: 760px;
  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(42, 36, 28, 0.06), 0 8px 24px rgba(42, 36, 28, 0.08);
  --shadow-lg: 0 12px 40px rgba(42, 36, 28, 0.18);
  --step-hero: clamp(2.6rem, 1.4rem + 5vw, 5rem);
  --step-h2: clamp(1.7rem, 1.2rem + 2vw, 2.6rem);
  --step-h3: clamp(1.25rem, 1.05rem + 0.8vw, 1.55rem);
  --pad-section: clamp(3.5rem, 2rem + 6vw, 6.5rem);
}

/* ----------------------------------------------------------------- Base */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  line-height: 1.65;
  text-rendering: optimizelegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--barn);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
a:hover, a:focus { color: var(--barn-dark); }

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  z-index: 200;
}
.skip-link:focus { left: 0; color: var(--bg); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 0.5rem + 3vw, 2.5rem);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 239, 224, 0.92);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover, .brand:focus { color: var(--ink); }
.brand__mark { color: var(--barn); }

.brand__sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { display: block; }

.nav-menu { display: flex; }

.nav-menu ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-menu a:hover,
.nav-menu a:focus { background: var(--surface-2); color: var(--olive); }

.nav-menu a[aria-current="page"] {
  color: var(--barn);
  box-shadow: inset 0 -2px 0 var(--ochre);
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }

  .nav-menu {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-menu.is-open { display: block; }
  .nav-menu ul { flex-direction: column; align-items: stretch; padding: 0.6rem clamp(1.1rem, 3vw, 2.5rem); gap: 0.15rem; }
  .nav-menu a { padding: 0.8rem 0.6rem; font-size: 1.05rem; }
  .nav-menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--ochre); }
}

/* ----------------------------------------------------------- Components */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover, .btn:focus { transform: translateY(-1px); }
.btn--primary { background: var(--barn); color: #fff; }
.btn--primary:hover, .btn--primary:focus { background: var(--barn-dark); color: #fff; }
.btn--ghost { border-color: currentcolor; color: var(--ink); background: transparent; }
.btn--ghost:hover, .btn--ghost:focus { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--on-dark { color: #fff; }
.btn--on-dark.btn--ghost { border-color: rgba(255, 255, 255, 0.6); }

.btn--on-dark.btn--ghost:hover,
.btn--on-dark.btn--ghost:focus { background: #fff; color: var(--ink); border-color: #fff; }

/* Section scaffolding */
.section { padding-block: var(--pad-section); }
.section--alt { background: var(--surface-2); }
.section--dark { background: var(--olive-deep); color: #f3ecd9; }
.section--dark h2, .section--dark h3 { color: #fff; }

.section-head { text-align: center; max-width: var(--wrap-narrow); margin-inline: auto; margin-bottom: clamp(2rem, 4vw, 3.5rem); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 0.75rem;
}
.section--dark .eyebrow { color: var(--ochre); }
.section-head h2 { font-size: var(--step-h2); }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.section--dark .section-head p { color: #d8cfb9; }

.lede { font-size: 1.2rem; color: var(--ink-soft); }

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

.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  transform: scale(1.02);
}

.hero__slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__slide.is-active { opacity: 1; }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(42, 36, 28, 0.55) 0%, rgba(42, 36, 28, 0.35) 40%, rgba(59, 58, 29, 0.82) 100%);
}
.hero__inner { padding-block: clamp(4rem, 10vw, 8rem); max-width: 820px; }

.hero__eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: clamp(0.75rem, 0.6rem + 0.6vw, 0.95rem);
  color: #f0d9a8;
  margin-bottom: 1rem;
}

.hero h1 {
  color: #fff;
  font-size: var(--step-hero);
  font-weight: 600;
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.hero__dates {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 1rem + 2vw, 2.2rem);
  color: #fff;
  margin-bottom: 0.5rem;
}

.hero__place {
  font-size: 1.1rem;
  color: #efe7d5;
  margin-bottom: 1rem;
}
.hero__place svg { vertical-align: -0.15em; margin-right: 0.35rem; }

.hero__theme {
  display: inline-block;
  margin-bottom: 2rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 0.95rem;
  color: #f0d9a8;
}
.hero__theme strong { color: #fff; font-weight: 600; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* --------------------------------------------------------------- Prose */

.prose { max-width: var(--wrap-narrow); margin-inline: auto; }
.prose p { font-size: 1.12rem; }
.prose h2 { font-size: var(--step-h3); margin-top: 2rem; }

/* ---------------------------------------------------------------- Team */

.grid-team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 960px;
  margin-inline: auto;
}
.member { text-align: center; }

.member__photo {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow);
}
.member h3 { font-size: 1.2rem; margin-bottom: 0.15rem; }

.member .role {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--barn);
}
.member .role--plain { color: var(--ink-soft); }

/* ------------------------------------------------------------ Partners */

.partner {
  max-width: var(--wrap-narrow);
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ochre);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
}
.partner + .partner { margin-top: 1.5rem; }
.partner h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.partner p { color: var(--ink-soft); margin-bottom: 0; }

/* ---------------------------------------------------------- Collection */

.collection-cat + .collection-cat { margin-top: clamp(2.5rem, 5vw, 4rem); }

.collection-cat__title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--step-h3);
  margin-bottom: 1.5rem;
}

.collection-cat__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(0.9rem, 2vw, 1.5rem);
}

.tile {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.06); }

.tile__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.5rem 1rem 0.75rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(180deg, transparent, rgba(42, 36, 28, 0.85));
}

/* --------------------------------------------------------------- Blog */

.post-list { max-width: var(--wrap-narrow); margin-inline: auto; display: grid; gap: 1.5rem; }

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.post-card time {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 0.5rem;
}
.post-card h2 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--barn); }
.post-card p { color: var(--ink-soft); }
.post-card__more { font-weight: 600; text-decoration: none; }
.post-card__more::after { content: " \2192"; }

/* Single post */
.post-hero { text-align: center; padding-block: clamp(2.5rem, 5vw, 4rem) 0; }

.post-hero time {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ochre);
}
.post-hero h1 { font-size: var(--step-h2); margin-top: 0.5rem; }
.post-body { max-width: var(--wrap-narrow); margin-inline: auto; }
.post-body img { border-radius: var(--radius-lg); margin-block: 1.5rem; box-shadow: var(--shadow); }
.post-body h2 { font-size: var(--step-h3); margin-top: 2rem; }
.post-back { display: inline-block; margin-top: 2.5rem; font-weight: 600; text-decoration: none; }
.post-back::before { content: "\2190 "; }

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

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

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

.map-frame {
  border: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}
.contact-card h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.contact-card dl { margin: 0; }

.contact-card dt {
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 1rem;
}
.contact-card dd { margin: 0.15rem 0 0; font-size: 1.05rem; }
.contact-card .btn { margin-top: 1.75rem; }

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

.site-footer {
  background: var(--ink);
  color: #d8cfb9;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

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

.site-footer h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}
.site-footer__brand { font-family: var(--font-display); font-size: 1.4rem; color: #fff; margin-bottom: 0.5rem; }
.site-footer a { color: #e7dfca; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.social-link { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.social-link svg { flex: none; }

.footer-bottom {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: #a89e88;
}

/* ------------------------------------------------------------ Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  background: rgba(26, 22, 16, 0.92);
}
.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox__caption {
  position: absolute;
  bottom: 1.5rem;
  left: 0; right: 0;
  text-align: center;
  color: #f3ecd9;
  font-weight: 500;
}

.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.24); }
