/*
 * site.css: the only stylesheet for heathhayes-spice.co.uk.
 *
 * Sections, in order:
 *   1. Tokens        colours, fonts, spacing (custom properties)
 *   2. Fonts         @font-face for self-hosted fonts
 *   3. Base          reset and element defaults
 *   4. Layout        sidebar offset, panels
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (from the original Elementor CSS; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *   Desktop: the header is a fixed 360px sidebar on the left and the page sits beside it;
 *            hero, spice and banner photos use background-attachment: fixed (as the original).
 *   Tablet/mobile: the header is static at the top with a burger dropdown.
 *
 * Same App4 "fixed left sidebar" template as easterntandoori.co.uk; structure reused from that build.
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's Elementor CSS; kit globals 2a5d0eb / f7d2e5b) */
  --color-text: #1d1d1b;            /* body copy */
  --color-brown: #87521c;           /* box borders, headings, allergy panel, dividers */
  --color-orange: #f69634;          /* kickers, app section, popup */
  --color-sand: #e8e0d4;            /* backdrop panels */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-nav-faded: rgb(255 255 255 / 0.37);  /* nav hover / active (#FFFFFF5E) */
  --color-dropdown-hover: #55595c;  /* Elementor dropdown hover/active background */
  --color-popup-red: #f40000;       /* popup ORDER NOW button */
  --color-popup-backdrop: rgb(84 89 95 / 0.81); /* #54595FCF */

  /* Typography */
  --font-body: "League Spartan", sans-serif;
  --font-accent: "Amaranth", sans-serif;
  --font-ui: "Roboto", sans-serif;  /* buttons and popup */
  --weight-light: 300;
  --weight-heading: 600;
  --text-body: 20px;
  --leading: 1.6;

  /* Layout */
  --sidebar-width: 360px;
  --content-max: 1140px;            /* Elementor boxed container */
  --box-border: 5px solid var(--color-brown);
  --radius: 3px;
  --button-radius: 6px;

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

/* ============ 2. Fonts ============ */
/* Self-hosted Google Fonts (OFL / Apache 2.0), latin subset. League Spartan and Roboto are variable fonts. */
@font-face { font-family: "League Spartan"; src: url("/assets/fonts/league-spartan-latin-variable.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Amaranth"; src: url("/assets/fonts/amaranth-400-latin.woff2") format("woff2"); font-weight: 400; 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; }
@font-face { font-family: "Roboto"; src: url("/assets/fonts/roboto-italic-400-latin.woff2") format("woff2"); font-weight: 400; font-style: italic; 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: var(--weight-light); font-size: 16px; line-height: var(--leading); color: var(--color-text); background: var(--color-white); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }
p { margin: 0; }
a { color: inherit; transition: color var(--duration) var(--ease); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-orange); outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* The page sits to the right of the fixed sidebar header on desktop. */
@media (min-width: 1025px) {
  body { margin-left: var(--sidebar-width); }
}

/* Backdrop panel: sand colour + texture image with a sand wash (Elementor overlay).
   Set the texture with --backdrop-image and the wash with --backdrop-wash. */
.backdrop { position: relative; isolation: isolate; display: flex; justify-content: center; padding: 100px; background: var(--color-sand) var(--backdrop-image, none) center / cover no-repeat; }
.backdrop::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--color-sand); opacity: var(--backdrop-wash, 0.86); }
@media (max-width: 1024px) { .backdrop { padding: 60px; } }
@media (max-width: 767px) { .backdrop { padding: 30px; } }

/* Photo panel: background photo, cover; optional black overlay via --photo-overlay;
   fixed (parallax-like) background on desktop as on the original. */
.photo-panel { position: relative; isolation: isolate; background-position: center; background-repeat: no-repeat; background-size: cover; }
.photo-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #000; opacity: var(--photo-overlay, 0); }
@media (min-width: 1025px) { .photo-panel--fixed { background-attachment: fixed; } }

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

/* === Component: skip-link === */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; padding: 0.5rem 1rem; background: var(--color-white); color: var(--color-text); }
.skip-link:focus { left: 1rem; }

