/* Cilantro Café
   Colours taken from the shopfront, the logo leaves and the teak panelling inside. */

:root {
  --fascia: #0d5c46;       /* shopfront green */
  --fascia-deep: #073d2f;  /* door green, in shade */
  --moulding: #177a5d;     /* highlight on the shopfront mouldings */
  --leaf: #a8d46f;         /* logo leaves */
  --teak: #8f4220;         /* wall panelling */
  --wall: #f1f4ef;
  --white: #ffffff;
  --ink: #1c2a23;
  --muted: #4d5c54;
  --line: #d3ddd6;
  --error: #a3261b;

  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 65ch; }

a { color: var(--fascia); }
a:hover { color: var(--fascia-deep); }

:focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--white);
  color: var(--fascia-deep);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-block;
  font: 600 1rem/1 var(--sans);
  padding: 0.95rem 1.5rem;
  border-radius: 4px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.btn-light { background: var(--white); color: var(--fascia-deep); }
.btn-light:hover { background: var(--leaf); color: var(--fascia-deep); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.7); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--fascia-deep); }
.btn-green { background: var(--fascia); color: var(--white); }
.btn-green:hover { background: var(--fascia-deep); color: var(--white); }
.btn-block { display: block; width: 100%; }

.text-link {
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---------- Header: styled on the shop fascia ---------- */

.fascia {
  background: var(--fascia);
  color: var(--white);
  border-top: 6px solid var(--fascia-deep);
  box-shadow:
    inset 0 2px 0 var(--moulding),
    inset 0 -3px 0 var(--fascia-deep),
    inset 0 -5px 0 var(--moulding);
  position: relative;
  z-index: 10;
}

.fascia-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1rem var(--gutter) 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  color: var(--white);
  text-decoration: none;
}
.wordmark:hover { color: var(--white); }
.wordmark img { max-height: 56px; width: auto; }
.wordmark-main { font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.wordmark-sub { font-weight: 600; font-size: 0.95rem; letter-spacing: 0.06em; color: var(--leaf); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.site-nav a {
  display: block;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  padding: 0.55rem 0.9rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: rgba(255, 255, 255, 0.5); color: var(--white); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--leaf); }
.site-nav a.nav-book {
  background: var(--leaf);
  color: var(--fascia-deep);
  border-radius: 4px;
  border-bottom: 0;
  margin-left: 0.5rem;
  font-weight: 600;
}
.site-nav a.nav-book:hover { background: var(--white); }
.site-nav a.nav-book[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--fascia-deep); }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  width: 48px;
  height: 44px;
  cursor: pointer;
  position: relative;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  background: var(--white);
  transform: translateX(-50%);
  content: "";
}
.nav-toggle-bars { top: 50%; margin-top: -1px; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: translateX(-50%) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--fascia-deep);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 0.9rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); font-size: 1.125rem; }
  .site-nav a[aria-current="page"] { color: var(--leaf); border-bottom-color: rgba(255, 255, 255, 0.12); }
  .site-nav a.nav-book { margin: 1rem 0 0; padding: 0.95rem; text-align: center; }
}

/* ---------- Home: hero ---------- */

.hero {
  background: var(--fascia);
  color: var(--white);
  display: grid;
  grid-template-columns: 1fr;
}
.hero-text {
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter);
  align-self: center;
}
.hero-text h1 { max-width: 11ch; }
.hero-lede {
  font-size: 1.2rem;
  color: #d8ebdf;
  max-width: 38ch;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 40%;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: min(78vh, 720px);
  }
  .hero-text {
    padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
    padding-right: clamp(2rem, 5vw, 4rem);
  }
  .hero-photo img { aspect-ratio: auto; }
}

/* ---------- Sections ---------- */

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

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.section-head h2 { margin: 0; }

.dish-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .dish-row { grid-template-columns: repeat(3, 1fr); }
}
.dish a {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  text-decoration: none;
  color: var(--ink);
}
.dish img {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin-bottom: 0.9rem;
}
.dish-name { font-family: var(--serif); font-size: 1.3rem; }
.dish-price { color: var(--teak); font-weight: 600; font-variant-numeric: tabular-nums; }
.dish a:hover .dish-name { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 639px) {
  .dish img { aspect-ratio: 4 / 3; }
}

.inside { background: var(--wall); }
.inside-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 900px) {
  .inside-grid { grid-template-columns: 1.35fr 1fr; gap: 4rem; }
}
.inside-photo { width: 100%; }

.visit-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 900px) {
  .visit-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}
.visit-address { font-size: 1.25rem; }
.visit-photo {
  position: relative;
  display: block;
  color: var(--white);
  text-decoration: none;
}
.visit-photo img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.visit-photo span {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--fascia);
  padding: 0.8rem 1.2rem;
  font-weight: 600;
}
.visit-photo:hover span { background: var(--fascia-deep); color: var(--white); }

.hours { margin: 1.25rem 0 1.5rem; }
.hours div { display: flex; justify-content: space-between; gap: 1.5rem; padding: 0.35rem 0; }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; font-variant-numeric: tabular-nums; }
.hours-large { max-width: 26rem; border-top: 1px solid var(--line); }
.hours-large div { border-bottom: 1px solid var(--line); padding: 0.6rem 0; }

