/* ==========================================================================
   Dirtybiology — static site
   Light/dark theming via CSS custom properties + [data-theme] on <html>.
   ========================================================================== */

/* Self-hosted fonts (no third-party requests — GDPR-friendly).
   Inter is a variable font: one file covers weights 400–800. */
@font-face {
  font-family: "Cardo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cardo-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cardo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cardo-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cardo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/cardo-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cardo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/cardo-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cardo";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cardo-400-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cardo";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cardo-400-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f9f9f9;
  --text: #313131;
  --muted: #5a5a5a;
  --accent: #d8613c;
  --accent-strong: #b84a28;
  --green: #0a9d3f;
  --card-bg: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --nav-bg: #f0efeb;
  --icon-bg: #e9e7e2;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  --deco-opacity: 0.1;
  --deco-filter: none;
}

[data-theme="dark"] {
  --bg: #17181c;
  --text: #e8e6e1;
  --muted: #a7a49e;
  --accent: #ff7a52;
  --accent-strong: #ff9a7a;
  --green: #3ecf72;
  --card-bg: #1f2026;
  --border: rgba(255, 255, 255, 0.12);
  --nav-bg: #22232a;
  --icon-bg: #2a2b33;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --deco-opacity: 0.09;
  --deco-filter: invert(1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  position: relative;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Scattered background drawings (injected by JS) */
#decoLayer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
#decoLayer .deco {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: var(--deco-opacity);
  filter: var(--deco-filter);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--accent); }
a:hover { color: var(--accent-strong); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand-logo { width: 42px; height: 42px; object-fit: contain; }
[data-theme="dark"] .brand-logo { filter: invert(1) hue-rotate(180deg); }
.brand-name { font-weight: 600; font-size: 1.1rem; letter-spacing: 0.01em; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  text-decoration: none;
  background: var(--icon-bg);
  color: var(--text);
  transition: transform 0.15s ease, background-color 0.3s ease;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0;
}
.icon-btn:hover { transform: scale(1.08); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; display: block; }

.icon-instagram {
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  color: #fff;
}
.icon-instagram:hover { color: #fff; }
.icon-youtube { background: #ff0000; color: #fff; }
.icon-youtube:hover { color: #fff; }

/* Theme toggle: show moon in light mode, sun in dark mode */
.toggle-theme .icon-sun { display: none; }
[data-theme="dark"] .toggle-theme .icon-sun { display: block; }
[data-theme="dark"] .toggle-theme .icon-moon { display: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  text-align: center;
  margin-top: 70px;
}

.hero-title {
  font-family: "Cardo", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-snail {
  height: 1.15em;
  width: auto;
  transform: translateY(-6%);
}

.hero-intro {
  max-width: 640px;
  margin: 18px auto 0;
}
.hero-intro p { margin: 0; }
.hero-intro a { text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Nav pill (Boutique / Newsletter / Livres / Contact)
   -------------------------------------------------------------------------- */
.nav-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 44px;
  background: var(--nav-bg);
  border-radius: 6px;
  max-width: 640px;
  margin: 38px auto 0;
  padding: 16px 30px;
  transition: background-color 0.3s ease;
}
.nav-pill a {
  font-family: "Cardo", Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nav-pill .nav-shop {
  font-family: "Inter", system-ui, sans-serif;
  font-style: normal;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Dots divider
   -------------------------------------------------------------------------- */
.dots-divider {
  text-align: center;
  color: var(--muted);
  letter-spacing: 1.6em;
  text-indent: 1.6em;
  margin: 34px 0;
  user-select: none;
}

/* --------------------------------------------------------------------------
   Video carousel
   -------------------------------------------------------------------------- */
.carousel {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}
.car-viewport { overflow: hidden; }
.car-track {
  display: flex;
  transition: transform 0.45s ease;
}
.slide {
  flex: 0 0 100%;
  min-width: 100%;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  padding: 0 4px;
}
.slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: var(--shadow);
  display: block;
}
.slide-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 22px 0 0;
}
.slide-date {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 10px 0 0;
}
.slide:hover .slide-title { color: var(--accent); }

.car-arrow {
  position: absolute;
  top: 32%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
}
.carousel:hover .car-arrow,
.car-arrow:focus-visible { opacity: 1; }
.car-arrow:hover { transform: scale(1.08); }
.car-prev { left: -21px; }
.car-next { right: -21px; }

.car-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}
.car-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--border);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.car-dots button.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* --------------------------------------------------------------------------
   Experiments
   -------------------------------------------------------------------------- */
.experiments {
  max-width: 860px;
  margin: 20px auto 0;
  text-align: center;
}
.xp-title {
  font-family: "Cardo", Georgia, serif;
  font-weight: 400;
  font-size: 2rem;
  margin: 0;
}
.xp-subtitle {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 0.95rem;
}
.xp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.xp-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 22px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.3s ease;
}
.xp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--text);
}
.xp-emoji { font-size: 2.4rem; line-height: 1; }
.xp-card h3 {
  font-family: "Cardo", Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 14px 0 0;
}
.xp-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 8px 0 0;
}
.xp-card.xp-soon {
  opacity: 0.55;
  border-style: dashed;
  cursor: default;
}
.xp-card.xp-soon:hover { transform: none; box-shadow: none; }

/* --------------------------------------------------------------------------
   Inner pages (newsletter / contact / privacy)
   -------------------------------------------------------------------------- */
.page-content {
  max-width: 640px;
  margin: 60px auto 0;
}
.page-content.centered { text-align: center; }
.page-title {
  font-family: "Cardo", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3rem);
  text-align: center;
  margin: 0;
}
.page-content h2 {
  font-family: "Cardo", Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  margin: 36px 0 8px;
}
.page-content ul { padding-left: 1.3em; }
.page-lead { text-align: center; color: var(--muted); margin-top: 10px; }

.btn-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  background: var(--accent);
  color: #fff;
  transition: transform 0.15s ease, background-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--accent-strong); color: #fff; }
.btn.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn.btn-outline:hover { color: var(--accent-strong); border-color: var(--accent-strong); }

/* Contact form */
.contact-form {
  display: grid;
  gap: 18px;
  margin-top: 40px;
  text-align: left;
}
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
.field textarea { min-height: 150px; resize: vertical; }
.form-actions { margin-top: 10px; }
.form-note { font-size: 0.85rem; }

/* Newsletter bullet list */
.nl-list { display: inline-block; text-align: left; margin-top: 24px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 110px;
  padding-bottom: 60px;
  text-align: center;
}
.footer-logo { width: 64px; height: 64px; object-fit: contain; }
[data-theme="dark"] .footer-logo { filter: invert(1) hue-rotate(180deg); }
.footer-privacy {
  display: inline-block;
  font-family: "Cardo", Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  margin-top: 18px;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--text);
}
.footer-privacy:hover { color: var(--accent); }
.footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}
.footer-copy {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 26px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .hero { margin-top: 40px; }
  .nav-pill { gap: 10px 26px; padding: 14px 18px; }
  .car-prev { left: 6px; }
  .car-next { right: 6px; }
  .car-arrow { opacity: 1; }
  .form-row { grid-template-columns: 1fr; }
}

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