/*
 * site.css: the only stylesheet for wokdelight.co.uk.
 *
 * 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        container, sections, columns
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (the original's Elementor breakpoints; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *   The hamburger menu shows at <= 1024px; columns stack at <= 767px.
 *
 * Layout model (copied from the original Elementor page): every band is a full-width
 * section, a boxed container (1140px; full width at <= 1024px) and 10px column padding.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's computed styles) */
  --color-bg: #960d0c;            /* page and header red */
  --color-text: #ffffff;          /* text on red */
  --color-cream: #efedca;         /* nav links, Order now button */
  --color-nav-hover: #5a5a5a;     /* desktop nav hover */
  --color-dropdown-bg: #ffffff;   /* mobile dropdown */
  --color-dropdown-text: #33373d;
  --color-dropdown-hover-bg: #3f444b;
  --color-stroke: #e04c04;        /* "Contact us" heading outline */
  --color-black: #000000;

  /* Typography */
  --font-body: "Roboto", Arial, sans-serif;
  --font-heading: "Poppins", Arial, sans-serif;
  --text-base: 16px;
  --text-sm: 15px;                /* footer, buttons */
  --text-nav: 18px;
  --text-h2: 50px;                /* section headings (Elementor global "5a273cb") */
  --text-hero: 40px;
  --text-feature: 18.72px;        /* icon-box titles (browser h3 default 1.17em) */

  /* Spacing and shape */
  --container: 1140px;
  --container-narrow: 650px;
  --col-pad: 10px;                /* Elementor default column gap */
  --section-pad: 30px;            /* side padding of most bands */
  --widget-gap: 20px;             /* Elementor space between widgets */
  --radius-order: 15px;
  --radius-button: 3px;

  /* Motion (original timings) */
  --duration: 300ms;
  --ease: ease;
}

/* ============ 2. Fonts ============ */
/* Self-hosted from Google Fonts (SIL OFL), latin subset, only the weights in use. */
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("/assets/fonts/roboto-latin-variable.woff2") format("woff2"); font-weight: 100 900; 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-size: var(--text-base); line-height: normal; color: var(--color-text); background: var(--color-bg); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3 { margin: 0; }
h2 { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-h2); line-height: 1; color: var(--color-text); }
p { margin: 0; }
a { color: inherit; transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-cream); outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* .band = full-width section with the original's 30px side padding */
.band { padding-inline: var(--section-pad); }
.container { max-width: var(--container); margin-inline: auto; padding: var(--col-pad); }
.container--narrow { max-width: var(--container-narrow); }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-3 > * { padding: var(--col-pad); }
@media (max-width: 1024px) {
  .container { max-width: 1024px; }
  .container--narrow { max-width: var(--container-narrow); }
}
@media (max-width: 767px) {
  .cols-3 { grid-template-columns: minmax(0, 1fr); }
}

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

/* === Component: skip-link === */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 8px 16px; background: #fff; color: #000; }
.skip-link:focus { left: 16px; }

/* === Component: icon (inline SVG symbols from the header sprite) === */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1em; height: 1em; fill: currentColor; display: block; }

/* === Component: site-header ===
 * Not sticky (as the original). Desktop: logo | nav | Order now in three equal columns.
 * <= 1024px: hamburger in the middle column with an in-flow white dropdown.
 * <= 767px: the three columns stack (logo, hamburger, Order now), all centred. */
.site-header { background: var(--color-bg); padding-inline: var(--section-pad); }
.site-header__inner { max-width: var(--container); margin-inline: auto; padding: var(--col-pad); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; }
.site-header__inner > * { padding: var(--col-pad); }
.site-header__logo { display: block; }
.site-header__logo img { width: 50%; margin-inline: auto; }
.site-header__order { text-align: center; }

.nav-toggle { display: none; }
.site-nav__list { display: flex; justify-content: center; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 13px 20px; font-size: var(--text-nav); font-weight: 400; line-height: 20px; color: var(--color-cream); text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--color-nav-hover); }

@media (max-width: 1024px) {
  .site-header__menu { display: flex; flex-direction: column; align-items: stretch; }
  /* 44px tap target around the original's 33px toggle; negative margin keeps the original spacing */
  .nav-toggle { display: flex; align-self: center; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -5.5px 0; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; }
  .nav-toggle__box { display: flex; align-items: center; justify-content: center; width: 33px; height: 33px; border-radius: 3px; background: rgb(0 0 0 / 0.05); font-size: 22px; }
  .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; }
  /* Slide-down: grid row 0fr -> 1fr; align-items: stretch so the list is clipped while it animates */
  .site-nav { display: grid; grid-template-rows: 0fr; align-items: stretch; margin-top: 10px; background: var(--color-dropdown-bg); transition: grid-template-rows var(--duration) var(--ease), visibility var(--duration); visibility: hidden; }
  .site-nav.is-open { grid-template-rows: 1fr; visibility: visible; }
  .site-nav.is-instant { transition: none; }
  .site-nav__inner { overflow: hidden; min-height: 0; }
  .site-nav__list { flex-direction: column; }
  .site-nav a { padding: 10px 20px; color: var(--color-dropdown-text); min-height: 40px; }
  .site-nav a:hover, .site-nav a:focus-visible { color: #fff; background: var(--color-dropdown-hover-bg); }
}
@media (max-width: 767px) {
  .site-header__inner { grid-template-columns: minmax(0, 1fr); }
}

