/* ==========================================================================
   Chez Laet — trattoria familiale, Rumilly
   Token system
   ========================================================================== */

:root {
  /* Color */
  --cream:          #F5EFE1;
  --cream-dim:      #ECE2CC;
  --paper:          #FBF6E9;
  --charcoal:       #2A2823;
  --charcoal-soft:  #38352C;
  --ink:            #2A2823;
  --chalk:          #F2EEE1;
  --terracotta:     #C1512D;
  --terracotta-dark:#9E3F22;
  --italia-green:   #0F5132;
  --olive:          var(--italia-green);
  --olive-dark:     var(--italia-green);
  --gold:           #D9A441;
  --vichy:          #4C6E91;
  --line:           rgba(42, 40, 35, 0.14);
  --line-chalk:     rgba(242, 238, 225, 0.22);

  /* Type */
  --font-display: 'Italiana', serif;
  --font-hand:    'Grand Hotel', cursive;
  --font-body:    'Schibsted Grotesk', sans-serif;
  --font-mono:    'Cutive Mono', monospace;

  /* Layout */
  --max-width: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
}

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

html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background-color: var(--cream);
  background-image: radial-gradient(circle, rgba(42, 40, 35, 0.05) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 239, 225, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--terracotta);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding-bottom: 4px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 2px;
  background: var(--terracotta);
  transition: width 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem;
}

.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem var(--gutter);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .main-nav.is-open { transform: translateX(0); }

  .main-nav ul {
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
  }

  .main-nav a {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--olive-dark);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0 0 1.1rem;
  color: var(--ink);
}

.hero h1 span {
  color: var(--terracotta);
  letter-spacing: 0.03em;
}

.hero-tagline {
  font-size: 1.15rem;
  max-width: 34ch;
  color: var(--charcoal-soft);
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--terracotta);
  color: var(--chalk);
}
.btn-primary:hover { background: var(--terracotta-dark); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--cream-dim);
  border: 1px solid var(--line);
}

.status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #8a8a7c;
}

.status-pill[data-state="open"] .status-dot { background: var(--olive); }
.status-pill[data-state="closed"] .status-dot { background: var(--terracotta); }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-facts li {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--olive-dark);
}

.hero-media {
  position: relative;
}

.hero-media .frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 18px 40px -18px rgba(42, 40, 35, 0.45);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-media:hover img {
  transform: scale(1.06);
}

.hero-tag {
  position: absolute;
  bottom: -18px;
  left: -18px;
  background: var(--olive);
  color: var(--chalk);
  font-family: var(--font-hand);
  font-size: 1.6rem;
  padding: 0.6rem 1.3rem 0.7rem;
  border-radius: var(--radius);
  transform: rotate(-4deg);
  box-shadow: 0 10px 24px -10px rgba(42, 40, 35, 0.4);
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 380px; }
}

@media (max-width: 420px) {
  .hero-tag { left: 0; font-size: 1.4rem; padding: 0.55rem 1.1rem 0.6rem; }
}

/* ==========================================================================
   Intro strip
   ========================================================================== */

.intro-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--cream-dim);
}

.intro-strip .wrap {
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

.intro-strip p {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  max-width: 46ch;
  margin: 0;
  color: var(--olive-dark);
}

/*
 * Magic text: each word renders twice — a dim "ghost" copy that sets the
 * layout, and a fill copy stacked exactly on top whose opacity is driven by
 * scroll position, so words brighten one by one as the quote scrolls by.
 */
.magic-text {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.3em;
}

.magic-word {
  position: relative;
  display: inline-block;
  margin-right: 0.28em;
}

.magic-word-ghost {
  opacity: 0.25;
}

.magic-word-fill {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  color: var(--terracotta);
}

/* ==========================================================================
   Section heading pattern
   ========================================================================== */

.section {
  padding-top: clamp(3.5rem, 8vw, 6rem);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.section-head {
  margin-bottom: 2.5rem;
  max-width: 60ch;
}

.section-eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--terracotta);
  margin: 0 0 0.6rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: 0.01em;
  margin: 0 0 0.75rem;
}

