/* ── Gustatory Design System — "Cahier de Recette" Edition ── */
:root {
  /* Earthy, warm palette — notebook paper meets kitchen warmth */
  --bg-deep:       #1a1208;   /* Deep warm espresso */
  --bg-warm:       #221a0f;   /* Warm parchment-dark */
  --bg-card:       #2a1f12;   /* Card background */
  --bg-paper:      #f5f0e8;   /* Cream paper (light accents) */
  --fg-primary:    #f2ead8;   /* Warm off-white */
  --fg-muted:      #a8967e;   /* Warm gray */
  --fg-dim:        #6b5a44;   /* Dim warm */
  --accent-amber:  #d4955a;   /* Terre de Sienne */
  --accent-copper: #b8743b;   /* Deep copper */
  --accent-gold:   #c9a55a;   /* Warm gold */
  --accent-ember:  #d96840;   /* Ember/coral */
  --accent-olive:  #7a8c5a;   /* Olive green */
  --accent-cream:  #e8dcc8;   /* Cream accent */

  --serif:  'Cormorant Garamond', Georgia, serif;
  --sans:   'DM Sans', -apple-system, sans-serif;

  /* Spacing scale */
  --space-xs:  0.375rem;
  --space-sm:  0.75rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;
  --space-xl:  3.5rem;

  /* Touch targets */
  --tap-min:   44px;

  /* Transitions */
  --ease-out:  cubic-bezier(0.2, 0, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-deep);
  color: var(--fg-primary);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  /* Subtle paper grain texture */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
  padding-bottom: 80px; /* Space for bottom nav */
}

/* ── Bottom Navigation Bar ─────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(26, 18, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(212, 149, 90, 0.12);
  display: flex;
  align-items: stretch;
  height: 64px;
  padding: 0 env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--fg-dim);
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s var(--ease-out);
  position: relative;
  min-height: var(--tap-min);
  padding: 8px 0;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.bottom-nav-item span {
  line-height: 1;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--accent-amber);
}

/* Active dot indicator */
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 6px;
  width: 4px;
  height: 4px;
  background: var(--accent-amber);
  border-radius: 50%;
}

/* ── Top bar (minimal) ─────────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 54px;
  background: rgba(26, 18, 8, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(212, 149, 90, 0.08);
}

.top-bar-logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--fg-primary);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.top-bar-logo em {
  font-style: italic;
  color: var(--accent-amber);
}

/* Language Switcher — compact, in top bar */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.lang-switcher select {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(212, 149, 90, 0.2);
  border-radius: 8px;
  color: var(--fg-muted);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.75rem;
  padding: 0.4rem 1.8rem 0.4rem 0.6rem;
  outline: none;
  transition: border-color 0.2s, color 0.2s;
  min-height: var(--tap-min);
}

.lang-switcher select:hover,
.lang-switcher select:focus {
  border-color: rgba(212, 149, 90, 0.45);
  color: var(--fg-primary);
}

.lang-switcher::after {
  content: '⌄';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-dim);
  pointer-events: none;
  font-size: 0.7rem;
}

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 5rem;
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(160,98,42,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(192,68,10,0.04) 0%, transparent 60%),
    var(--bg-deep);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100px;
  background: linear-gradient(to bottom, transparent, rgba(212, 149, 90, 0.4), transparent);
}

.hero-label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 2rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  line-height: 1.08;
  color: var(--fg-primary);
  max-width: 860px;
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-amber);
}

.hero-sub {
  font-family: var(--sans);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--fg-muted);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

/* Primary CTA on hero */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--accent-amber);
  color: var(--bg-deep);
  border: none;
  border-radius: 100px;
  padding: 0.9rem 2.2rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease-out), transform 0.15s var(--ease-out);
  margin-bottom: 3rem;
  letter-spacing: 0.02em;
  min-height: var(--tap-min);
}

.hero-cta:hover { background: var(--accent-copper); transform: translateY(-2px); }
.hero-cta:active { transform: scale(0.97); }

.hero-ingredients {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-ingredients span {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--fg-dim);
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(212, 149, 90, 0.12);
  border-radius: 100px;
  transition: all 0.3s var(--ease-out);
  cursor: default;
}

.hero-ingredients span:hover {
  color: var(--accent-amber);
  border-color: rgba(212, 149, 90, 0.35);
  background: rgba(212, 149, 90, 0.04);
}

/* ── Philosophy ────────────────────────────────────────────── */
.philosophy {
  padding: var(--space-xl) 1.5rem;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  text-align: center;
}

.philosophy::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 2px;
  background: var(--accent-copper);
  border-radius: 2px;
}

.philosophy-quote {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.5vw, 2.3rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--fg-primary);
  margin-bottom: 1.75rem;
}

.philosophy-quote em {
  font-style: italic;
  color: var(--accent-gold);
}

