/* Layout & components — t_6dbbdfb2 spec §§3–9. Mobile-first, single structural breakpoint 52rem.
   Colour values live ONLY in theme.css (acceptance #6); everything here consumes tokens. */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: var(--heading-font);
  color: var(--text);
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem);
  line-height: 1.15;
  text-wrap: balance;
  margin-block: 0 var(--space-3);
}

h2 {
  font-size: clamp(1.4rem, 1.15rem + 1.1vw, 2rem);
  margin-block: var(--space-5) var(--space-3);
}

h3 { font-size: 1.15rem; margin-block: 0 var(--space-2); }

p { margin-block: 0 0 var(--space-3); }

img { max-width: 100%; }

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-style: wavy; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: min(100% - 2 * var(--space), var(--max-width));
  margin-inline: auto;
}

.content-section { padding-block: clamp(2rem, 5vw, 4rem); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  border: 1px solid var(--border);
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav (§4) ---------- */

.site-header {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 5;
}

.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-block: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 1.15rem;
}

.brand-mark { display: inline-flex; width: 40px; height: 40px; color: var(--accent); }
.brand-mark svg { width: 100%; height: 100%; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  list-style: none;
  margin: 0;
  margin-left: auto;
  padding: 0;
}

.nav-list a {
  display: inline-block;
  padding: 0.5rem 0; /* ≥44px tap target with line-height at 360 */
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-list a:hover, .nav-list a:focus-visible { color: var(--accent); }

.nav-list a[aria-current="page"] {
  color: var(--accent-deep);
  font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-list a[aria-current="page"] { color: var(--accent); }
}
[data-theme="dark"] .nav-list a[aria-current="page"] { color: var(--accent); }

.theme-toggle {
  margin-left: var(--space-2);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  transition: box-shadow 120ms ease;
}
.theme-toggle:hover, .theme-toggle:focus-visible { box-shadow: var(--shadow-lift); }

/* ---------- Buttons (§4) ---------- */

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.button:hover, .button:focus-visible {
  background: var(--accent-deep);
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .button:hover,
  :root:not([data-theme="light"]) .button:focus-visible { background: var(--accent); transform: none; }
}
[data-theme="dark"] .button:hover,
[data-theme="dark"] .button:focus-visible { background: var(--accent); transform: none; }

.button-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 600;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  transition: box-shadow 120ms ease;
}
.button-secondary:hover, .button-secondary:focus-visible { box-shadow: var(--shadow-lift); }

.button-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); }

/* ---------- Cards (§4) ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-rest);
}
.card:hover { box-shadow: var(--shadow-lift); }

/* ---------- Image frames (§9 master pattern) ---------- */

.frame {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-rest);
  margin-block: 0;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-figure { height: clamp(240px, 40vw, 480px); }
.story-frame, .teaser-figure { aspect-ratio: 3 / 2; }
.menu-card-figure { aspect-ratio: 4 / 3; }
.about-collage { aspect-ratio: 1 / 1; }
.detail-frame { aspect-ratio: 4 / 3; }

figcaption { color: var(--muted); font-size: 0.85rem; margin-top: var(--space-2); }

/* ---------- Hero (§5) ---------- */

.hero { padding-block: clamp(2rem, 5vw, 4rem) 0; }

.hero-inner { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }

.hero-subtext { font-size: 1.1rem; color: var(--muted); max-width: 46ch; }

@media (min-width: 52rem) {
  .hero-inner { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .hero-figure { height: auto; aspect-ratio: 3 / 2; }
}

/* ---------- Trust strip (§5) ---------- */

.trust-strip { border-bottom: 1px solid var(--border); }

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  list-style: none;
  margin: 0;
  padding-block: var(--space-3);
  font-size: 0.95rem;
  color: var(--muted);
}

.trust-list li { display: flex; align-items: center; gap: var(--space-2); white-space: nowrap; }

.trust-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Split sections (§5 story teaser, §7 story) ---------- */

.section-inner { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }

@media (min-width: 52rem) {
  .section-inner { grid-template-columns: 1fr 1fr; align-items: center; }
}

/* Home teaser: image first at 360 to keep mobile rhythm lively (§5). */
.teaser-figure { order: -1; }
@media (min-width: 52rem) {
  .teaser-figure { order: 0; }
}

.lede { max-width: 42ch; font-size: 1.05rem; }

/* ---------- Location / CTA bands (§5, §7) ---------- */

.band {
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
}

/* ---------- Menu grid (§6) ---------- */

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.menu-card { overflow: hidden; }

.menu-card-body { padding: 1rem 1.25rem 1.25rem; }

