/* ============================================================
   MISE EN PAGE — Website Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500;1,600&family=IBM+Plex+Sans:wght@400;500&display=swap');

/* === TOKENS === */
:root {
  --charcoal:  #2A3135;
  --ivory:     #F5F1EA;
  --copper:    #C47A3A;
  --white:     #FFFFFF;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-light: 'IBM Plex Sans', 'Segoe UI', sans-serif;

  --max-w: min(1440px, calc(100vw - 96px));
  --gutter: 48px;
  --transition: 0.22s ease;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--charcoal);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* === LAYOUT === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* === NAVIGATION === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px var(--gutter);
  background: var(--charcoal);
  border-bottom: 1px solid rgba(245, 241, 234, 0.10);
}
.nav__brand {
  grid-column: 2;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--white);
  transition: color var(--transition);
}
.nav__brand:hover { color: var(--copper); }

.nav__links {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 40px;
}
.nav__links a {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ivory);
  opacity: 0.68;
  transition: opacity var(--transition), color var(--transition);
}
.nav__links a:hover,
.nav__links a.active {
  opacity: 1;
  color: var(--copper);
}

/* === SHARED === */
.section--flush { padding: 0; }

.eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--copper);
  margin-bottom: 28px;
}

.eyebrow--cg {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 15px;
  margin-bottom: 8px;
}

/* === FOOTER === */
.footer {
  border-top: 1px solid rgba(245, 241, 234, 0.10);
  padding: 48px 0;
}
.footer .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}
.footer__brand {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--white);
}
.footer__nav {
  display: flex;
  gap: 32px;
  justify-content: center;
}
.footer__nav a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ivory);
  opacity: 0.40;
  transition: opacity var(--transition);
}
.footer__nav a:hover { opacity: 0.9; }
.footer__copy {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ivory);
  opacity: 0.28;
  text-align: right;
}

/* === PAGE HEADER (Library / Founder / Plate) === */
.page-header {
  padding: 92px 0 28px;
  border-bottom: 1px solid rgba(245, 241, 234, 0.10);
}
.page-header .container {
  padding-top: 0;
  padding-bottom: 0;
}
.page-header--no-rule {
  border-bottom: none;
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.8vw, 52px);
  font-weight: 600;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 20px;
}
.page-header p {
  font-size: 18px;
  font-weight: 500;
  font-style: italic;
  color: var(--ivory);
  opacity: 0.75;
  max-width: 52ch;
  line-height: 1.65;
}

/* === HOMEPAGE === */
.snap-container {}
.snap-slide { position: relative; }
.snap-slide--one { min-height: 100dvh; }

.slide-one__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px var(--gutter) 60px;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Dictionary entry */
.dict-entry {
  max-width: 960px;
  width: 100%;
  text-align: center;
}
.dict-entry__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.dict-entry__term {
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.5vw, 60px);
  font-weight: 500;
  font-style: italic;
  color: var(--ivory);
  line-height: 1.05;
  margin-bottom: 14px;
}
.dict-entry__phonetic {
  display: block;
  font-family: var(--font-light);
  font-size: 12px;
  font-weight: 400;
  color: var(--white);
  opacity: 1;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.dict-entry__lang,
.dict-entry__type {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--copper);
}
.dict-entry__sep {
  color: var(--ivory);
  opacity: 0.28;
  font-size: 14px;
}

/* mise en place context box */
.mep-context {
  border-top: 1px solid rgba(196, 122, 58, 0.55);
  border-bottom: 1px solid rgba(196, 122, 58, 0.55);
  padding: 36px 0;
  margin-bottom: 80px;
}
.mep-context .dict-entry__term {
  font-size: clamp(24px, 2.8vw, 36px);
  opacity: 0.75;
}

