/*
 * site.css: the only stylesheet for rokapizza.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, columns
 *   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 theme's media queries; media queries can't use custom properties):
 *   ≤ 600px   small mobile: menu squares go 2×2, smaller address text
 *   ≤ 768px   mobile/tablet: hamburger menu, centred logo, 74px header, smaller type
 *   ≥ 769px   desktop: full nav with social icons, 80px header
 *
 * The original theme (hand-coded "rokapizza", 2017) used fixed px and % values; they are
 * kept as-is so the rebuild measures the same as the original at every width.
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.page-content--dark) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original theme CSS and computed styles) */
  --color-text: #555555;          /* body copy */
  --color-heading: #181818;       /* default heading colour */
  --color-bg: #ffffff;
  --color-dark: #1a1a1b;          /* header, footer, dark bands, buttons */
  --color-white: #ffffff;
  --color-hover: #999999;         /* link hover (all links), mobile menu item hover background */
  --color-link: #2a85e8;          /* default link colour in body copy; also used for focus rings */
  --color-band-grey: #656569;     /* contact band (was the form area) */
  --color-button-hover: #ababab;
  --color-square: #5f6036;        /* menu-square fallback colour behind the image */
  --color-focus: #2a85e8;

  /* Typography */
  --font-body: "Oswald", "Arial Narrow", sans-serif;        /* headings, nav, footer, buttons */
  --font-type: "Special Elite", "Courier New", monospace;   /* typewriter body copy in .page-content */
  --text-base: 16px;
  --text-base-mobile: 14px;
  --leading: 1.5;

  /* Layout */
  --container: 1000px;            /* .inner max-width in the original */
  --header-height: 80px;          /* fixed header, desktop */
  --header-height-mobile: 74px;   /* fixed header, ≤768px */
  --gutter: 20px;                 /* header side padding */

  /* Motion (match the original's timings) */
  --duration-hover: 0.2s;         /* menu squares, button: transition all .2s linear */
  --ease-hover: linear;
  --duration-menu: 400ms;         /* mobile menu slide (SlickNav default, decision d16) */
  --ease-menu: ease-in-out;       /* jQuery "swing" */
}