/* === Component: button === */
.button { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; line-height: 1; text-decoration: none; cursor: pointer; transition: all var(--duration) var(--ease); }
/* Outlined cream pill "Order now" (header); no hover change, as the original */
.button--order { padding: 12px 24px; border: 3px solid var(--color-cream); border-radius: var(--radius-order); color: var(--color-cream); background: transparent; }

/* === Component: hero ("Our Passion For Delicious Food" between two ornaments) === */
.hero { display: flex; align-items: center; min-height: 800px; padding-inline: var(--section-pad); background: #1b1b1b url("/wp-content/uploads/2022/08/Rectangle-3.png") center center / cover no-repeat; }
.hero__inner { width: 100%; max-width: var(--container); margin-inline: auto; align-items: start; }  /* ornaments sit level with the top of the heading, as the original */
.hero__ornament--start img { margin-left: auto; }
.hero__ornament--end img { margin-right: auto; }
.hero__title { font-size: var(--text-hero); text-align: center; }

/* === Component: section-divider (short white rule above section headings) === */
.section-divider { width: 90px; margin: 0 auto var(--widget-gap); border: 0; border-top: 1.5px solid #fff; }
.section-heading { text-align: center; margin-bottom: var(--widget-gap); }

/* === Component: about (cherry-blossom background, intro text, three icon features) === */
.about { position: relative; margin-block: 40px; padding-inline: var(--section-pad); }
.about::before { content: ""; position: absolute; inset: 0; background: url("/wp-content/uploads/2022/08/image-49-1.png") top center / cover no-repeat; pointer-events: none; }
.about > * { position: relative; }
.about__intro .section-divider { margin-bottom: calc(var(--widget-gap) + 15px + var(--widget-gap)); }
.about__text { text-align: center; }
@media (max-width: 767px) {
  .about { margin-block: 70px; }
}

/* === Component: features (icon boxes: icon above a title; not links) === */
.feature { display: flex; flex-direction: column; align-items: center; gap: 15px; text-align: center; }
.feature__icon { width: 50px; height: 50px; object-fit: contain; }
.feature__title { margin: 18.72px 0; font-family: var(--font-body); font-size: var(--text-feature); font-weight: 400; line-height: normal; color: var(--color-text); }

/* === Component: banner (full-width food photo, 500px high) === */
.banner { margin-block: 40px; }
.banner img { width: 100%; height: 500px; object-fit: cover; }

/* === Component: dishes / gallery (thumbnails open GLightbox; one shared gallery) === */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
.gallery__item { display: flex; justify-content: center; margin: 0; }
.gallery__item a { display: block; }
.gallery__item img { width: 150px; height: 150px; }
@media (max-width: 767px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
}
/* GLightbox: library CSS in /assets/vendor/glightbox-3.3.1/; no captions (d8) */
.glightbox-clean .gslide-description { display: none; }

/* === Component: wave-band (decorative pattern strip) === */
.wave-band { position: relative; height: 61px; margin-block: 40px; background: var(--color-black); }
.wave-band::before { content: ""; position: absolute; inset: 0; background: url("/wp-content/uploads/2022/08/image-51-1.png") 0 0 / cover no-repeat; }

/* === Component: contact ("Contact us" heading + contact-email block) === */
.contact { margin-block: 80px; padding-inline: var(--section-pad); }
.contact__heading { -webkit-text-stroke: 1px var(--color-stroke); }
@media (max-width: 767px) {
  .contact__heading { text-align: center; }
}

/* === Component: contact-email (replaces the Elementor form: a white "Send Message" mailto button + visible address) ===
 * Hover turns the button cream so the text stays legible (the original went white on white).
 * Hidden until CONFIG.contactEmail in site.js is set; site.js then adds the button and address. */
.contact-email { display: grid; gap: 15px; justify-items: start; margin-top: calc(var(--widget-gap) + 20px + var(--widget-gap)); }
.contact-email[hidden] { display: none; }
.contact-email__button { min-height: 40px; padding: 0 24px; border-radius: var(--radius-button); background: #fff; color: #000; font-size: var(--text-sm); font-weight: 500; line-height: 1; text-decoration: none; display: inline-flex; align-items: center; }
.contact-email__button:hover, .contact-email__button:focus-visible { background: var(--color-cream); color: #000; }
.contact-email__address { font-size: var(--text-sm); word-break: break-word; }
.contact-email__address a { color: var(--color-text); }

/* === Component: site-footer (copyright + Powered by OrderYOYO, same line and style as the original) === */
.site-footer__inner { max-width: var(--container); margin-inline: auto; padding: var(--col-pad); }
.site-footer__credit { margin: 15px 0; font-size: var(--text-sm); text-align: center; color: var(--color-text); }
.site-footer__credit a { text-decoration: none; }
.site-footer__credit a:hover { text-decoration: underline; }

/* === Component: error-page (404) === */
.error-page { margin-block: 80px; padding-inline: var(--section-pad); text-align: center; }
.error-page h1 { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-h2); line-height: 1; }
.error-page__text { margin-bottom: var(--widget-gap); }
.error-page__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; list-style: none; margin: 0; padding: 0; }
.error-page__links a { color: var(--color-cream); font-size: var(--text-nav); }

/* ============ 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; }
}