/* MISE EN PAGE hero title */
.dict-entry__page-name {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.8vw, 52px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1.05;
  text-align: center;
  margin-bottom: 24px;
}
.dict-entry__definition {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 24px);
  font-style: normal;
  color: var(--ivory);
  opacity: 0.88;
  line-height: 1.62;
  margin-bottom: 32px;
}
.dict-entry__definition--copper {
  color: var(--copper);
  opacity: 1;
}
.dict-entry__cta {
  display: inline-block;
  margin-top: 36px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 600;
  color: var(--copper);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.dict-entry__cta:hover { opacity: 1; }

/* === LIBRARY: TAG CHIPS + GRID === */
.library-body { padding: 8px 0 56px; }

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.chip {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(245, 241, 234, 0.22);
  border-radius: 999px;
  background: transparent;
  color: var(--ivory);
  opacity: 0.7;
  transition: all var(--transition);
}
.chip:hover { opacity: 1; border-color: rgba(245, 241, 234, 0.5); }
.chip.active {
  background: transparent;
  border-color: var(--copper);
  color: var(--copper);
  opacity: 1;
}
.library-empty {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  opacity: 0.6;
  padding: 24px 0;
}
.library-empty[hidden] { display: none; }

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px 24px;
}
.recipe-card {
  display: flex;
  flex-direction: column;
  padding: 0 0 20px;
  border-bottom: 1px solid rgba(245, 241, 234, 0.12);
  transition: border-color var(--transition);
}
.recipe-card[hidden] { display: none; }
.recipe-card:hover { border-bottom-color: var(--copper); }
.recipe-card__art {
  width: 100%;
  height: 130px;
  object-fit: contain;
  object-position: left bottom;
  margin-bottom: 20px;
  transition: transform var(--transition);
}
.recipe-card:hover .recipe-card__art { transform: translateY(-3px); }
.recipe-card__name {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  color: var(--white);
  line-height: 1.15;
}
.recipe-card__meta {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ivory);
  opacity: 0.5;
}

/* === ILLUSTRATION: still life + divider === */
.still-life {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 3vw, 28px);
  margin: 56px auto 0;
}
.still-life img { height: auto; width: clamp(48px, 13vw, 110px); }
.still-life img:nth-child(2) { transform: translateY(-6px); }
.still-life img:nth-child(4) { transform: translateY(-10px); }
.divider-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 8px 0 48px;
}
.divider-row::before, .divider-row::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: rgba(245, 241, 234, 0.12);
}
.divider-row img { height: 36px; width: auto; opacity: 0.8; }

/* === PLATE VIEW === */
.plate-header {
  border-bottom: none;
  padding-bottom: 24px;
}
.plate-view {
  padding: 0 0 120px;
}
.plate-ingredients {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ingredient-group {
  flex: 1;
  min-width: 120px;
}
.ingredient-group__label {
  display: block;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--copper);
  opacity: 0.80;
  margin-bottom: 10px;
}
.ingredient-group__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ingredient-group__list li {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--ivory);
  opacity: 0.75;
  line-height: 1.4;
}
.plate-ctas {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 28px;
}
.plate-cta {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 600;
  color: var(--copper);
  text-decoration: none;
  transition: opacity var(--transition);
}
.plate-cta:hover { opacity: 0.75; }
.plate-canvas {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(245, 241, 234, 0.08);
  background: var(--charcoal);
}
.plate-image {
  display: block;
  width: 100%;
  min-width: 900px;
  height: auto;
}