/* ============ 2. Fonts ============ */
/* Google Fonts, self-hosted (latin subset). Oswald is a variable font: one file covers 200–700. */
@font-face { font-family: "Oswald"; src: url("/assets/fonts/oswald-latin-variable.woff2") format("woff2"); font-weight: 200 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Special Elite"; src: url("/assets/fonts/special-elite-400-latin.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; scroll-padding-top: var(--header-height); }
body { margin: 0; padding-top: var(--header-height); font-family: var(--font-body); font-size: var(--text-base); line-height: var(--leading); color: var(--color-text); background: var(--color-bg); -webkit-font-smoothing: antialiased; }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { color: var(--color-heading); font-weight: 700; line-height: 1.25; margin: 0; }
h1 { font-size: 46px; margin-bottom: 12px; }
h2 { font-size: 35px; margin-bottom: 9px; }
h3 { font-size: 28px; margin-bottom: 9px; }
h4 { font-size: 21px; margin-bottom: 3px; }
p { font-size: 16px; line-height: 1.5; margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
strong, b { font-weight: 700; }
a { color: var(--color-link); text-decoration: none; }
a:hover, a:focus { color: var(--color-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

@media (max-width: 768px) {
  html { scroll-padding-top: var(--header-height-mobile); }
  body { padding-top: var(--header-height-mobile); font-size: var(--text-base-mobile); }
  h1 { font-size: 32px; line-height: 1.3; }
  h2 { font-size: 28px; line-height: 1.3; }
  h3 { font-size: 21px; line-height: 1.3; }
  h4 { font-size: 18px; line-height: 1.2; }
  p { font-size: 14px; }
}

/* ============ 4. Layout ============ */
/* .container = the original's ".inner": centred, max 1000px, no side padding of its own */
.container { width: 100%; max-width: var(--container); margin-inline: auto; }

/* Two equal columns (original ".row > .six.columns"); stacked at ≤768px */
.columns-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4.4%; }
@media (max-width: 768px) {
  .columns-2 { grid-template-columns: 1fr; }
}

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

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

/* === Component: site-header ===
 * Fixed dark bar. Desktop: logo left, nav + social icons right, 80px tall.
 * ≤768px: logo centred (100×34), hamburger at the right, nav slides down below the logo.
 */
.site-header { position: fixed; top: 0; left: 0; z-index: 1000; width: 100%; background: var(--color-dark); padding: 0 var(--gutter); }
.site-header__inner { display: flex; align-items: flex-start; justify-content: space-between; max-width: var(--container); margin-inline: auto; }
.site-header__logo { display: block; flex: none; }
.site-header__logo img { width: auto; height: 40px; margin: 20px 0; }

/* === Component: site-nav (desktop row + mobile slide-down list) === */
.site-nav { display: flex; align-items: flex-start; line-height: 1; }
.site-nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }  /* 4px = the inline-block word space between items in the original */
.site-nav__list li { margin: 0; }
.site-nav__list a { display: block; padding: 29px 10px; font-size: 22px; line-height: 22px; text-transform: uppercase; color: var(--color-white); }
.site-nav__list a:hover, .site-nav__list a:focus { color: var(--color-hover); }

/* === Component: social-links (white icon swaps to grey on hover; header, desktop only) === */
.social-links { display: flex; margin-left: 5px; }
.social-link { position: relative; display: block; }
.social-link img { display: block; box-sizing: content-box; width: 30px; height: 30px; padding: 25px 5px; }
.social-link__grey { position: absolute; top: 0; left: 0; opacity: 0; }
.social-link:hover .social-link__grey, .social-link:focus-visible .social-link__grey { opacity: 1; }
.social-link:hover .social-link__white, .social-link:focus-visible .social-link__white { opacity: 0; }

/* === Component: nav-toggle (hamburger, ≤768px only; three 25×3 white bars like SlickNav) === */
.nav-toggle { display: none; position: absolute; top: 18px; right: 5px; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--color-white); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle__bars { display: block; width: 25px; }
.nav-toggle__bars span { display: block; height: 3px; border-radius: 2px; background: currentColor; }
.nav-toggle__bars span + span { margin-top: 5px; }
.nav-toggle:focus-visible { outline-color: var(--color-white); outline-offset: -2px; }

@media (max-width: 768px) {
  .site-header__inner { display: block; }
  .site-header__logo { width: 100px; margin: 0 auto; }
  .site-header__logo img { width: 100px; height: 34px; object-fit: contain; }
  .js .nav-toggle { display: flex; }
  .social-links { display: none; }

  /* Slide-down: grid row animates 0fr → 1fr. visibility keeps closed links out of the tab order.
   * align-items: stretch overrides the desktop flex-start so the list is sized to the animating
   * row (and clipped by its own overflow) instead of overflowing it at full height. */
  .site-nav { display: grid; grid-template-rows: 1fr; align-items: stretch; }
  .js .site-nav { grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--duration-menu) var(--ease-menu), visibility 0s linear var(--duration-menu); }
  .js .site-nav.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--duration-menu) var(--ease-menu), visibility 0s linear 0s; }
  .site-nav__list { display: block; min-height: 0; overflow: hidden; text-align: center; }
  .site-nav__list li { border-bottom: 1px solid var(--color-white); }
  .site-nav__list li:last-child { border-bottom: 0; }
  .site-nav__list a { padding: 13px 10px; font-size: 12px; line-height: 18px; letter-spacing: 0.05em; }
  .site-nav__list a:hover, .site-nav__list a:focus-visible { background: var(--color-hover); color: var(--color-white); }
  .site-nav__list a:focus-visible { outline-offset: -2px; outline-color: var(--color-white); }
}

