/*
 * site.css: the only stylesheet for trenta.co.uk (Trenta Pizza).
 *
 * 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        containers and sections
 *   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 defaults; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *   - burger menu: <= 767px (the original's nav widget switches at "mobile")
 *   - galleries: 4 columns desktop (gallery page), 2 tablet, 1 mobile
 *   - fixed ("parallax") section backgrounds: desktop only (>= 1025px), like the original
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.button--x) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's computed styles) */
  --color-dark: #151515;          /* header, footer, gallery sections */
  --color-text-dark: #242424;     /* text on orange */
  --color-orange: #ff7701;        /* buttons, orange bands */
  --color-white: #ffffff;
  --color-nav-active: #1d181f;    /* mobile dropdown: current page / hover */
  --color-overlay-hero: rgb(0 0 0 / 0.75);
  --color-overlay-orange: rgb(255 119 1 / 0.95);
  --color-gallery-hover: rgb(0 0 0 / 0.5);

  /* Typography */
  --font-display: "Ubuntu Condensed", sans-serif;  /* nav, headings, body copy */
  --font-ui: "Roboto", sans-serif;                 /* buttons, hero subtitle */
  --font-footer-bar: Helvetica, sans-serif;        /* copyright / credit line (system font, as on the original) */

  /* Spacing and shape */
  --container: 1140px;        /* Elementor boxed sections */
  --container-wide: 1440px;   /* gallery sections */
  --gutter: 10px;             /* Elementor column padding */
  --radius: 3px;
  --header-shadow: 0 0 10px 0 rgb(0 0 0 / 0.5);

  /* Motion (match the original's timings) */
  --duration: 300ms;
  --duration-gallery: 800ms;
  --ease: ease;
}

/* ============ 2. Fonts ============ */
/* Google Fonts, self-hosted (OFL). Ubuntu Condensed exists in 400 only; the original asked for 600
   on headings, so the browser synthesises bold exactly as it did on the WordPress site. */
