/*
 * site.css: the only stylesheet for periperioriginalchesham.co.uk (Peri Peri Original, Chesham).
 *
 * Sections, in order:
 *   1. Tokens        colours, fonts, spacing, motion (custom properties)
 *   2. Fonts         @font-face for self-hosted Montserrat and Open Sans
 *   3. Base          reset and element defaults (the app4banners theme's reset + typography)
 *   4. Layout        page content column
 *   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 app4banners theme; media queries can't use custom properties):
 *   ≤ 1020px  image link blocks: smaller text
 *   ≤ 960px   info bar stacks (centred lines); hero 380px tall
 *   ≤ 768px   mobile layout: "MENU" bar replaces the nav, hero 250px, blocks 2 per row,
 *             app bar shows badges only, body text 14px
 *   ≤ 580px   blocks: smaller text; hero caption 36px
 *   ≤ 420px   blocks 1 per row; hero caption 26px
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (theme customiser output + additional CSS on the original) */
  --color-red: #bf1b1b;            /* info bar, headings, review names, buttons */
  --color-green: #007000;          /* links, app bar, MENU bar text, dots, button hover */
  --color-green-dark: rgb(0 84 0);   /* header gradient top */
  --color-green-light: rgb(0 146 0); /* header gradient bottom */
  --color-yellow: #f2d500;         /* desktop nav hover */
  --color-text: #404040;
  --color-bg: #ffffff;
  --color-white: #ffffff;

  /* Typography */
  --font-body: "Montserrat", "Open Sans", sans-serif;
  --font-button: "Open Sans", sans-serif;
  --text-base: 16px;
  --text-base-mobile: 14px;
  --leading: 1.5;

  /* Spacing */
  --gutter: 20px;
  --content-width: 1000px;         /* .page-content max width */
  --text-column: 600px;            /* centred text column on About / Contact */

  /* Motion (match the original's timings) */
  --duration: 200ms;               /* nav links, buttons: "all .2s linear" */
  --duration-block: 100ms;         /* image link blocks: "all .1s linear" */
  --ease: linear;
  --duration-menu: 400ms;          /* SlickNav slideToggle default */
  --ease-menu: cubic-bezier(0.45, 0, 0.55, 1); /* close to jQuery "swing" */
}

/* ============ 2. Fonts ============ */
/* Self-hosted Google Fonts (variable woff2, latin subset, OFL).
 * Montserrat 400 is the body font; Open Sans 300 is used by the red button (theme's button font). */
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/open-sans-latin-variable.woff2") format("woff2");
  font-weight: 300 800;
  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: var(--leading);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--color-red); font-weight: 700; line-height: 1.25; }
p { margin: 0 0 18px; font-size: var(--text-base); line-height: var(--leading); }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
li { margin: 0; }
a { color: var(--color-green); text-decoration: none; }
a:hover, a:focus { color: var(--color-text); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-green); outline-offset: 2px; }

@media (max-width: 768px) {
  body, p { font-size: var(--text-base-mobile); line-height: 1.5; }
}

/* ============ 4. Layout ============ */
/* #content on the original: 50px top/bottom, 20px sides; inner column max 1000px. */
.page-content { padding: 50px var(--gutter); }
.page-content__inner { width: 100%; max-width: var(--content-width); margin: auto; }

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

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

/* === Component: site-header ===
 * Red info bar, green gradient behind logo + nav. The gradient spans the whole header (as on the
 * original, where it sat on #header), so the info bar and the mobile MENU bar paint over it.
 * Not sticky. */
.site-header {
  position: relative;
  z-index: 100;
  background-color: var(--color-green);
  background-image: linear-gradient(to bottom, var(--color-green-dark) 0%, var(--color-green-light) 100%);
}
.site-header__logo { display: block; width: 60%; max-width: 300px; margin: 15px auto 0; }
.site-header__logo img { width: 100%; vertical-align: baseline; }
.site-header__brand { padding: 0 var(--gutter); }

/* === Component: info-bar (top red bar: Facebook icon · address · hours · phone) === */
.info-bar {
  display: flex;
  align-items: center;
  padding: 5px;
  background-color: var(--color-red);
  color: var(--color-white);
  font-size: 12px;
  line-height: 18px;
}
.info-bar__item { display: flex; align-items: center; height: 20px; }
.info-bar__item + .info-bar__item::before {
  content: "";
  display: block;
  width: 2px;
  height: 2px;
  margin: 0 12px;
  background-color: var(--color-white);
}
.info-bar__social { display: block; }
.info-bar__social img { display: block; width: 20px; height: 20px; }
@media (max-width: 960px) {
  .info-bar { flex-direction: column; text-align: center; }
  .info-bar__item { display: block; height: auto; margin-bottom: 3px; line-height: 12px; }
  .info-bar__item:last-child { margin-bottom: 0; }
  .info-bar__item + .info-bar__item::before { display: none; }
  .info-bar__item--social { height: 20px; }
}

