/*
Theme Name: Chef Zarmig Modern
Theme URI: https://www.chefzarmig.com
Author: Chef Zarmig
Description: A refined, responsive portfolio theme for Chef Zarmig, built around her culinary work, books, television career, awards, and art.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: chef-zarmig-modern
*/

:root {
  --ink: #171714;
  --paper: #f5f0e8;
  --cream: #fffaf1;
  --gold: #a87938;
  --sage: #6f7969;
  --line: rgba(23, 23, 20, .16);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.02; }
h1 { font-size: clamp(58px, 9vw, 142px); letter-spacing: -.055em; }
h2 { font-size: clamp(42px, 6vw, 82px); letter-spacing: -.045em; }
h3 { font-size: clamp(25px, 3vw, 38px); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background .25s, color .25s, transform .25s;
}
.button:hover { color: var(--cream); background: var(--ink); transform: translateY(-2px); }
.button-light { color: var(--cream); border-color: rgba(255,255,255,.7); }
.button-light:hover { color: var(--ink); background: var(--cream); }
.skip-link { position: absolute; left: -999px; top: 10px; z-index: 1000; background: white; padding: 10px; }
.skip-link:focus { left: 10px; }

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,.22);
}
.header-inner { height: 88px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; flex-direction: column; line-height: 1; }
.brand strong { font-family: var(--serif); font-size: 26px; font-weight: 400; letter-spacing: .04em; }
.brand span { margin-top: 6px; color: rgba(255,255,255,.7); font-size: 9px; letter-spacing: .26em; text-transform: uppercase; }
.menu { display: flex; gap: 30px; align-items: center; margin: 0; padding: 0; list-style: none; }
.menu a { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.menu a:hover { color: #d6b37d; }
.menu a { position: relative; }
.menu a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.menu a:hover::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; color: white; background: transparent; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 24px; height: 1px; margin: 6px auto; background: currentColor; }
.site-header.is-dark { position: relative; color: var(--ink); background: var(--paper); border-color: var(--line); }
.site-header.is-dark .brand span { color: rgba(23,23,20,.6); }
.site-header.is-dark .menu-toggle { color: var(--ink); }

.hero { position: relative; min-height: 100svh; display: grid; align-items: end; color: white; background: #161615; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 52% center; filter: contrast(1.04); }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,8,.82) 0%, rgba(10,10,8,.28) 52%, rgba(10,10,8,.12)), linear-gradient(0deg, rgba(10,10,8,.68), transparent 48%); }
.hero-content { position: relative; z-index: 2; padding: 185px 0 70px; }
.hero h1 span { display: block; }
.hero h1 .script { margin-left: .75em; color: #d6b37d; font-size: .42em; font-style: italic; letter-spacing: 0; }
.hero-copy { display: grid; grid-template-columns: 1fr 360px; align-items: end; gap: 40px; margin-top: 36px; }
.hero-copy p { margin: 0; color: rgba(255,255,255,.78); font-family: var(--serif); font-size: 21px; }
.hero-links { display: flex; gap: 14px; }
.hero-note { position: absolute; right: 24px; bottom: 120px; z-index: 2; writing-mode: vertical-rl; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; }

.intro { padding: 130px 0; }
.intro-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(50px, 9vw, 130px); align-items: center; }
.portrait-frame { position: relative; padding: 0 0 44px 44px; }
.portrait-frame::before { content: ""; position: absolute; left: 0; bottom: 0; width: 70%; height: 76%; border: 1px solid var(--gold); }
.portrait-frame img { position: relative; width: 100%; aspect-ratio: .82; object-fit: cover; object-position: center; filter: sepia(.12); }
.intro-copy h2 em { color: var(--gold); font-weight: 400; }
.intro-copy .lead { margin: 30px 0 18px; font-family: var(--serif); font-size: 24px; line-height: 1.5; }
.intro-copy p { color: #55544e; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.fact strong { display: block; color: var(--gold); font-family: var(--serif); font-size: 34px; font-weight: 400; }
.fact span { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; }

.chapters { padding: 120px 0; color: var(--cream); background: var(--ink); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 62px; }
.section-head p { max-width: 420px; margin: 0; color: rgba(255,255,255,.62); }
.chapter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,.2); }
.chapter { min-height: 390px; display: flex; flex-direction: column; justify-content: space-between; padding: 38px; background: var(--ink); transition: background .3s; }
.chapter { position: relative; overflow: hidden; }
.chapter::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.chapter:hover { background: #25251f; }
.chapter:hover::after { transform: scaleX(1); }
.chapter h3, .chapter-link { transition: color .3s, transform .4s cubic-bezier(.22, 1, .36, 1); }
.chapter:hover h3 { color: #d6b37d; transform: translateY(-4px); }
.chapter:hover .chapter-link { transform: translateX(8px); }
.chapter-index { color: var(--gold); font-size: 11px; letter-spacing: .18em; }
.chapter p { color: rgba(255,255,255,.58); }
.chapter-link { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

.signature { padding: 130px 0; overflow: hidden; }
.signature-head { max-width: 760px; margin-bottom: 60px; }
.signature-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 26px; }
.signature-grid figure { position: relative; margin: 0; overflow: hidden; background: #ddd; }
.signature-grid img { width: 100%; height: 100%; min-height: 620px; object-fit: cover; transition: transform .7s; }
.signature-grid figure:hover img { transform: scale(1.03); }
.signature-grid .tall img { min-height: 620px; }
.image-label { position: absolute; left: 22px; bottom: 22px; padding: 10px 14px; color: white; background: rgba(0,0,0,.68); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; }

.books { padding: 110px 0; background: #dcd4c8; }
.books-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 90px; align-items: center; }
.book-art { min-height: 540px; display: grid; place-items: center; padding: 50px; color: #e8d8b8; background: #282621; transform: rotate(-2deg); box-shadow: 24px 30px 60px rgba(0,0,0,.18); }
.book-art div { padding: 70px 34px; border: 1px solid rgba(232,216,184,.4); text-align: center; }
.book-art small { letter-spacing: .28em; text-transform: uppercase; }
.book-art strong { display: block; margin: 20px 0; font-family: var(--serif); font-size: clamp(54px, 8vw, 94px); font-weight: 400; line-height: .9; }
.book-art em { font-family: var(--serif); font-size: 19px; }
.books-copy p { color: #514d47; }
.books-copy .book-count { margin: 24px 0; color: var(--gold); font-family: var(--serif); font-size: 34px; }

.gallery-strip { display: grid; grid-template-columns: repeat(3, 1fr); }
.gallery-strip img { width: 100%; height: 410px; object-fit: cover; }
.gallery-strip img:nth-child(2) { filter: grayscale(1); }
.gallery-strip { overflow: hidden; }
.gallery-strip img { transition: filter .6s, transform .8s cubic-bezier(.22, 1, .36, 1); }
.gallery-strip img:hover { filter: none; transform: scale(1.035); }

.contact-cta { padding: 120px 0; text-align: center; color: white; background: var(--sage); }
.contact-cta h2 { max-width: 920px; margin: 0 auto 34px; }
.contact-cta p { max-width: 600px; margin: 0 auto 32px; color: rgba(255,255,255,.76); }

.site-footer { padding: 70px 0 26px; color: var(--cream); background: #11110f; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 60px; padding-bottom: 60px; }
.footer-brand { font-family: var(--serif); font-size: 42px; }
.footer-title { margin-bottom: 18px; color: #d6b37d; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.footer-menu { margin: 0; padding: 0; list-style: none; }
.footer-menu li { margin: 7px 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.45); font-size: 12px; }

.page-hero { padding: 110px 0 80px; border-bottom: 1px solid var(--line); }
.page-hero h1 { color: var(--ink); font-size: clamp(50px, 8vw, 110px); }
.content-area { padding: 80px 0 120px; }
.entry-content { max-width: 820px; margin: auto; }
.entry-content > * + * { margin-top: 1.4em; }
.entry-content h2 { margin-top: 1.2em; font-size: clamp(34px, 5vw, 58px); }
.entry-content a { color: var(--gold); text-decoration: underline; }
.entry-content img { margin: 42px auto; }
.legacy-row { margin: 0 auto 42px; }
.legacy-row-inner { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; }
.legacy-column { grid-column: span 12; min-width: 0; }
.legacy-column.has-background {
  min-height: 420px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.legacy-column[data-width="1/3"] { grid-column: span 4; }
.legacy-column[data-width="1/2"] { grid-column: span 6; }
.legacy-column[data-width="2/3"] { grid-column: span 8; }
.legacy-heading { margin: 68px 0 30px; }
.legacy-heading .eyebrow { margin-bottom: 12px; }
.legacy-heading h2 { font-size: clamp(38px, 5vw, 68px); }
.legacy-icon-card {
  height: 100%;
  padding: 32px 24px;
  border: 1px solid var(--line);
  text-align: center;
}
.legacy-icon-card span { color: var(--gold); font-family: var(--serif); font-size: 34px; }
.legacy-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 0 0 68px;
}
.legacy-banner figure { margin: 0; overflow: hidden; background: #ddd; }
.legacy-banner img { width: 100%; height: 420px; object-fit: cover; transition: transform .7s cubic-bezier(.22,1,.36,1); }
.legacy-banner figure:hover img { transform: scale(1.035); }
.legacy-service { padding: 30px; border-top: 1px solid var(--line); }
.legacy-contact-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.legacy-contact-row strong {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.legacy-contact-row a, .legacy-contact-row span { font-family: var(--serif); font-size: 23px; }
.legacy-notice { padding: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.3); }
.native-gallery { padding: 80px 0 120px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense;
  grid-auto-rows: 82px;
  gap: 16px;
}
.gallery-item {
  position: relative;
  grid-column: span 4;
  grid-row: span 5;
  min-height: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #ddd;
  cursor: zoom-in;
}
.gallery-item:nth-child(7n + 1) { grid-column: span 8; grid-row: span 7; }
.gallery-item:nth-child(7n + 4) { grid-row: span 7; }
.gallery-item:nth-child(11n + 6) { grid-column: span 8; grid-row: span 6; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.22,1,.36,1), filter .5s;
}
.gallery-item::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background: linear-gradient(145deg, transparent 45%, rgba(0,0,0,.28));
  opacity: 0;
  transition: opacity .4s;
}
.gallery-item::after {
  content: "+";
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ink);
  background: var(--cream);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 25px;
  opacity: 0;
  transform: translateY(10px) rotate(-20deg);
  transition: opacity .35s, transform .45s cubic-bezier(.22,1,.36,1);
}
.gallery-item:hover img { transform: scale(1.045); filter: contrast(1.05); }
.gallery-item:hover::before,
.gallery-item:hover::after { opacity: 1; }
.gallery-item:hover::after { transform: translateY(0) rotate(0); }

.gallery-lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  padding: 44px;
  color: white;
  background: rgba(13,13,11,.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.gallery-lightbox.is-open { opacity: 1; pointer-events: auto; }
.gallery-lightbox-stage { display: grid; height: calc(100vh - 88px); place-items: center; }
.gallery-lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 26px 80px rgba(0,0,0,.35);
}
.gallery-lightbox button {
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  color: white;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  transition: color .25s, background .25s, border-color .25s;
}
.gallery-lightbox button:hover { color: var(--ink); background: white; border-color: white; }
.gallery-lightbox-close { position: absolute; top: 24px; right: 24px; }
.gallery-lightbox-next { justify-self: end; }
.gallery-lightbox-prev { justify-self: start; }
body.lightbox-open { overflow: hidden; }
}
.gallery-item:hover figcaption { opacity: 1; transform: none; }
.post-card { padding: 34px 0; border-bottom: 1px solid var(--line); }
.post-card h2 { font-size: 42px; }
.post-card p { max-width: 740px; }
.pagination { margin-top: 50px; }

/* Progressive motion: content stays fully visible when JavaScript is unavailable. */
.motion-ready .reveal {
  opacity: 0;
  transform: translateY(42px);
  transition:
    opacity .9s cubic-bezier(.22, 1, .36, 1),
    transform .9s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.motion-ready .reveal.reveal-left { transform: translateX(-48px); }
.motion-ready .reveal.reveal-right { transform: translateX(48px); }
.motion-ready .reveal.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
.motion-ready .image-reveal { position: relative; overflow: hidden; }
.motion-ready .image-reveal::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  background: var(--paper);
  transform: scaleX(1);
  transform-origin: right;
  transition: transform 1.15s cubic-bezier(.77, 0, .18, 1);
  transition-delay: var(--reveal-delay, 0ms);
  pointer-events: none;
}
.motion-ready .image-reveal.dark-mask::after { background: var(--ink); }
.motion-ready .image-reveal.is-visible::after { transform: scaleX(0); }
.motion-ready .image-reveal img {
  transform: scale(1.07);
  transition: transform 1.4s cubic-bezier(.22, 1, .36, 1);
}
.motion-ready .image-reveal.is-visible img { transform: scale(1); }

.motion-ready .hero .eyebrow,
.motion-ready .hero h1 > span,
.motion-ready .hero-copy {
  opacity: 0;
  transform: translateY(34px);
  animation: hero-rise .95s cubic-bezier(.22, 1, .36, 1) forwards;
}
.motion-ready .hero .eyebrow { animation-delay: .16s; }
.motion-ready .hero h1 > span:first-child { animation-delay: .28s; }
.motion-ready .hero h1 > span:last-child { animation-delay: .42s; }
.motion-ready .hero-copy { animation-delay: .58s; }
.motion-ready .hero-media { animation: hero-focus 1.8s cubic-bezier(.22, 1, .36, 1) both; }
.motion-ready .hero-note { animation: quiet-pulse 2.2s ease-in-out 1.2s infinite; }

.fact strong { font-variant-numeric: tabular-nums; }
.cursor-glow {
  position: fixed;
  z-index: 50;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(168, 121, 56, .7);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s, opacity .25s;
}
.cursor-glow.is-active { width: 34px; height: 34px; opacity: .85; }

@keyframes hero-rise {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-focus {
  from { opacity: .55; transform: scale(1.06); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes quiet-pulse {
  0%, 100% { opacity: .45; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(8px); }
}

@media (max-width: 900px) {
  .container { width: min(100% - 32px, 720px); }
  .menu-toggle { display: block; }
  .nav-wrap { position: fixed; inset: 0; display: none; place-items: center; color: white; background: rgba(18,18,15,.98); }
  .menu-open .nav-wrap { display: grid; }
  .nav-wrap .menu { flex-direction: column; gap: 24px; }
  .nav-wrap .menu a { font-size: 20px; }
  .menu-toggle { position: relative; z-index: 2; }
  .hero-copy, .intro-grid, .books-grid { grid-template-columns: 1fr; }
  .hero-copy { align-items: start; }
  .hero-copy p { max-width: 520px; }
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter { min-height: 290px; }
  .signature-grid { grid-template-columns: 1fr 1fr; }
  .signature-grid img, .signature-grid .tall img { min-height: 450px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 230px; }
  .gallery-item,
  .gallery-item:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .gallery-item:nth-child(5n + 1) { grid-column: span 2; grid-row: span 2; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { min-height: 780px; }
  .hero-content { padding-bottom: 46px; }
  .hero-media img { object-position: 60% center; }
  .hero h1 { font-size: 66px; }
  .hero h1 .script { margin-left: .15em; font-size: .48em; }
  .hero-copy { margin-top: 28px; }
  .hero-links { align-items: stretch; flex-direction: column; }
  .hero-note { display: none; }
  .intro, .signature { padding: 90px 0; }
  .portrait-frame { padding: 0 0 24px 24px; }
  .facts { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .signature-grid { grid-template-columns: 1fr; }
  .signature-grid img, .signature-grid .tall img { min-height: 480px; }
  .book-art { min-height: 430px; padding: 26px; }
  .gallery-strip { grid-template-columns: 1fr; }
  .gallery-strip img { height: 340px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .legacy-row-inner { display: block; }
  .legacy-column + .legacy-column { margin-top: 20px; }
  .gallery-grid { display: block; }
  .gallery-item { display: block; height: auto; margin-bottom: 14px; }
  .gallery-item img { height: auto; max-height: 620px; }
  .gallery-lightbox { grid-template-columns: 52px 1fr 52px; padding: 68px 10px 24px; }
  .gallery-lightbox-stage { height: calc(100vh - 92px); }
  .gallery-lightbox button { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .motion-ready .reveal,
  .motion-ready .hero .eyebrow,
  .motion-ready .hero h1 > span,
  .motion-ready .hero-copy { opacity: 1; transform: none; }
  .motion-ready .image-reveal::after, .cursor-glow { display: none; }
}