/* === Component: site-footer (dark, centred, small light text; app badges then copyright) === */
.site-footer { padding: 4% 5%; background: var(--color-dark); color: var(--color-white); text-align: center; font-size: 12px; font-weight: 300; line-height: 1.5; letter-spacing: 0.06em; }
.site-footer a { color: var(--color-white); }
.site-footer a:hover, .site-footer a:focus { color: var(--color-hover); }
.site-footer__copyright { margin: 0; font-size: inherit; line-height: inherit; }

/* === Component: app-badges (App Store / Google Play images, footer) === */
.app-badges { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 8px; }
.app-badges__link { display: block; max-width: 170px; padding: 10px; margin-bottom: 15px; }
.app-badges__link img { width: 150px; height: auto; }

/* === Component: page-banner (cover image with the page's h1; About, Contact, 404) ===
 * <div class="page-banner" style="background-image: url('/wp-content/uploads/2017/12/pizza-bg.jpg')"><h1 class="page-banner__title">Contact</h1></div>
 */
.page-banner { position: relative; padding: 10% 5% 11%; background-color: var(--color-dark); background-size: cover; background-position: center; text-align: center; }
.page-banner__title { margin: 0; color: var(--color-white); font-weight: 400; text-transform: uppercase; }
@media (max-width: 768px) {
  .page-banner { padding: 15% 5% 16%; }
}

/* === Component: page-content (typewriter-font text section; white or dark) === */
.page-content { position: relative; padding: 5%; font-family: var(--font-type); letter-spacing: 0.1em; line-height: 2em; }
.page-content p { line-height: 2em; }
.page-content--dark { background: var(--color-dark); color: var(--color-white); }
.page-content--compact { padding: 5%; }
@media (max-width: 768px) {
  .page-content { padding: 10%; text-align: center; }
  .page-content--compact { padding: 5%; }
}

/* === Component: content-intro (centred intro text inside page-content) ===
 * Default: max 700px (home intro). --narrow: max 500px with a bigger first line (About).
 */
.content-intro { width: 100%; max-width: 700px; margin: auto; text-align: center; }
.content-intro--narrow { max-width: 500px; margin: 0 auto 34px; }
.content-intro__lead { font-size: 1.5em; line-height: 1.5; }
.page-content .content-intro__lead { line-height: 1.5; }

/* === Component: hero (home landing image with the round logo; parallax background) ===
 * <div class="hero" data-parallax="0.5" data-parallax-from="top">
 *   <div class="hero__bg" style="background-image: url('/wp-content/uploads/2017/12/pizza-bg.jpg')"></div>
 *   <img class="hero__logo" src="/assets/images/li-logo.png" alt="Roka Pizza" width="1000" height="1000">
 * </div>
 */
.hero { position: relative; padding: 12% 0; overflow: hidden; }
.hero__bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; will-change: transform; }
.hero__logo { position: relative; width: 25%; margin: auto; }
@media (max-width: 768px) {
  .hero__logo { width: 40%; }
}

/* === Component: image-band (full-width cover image band, optional content on top) ===
 * --fixed: fixed background on desktop pointers only (home bands); --sub: tall empty band (About).
 * <div class="image-band image-band--fixed"><div class="image-band__bg" style="background-image: url('…')"></div><div class="image-band__content container">…</div></div>
 */
.image-band { position: relative; padding: 5%; }
.image-band--sub { padding: 15%; }
.image-band__bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; }
.image-band__content { position: relative; }
@media (hover: hover) and (pointer: fine) {
  .image-band--fixed .image-band__bg { background-attachment: fixed; }
}

