/*
 * site.css: the only stylesheet for squiressandwichbar.co.uk (Squires Sandwich Bar).
 *
 * Sections, in order:
 *   1. Tokens        colours, fonts, spacing, breakpoints (custom properties)
 *   2. Fonts         @font-face for self-hosted fonts
 *   3. Base          reset and element defaults
 *   4. Layout        helpers shared by sections
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (Elementor defaults on the original; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *
 * Values come from the original's Elementor CSS (design-system/src/post-16.css) and computed
 * styles of the live page (design-system/live-styles.json).
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours */
  --color-brown: #9d7456;          /* buttons, nav, headings, copy, footer background */
  --color-brown-dark: #633e0f;     /* nav hover / current section */
  --color-white: #ffffff;
  --color-dropdown-text: #33373d;  /* mobile dropdown links (Elementor default) */
  --color-dropdown-hover: #55595c; /* mobile dropdown hover background (Elementor default) */
  --color-toggle-bg: rgb(0 0 0 / 0.05);
  --shadow-map: 0 0 10px 0 rgb(0 0 0 / 0.5);

  /* Typography */
  --font-body: "Poppins", Arial, sans-serif;          /* nav, buttons, copy (weight 300 throughout) */
  --font-script: "Parisienne", "Brush Script MT", cursive; /* section headings */
  --text-script: 60px;
  --text-copy: 20px;

  /* Spacing and shape */
  --container: 1280px;             /* Elementor boxed sections on the original */
  --gutter: 30px;                  /* section side padding */
  --header-h: 86px;                /* sticky header height at desktop; anchors scroll below it */

  /* Motion */
  --duration: 300ms;
  --ease: ease;
}

/* ============ 2. Fonts ============ */
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Parisienne"; src: url("/assets/fonts/parisienne-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ============ 3. Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-weight: 300; font-size: 16px; line-height: 1.5; color: var(--color-brown); background: var(--color-white); }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-brown-dark); outline-offset: 2px; }
@media (min-width: 768px) { [id] { scroll-margin-top: var(--header-h); } }
/* Narrow tablets: the header's social icons wrap to two rows (as on the original), so the header is taller. */
@media (min-width: 768px) and (max-width: 879px) { :root { --header-h: 119px; } }

/* ============ 4. Layout ============ */
/* Boxed content area (1280px) inside a section with 30px side padding, like the original sections. */
.section-inner { max-width: var(--container); margin-inline: auto; }

/* ============ 5. Components ============ */

/* === Component: skip-link === */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 8px 16px; background: var(--color-white); color: var(--color-brown-dark); }
.skip-link:focus { left: 16px; }

/* === Component: page-header (hidden page title "Home Page", as on the original theme) === */
.page-header { display: none; }

/* === Component: button (brown, white Poppins 300 15px; Order Now / View Menu / Download Now) === */
.button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: 3px; background: var(--color-brown); font-family: var(--font-body); font-size: 15px; font-weight: 300; line-height: 1; text-align: center; color: var(--color-white); }
.button:hover, .button:focus-visible { color: var(--color-white); }

/* === Component: button-group (pair of buttons, centred, 25px apart; 10px on mobile) === */
.button-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 767px) { .button-group { gap: 10px; } }

/* === Component: script-heading (Parisienne 60px section headings, centred) === */
.script-heading { font-family: var(--font-script); font-size: var(--text-script); font-weight: 400; line-height: 1; text-align: center; color: var(--color-brown); }
.script-heading--light { color: var(--color-white); }

/* === Component: copy (Poppins 300 20px centred paragraphs; paragraphs spaced 1em as on the original) === */
.copy { font-size: var(--text-copy); font-weight: 300; line-height: 1.5; text-align: center; color: var(--color-brown); }
.copy p { margin: 1em 0; }

/* === Component: social-icons (Facebook / Instagram / Tripadvisor, 34px, 19px apart) === */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.social-icons { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 19px; margin: 0; padding: 0; list-style: none; }
.social-icons__link { display: block; width: 34px; height: 34px; color: var(--color-brown); fill: currentColor; }
.social-icons__link svg { display: block; width: 34px; height: 34px; }

