/*
 * site.css: the only stylesheet for this site (Pizza Land Moorends).
 *
 * Sections, in order:
 *   1. Tokens        colours, fonts, spacing (custom properties)
 *   2. Fonts         @font-face for self-hosted Open Sans and Montserrat
 *   3. Base          reset and element defaults
 *   4. Layout        content column, bands
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Values come from the original App4 "app4blend" theme (style.css + Customizer colours).
 * Breakpoints (from the original's media queries; media queries can't use custom properties):
 *   ≤ 960px  home hero 380px tall
 *   ≤ 768px  mobile layout: "MENU" toggle bar, smaller type (body 14px), hero 250px, 2x2 home tiles
 *
 * 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 (Customizer values from the original) */
  --color-text: #0a0a0a;          /* body text */
  --color-heading: #075600;       /* h1–h6 */
  --color-link: #2c8e3e;
  --color-link-hover: #7f7f7f;
  --color-bg: #ffffff;
  --color-brand: #26c111;         /* header nav and footer background */
  --color-accent: #eeee22;        /* nav/footer borders, nav hover */
  --color-on-brand: #ffffff;      /* nav and footer text */
  --color-band: #eeeeee;          /* grey band behind the contact block */
  --color-button: #cccccc;
  --color-button-hover: #aaaaaa;

  /* Typography */
  --font-body: "Open Sans", sans-serif;
  --font-heading: "Montserrat", "Open Sans", sans-serif;
  --text-base: 16px;              /* 14px at ≤ 768px */
  --leading: 1.5;

  /* Layout */
  --content: 1000px;              /* .page-content max width */
  --form-width: 600px;            /* contact block width (was the CF7 form) */
  --gutter: 20px;
  --border-brand: 4px;

  /* Motion (theme: transition all .2s linear; SlickNav slide ~200ms) */
  --duration: 0.2s;
  --ease: linear;
}

/* ============ 2. Fonts ============ */
/* Google Fonts (OFL), self-hosted variable woff2, latin subset. Used: Open Sans 300/400, Montserrat 600. */
@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;
}
@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;
}

/* ============ 3. Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
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; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--color-heading); font-weight: 600; line-height: 1.25; margin: 0; }
h1 { font-size: 40px; margin-bottom: 12px; }
h2 { font-size: 34px; margin-bottom: 9px; }
h3 { font-size: 26px; margin-bottom: 9px; }
p { font-size: var(--text-base); line-height: var(--leading); margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--color-link); text-decoration: none; }
a:hover, a:focus { color: var(--color-link-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

@media (max-width: 768px) {
  :root { --text-base: 14px; }
  h1 { font-size: 32px; line-height: 1.3; }
  h2 { font-size: 28px; line-height: 1.3; }
  h3 { font-size: 21px; line-height: 1.3; }
}

/* ============ 4. Layout ============ */
/* .page-content: centred 1000px column used inside every band */
.page-content { width: 100%; max-width: var(--content); margin: 0 auto; }
/* .band: plain white section with the theme's 50px/20px padding (#content) */
.band { padding: 50px var(--gutter); }
/* .band--grey: grey section (#contact) */
.band--grey { background: var(--color-band); }
.text-center { text-align: center; }

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

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

/* === Component: site-header (green nav bar, yellow border; "MENU" toggle at ≤ 768px) === */
.site-header {
  position: relative;
  z-index: 100;
  background: var(--color-brand);
  border-bottom: var(--border-brand) solid var(--color-accent);
  text-align: center;
}
.nav-toggle { display: none; }
.site-nav__list li { display: inline-block; }
.site-nav__list a {
  display: block;
  padding: 8px 12px;
  font-size: 0.8em;
  color: var(--color-on-brand);
  text-transform: uppercase;
  transition: all var(--duration) var(--ease);
}
.site-nav__list a:hover, .site-nav__list a:focus { color: var(--color-accent); }

@media (max-width: 768px) {
  /* Mobile bar (was SlickNav): yellow top border, "MENU" + bars at the right, list slides down and pushes content */
  .site-header {
    border-bottom: 0;
    border-top: var(--border-brand) solid var(--color-accent);
    padding: 5px 10px;
    font-size: 14px;
  }
  .nav-toggle {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin: 2px 2px 2px auto;
    padding: 5px;
    border: 0;
    background: none;
    color: var(--color-on-brand);
    font: inherit;
    line-height: 1.125em;
    cursor: pointer;
  }
  .nav-toggle::after { content: ""; position: absolute; inset: -8px -12px; } /* 44px tap area without changing the bar height */
  .nav-toggle__text { display: block; line-height: 1.3em; }
  .nav-toggle__icon { display: block; width: 20px; height: 12px; margin: 3px 0 0 5px; }
  .nav-toggle__icon span { display: block; width: 20px; height: 2px; border-radius: 1px; background: var(--color-on-brand); }
  .nav-toggle__icon span + span { margin-top: 3px; }

  .site-nav {
    display: grid;
    grid-template-rows: 0fr;
    align-items: stretch; /* keeps the list clipped while it slides */
    transition: grid-template-rows var(--duration) ease;
  }
  .site-nav.is-open { grid-template-rows: 1fr; }
  .site-nav.is-instant { transition: none; }
  .site-nav__list { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s var(--duration); }
  .site-nav.is-open .site-nav__list { visibility: visible; transition: visibility 0s 0s; }
  .site-nav__list li { display: block; border-bottom: 1px solid var(--color-on-brand); }
  .site-nav__list li:last-child { border-bottom: 0; }
  .site-nav__list a { padding: 13px 10px; font-size: 12px; line-height: 18px; text-transform: none; }
}