/* === Component: site-header ===
 * Desktop (>= 1025px): fixed 360px sidebar, full viewport height, dark spice photo with a
 * 59% black overlay; logo then a vertical nav (50px gaps), white Amaranth caps.
 * Tablet: static header, logo left and black burger right. Mobile: logo then burger, centred.
 * The menu drops down over the page, full width, black.
 */
.site-header { position: relative; z-index: 1000; isolation: isolate; background: #000 url("/wp-content/uploads/2022/03/heathhayes-spice-background-e1648038022852.jpg") center bottom / cover no-repeat; }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #000; opacity: 0.59; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 40px 40px 90px; }
.site-header__logo img { width: 300px; }

.site-nav__list { list-style: none; margin: 0; padding: 0; text-align: center; }
.site-nav__list a { display: block; font-family: var(--font-accent); font-size: 20px; font-weight: 400; line-height: 20px; text-transform: uppercase; text-decoration: none; color: var(--color-white); }

.nav-toggle { display: none; align-items: center; justify-content: center; width: 60px; height: 60px; padding: 10px; border: 0; border-radius: var(--radius); background: var(--color-black); color: var(--color-white); cursor: pointer; }
.nav-toggle svg { width: 40px; height: 40px; fill: currentColor; }
.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; }

@media (min-width: 1025px) {
  .site-header { position: fixed; top: 0; left: 0; width: var(--sidebar-width); height: 100vh; overflow-y: auto; background-position: center top; }
  .site-header__inner { min-height: 100vh; flex-direction: column; justify-content: flex-start; padding: 90px 40px 130px; }
  .site-header__logo { width: 100%; margin-bottom: 20px; }
  .site-header__logo img { width: 100%; }
  .site-nav { width: 100%; }
  .site-nav__list li:not(:last-child) { margin-bottom: 50px; }
  .site-nav__list a { transition: color 0.4s var(--ease); }
  .site-nav__list a:hover, .site-nav__list a:focus-visible, .site-nav__list a.is-active { color: var(--color-nav-faded); }
}

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  /* Dropdown: absolute, full width, 100px under the toggle (55px on mobile); grid 0fr -> 1fr slide.
     align-items: stretch keeps the list clipped while it animates. */
  .site-nav { position: absolute; top: 301px; left: 0; right: 0; z-index: 9997; display: grid; grid-template-rows: 0fr; align-items: stretch; background: var(--color-black); visibility: hidden; transition: grid-template-rows var(--duration) var(--ease), visibility var(--duration); }
  .site-nav.is-open { grid-template-rows: 1fr; visibility: visible; }
  .site-nav.is-instant { transition: none; }
  .site-nav__list { min-height: 0; overflow: hidden; }
  .site-nav__list a { padding: 18px 20px; }
  .site-nav__list a:hover, .site-nav__list a:focus-visible, .site-nav__list a.is-active { background: var(--color-dropdown-hover); }
}
@media (max-width: 767px) {
  .site-header__inner { flex-direction: column; justify-content: center; padding: 40px 40px 90px; }
  .site-header__logo { margin-bottom: 40px; }
  .site-header__logo img { width: 100%; max-width: 300px; }
  .nav-toggle { width: 45px; height: 45px; padding: 7.5px; }
  .nav-toggle svg { width: 30px; height: 30px; }
  .site-nav { top: calc(100% - 35px); }
  .site-nav__list a { padding: 15px 20px; }
}

/* === Component: box (white card with a 5px brown border) === */
.box { width: 100%; max-width: var(--content-max); background: var(--color-white); border: var(--box-border); border-radius: var(--radius); padding: 70px 100px; text-align: center; }
.box--even { padding: 80px; }
.box__body { padding: 10px; } /* Elementor column padding inside each box */
@media (max-width: 1024px) { .box, .box--even { padding: 60px; } }
@media (max-width: 767px) { .box { padding: 20px; } .box--even { padding: 30px; } }