/* === Component: site-header (white; nav left, social icons, Order Now right; sticky from 768px) === */
.site-header { position: relative; z-index: 50; padding: 10px var(--gutter); background: var(--color-white); }
.site-header__inner { display: flex; align-items: center; max-width: var(--container); margin-inline: auto; }
.site-header__inner > * { padding: 10px; }
.site-header__nav-col { width: 73.722%; }
.site-header__social { width: 12.715%; }
.site-header__actions { width: 12.969%; display: flex; justify-content: flex-end; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 auto; padding: 0; border: 0; border-radius: 3px; background: var(--color-toggle-bg); color: var(--color-dropdown-text); cursor: pointer; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }
.site-nav__list { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: 13px 20px; font-size: 16px; font-weight: 300; line-height: 20px; color: var(--color-brown); }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.is-active { color: var(--color-brown-dark); }
@media (min-width: 768px) {
  .site-header { position: sticky; top: 0; }
}
@media (max-width: 1024px) {
  .site-header__nav-col { width: 60%; }
  .site-header__social, .site-header__actions { width: 20%; }
  .nav-toggle { display: flex; }
  /* Dropdown (Elementor "dropdown: tablet"): white list under the toggle, in the flow of the header
     like the original; slides open with a grid 0fr -> 1fr row (align-items: stretch clips it while animating). */
  .site-nav { display: grid; grid-template-rows: 0fr; align-items: stretch; margin-top: 0; visibility: hidden; background: var(--color-white); transition: grid-template-rows var(--duration) var(--ease), margin-top var(--duration) var(--ease), visibility 0s linear var(--duration); }
  .site-nav.is-open { grid-template-rows: 1fr; margin-top: 10px; visibility: visible; transition: grid-template-rows var(--duration) var(--ease), margin-top var(--duration) var(--ease), visibility 0s; }
  .site-nav.is-instant { transition: none; }
  .site-nav__inner { min-height: 0; overflow: hidden; }
  .site-nav__list { flex-direction: column; flex-wrap: nowrap; }
  .site-nav a { min-height: 44px; padding: 12px 20px; font-size: 13px; color: var(--color-dropdown-text); }
  .site-nav a.is-active { color: var(--color-dropdown-text); }
  .site-nav a:hover, .site-nav a:focus-visible { background: var(--color-dropdown-hover); color: var(--color-white); }
}
@media (max-width: 767px) {
  .site-header__inner { display: block; }
  .site-header__nav-col, .site-header__social, .site-header__actions { width: auto; }
  .site-header__actions { justify-content: center; }
}

/* === Component: hero (shop photo across the top, white logo, 412px spacer; 89vh tall) === */
/* The photo is drawn at 100% width from the top, so on narrow screens the rest of the section is white (as on the original). */
.hero { display: flex; align-items: center; min-height: 89vh; background: url("/wp-content/uploads/2023/08/squires-BG.png") 50% 0 / 100% auto no-repeat; }
.hero__inner { width: 100%; max-width: var(--container); margin-inline: auto; padding: 10px; }
.hero__logo { display: block; margin-inline: auto; }
.hero__spacer { height: 412px; margin-top: 20px; }

/* === Component: about (heading, text, three overlapping circle photos) === */
.about { margin: 120px 0; padding: 0 var(--gutter); }
.about .copy { margin-top: 70px; }
.about__photos { display: flex; justify-content: center; margin-top: 110px; padding: 10px 0; }
.about__photo { position: relative; flex: none; }
.about__photo img { display: block; width: 250px; }
/* Desktop: 250px circles 160px apart, each one over the next (z-index 3/2/1 on the original widgets). */
.about__photo:nth-child(1) { z-index: 3; }
.about__photo:nth-child(2) { z-index: 2; margin-left: -90px; }
.about__photo:nth-child(3) { z-index: 1; margin-left: -90px; }
@media (max-width: 1024px) {
  .about__photos { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; }
  .about__photo, .about__photo:nth-child(2), .about__photo:nth-child(3) { margin: 0; padding: 10px; }
  .about__photo img { width: 100%; max-width: 250px; margin-inline: auto; }
}
@media (max-width: 767px) {
  .about__photos { grid-template-columns: 1fr; }
}

/* === Component: menu-band (wood background; heading + buttons left, 2x2 circle photos right) === */
.menu-band { margin: 120px 0; padding: 120px var(--gutter); background: url("/wp-content/uploads/2023/08/Rectangle-17.png") 0 0 repeat; }
.menu-band__inner { display: flex; align-items: center; }
.menu-band__intro { width: 42.031%; padding: 10px; }
.menu-band__intro .script-heading { margin-bottom: 20px; }
.menu-band__photos { display: grid; grid-template-columns: 1fr 1fr; width: 57.969%; padding: 10px; }
.menu-band__photo { padding: 10px; }
.menu-band__photo img { display: block; width: 248px; margin-inline: auto; }
@media (max-width: 1024px) {
  .menu-band__photo img { width: 100%; max-width: 248px; }
}
@media (max-width: 767px) {
  .menu-band__inner { display: block; }
  .menu-band__intro, .menu-band__photos { width: auto; }
  .menu-band__photos { grid-template-columns: 1fr; }
}