/* === Component: site-footer (green band, yellow top border, Facebook icon, copyright + credit) === */
.site-footer {
  padding: 20px var(--gutter);
  text-align: center;
  font-size: 0.8em;
  color: var(--color-on-brand);
  background: var(--color-brand);
  border-top: var(--border-brand) solid var(--color-accent);
}
.site-footer a { color: var(--color-on-brand); }
.site-footer p { font-size: inherit; margin: 0; }
.social { margin-bottom: 20px; line-height: 1; }
.social__link { display: inline-block; width: 40px; margin: 0 2px; vertical-align: top; }
.social__link img { display: block; width: 40px; height: 40px; }

/* === Component: home-hero (600px photo band; logo image centred near the top) === */
.home-hero {
  position: relative;
  height: 600px;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 10px 12px -10px rgb(0 0 0 / 0.6);
}
.home-hero__logo {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 300px;
  margin-left: -125px; /* the original's offset (not exactly centred) */
}
@media (max-width: 960px) {
  .home-hero { height: 380px; box-shadow: inset 0 -8px 8px -10px rgb(0 0 0 / 0.6), inset 0 8px 8px -10px rgb(0 0 0 / 0.6); }
}
@media (max-width: 768px) {
  .home-hero { height: 250px; }
  .home-hero__logo { top: 20px; width: 200px; margin-left: -100px; }
}

/* === Component: welcome (text that overlaps the hero bottom on a white fade) === */
.welcome {
  position: relative;
  margin-top: -250px;
  min-height: 250px;
  padding: 150px var(--gutter) 40px;
  background: linear-gradient(to bottom, rgb(255 255 255 / 0) 0, #fff 250px);
}
@media (max-width: 768px) {
  .welcome { margin-top: -100px; min-height: 100px; padding: 10px var(--gutter) 15px; background: linear-gradient(to bottom, rgb(255 255 255 / 0) 0, #fff 100px); }
}

/* === Component: tiles (4 square photos; 2x2 at ≤ 768px) === */
.tiles { padding: 10px var(--gutter) 60px; background: #fff; }
.tiles__grid { display: flex; flex-wrap: wrap; gap: 0 2.66%; }
.tiles__item { width: 23%; aspect-ratio: 1; object-fit: cover; }
@media (max-width: 768px) {
  .tiles { padding: 0 var(--gutter) 20px; }
  .tiles__grid { gap: 0 4%; }
  .tiles__item { width: 48%; margin-top: 4%; }
}

/* === Component: gallery-grid (3 columns at every width; GLightbox opens a.glightbox links) === */
.gallery-section { padding: 20px; }
.gallery-grid { display: flex; flex-wrap: wrap; gap: 0 2%; max-width: var(--content); margin: 0 auto; }
.gallery-grid__item { display: block; width: 32%; margin-bottom: 2%; cursor: zoom-in; }
.gallery-grid__item img { width: 100%; aspect-ratio: 32 / 31; object-fit: cover; }

/* === Component: lightbox (GLightbox styled like the original Colorbox: white 0.9 overlay, no captions) === */
.glightbox-container .goverlay { background: rgb(255 255 255 / 0.9); }
.glightbox-clean .gclose, .glightbox-clean .gnext, .glightbox-clean .gprev { background-color: rgb(0 0 0 / 0.55); }

/* === Component: button (theme grey button: full width, uppercase, light weight) === */
.button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 20px;
  border: 0;
  border-radius: 0;
  background-color: var(--color-button);
  color: #fff;
  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: all var(--duration) var(--ease);
}
.button:hover, .button:focus { background-color: var(--color-button-hover); color: #fff; }

/* === Component: contact-email (replaces the contact form: visible address + Send button) === */
.contact-email { max-width: var(--form-width); margin: 0 auto; text-align: center; }
.contact-email__address { margin: 0 0 18px; font-size: 1.1em; word-break: break-word; }

/* === Component: error-links (404 page: list of main sections) === */
.error-links { margin: 18px 0 0; }
.error-links li { display: inline-block; margin: 0 10px 10px; }

/* ============ 6. Pages ============ */
/* (none) */

/* ============ 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) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