/* ---------- Inner page intro ---------- */

.page-intro {
  background: var(--wall);
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  border-bottom: 1px solid var(--line);
}
.page-intro p { color: var(--muted); }

/* ---------- Menu ---------- */

.menu-jump {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0 0.25rem;
  scrollbar-width: none;
}
.menu-jump::-webkit-scrollbar { display: none; }
.menu-jump a {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--fascia);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--white);
}
.menu-jump a:hover { background: var(--fascia); color: var(--white); }

.menu-layout { padding-top: 3rem; padding-bottom: 3rem; }
@media (min-width: 900px) {
  .menu-layout { columns: 2; column-gap: 4.5rem; }
}

.menu-section {
  break-inside: avoid;
  margin-bottom: 3rem;
  scroll-margin-top: 1.5rem;
}
.menu-section h2 {
  font-size: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--fascia);
  margin-bottom: 0.5rem;
}
.menu-note { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin-left: 0.25rem; }

.menu-items { list-style: none; margin: 0; padding: 0; }
.menu-item { padding: 1rem 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.menu-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.menu-item h3 { margin: 0; font-size: 1.2rem; }
.price {
  color: var(--teak);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.allergens { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; color: var(--fascia); margin-left: 0.35rem; white-space: nowrap; }
.allergens abbr { text-decoration: none; cursor: help; margin-right: 0.2rem; }
.menu-desc { color: var(--ink); margin: 0.3rem 0 0; font-size: 1rem; }
.menu-extra { color: var(--muted); margin: 0.15rem 0 0; font-size: 0.95rem; }

.allergen-key {
  break-inside: avoid;
  background: var(--wall);
  padding: 1.5rem;
}
.allergen-key h2 { font-size: 1.5rem; }
.allergen-key dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 1.5rem; font-size: 0.95rem; }
.allergen-key div { display: flex; gap: 0.6rem; }
.allergen-key dt { font-weight: 600; color: var(--fascia); min-width: 1.6rem; }
.allergen-key dd { margin: 0; }
@media (max-width: 480px) {
  .allergen-key dl { grid-template-columns: 1fr; }
}

.cta-band { background: var(--fascia); color: var(--white); }
.cta-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.cta-inner h2 { margin: 0; }

/* ---------- Booking ---------- */

.booking-layout {
  display: grid;
  gap: 2.5rem;
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
}
@media (min-width: 900px) {
  .booking-layout { grid-template-columns: 1fr 1.35fr; gap: 4.5rem; align-items: start; }
}
.booking-side p { color: var(--muted); }
.booking-photo { margin-top: 2rem; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 899px) {
  .booking-photo { display: none; }
}

.booking-form fieldset { border: 0; margin: 0 0 1.5rem; padding: 0; }
.booking-form legend {
  font-family: var(--serif);
  font-size: 1.5rem;
  padding: 0;
  margin-bottom: 1rem;
}
.field { margin-bottom: 1.15rem; }
.field-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.optional { font-weight: 400; color: var(--muted); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid #a9b8ae;
  border-radius: 4px;
  padding: 0.75rem 0.85rem;
  min-height: 50px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid var(--leaf);
  outline-offset: 0;
  border-color: var(--fascia);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 0.95rem; font-weight: 500; margin: 0.35rem 0 0; }

.form-alert {
  background: #fbeceb;
  border-left: 5px solid var(--error);
  color: var(--error);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.privacy-note { color: var(--muted); font-size: 0.95rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.confirmation {
  background: var(--wall);
  border-left: 6px solid var(--fascia);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

/* ---------- Gallery ---------- */

.gallery {
  list-style: none;
  margin: 0;
  padding: 2.5rem 0 4rem;
  columns: 1;
  column-gap: 1rem;
}
@media (min-width: 560px) { .gallery { columns: 2; } }
@media (min-width: 960px) { .gallery { columns: 3; } }

.gallery li { break-inside: avoid; margin-bottom: 1rem; }
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.gallery-item img { width: 100%; }

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  color: var(--white);
}
.lightbox::backdrop { background: rgba(4, 34, 26, 0.94); }
.lightbox figure {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 4.5rem 2rem;
}
.lightbox img { max-height: calc(100vh - 9rem); max-width: 100%; width: auto; object-fit: contain; }
.lightbox figcaption { margin-top: 1rem; text-align: center; }
.lb-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.25); }
.lb-prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
.lb-close { right: 0.75rem; top: 0.75rem; font-size: 1.75rem; }
@media (max-width: 600px) {
  .lightbox figure { padding: 4rem 0.75rem 5rem; }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--fascia-deep);
  color: #d4e6da;
  padding: 3rem 0 1.5rem;
  border-top: 5px solid var(--moulding);
}
.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 1.5rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.footer-col p { margin: 0 0 0.4rem; }
.footer-name { font-family: var(--serif); font-size: 1.5rem; color: var(--white); }
.footer-heading { font-weight: 600; color: var(--white); }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--leaf); }
.site-footer .hours { margin: 0; }
.site-footer .hours div { padding: 0.15rem 0; }
.footer-legal {
  max-width: var(--wrap);
  margin: 2.5rem auto 0;
  padding: 1.25rem var(--gutter) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
}