/* === Component: app-promo (Our App: heading, store badges, divider, text, buttons; phone mockup right) === */
.app-promo { margin: 180px 0; padding: 0 var(--gutter); }
.app-promo__inner { display: flex; align-items: center; }
.app-promo__text, .app-promo__media { width: 50%; padding: 10px; }
.app-promo__text { display: flex; flex-direction: column; align-items: center; }
.app-promo__badges { display: block; margin-top: 20px; }
.app-promo__divider { width: 100%; margin: 20px 0 0; padding: 6px 0; border: 0; }
.app-promo__divider::before { content: ""; display: block; width: 62%; margin-inline: auto; border-top: 2.6px solid var(--color-brown); }
.app-promo .copy { width: 62%; margin-top: 20px; padding: 20px 0; }
.app-promo .copy p { margin: 0; }
.app-promo__mockup { display: block; margin-inline: auto; }
@media (max-width: 1024px) {
  .app-promo .copy { width: 279.797px; max-width: 100%; }
}
@media (max-width: 767px) {
  .app-promo__inner { display: block; }
  .app-promo__text, .app-promo__media { width: auto; }
}

/* === Component: map (keyless Google Maps iframe, 503px high) === */
.map { display: block; width: 100%; height: 503px; border: 0; }

/* === Component: site-footer (brown; Contact / Find Us / Opening times left, map right; copyright bar) === */
.site-footer { margin-top: 120px; background: var(--color-brown); color: var(--color-white); }
.site-footer__main { display: flex; align-items: flex-start; padding-bottom: 30px; }
.site-footer__info { width: 50%; padding: 60px var(--gutter) 0; }
.site-footer__info > * { max-width: 640px; margin-inline: auto; }
.site-footer__cols { display: flex; }
.site-footer__col { width: 50%; padding: 10px; }
.site-footer__col .script-heading { margin-bottom: 20px; }
.site-footer__info > .script-heading { max-width: 660px; margin-bottom: 20px; }
.site-footer__text { display: flow-root; font-size: 20px; font-weight: 300; text-align: center; color: var(--color-white); }
.site-footer__text p { margin: 1em 0; }
.site-footer__text--contact { line-height: 11px; }
.site-footer__text--address { line-height: 19px; }
.site-footer__text--hours { font-size: 16px; line-height: 1.5; }
.site-footer__map { width: 50%; margin-top: -75px; border-radius: 40px 0 0 40px; box-shadow: var(--shadow-map); overflow: hidden; }
.site-footer__bar { display: flex; align-items: center; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding: 10px var(--gutter); }
.site-footer__bar > * { padding: 10px; }
.site-footer__copyright { width: 57.108%; font-size: 20px; font-weight: 300; line-height: 20px; }
.site-footer__copyright a:hover, .site-footer__copyright a:focus-visible { text-decoration: underline; }
.site-footer__social { width: 42.815%; }
.site-footer__social .social-icons { justify-content: flex-end; }
.site-footer .social-icons__link { color: var(--color-white); }
@media (max-width: 1024px) {
  .site-footer__main { align-items: center; }
  .site-footer__cols { display: block; }
  .site-footer__col { width: auto; }
  .site-footer .script-heading { font-size: 41px; }
  .site-footer__col + .site-footer__col .script-heading { font-size: 40px; }
  .site-footer__text--contact { max-width: 325.297px; font-size: 17px; }
  .site-footer__text--address { font-size: 16px; }
  .site-footer__map { margin-top: 0; }
}
@media (max-width: 767px) {
  .site-footer__main { display: block; }
  .site-footer__info, .site-footer__map { width: auto; }
  .site-footer__map { border-radius: 0; }
  .site-footer__bar { display: block; text-align: center; }
  .site-footer__copyright, .site-footer__social { width: auto; }
  .site-footer__copyright { font-size: 18px; line-height: 18px; }
  .site-footer__social .social-icons { justify-content: center; }
}

/* === Component: not-found (404 page body) === */
.not-found { padding: 120px var(--gutter) 60px; text-align: center; }
.not-found .script-heading { margin-bottom: 24px; }
.not-found__text { margin: 0 auto 32px; max-width: 40em; font-size: 20px; }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* ============ 6. Pages ============ */

/* ============ 7. Utilities ============ */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