.section-head p {
  color: var(--charcoal-soft);
  margin: 0;
}

/* ==========================================================================
   Menu / Ardoise (signature element)
   ========================================================================== */

.menu-board {
  background-color: var(--italia-green);
  background-image: radial-gradient(circle, rgba(242, 238, 225, 0.035) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
  color: var(--chalk);
  position: relative;
}

.menu-board .section-eyebrow { color: var(--gold); }

.menu-board .section-head h2 {
  color: var(--chalk);
}

.menu-board .section-head p {
  color: rgba(242, 238, 225, 0.72);
}

/*
 * The card itself is styled as a 1960s Italian-American diner menu: cream
 * paper, a thin double-ruled red border, dotted price leaders and a poster
 * slab face for category names — set apart from the dark chalkboard section
 * it sits in, like a printed menu laid on a dark counter.
 */
/*
 * The tricolor edge is built from solid nested rings (not thin box-shadow
 * lines) so each color band stays a real, unambiguous fill at any zoom —
 * thin overlapping shadows were rendering as a blurred single line.
 */
.board-ring-red {
  background: var(--terracotta);
  padding: 4px;
  border-radius: 8px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55);
}

.board-ring-white {
  background: var(--paper);
  padding: 4px;
  border-radius: 6px;
}

.board-ring-green {
  background: var(--italia-green);
  padding: 4px;
  border-radius: 4px;
}

.board-frame {
  background: var(--paper);
  border-radius: 2px;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.75rem, 4vw, 3rem);
}

.menu-columns {
  columns: 2;
  column-gap: clamp(2rem, 4vw, 3.5rem);
}

@media (max-width: 760px) {
  .menu-columns { columns: 1; }
}

.menu-emblem {
  column-span: all;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 0 2.25rem;
}

.menu-emblem .bar {
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--italia-green);
}

.menu-emblem .bar.red { background: var(--terracotta); }

.menu-emblem .word {
  font-family: var(--font-hand);
  font-size: 2.1rem;
  color: var(--ink);
}

.menu-category {
  break-inside: avoid;
  margin-bottom: 2.25rem;
}

.menu-category h3 {
  font-family: 'Alfa Slab One', var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  margin: 0 0 0.65rem;
  padding-bottom: 0.4rem;
  color: var(--terracotta);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 2px solid var(--italia-green);
}

.menu-category .cat-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--olive-dark);
  display: block;
  margin: -0.35rem 0 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.menu-item {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(42, 40, 35, 0.08);
}

.menu-item:last-child { border-bottom: none; }

.menu-item-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.menu-item-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  white-space: nowrap;
}

.menu-item-leader {
  flex: 1 1 auto;
  min-width: 0.75rem;
  border-bottom: 1.5px dotted rgba(42, 40, 35, 0.4);
  transform: translateY(-0.3em);
}

.menu-item-price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--terracotta);
  white-space: nowrap;
}

.menu-item-desc {
  font-size: 0.82rem;
  color: rgba(42, 40, 35, 0.68);
  margin: 0.2rem 0 0;
  max-width: 42ch;
}

/* ==========================================================================
   Galerie
   ========================================================================== */