/* === Component: site-nav (desktop: centred uppercase links under the logo) === */
.site-nav { text-align: center; }
.site-nav__list li { display: inline-block; }
.site-nav__list a {
  display: block;
  padding: 10px 15px;
  font-size: 0.9em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--color-white);
  transition: all var(--duration) var(--ease);
}
.site-nav__list a:hover,
.site-nav__list a:focus { color: var(--color-yellow); }
.site-nav__list a:focus-visible { outline-color: var(--color-yellow); outline-offset: -2px; }

/* === Component: nav-toggle (mobile "MENU ☰" bar, SlickNav look: white bar, green text) === */
.nav-toggle { display: none; }

@media (max-width: 768px) {
  .site-header__logo { margin: 15px auto; }

  .nav-toggle {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 5px 17px 5px 10px;
    border: 0;
    border-radius: 0;
    background-color: var(--color-bg);
    color: var(--color-green);
    font: inherit;
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle:focus-visible { outline: 2px solid var(--color-green); outline-offset: -2px; }
  .nav-toggle__icon { display: inline-block; width: 20px; height: 12px; margin-left: 5px; }
  .nav-toggle__icon span { display: block; width: 20px; height: 2px; border-radius: 1px; background-color: var(--color-green); }
  .nav-toggle__icon span + span { margin-top: 3px; }

  /* Slide-down list: grid row 0fr → 1fr. align-items: stretch keeps the list clipped while it animates. */
  .site-nav {
    display: grid;
    grid-template-rows: 0fr;
    align-items: stretch;
    padding: 0 10px;
    background-color: var(--color-bg);
    visibility: hidden;
    transition: grid-template-rows var(--duration-menu) var(--ease-menu), padding var(--duration-menu) var(--ease-menu), visibility 0s linear var(--duration-menu);
  }
  .site-nav.is-open {
    grid-template-rows: 1fr;
    padding-bottom: 5px;
    visibility: visible;
    transition: grid-template-rows var(--duration-menu) var(--ease-menu), padding var(--duration-menu) var(--ease-menu), visibility 0s;
  }
  .site-nav__list { min-height: 0; overflow: hidden; font-size: 12px; }
  .site-nav__list li { display: block; border-bottom: 1px solid var(--color-green); }
  .site-nav__list li:last-child { border-bottom: 0; }
  /* 44px tall items (original 38px) for the tap-target rule; labels in their original case. */
  .site-nav__list a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px;
    font-size: inherit;
    text-transform: none;
    color: var(--color-green);
  }
  .site-nav__list a:hover,
  .site-nav__list a:focus { background-color: var(--color-green); color: var(--color-white); }

  /* Without JavaScript the menu can't toggle: show the list open. */
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .site-nav { grid-template-rows: 1fr; visibility: visible; }
}

/* === Component: hero-slider (home: 3 full-width photos, 30% dark overlay, fixed caption) ===
 * Swiper; options in data-swiper. The caption "Quality and Service / You Can Trust" is CSS
 * generated content on the original (#home-slider:after), kept the same way here. */
.hero-slider { position: relative; overflow: hidden; }
.hero-slider .swiper-slide { position: relative; height: 500px; overflow: hidden; }
.hero-slider .swiper-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-slider .swiper-slide::after { content: ""; position: absolute; inset: 0; background-color: rgb(0 0 0 / 0.3); }
.hero-slider::after {
  content: "Quality and Service\A\AYou Can Trust";
  white-space: pre-wrap;
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 0;
  width: 100%;
  margin-top: -1em;
  padding: 0 var(--gutter);
  text-align: center;
  color: var(--color-white);
  font-size: 80px;
  line-height: 0.6em;
  text-shadow: 0.05em 0.05em 0.05em rgb(0 0 0 / 0.4);
  pointer-events: none;
}
/* Before Swiper starts (or without JS) show only the first slide. */
.hero-slider:not(.swiper-initialized) .swiper-slide:not(:first-child) { display: none; }
@media (max-width: 960px) {
  .hero-slider .swiper-slide { height: 380px; }
  .hero-slider::after { font-size: 60px; }
}
@media (max-width: 768px) {
  .hero-slider .swiper-slide { height: 250px; }
  .hero-slider::after { font-size: 48px; }
}
@media (max-width: 580px) { .hero-slider::after { font-size: 36px; } }
@media (max-width: 420px) { .hero-slider::after { font-size: 26px; } }