/* === Component: order-steps ("How To Order" title and four icon + h3 blocks; home) === */
.order-steps__title { margin-bottom: 5%; color: var(--color-white); font-size: 6em; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; }
.order-steps__list { display: flex; justify-content: space-between; align-items: flex-start; }
.order-steps__item { text-align: center; }
.order-steps__item img { width: 75px; margin: 0 auto 20px; }
.order-steps__item h3 { margin: 0; color: var(--color-white); font-weight: 400; letter-spacing: 0.05em; text-transform: uppercase; }
@media (max-width: 768px) {
  .order-steps__title { font-size: 4em; }
  .order-steps__item img { width: 50px; }
  .order-steps__item h3 { font-size: 14px; }
}

/* === Component: menu-squares (four image tiles; hover dims the image and shows the label; not links; home) === */
.menu-squares { display: flex; flex-wrap: wrap; }
.menu-square { position: relative; flex: 0 0 23.5%; margin-right: 2%; padding: 11.75% 0; background-color: var(--color-square); text-align: center; font-size: 26px; line-height: 0; text-transform: uppercase; }
.menu-square:last-child { margin-right: 0; }
.menu-square__bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; transition: opacity var(--duration-hover) var(--ease-hover); }
.menu-square__label { position: relative; opacity: 0; color: var(--color-white); transition: opacity var(--duration-hover) var(--ease-hover); }
.menu-square:hover .menu-square__bg { opacity: 0.3; }
.menu-square:hover .menu-square__label { opacity: 1; }
@media (max-width: 768px) {
  .menu-square { font-size: 18px; }
}
@media (max-width: 600px) {
  .menu-square { flex-basis: 49%; margin: 0 2% 2% 0; padding: 15% 0; font-size: 22px; }
  .menu-square:nth-child(even) { margin-right: 0; }
  .menu-square:nth-last-child(-n+2) { margin-bottom: 0; }
}

/* === Component: venue-details (big white address + opening hours on an image band; home) === */
.venue-details { max-width: 544px; margin-bottom: 12px; color: var(--color-white); font-size: 2.5em; line-height: 1.2; letter-spacing: 0.06em; }
.venue-details p { margin: 0; font-size: inherit; line-height: inherit; }
.venue-details .venue-details__small { font-size: 0.7em; }
@media (max-width: 768px) {
  .venue-details { max-width: 340px; font-size: 1.8em; }
}
@media (max-width: 600px) {
  .venue-details { max-width: 260px; font-size: 1.5em; }
}

/* === Component: button (dark, full width, uppercase Oswald Light; original form "Send" button) === */
.button { display: block; width: 100%; padding: 8px 20px; border: 0; border-radius: 0; background: var(--color-dark); color: var(--color-white); font-family: var(--font-body); font-size: 1.1em; font-weight: 300; line-height: 1.5; text-align: center; text-transform: uppercase; cursor: pointer; transition: background-color var(--duration-hover) var(--ease-hover); }
.button:hover, .button:focus { background: var(--color-button-hover); color: var(--color-white); }
.button:focus-visible { outline-color: var(--color-white); }

/* === Component: contact-email (replaces the Contact Form 7 form: grey band, mailto button, visible address, phone) ===
 * Sits where the form was, on the same grey band, 600px wide like the form.
 */
.contact-email { padding: 50px 30px; background: var(--color-band-grey); color: var(--color-white); }
.contact-email__inner { display: grid; gap: 10px; max-width: 600px; margin: auto; text-align: center; }
.contact-email__address, .contact-email__phone { margin: 0; font-size: 1.1em; letter-spacing: 0.06em; }
.contact-email__address { overflow-wrap: anywhere; }
.contact-email a:not(.button) { color: var(--color-white); }
.contact-email a:not(.button):hover, .contact-email a:not(.button):focus { color: var(--color-dark); }
.contact-email .button { margin-top: 0; }

/* === Component: parallax (GSAP moves the first child; see site.js) === */
.parallax { overflow: hidden; }

/* === Component: reveal (GSAP animates these; hidden only once GSAP has loaded) === */
.reveal-ready [data-reveal] { visibility: hidden; }

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

/* ============ 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; transition-delay: 0s !important; }
  [data-reveal] { visibility: visible !important; }
}