@font-face { font-family: "Ubuntu Condensed"; src: url("/assets/fonts/ubuntu-condensed-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; }

/* ============ 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-display); font-size: 16px; line-height: 1.5; color: var(--color-text-dark); background: var(--color-dark); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3 { margin: 0; line-height: 1; }
p { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-orange); outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* Boxed section content: 1140px wide, columns padded 10px (Elementor). */
.container { width: 100%; max-width: var(--container); margin-inline: auto; }
.container--wide { max-width: var(--container-wide); }
.section { position: relative; }
.section__inner { padding: var(--gutter); }

/* Section with a background photo and a coloured overlay (hero, loyalty, menu band).
   Set the photo with --bg on the section (one-off inline value); the overlay colour with --overlay. */
.bg-section { position: relative; background-color: var(--bg-color, transparent); background-image: var(--bg); background-position: center center; background-size: cover; background-repeat: no-repeat; isolation: isolate; }
.bg-section::before { content: ""; position: absolute; inset: 0; background: var(--overlay, transparent); z-index: -1; }
@media (min-width: 1025px) {
  .bg-section--fixed { background-attachment: fixed; }
}

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

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

/* === Component: site-header ===
   Dark bar, not sticky: centred logo with the menu below. At <= 767px a full-width burger
   button replaces the menu and opens a slide-down list (grid 0fr -> 1fr). */
.site-header { position: relative; z-index: 10; background: var(--color-dark); box-shadow: var(--header-shadow); padding: 20px 16px; }
.site-header__inner { display: flex; flex-direction: column; align-items: center; }
.site-header__logo { display: block; }
.site-header__logo img { width: 100px; height: 120px; }
.nav-toggle { display: none; }
.site-nav { margin-top: 20px; }
.site-nav__list { display: flex; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 13px 16px; font-family: var(--font-display); font-size: 16px; font-weight: 400; line-height: 20px; letter-spacing: 1px; text-transform: uppercase; color: var(--color-white); text-decoration: none; }

@media (max-width: 767px) {
  .site-header__inner { align-items: stretch; }
  .site-header__logo { align-self: center; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; margin-top: 20px; width: 100%; min-height: 33px; padding: 5.5px; border: 0; border-radius: var(--radius); background: rgb(0 0 0 / 0.05); color: var(--color-white); cursor: pointer; position: relative; }
  .nav-toggle::after { content: ""; position: absolute; inset: -6px 0; } /* 44px tap area */
  .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: the nav must stretch (not shrink to content) so the list is clipped while it animates. */
  .site-nav { margin-top: 10px; display: grid; grid-template-rows: 0fr; align-items: stretch; transition: grid-template-rows var(--duration) var(--ease); }
  .site-nav.is-open { grid-template-rows: 1fr; }
  .site-nav__clip { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s linear var(--duration); }
  .site-nav.is-open .site-nav__clip { visibility: visible; transition-delay: 0s; }
  .site-nav__list { flex-direction: column; flex-wrap: nowrap; }
  .site-nav a { padding: 16px 20px; text-align: center; }
  .site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { background: var(--color-nav-active); }
}

/* === Component: site-footer ===
   Address/phone/email and opening hours (two columns), the map, then the copyright and
   "Powered by OrderYOYO" line. id="contact" is the target of the nav's Contact link. */
.site-footer { background: var(--color-dark); padding: 42px 16px; color: var(--color-white); }
.site-footer__contact { display: grid; grid-template-columns: 1fr 1fr; padding-top: 16px; }
.site-footer__col:first-child { padding: 0 10px 0 var(--gutter); }
.site-footer__col:last-child { padding: 0 var(--gutter) 0 10px; }
.site-footer__text { display: flow-root; margin: 10px 10px 10px 50px; font-family: var(--font-display); font-size: 24px; font-weight: 400; line-height: 1.4; }
.site-footer__text p { margin: 24px 0; }
.site-footer__text a { color: inherit; text-decoration: none; }
.site-footer__map { display: block; width: 100%; height: 300px; border: 0; margin-bottom: 16px; }
.site-footer__bar { display: grid; grid-template-columns: 1fr 1fr; padding-top: 26px; font-family: var(--font-footer-bar); font-size: 16px; font-weight: 300; line-height: 1; }
.site-footer__bar p { padding: var(--gutter); }
.site-footer__credit { text-align: end; }
.site-footer__credit a { color: inherit; text-decoration: none; }
@media (max-width: 767px) {
  .site-footer__contact { grid-template-columns: 1fr; padding-top: 0; }
  .site-footer__col:first-child, .site-footer__col:last-child { padding: 0 10px 0 var(--gutter); }
  .site-footer__bar { grid-template-columns: 1fr; text-align: center; }
  .site-footer__credit { text-align: center; }
}

/* === Component: button === (orange, square-ish, uppercase Roboto 500) */
.button { display: inline-block; padding: 18px 25px; border-radius: var(--radius); background: var(--color-orange); color: var(--color-white); font-family: var(--font-ui); font-size: 15px; font-weight: 500; line-height: 1; text-transform: uppercase; text-align: center; text-decoration: none; transition: all var(--duration) var(--ease); }
.button--wide { min-width: 250px; }

/* === Component: hero === (home: photo with dark overlay, two headings, divider, two buttons) */
.hero { --overlay: var(--color-overlay-hero); display: flex; align-items: center; min-height: 650px; }
.hero__content { width: 100%; padding: var(--gutter); }
.hero__title { font-family: var(--font-display); font-size: 59px; font-weight: 600; line-height: 1; text-transform: uppercase; color: var(--color-white); }
.hero__subtitle { margin-top: 20px; font-family: var(--font-ui); font-size: 24px; font-weight: 400; line-height: 1; text-transform: uppercase; color: var(--color-white); }
.hero__divider { width: 500px; max-width: 100%; margin: 20px 0 0; padding-block: 2px; border: 0; }
.hero__divider::after { content: ""; display: block; border-top: 2px solid var(--color-white); }
.hero__buttons { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; margin-top: 20px; }
@media (max-width: 767px) {
  .hero__title, .hero__subtitle { text-align: center; }
  .hero__divider { width: 100%; }
  .hero__buttons { align-items: center; }
}

/* === Component: loyalty === (orange overlay band: paragraph + app store badges) */
.loyalty { --overlay: var(--color-overlay-orange); --bg-color: var(--color-text-dark); padding: 110px 0; }
.loyalty__inner { max-width: 600px; margin-inline: auto; padding: 10px 10px 20px 30px; }
.loyalty__text { margin: 29px 10px 39px; font-family: var(--font-display); font-size: 24px; font-weight: 400; line-height: 1.5; color: var(--color-text-dark); }
.loyalty__badges { display: flex; align-items: flex-start; }
.loyalty__badge { width: 50%; text-align: center; }
.loyalty__badge a { display: block; }
.loyalty__badge img { width: 100%; }
.loyalty__badge--apple a { margin: 25px; }
.loyalty__badge--google a { margin: 10px; }
@media (max-width: 767px) {
  .loyalty__inner { padding-inline: 35px 15px; }
}

/* === Component: gallery-grid === (Elementor Pro gallery look: 3:2 crops, 10px gaps, dark hover
   overlay fading in over 800ms; thumbnails link to the full image and open in GLightbox) */
.gallery-grid { --columns: 2; display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.gallery-grid--4 { --columns: 4; }
.gallery-grid__item a { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.gallery-grid__item img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.gallery-grid__item a::after { content: ""; position: absolute; inset: 0; background: var(--color-gallery-hover); opacity: 0; transition: opacity var(--duration-gallery) var(--ease); }
.gallery-grid__item a:hover::after, .gallery-grid__item a:focus-visible::after { opacity: 1; }
@media (max-width: 1023px) { /* the original gallery widget kept 4 columns at exactly 1024px */
  .gallery-grid--4 { --columns: 2; }
}
@media (max-width: 767px) {
  .gallery-grid, .gallery-grid--4 { --columns: 1; }
}

/* === Component: gallery-section === (dark section, 1440px wide, grid with 50px above and below) */
.gallery-section { background: var(--color-dark); }
.gallery-section .gallery-grid { margin-block: 50px; }
.gallery-section__action { margin: 0 0 50px; padding-top: 20px; text-align: center; }

/* === Component: cta-band === (orange wood-texture band with two big underlined heading links) */
.cta-band { --overlay: var(--color-overlay-orange); --bg-color: var(--color-orange); padding: 60px 0; }
.cta-band__row { display: grid; grid-template-columns: 1fr 1fr; }
.cta-band__item { margin: var(--gutter); padding: 50px 0; text-align: center; }
.cta-band__title { font-family: var(--font-display); font-size: 39px; font-weight: 600; line-height: 1; text-transform: uppercase; text-decoration: underline; color: var(--color-text-dark); }
.cta-band__title a { color: inherit; }
@media (max-width: 767px) {
  .cta-band__row { grid-template-columns: 1fr; }
}

/* === Component: lightbox (GLightbox; library CSS in /assets/vendor/glightbox-3.3.1/) === */
.glightbox-clean .gslide-description { background: transparent; }
.glightbox-clean .gslide-title { color: var(--color-white); font-family: var(--font-ui); }

/* === Component: map === */
.map { display: block; width: 100%; border: 0; }

/* === Component: contact-email === (not used: the original has no forms; kept for consistency) */
.contact-email { display: grid; gap: 16px; justify-items: start; }
.contact-email__address { font-weight: 600; word-break: break-word; }

/* === Component: not-found === (404 page) */
.not-found { background: var(--color-dark); color: var(--color-white); text-align: center; padding: 100px 16px; }
.not-found__title { font-family: var(--font-display); font-size: 59px; font-weight: 600; text-transform: uppercase; }
.not-found__text { margin: 20px auto 30px; max-width: 600px; font-size: 24px; line-height: 1.5; }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }

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

/* === Page: / === (section background photos) */
.hero--home { --bg: url("/wp-content/uploads/2020/08/68870052_2604998462877938_6640105639609630720_o-e1596039200944.jpg"); }
.loyalty--home { --bg: url("/wp-content/uploads/2020/08/shutterstock_345887366.jpg"); }
.cta-band--home { --bg: url("/wp-content/uploads/2020/08/wood.jpg"); }

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

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