/* === Component: link-blocks (home: 4 photo tiles with uppercase labels; overlay lightens on hover) === */
.link-blocks { display: flex; flex-wrap: wrap; width: 100%; overflow: hidden; }
.link-block {
  display: block;
  width: 25%;
  padding: 10% 0;
  text-align: center;
  text-transform: uppercase;
  color: var(--color-white);
  font-size: 2em;
  line-height: 0;
  text-shadow: 2px 2px 2px rgb(0 0 0 / 0.5);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1000px rgb(0 0 0 / 0.4);
  transition: all var(--duration-block) var(--ease);
}
.link-block:hover,
.link-block:focus {
  color: var(--color-white);
  font-size: 2.2em;
  box-shadow: inset 0 0 0 1000px rgb(0 0 0 / 0.1);
}
.link-block:focus-visible { outline: 2px solid var(--color-white); outline-offset: -4px; }
@media (max-width: 1020px) {
  .link-block { font-size: 1.7em; }
  .link-block:hover, .link-block:focus { font-size: 1.9em; }
}
@media (max-width: 768px) {
  .link-block { width: 50%; padding: 12% 0; }
}
@media (max-width: 580px) {
  .link-block { font-size: 1.4em; }
  .link-block:hover, .link-block:focus { font-size: 1.6em; }
}
@media (max-width: 420px) {
  .link-block { width: 100%; padding: 20% 0; }
}

/* === Component: review-slider (home: customer quotes, green dots; Swiper) === */
.reviews { padding: 50px var(--gutter); text-align: center; background-color: var(--color-bg); }
.review-slider { padding-bottom: 20px; }
.review { outline: none; }
.review__text { display: block; max-width: 720px; margin: 0 auto 30px; color: var(--color-text); }
.review__text::before,
.review__text::after { content: " '' "; }
.review__name { display: block; width: 80%; max-width: 800px; margin: 0 auto 30px; font-size: 0.9em; font-style: italic; color: var(--color-red); }
.review-slider .swiper-pagination.swiper-pagination-bullets {
  position: absolute;
  top: auto;
  bottom: 4px;
  left: 0;
  width: 100%;
  line-height: 0;
}
.review-slider .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  margin: 0 9px;
  --swiper-pagination-bullet-horizontal-gap: 9px;
  border-radius: 10px;
  background-color: var(--color-green);
  opacity: 0.5;
}
.review-slider .swiper-pagination-bullet-active { opacity: 1; }
/* Before Swiper starts (or without JS) show only the first review. */
.review-slider:not(.swiper-initialized) .swiper-slide:not(:first-child) { display: none; }

/* === Component: app-bar ("Get our Mobile App" green strip with iPhone / Android badges) === */
.app-bar {
  height: 50px;
  padding: 10px var(--gutter);
  text-align: center;
  font-size: 24px;
  line-height: 0;
  color: var(--color-white);
  background-color: var(--color-green);
}
.app-bar__link { display: inline-block; position: relative; width: 144px; height: 30px; margin-bottom: -7.5px; }
.app-bar__link img { display: block; width: 100%; height: auto; }
.app-bar__link:focus-visible { outline-color: var(--color-white); }
@media (max-width: 768px) {
  .app-bar { height: auto; font-size: 0; color: transparent; }
  .app-bar__link { width: 130px; height: auto; margin: 0 5px; }
}

/* === Component: site-footer (copyright + Powered by OrderYOYO) === */
.site-footer {
  padding: 30px var(--gutter);
  text-align: center;
  font-size: 0.8em;
  color: var(--color-text);
  background-color: var(--color-bg);
}
.site-footer p { margin: 0; font-size: inherit; line-height: inherit; }
.site-footer a { color: var(--color-text); }
.site-footer a:hover, .site-footer a:focus { color: var(--color-text); }

/* === Component: text-column (centred 600px text block on About / Contact) === */
.text-column { max-width: var(--text-column); margin: 0 auto 50px; text-align: center; }
.text-column--intro { margin-bottom: 40px; }

/* === Component: map (keyless Google Maps iframe; 100% of the 1000px column × 400px) === */
.map-embed { margin: 0; }
.map { display: inline-block; vertical-align: baseline; width: 100%; height: 400px; border: 0; }

/* === Component: button (theme button: full-width red bar, Open Sans 300 uppercase; hover green) === */
.button {
  display: block;
  width: 100%;
  padding: 8px 20px;
  border: 0;
  border-radius: 0;
  background-color: var(--color-red);
  color: var(--color-white);
  font-family: var(--font-button);
  font-size: 1.1em;
  font-weight: 300;
  line-height: normal;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.button:hover,
.button:focus { background-color: var(--color-green); color: var(--color-white); }

/* === Component: contact-email (replaces the CF7 form: visible address, mailto "Send" button, phone) ===
 * Same 600px centred column as the original form. */
.contact-email { max-width: var(--text-column); margin: 0 auto; text-align: center; }
.contact-email__address,
.contact-email__phone { margin: 0 0 15px; word-break: break-word; }
.contact-email__label { display: block; font-size: 0.9em; color: #333333; }
.contact-email .button { margin-bottom: 15px; }
.contact-email > :last-child { margin-bottom: 0; }

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

/* === Page: /404.html (added by redirects-seo) === */
.not-found__title { margin-bottom: 18px; font-size: 35px; }
@media (max-width: 768px) { .not-found__title { font-size: 28px; line-height: 1.3; } }

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