.philosophy-text {
  color: var(--fg-muted);
  font-size: 0.98rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ── Engine Demo ───────────────────────────────────────────── */
.engine {
  padding: 4rem 1.5rem;
  background: var(--bg-warm);
  position: relative;
  overflow: hidden;
}

/* Decorative paper fold corner */
.engine::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 40px; height: 40px;
  background: linear-gradient(225deg, var(--bg-deep) 50%, transparent 50%);
  opacity: 0.5;
}

.engine-inner {
  max-width: 960px;
  margin: 0 auto;
}

.engine-label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-copper);
  margin-bottom: 1.25rem;
}

.engine-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 2.5rem;
  line-height: 1.25;
  max-width: 500px;
}

.engine-demo {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  align-items: start;
}

.engine-input {
  background: var(--bg-card);
  border: 1px solid rgba(212, 149, 90, 0.14);
  border-radius: 16px;
  padding: 1.75rem;
}

.engine-input-label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 0.75rem;
}

.engine-input-value {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--accent-amber);
  font-style: italic;
}

.engine-results {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.engine-result-group h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 0.65rem;
}

.pairing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pairing-tags span {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--fg-primary);
  background: var(--bg-card);
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 149, 90, 0.1);
}

.tension-tags span {
  color: var(--accent-gold);
  background: rgba(201, 165, 90, 0.07);
  border-color: rgba(201, 165, 90, 0.15);
}

.culture-tags span {
  color: var(--accent-ember);
  background: rgba(217, 104, 64, 0.06);
  border-color: rgba(217, 104, 64, 0.12);
}

/* ── Dimensions Grid ───────────────────────────────────────── */
.dimensions {
  padding: var(--space-xl) 1.5rem;
  max-width: 1060px;
  margin: 0 auto;
}

.dimensions-label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-copper);
  margin-bottom: 1.25rem;
}

.dimensions-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 3rem;
  max-width: 560px;
  line-height: 1.25;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.dimension-card {
  padding: 2.25rem;
  background: var(--bg-warm);
  border: 1px solid rgba(212, 149, 90, 0.08);
  border-radius: 20px;
  transition: border-color 0.3s var(--ease-out), transform 0.2s var(--ease-out);
}

.dimension-card:hover {
  border-color: rgba(212, 149, 90, 0.22);
  transform: translateY(-3px);
}

.dimension-number {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: rgba(212, 149, 90, 0.13);
  margin-bottom: 0.85rem;
  line-height: 1;
}

.dimension-card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--fg-primary);
  margin-bottom: 0.65rem;
}

.dimension-card p {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

/* ── Closing Section ───────────────────────────────────────── */
.closing {
  padding: var(--space-xl) 1.5rem;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse 65% 55% at 50% 55%, rgba(212, 149, 90, 0.05) 0%, transparent 65%),
    var(--bg-deep);
}

.closing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 2px;
  background: var(--accent-copper);
  border-radius: 2px;
}

.closing h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
  color: var(--fg-primary);
}

.closing h2 em {
  font-style: italic;
  color: var(--accent-amber);
}

.closing p {
  color: var(--fg-muted);
  font-size: 1rem;
  max-width: 460px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(212, 149, 90, 0.07);
}

.footer p {
  font-family: var(--serif);
  font-size: 0.82rem;
  color: var(--fg-dim);
  font-style: italic;
}

.footer-legal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.footer-legal a {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--fg-dim);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

.footer-legal a:hover { color: var(--accent-amber); }

.footer-legal span {
  color: rgba(212, 149, 90, 0.25);
  font-size: 0.6rem;
}

/* ── Skeleton Loader Shimmer ───────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    rgba(212, 149, 90, 0.04) 25%,
    rgba(212, 149, 90, 0.08) 37%,
    rgba(212, 149, 90, 0.04) 63%
  );
  background-size: 600px 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid rgba(212, 149, 90, 0.08);
  border-radius: 20px;
  padding: 2rem;
}

.skeleton-line {
  height: 14px;
  margin-bottom: 10px;
  border-radius: 7px;
}

.skeleton-title { height: 22px; width: 55%; }
.skeleton-text-sm { width: 85%; }
.skeleton-text-xs { width: 65%; }
.skeleton-badge { height: 26px; width: 80px; border-radius: 100px; display: inline-block; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .engine-demo {
    grid-template-columns: 1fr;
  }
  .dimension-grid {
    grid-template-columns: 1fr;
  }
  .hero-ingredients {
    gap: 0.6rem;
  }
  .hero-ingredients span {
    font-size: 0.82rem;
    padding: 0.4rem 0.9rem;
  }
  .dimension-card {
    padding: 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 4.5rem 1.25rem 4rem;
  }
  .philosophy {
    padding: 4rem 1.25rem;
  }
  .engine {
    padding: 3.5rem 1.25rem;
  }
  .dimensions {
    padding: 4rem 1.25rem;
  }
  .closing {
    padding: 4rem 1.25rem;
  }
}
