/*
Theme Name: Zapote Custom
Theme URI: https://zapote.co.uk/
Author: Zapote
Description: Lightweight, accessible theme for Zapote Restaurant in Shoreditch.
Version: 1.3.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: zapote
*/

:root {
  --ink: #171411;
  --ink-soft: #24201c;
  --cream: #f2eadb;
  --paper: #fbf6ec;
  --copper: #bd6238;
  --copper-dark: #8b3f22;
  --sage: #747b5c;
  --line: rgba(23, 20, 17, .18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page: min(1200px, calc(100vw - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 4px; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed !important; z-index: 9999; top: 12px; left: 12px;
  width: auto; height: auto; padding: 10px 16px; margin: 0;
  clip: auto; background: var(--paper); color: var(--ink);
}

.site-header {
  position: absolute; z-index: 100; inset: 0 0 auto;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.24);
}
.site-header.is-scrolled {
  position: fixed;
  background: rgba(23,20,17,.96);
  backdrop-filter: blur(16px);
  animation: header-in .25s ease-out;
}
@keyframes header-in { from { transform: translateY(-100%); } }
.header-inner {
  width: var(--page); min-height: 92px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; width: 138px; text-decoration: none; }
.brand img { width: 138px; max-height: 72px; object-fit: contain; }
.site-nav ul { display: flex; gap: clamp(18px, 2.2vw, 36px); margin: 0; padding: 0; list-style: none; }
.site-nav a {
  text-decoration: none; text-transform: uppercase; letter-spacing: .13em;
  font-size: .72rem; font-weight: 700;
}
.site-nav a:hover { color: #eab18d; }
.header-action { justify-self: end; }
.menu-toggle { display: none; justify-self: end; border: 0; background: transparent; color: inherit; padding: 12px 0; }
.menu-toggle span { display: block; width: 29px; height: 1px; margin: 7px 0; background: currentColor; transition: .2s; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 25px; border: 1px solid var(--copper);
  background: var(--copper); color: #fff; text-decoration: none;
  text-transform: uppercase; letter-spacing: .13em; font-size: .7rem; font-weight: 750;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.button:hover { background: var(--copper-dark); border-color: var(--copper-dark); transform: translateY(-2px); }
.button-outline { background: transparent; border-color: currentColor; }
.button-outline:hover { color: var(--ink); background: var(--paper); border-color: var(--paper); }
.text-link { text-transform: uppercase; letter-spacing: .13em; font-size: .72rem; font-weight: 750; }

.hero {
  position: relative; min-height: min(920px, 100svh); color: #fff;
  display: grid; align-items: end; overflow: hidden; background: var(--ink);
}
.hero-media, .hero-media::after { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 44%; opacity: .74; }
.hero-media::after {
  content: "";
  background: linear-gradient(180deg, rgba(10,8,6,.38) 0%, rgba(10,8,6,.02) 38%, rgba(10,8,6,.82) 100%);
}
.hero-content { position: relative; z-index: 2; width: var(--page); margin: 0 auto; padding: 210px 0 84px; }
.eyebrow { margin: 0 0 18px; text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; font-weight: 750; }
.hero h1, .display-title {
  max-width: 940px; margin: 0; font: 400 clamp(3.3rem, 8vw, 8.5rem)/.88 var(--serif); letter-spacing: -.045em;
}
.hero-lede { max-width: 590px; margin: 28px 0 0; font-size: clamp(1rem, 1.6vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-note {
  position: absolute; right: 0; bottom: 84px; writing-mode: vertical-rl;
  text-transform: uppercase; letter-spacing: .2em; font-size: .66rem;
}

.section { padding: clamp(84px, 10vw, 150px) 0; }
.section-inner { width: var(--page); margin: 0 auto; }
.section-kicker { color: var(--copper-dark); text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; font-weight: 800; }
.section-title { margin: 14px 0 0; font: 400 clamp(2.6rem, 5.8vw, 6.2rem)/.95 var(--serif); letter-spacing: -.035em; }
.section-copy { max-width: 680px; font-size: clamp(1rem, 1.5vw, 1.2rem); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .72fr); gap: clamp(50px, 9vw, 140px); align-items: center; }
.intro-copy p:first-of-type { font: 400 clamp(1.45rem, 2.4vw, 2.15rem)/1.25 var(--serif); }
.image-frame { position: relative; }
.image-frame::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--copper); z-index: -1; }
.image-frame img { aspect-ratio: 3/4; width: 100%; object-fit: cover; }

.menu-callout { background: var(--ink); color: var(--cream); overflow: hidden; }
.menu-heading-row { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 50px; }
.menu-heading-row .section-title { max-width: 780px; }
.dish-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dish-card { position: relative; min-height: 520px; overflow: hidden; }
.dish-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.dish-card:hover img { transform: scale(1.035); }
.dish-card figcaption { position: absolute; inset: auto 0 0; padding: 80px 28px 28px; background: linear-gradient(transparent, rgba(0,0,0,.78)); }
.dish-card strong { display: block; font: 400 1.7rem/1.1 var(--serif); }
.dish-card span { display: block; margin-top: 5px; color: rgba(255,255,255,.72); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }

.story-band { background: var(--cream); }
.story-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(50px, 9vw, 140px); align-items: center; }
.story-image { min-height: 720px; background: #ccc; }
.story-image img { width: 100%; height: 100%; object-fit: cover; }
.story-copy .section-title { font-size: clamp(2.8rem, 5vw, 5.6rem); }
.story-copy blockquote { margin: 38px 0; padding-left: 28px; border-left: 1px solid var(--copper); font: 400 1.4rem/1.45 var(--serif); }

.events { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.events::after { content: ""; position: absolute; width: 460px; height: 460px; right: -120px; top: -120px; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; }
.events-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: end; }
.events-copy { position: relative; z-index: 1; }
.event-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.events-stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255,255,255,.26); }
.stat { padding: 30px 18px 0 0; }
.stat + .stat { padding-left: 30px; border-left: 1px solid rgba(255,255,255,.26); }
.stat strong { display: block; font: 400 clamp(3rem, 5vw, 5rem)/1 var(--serif); }
.stat span { color: rgba(255,255,255,.7); font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.contact-list { margin: 42px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.contact-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.hours { display: grid; grid-template-columns: 1fr auto; gap: 10px 25px; margin-top: 34px; }
.map-link { min-height: 480px; position: relative; display: flex; align-items: end; padding: 30px; background: var(--ink-soft); color: #fff; text-decoration: none; overflow: hidden; }
.map-link::before { content: ""; position: absolute; width: 340px; height: 340px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.map-link::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--copper); top: 50%; left: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 0 10px rgba(189,98,56,.2); }
.map-link span { position: relative; z-index: 1; }

.instagram-section { background: var(--cream); }
.instagram-heading-row {
  display: flex; justify-content: space-between; align-items: end;
  gap: 30px; margin-bottom: 44px;
}
.instagram-heading-row .section-title { margin-bottom: 0; }
.instagram-feed-wrap { min-height: 220px; }
.instagram-feed-wrap #sb_instagram { padding-bottom: 0 !important; }
.instagram-feed-wrap #sbi_load { padding-top: 26px !important; }

.site-footer { padding: 70px 0 28px; background: #100e0c; color: var(--cream); }
.footer-inner { width: var(--page); margin: 0 auto; }
.footer-main { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 60px; padding-bottom: 60px; }
.footer-logo { width: 150px; }
.footer-nav { margin: 0; padding: 0; list-style: none; }
.footer-nav li + li { margin-top: 9px; }
.footer-nav a { text-decoration: none; }
.footer-label { color: #d7926f; text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; font-weight: 800; }
.footer-bottom { display: flex; justify-content: space-between; gap: 25px; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.58); font-size: .76rem; }

.page-hero { padding: 205px 0 95px; color: #fff; background: var(--ink); }
.page-hero .section-inner { position: relative; }
.page-hero-mark { position: absolute; width: 190px; right: 5%; top: -70px; opacity: .12; }
.content-shell { width: min(820px, calc(100vw - 48px)); margin: 0 auto; padding: 90px 0 120px; }
.content-shell h2, .content-shell h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; }
.content-shell h2 { font-size: 2.5rem; }

.menus-page { background: var(--paper); }
.menus-page .page-hero { padding: 142px 0 46px; }
.menus-page .page-hero-mark { width: 125px; top: -32px; }
.menu-tabs { position: sticky; top: 76px; z-index: 20; display: flex; justify-content: center; gap: 8px; padding: 18px 24px; background: rgba(251,246,236,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.menu-tab { border: 0; background: transparent; padding: 11px 17px; text-transform: uppercase; letter-spacing: .13em; font-size: .7rem; font-weight: 800; cursor: pointer; }
.menu-tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.menu-panel { display: none; }
.menu-panel.is-active { display: block; }
.menu-sheet { width: min(920px, calc(100vw - 48px)); margin: 0 auto; padding: 85px 0 130px; }
.menu-intro { max-width: 660px; margin: 0 auto 65px; text-align: center; }
.menu-intro h2 { margin: 0; font: 400 clamp(3rem, 6vw, 5.6rem)/1 var(--serif); }
.menu-section + .menu-section { margin-top: 62px; }
.menu-section h3 { display: flex; align-items: center; gap: 20px; margin: 0 0 22px; color: var(--copper-dark); font: 400 2rem/1 var(--serif); }
.menu-section h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.menu-item { display: grid; grid-template-columns: 1fr auto; gap: 10px 30px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.menu-item h4 { margin: 0; font: 400 1.2rem/1.25 var(--serif); }
.menu-item p { grid-column: 1; margin: 2px 0 0; color: #635a50; font-size: .88rem; }
.menu-price { grid-column: 2; grid-row: 1; font-weight: 750; }
.menu-dietary { margin-left: 7px; color: var(--copper-dark); font: 700 .68rem var(--sans); letter-spacing: .08em; }
.allergen-note { margin-top: 60px; padding: 24px; border: 1px solid var(--line); color: #635a50; font-size: .78rem; }
.menu-placeholder { padding: 90px 0; text-align: center; }

@media (max-width: 900px) {
  :root { --page: min(100% - 32px, 720px); }
  .header-inner { grid-template-columns: 1fr auto; min-height: 78px; }
  .site-nav, .header-action { display: none; }
  .menu-toggle { display: block; }
  .site-nav.is-open {
    display: flex; position: fixed; inset: 78px 0 0; padding: 60px 24px;
    background: var(--ink); align-items: flex-start; justify-content: center;
  }
  .site-nav.is-open ul { flex-direction: column; align-items: center; gap: 28px; }
  .site-nav.is-open a { font: 400 2.2rem/1 var(--serif); text-transform: none; letter-spacing: 0; }
  .hero-content { padding-bottom: 54px; }
  .hero-note { display: none; }
  .intro-grid, .story-grid, .events-grid, .contact-grid { grid-template-columns: 1fr; }
  .intro-grid, .story-grid, .events-grid, .contact-grid { gap: 55px; }
  .intro-image { max-width: 600px; }
  .dish-grid { grid-template-columns: 1fr 1fr; }
  .dish-card { min-height: 440px; }
  .dish-card:last-child { grid-column: 1 / -1; aspect-ratio: 16/9; min-height: 0; }
  .story-image { min-height: 520px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .hero h1, .display-title { font-size: clamp(3rem, 15vw, 4.7rem); }
  .hero-actions .button { width: 100%; }
  .section { padding: 76px 0; }
  .menu-heading-row { display: block; }
  .menu-heading-row .button { margin-top: 25px; }
  .dish-grid { grid-template-columns: 1fr; }
  .dish-card, .dish-card:last-child { grid-column: auto; min-height: 420px; aspect-ratio: auto; }
  .events-stats { grid-template-columns: 1fr; }
  .event-actions .button { width: 100%; }
  .stat + .stat { margin-top: 25px; padding-left: 0; border-left: 0; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .menu-tabs { justify-content: flex-start; overflow-x: auto; }
  .menus-page .page-hero { padding: 118px 0 32px; }
  .menu-item { gap: 8px 15px; }
  .instagram-heading-row { display: block; }
  .instagram-heading-row .text-link { display: inline-block; margin-top: 18px; }
}

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