.menu-card-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
}

.offering-price {
  color: var(--accent-deep);
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .offering-price { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .offering-price { color: var(--accent); }
}

.price-alt { display: block; color: var(--muted); font-size: 0.85rem; margin-top: var(--space-1); }

.menu-card-desc {
  color: var(--muted);
  margin: 0.35rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge-list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: 0.75rem; padding: 0; list-style: none; }

.badge {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
[data-theme="dark"] .badge { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge { color: var(--accent); }
}

.center { text-align: center; margin-top: var(--space-5); }

/* ---------- Quote card (home testimonial slot) ---------- */

.quote-card { margin-block: 0 var(--space-3); padding: var(--space-4) var(--space-5); }
.quote-card p { font-family: var(--heading-font); font-size: 1.15rem; }
.quote-card footer { color: var(--muted); font-size: 0.95rem; }

/* ---------- Owner flags + plain hero variants ---------- */

.owner-flag { color: var(--status-error); font-weight: 600; }

.hero-plain { padding-block: clamp(2rem, 5vw, 4rem) 0; }
.hero-plain .lede { max-width: 60ch; }

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

.good-to-know { padding-left: 1.2rem; display: grid; gap: var(--space-2); }

.address-lines { margin-block: 0 var(--space-3); }

/* ---------- Collage pair + values (§7) ---------- */

.collage { display: grid; gap: var(--space-4); }

@media (min-width: 768px) {
  .collage { grid-template-columns: 1fr 1fr; align-items: end; }
  /* Height governs here; aspect-ratio must not derive a wider-than-track box. */
  .collage .frame { height: 320px; aspect-ratio: auto; }
}

.values { display: grid; gap: var(--space-4); }

.values h3 {
  font-family: var(--body-font);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
[data-theme="dark"] .values h3 { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .values h3 { color: var(--accent); }
}

@media (min-width: 768px) {
  .values { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Contact (§8) ---------- */

.contact-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }

@media (min-width: 52rem) {
  .contact-grid { grid-template-columns: 1fr 1.2fr; align-items: start; }
}

.contact-cards { display: grid; gap: var(--space-4); }

.contact-cards .card { padding: 1.25rem; }

.hours { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem var(--space-3); margin: 0; }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.hours dd.today, .hours dt.today { color: var(--accent-deep); }
[data-theme="dark"] .hours .today { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hours .today { color: var(--accent); }
}

.contact-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.contact-lines a {
  color: var(--accent-deep);
  font-size: 1.05rem;
  text-decoration: none;
}
.contact-lines a:hover, .contact-lines a:focus-visible { text-decoration: underline; }
[data-theme="dark"] .contact-lines a { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .contact-lines a { color: var(--accent); }
}

.map-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-rest);
  aspect-ratio: 4 / 3;                 /* 360–767px */
}
@supports not (aspect-ratio: 1) { .map-frame { height: 320px; } }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
[data-theme="dark"] .map-frame iframe { filter: grayscale(1) invert(0.92) contrast(0.9) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .map-frame iframe { filter: grayscale(1) invert(0.92) contrast(0.9) hue-rotate(180deg); }
}
@media (min-width: 768px) { .map-frame { aspect-ratio: 16 / 9; } }

/* Enquiry form */

.form-field { display: grid; gap: 0.3rem; margin-bottom: var(--space-3); }

.form-field label { font-weight: 600; font-size: 0.95rem; }

.form-field input,
.form-field textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}
.form-field input:focus-visible,
.form-field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.consent { display: flex; gap: 0.6rem; align-items: start; margin-block: var(--space-3); }
.consent input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--accent); }
.consent label { font-size: 0.92rem; color: var(--muted); }

.form-status { min-height: 1.4em; font-size: 0.95rem; }
.form-status.ok { color: var(--accent-deep); font-weight: 600; }
.form-status.error { color: var(--status-error); }
[data-theme="dark"] .form-status.ok { color: var(--accent); }

/* ---------- Footer (§4) ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2rem, 5vw, 4rem);
}

.footer-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.footer-grid h2 { font-size: 1.1rem; margin-block: 0 var(--space-2); }

.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.footer-grid a { color: var(--accent-deep); text-decoration: none; }
.footer-grid a:hover, .footer-grid a:focus-visible { text-decoration: underline; }
[data-theme="dark"] .footer-grid a { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer-grid a { color: var(--accent); }
}

.footer-hours { color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: space-between;
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Reduced motion (§11) ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .button-secondary, .theme-toggle { transition: none; }
  .button:hover, .button:focus-visible { transform: none; }
}