/* === Component: section-title (League Spartan 30px semibold caps, 2px tracking) === */
.section-title { font-family: var(--font-body); font-size: 30px; font-weight: var(--weight-heading); line-height: 1; letter-spacing: 2px; text-transform: uppercase; color: var(--color-brown); }
.section-title--light { color: var(--color-white); line-height: 40px; }

/* === Component: kicker (Amaranth 15px orange caps, h5 in the original) === */
.kicker { font-family: var(--font-accent); font-size: 15px; font-weight: 400; line-height: 1; letter-spacing: 1px; text-transform: uppercase; color: var(--color-orange); }

/* === Component: copy (League Spartan Light 20px / 1.6, max 58ch) === */
.copy { display: flow-root; max-width: 58ch; margin-inline: auto; font-size: var(--text-body); font-weight: var(--weight-light); line-height: var(--leading); }
.copy p { margin: 1em 0; } /* 20px at 20px text; scales with the 15px mobile copy as on the original */
.copy--flush p { margin: 0; }
.copy--light { color: var(--color-white); margin-inline: 0; }

/* === Component: welcome-to ("WELCOME" / ——— TO ——— lockup) === */
.welcome-to__row { display: flex; align-items: center; justify-content: center; margin-top: 10px; }
.welcome-to__line { width: 40px; border-top: 1px solid var(--color-brown); }
.welcome-to__row .kicker { margin: 0 20px; }

/* === Component: button (Elementor XL button: Roboto 500 20px, 25px/50px padding) === */
.button { display: inline-flex; align-items: center; gap: 18px; padding: 25px 50px; border-radius: var(--button-radius); font-family: var(--font-ui); font-size: 20px; font-weight: 500; line-height: 1; text-decoration: none; text-align: center; white-space: nowrap; color: var(--color-white); background: var(--color-black); transition: background-color var(--duration), color var(--duration); }
.button svg { width: 24px; height: 20px; flex: none; fill: currentColor; }
.button--outline { border: 2px solid var(--color-white); }
.button--red { background: var(--color-popup-red); padding: 25px 100px; }
@media (max-width: 767px) { .button--red { padding: 20px 50px; } }

/* === Component: popup (native <dialog>; Elementor popup 129 look: orange box, zoom-in 1.2s) === */
.popup { width: 70vw; max-width: none; max-height: 100dvh; margin: auto; padding: 0; border: 0; overflow: auto; color: var(--color-black); background: var(--color-orange); font-family: var(--font-ui); font-weight: 400; }
.popup::backdrop { background: var(--color-popup-backdrop); }
.popup[open] { animation: popup-zoom-in 1.2s both; }
.popup__body { display: flex; flex-direction: column; justify-content: center; min-height: 70vh; padding: 0 90px; }
.popup__body > * + * { margin-top: 20px; }
.popup__title { font-family: var(--font-ui); font-size: 2.2rem; font-weight: 600; line-height: 1.2; text-align: center; }
.popup__text { font-size: 25px; line-height: 1.1; letter-spacing: -0.1px; text-align: justify; }
.popup__text p { margin-bottom: 1em; }
.popup__title + .popup__text { margin-top: 45px; }
.popup__note { margin-bottom: 1em; font-size: 15px; font-style: italic; line-height: 1.5; color: var(--color-white); }
.popup__action { text-align: center; }
.popup__close { position: absolute; top: 17px; right: 19px; display: flex; padding: 0; border: 0; border-bottom: 3px solid currentColor; background: none; color: var(--color-black); cursor: pointer; line-height: 0; }
.popup__close svg { width: 42px; height: 42px; fill: currentColor; }
@keyframes popup-zoom-in { from { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); } 50% { opacity: 1; } }
@media (max-width: 1024px) {
  .popup { width: 77vw; }
  .popup__body { min-height: max(404px, 70vh); padding: 4vw 12%; }
}
@media (max-width: 767px) {
  .popup { width: 90vw; }
  .popup__body { min-height: 440px; padding: 8% 10% 10%; }
  /* The original's close X overlaps the heading here; keep the heading clear of it (d12). */
  .popup__title { margin-top: 45px; }
  .popup__text { font-size: 17px; }
  .popup__note { font-size: 13px; }
}