/* === FOUNDER PAGE === */
.page-founder {
  background: var(--charcoal);
}
.page-founder .nav {
  background: var(--charcoal);
}
.page-founder .footer {
  border-top-color: rgba(245, 241, 234, 0.06);
}
.page-founder .footer__brand,
.page-founder .footer__copy,
.page-founder .footer__nav a {
  opacity: 0.6;
}
.founder-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  padding: 16px 0 80px;
  align-items: stretch;
}
.founder-portrait {
  height: 100%;
  order: -1;
}
.founder-portrait__frame {
  width: 100%;
  height: 100%;
  background: var(--charcoal);
}
.founder-portrait__photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
}
.founder-bio__name {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  color: var(--ivory);
  line-height: 1.05;
  margin-bottom: 24px;
}
.founder-bio__body {
  font-size: 17px;
  font-weight: 400;
  color: var(--ivory);
  opacity: 0.90;
  line-height: 1.80;
  margin-bottom: 28px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  :root { --gutter: 36px; }

  .footer .container {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .footer__copy { text-align: center; }

  .founder-layout {
    grid-template-columns: 1fr;
    gap: 52px;
  }
  .founder-portrait {
    position: static;
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  :root { --gutter: 24px; --max-w: 100%; }

  .nav { padding: 18px var(--gutter); display: flex; justify-content: space-between; align-items: center; }
  .nav__brand { font-size: 13px; letter-spacing: 0.02em; }
  .nav__links { gap: 20px; }
  .nav__links a { font-size: 11px; letter-spacing: 0.02em; }

  .recipe-grid { grid-template-columns: 1fr; gap: 24px; }
  .recipe-card { flex-direction: row; align-items: center; gap: 16px; padding-bottom: 16px; }
  .recipe-card__art { width: 88px; height: 72px; margin: 0; object-position: center; flex-shrink: 0; }
  .recipe-card__name { font-size: 22px; }
  .library-explainers__row { flex-direction: column; gap: 28px; }

  .page-header { padding: 92px 0 40px; }
}


/* === HOME === */
.home { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; padding: 112px var(--gutter) 16px; max-width: 720px; margin: 0 auto; }
.home__text { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.hero__h { font-family: var(--font-serif); font-weight: 500; font-size: clamp(30px, 6vw, 46px); line-height: 1.1; color: var(--white); margin: 0; max-width: 22ch; text-wrap: balance; }
.dict-entry--compact { text-align: center; max-width: 520px; }
.dict-entry--compact .dict-entry__term { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 6px; }
.dict-entry--compact .dict-entry__meta { justify-content: center; margin-bottom: 12px; }
.dict-entry--compact .dict-entry__definition { font-size: 20px; line-height: 1.45; margin: 0; }
.hero__plate { display: block; width: 100%; max-width: 560px; border: 1px solid rgba(245, 241, 234, 0.12); border-radius: 4px; overflow: hidden; }
.hero__plate img { display: block; width: 100%; height: auto; }
.home .dict-entry__cta { margin-top: 0; font-size: 26px; }
/* preface: the definition, small and quiet */
.home__text { padding-bottom: 28px; border-bottom: 1px solid rgba(196, 122, 58, 0.35); width: 100%; max-width: 360px; }
.home .dict-entry--compact .dict-entry__term { font-size: 24px; margin-bottom: 2px; opacity: 0.85; }
.home .dict-entry--compact .dict-entry__meta { margin-bottom: 8px; }
.home .dict-entry--compact .dict-entry__definition { font-size: 17px; opacity: 0.75; }
/* headline, link and plate read as one unit */
.home__left { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.home__text { margin-bottom: 10px; }
.home .hero__plate { margin-top: -2px; }
@media (min-width: 900px) {
  .home { flex-direction: row; align-items: center; justify-content: center; gap: 56px; max-width: 1280px; width: 100%; height: calc(100dvh - 56px); padding: 85px var(--gutter) 0; text-align: left; }
  .home__left { align-items: flex-start; flex: 0 0 40%; width: auto; gap: 0; }
  .home__text { max-width: none; width: 100%; margin-bottom: 28px; padding-bottom: 22px; }
  .home .dict-entry--compact { text-align: left; max-width: none; }
  .home .dict-entry--compact .dict-entry__meta { justify-content: flex-start; }
  .home .hero__h { font-size: 44px; max-width: none; margin: 0 0 18px; text-wrap: balance; }
  .home .hero__plate { flex: 1 1 0; min-width: 0; margin-top: 0; border: 0; border-radius: 0; overflow: visible; max-width: none; width: auto; display: flex; justify-content: flex-end; }
  .home .hero__plate img { width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 85px - 56px); object-fit: contain; }
  .home-foot { height: 56px; padding: 0; display: flex; align-items: center; justify-content: center; }
}

.hero__plate:focus-visible, .dict-entry__cta:focus-visible, .chip:focus-visible { outline: 2px solid var(--ivory); outline-offset: 4px; }
.home-foot { text-align: center; padding: 12px 0 28px; }
.home-foot__copy { margin: 0; }
.page-header p.page-count { font-size: 16px; font-style: normal; font-weight: 400; color: var(--ivory); opacity: 0.7; margin: 0; }

/* === LIBRARY: chips in one scrollable row === */
.tag-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-right: calc(var(--gutter) * -1);
  padding-right: var(--gutter);
  padding-bottom: 4px;
  scrollbar-width: none;
}
.tag-chips::-webkit-scrollbar { display: none; }
.chip { flex: none; white-space: nowrap; }

.home-foot__copy { margin-top: 14px; font-size: 11px; letter-spacing: 0.02em; color: var(--ivory); opacity: 0.3; }

/* === LIBRARY: how it works === */
.how { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: var(--max-w); margin: 0 auto 12px; padding: 0 var(--gutter); }
.how li { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.35; color: var(--ivory); opacity: 0.78; }
.how svg { width: 32px; height: 32px; color: var(--ivory); opacity: 0.95; flex: none; }
@media (min-width: 700px) { .how li { flex-direction: row; align-items: center; gap: 12px; font-size: 14px; } }