/*
 * Most source photos are small (~206x206) social-media exports. Tiles are
 * capped near that native size so nothing gets upscaled and blurred — only
 * the one high-resolution shot (the ardoise, .feature) gets a larger tile.
 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 213px;
  gap: 1rem;
  max-width: 900px;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}

/* Stagger-reveal: each photo settles into its own grid position one after another */
.stagger-reveal figure {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.stagger-reveal.is-visible figure {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stagger-reveal figure:nth-child(1) { transition-delay: 0ms; }
.stagger-reveal figure:nth-child(2) { transition-delay: 90ms; }
.stagger-reveal figure:nth-child(3) { transition-delay: 180ms; }
.stagger-reveal figure:nth-child(4) { transition-delay: 270ms; }
.stagger-reveal figure:nth-child(5) { transition-delay: 360ms; }
.stagger-reveal figure:nth-child(6) { transition-delay: 450ms; }

@media (prefers-reduced-motion: reduce) {
  .stagger-reveal figure {
    transition: none;
    transform: none;
  }
}

.gallery-grid figure.feature {
  grid-column: 1 / -1;
  grid-row: span 3;
  background: #1c1a16;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-grid figure.feature img {
  object-fit: contain;
}

.gallery-grid figure:hover img { transform: scale(1.06); }

@media (max-width: 620px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery-grid figure.feature { grid-column: span 2; grid-row: span 2; }
}

/* ==========================================================================
   A propos
   ========================================================================== */

.about .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about-text p {
  margin: 0 0 1.1rem;
  color: var(--charcoal-soft);
}

.about-text p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.2rem;
  float: left;
  line-height: 0.8;
  padding: 0.1rem 0.4rem 0 0;
  color: var(--terracotta);
}

.about-media {
  position: relative;
}

.about-media .frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(42,40,35,0.4);
}

.about-media img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.about-media:hover img {
  transform: scale(1.06);
}

.about-media .signature {
  position: absolute;
  bottom: -22px;
  right: -14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 108px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--olive-dark);
  transform: rotate(6deg);
  box-shadow: 0 10px 24px -10px rgba(42,40,35,0.35);
  line-height: 1.15;
}

@media (max-width: 860px) {
  .about .wrap { grid-template-columns: 1fr; }
  .about-media { order: -1; max-width: 320px; }
}

/* ==========================================================================
   Contact / infos pratiques
   ========================================================================== */

.practical {
  background-color: var(--olive-dark);
  background-image: radial-gradient(circle, rgba(242, 238, 225, 0.04) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
  color: var(--chalk);
}

.practical .section-eyebrow { color: var(--gold); }
.practical .section-head h2 { color: var(--chalk); }
.practical .section-head p { color: rgba(242,238,225,0.75); }

.practical .wrap {
  display: flex;
  justify-content: center;
}

.practical-info {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.practical-info .section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.practical-info .hours-table {
  max-width: 320px;
  margin: 0 auto;
}

.info-block {
  margin-bottom: 1.9rem;
}

.info-block h3 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--gold);
  margin: 0 0 0.6rem;
}

.info-block p, .info-block a {
  margin: 0;
  font-size: 1.05rem;
  text-decoration: none;
}

.info-block a:hover { text-decoration: underline; }

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.hours-table td {
  padding: 0.45rem 0;
  border-bottom: 1px dashed rgba(242,238,225,0.2);
}

.hours-table td:first-child {
  font-weight: 600;
  text-transform: capitalize;
  text-align: left;
}

.hours-table td:last-child {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.hours-table tr.today td {
  color: var(--gold);
  position: relative;
}

.hours-table tr.today td:first-child::before {
  content: "";
  position: absolute;
  left: -0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--charcoal);
  color: rgba(242,238,225,0.65);
  padding: 2rem 0;
  font-size: 0.85rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer strong { color: var(--chalk); }

.site-footer a {
  color: rgba(242,238,225,0.65);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover { color: var(--chalk); }

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Blur-reveal: a richer entrance (blur + rise, gentle spring settle) for the menu */
.blur-reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(80px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.blur-reveal.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .blur-reveal { transition: opacity 0.3s ease; filter: none; transform: none; }
}

/* ==========================================================================
   Cursor glow — a warm ambient halo that follows the pointer
   ========================================================================== */

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 164, 65, 0.55) 0%, rgba(193, 81, 45, 0.2) 45%, transparent 72%);
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform, opacity;
}

.cursor-glow.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cursor-glow { display: none; }
}