/* === Component: glightbox (GLightbox look, close to Elementor's dark lightbox) === */
.glightbox-clean .goverlay { background: rgb(0 0 0 / 0.87); }

/* === Component: site-footer (allergy panel + "Powered by OrderYOYO" credit) === */
.site-footer { display: flex; flex-wrap: wrap; }
.site-footer > * { width: 100%; }
.site-footer__allergies { background: var(--color-brown); padding: 60px 100px; display: flex; flex-direction: column; justify-content: center; }
.site-footer__allergies .section-title { margin-bottom: 20px; }
.site-footer__allergies .copy { max-width: none; }
.site-footer__credit { background: var(--color-white); padding: 30px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.site-footer__credit-label { margin: 0 0 20px; font-size: 16px; font-weight: var(--weight-light); line-height: var(--leading); color: var(--color-text); }
.site-footer__credit-brand { font-family: var(--font-body); font-size: 30px; font-weight: 500; line-height: 50px; letter-spacing: 0.5px; color: var(--color-text); text-decoration: none; }
.site-footer__credit-brand:hover { color: var(--color-brown); }
@media (min-width: 1025px) {
  .site-footer__allergies { width: 82.873%; }
  .site-footer__credit { width: 17.127%; }
}
@media (max-width: 1024px) { .site-footer__allergies { padding: 60px; } }
@media (max-width: 767px) { .site-footer__allergies { padding: 30px; } .site-footer__allergies .section-title { font-size: 24px; } }

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

/* === Page: / (home) === */
.hero { display: flex; align-items: center; justify-content: center; min-height: 100vh; background-image: url("/wp-content/uploads/2022/03/hero-image.jpg"); --photo-overlay: 0.29; }
@media (max-width: 1024px) { .hero { min-height: 600px; } }
@media (max-width: 767px) { .hero { min-height: 259px; } }

.about { --backdrop-image: url("/wp-content/uploads/2022/03/heathhayes-bg-2.jpg"); --backdrop-wash: 0.85; }
.about .section-title { margin-top: 20px; }
.about .copy { margin-top: 40px; }
@media (max-width: 767px) { .about .copy { font-size: 15px; } }

.spice { min-height: 460px; background-image: url("/wp-content/uploads/2022/03/spice-image.jpg"); --photo-overlay: 0.4; }
@media (max-width: 767px) { .spice { min-height: 300px; } }

.app { display: flex; align-items: center; min-height: 730px; background: var(--color-orange); }
.app__text { width: 51.206%; padding: 70px; }
.app__text .section-title { line-height: 40px; }
.app__text .copy { margin-inline: 0; }
.app__badges { display: block; width: fit-content; }
.app__badges img { width: 230px; }
.app__device { width: 48.794%; padding: 20px; display: flex; justify-content: center; }
@media (max-width: 1024px) {
  .app { min-height: 0; }
  .app__text { width: 65%; padding: 60px; }
  .app__device { display: none; }
}
@media (max-width: 767px) {
  .app__text { width: 100%; padding: 30px; }
  .app__text .section-title { font-size: 21px; }
}

.banner { min-height: 491px; background-image: url("/wp-content/uploads/2022/03/banner.jpg"); }
@media (max-width: 767px) { .banner { min-height: 284px; } }

.contact { --backdrop-image: url("/wp-content/uploads/2022/03/backdrop.jpg"); --backdrop-wash: 0.86; }
.contact .section-title { margin: 20px 0 10px; }
@media (max-width: 767px) { .contact .section-title { font-size: 25px; } }

/* === Page: /404.html === */
.not-found { min-height: 70vh; align-items: center; }
.not-found__links { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; }
.not-found__links a { font-family: var(--font-accent); font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: var(--color-brown); text-decoration: none; }
.not-found__links a:hover { color: var(--color-orange); }

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