/*
 * site.css: the only stylesheet for www.ajs-catering.co.uk (AJ's Catering).
 *
 * 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, sections, two-column split
 *   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 breakpoints; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *   - the nav collapses to a burger + full-width dropdown at <= 1024px (Order Now button hidden)
 *   - columns stack at <= 767px
 *
 * Original font: Agrandir (commercial, not licensable) -> Albert Sans (Google Font, self-hosted,
 * variable 400-700). Change --font-body to switch.
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.button--accent) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's computed styles / Elementor globals) */
  --color-primary: #244422;        /* dark green: all text, dark buttons, icons */
  --color-accent: #bfe0b1;         /* light green: header button, burger, nav hover, dark-button text */
  --color-bg: #ffffff;
  --color-bg-alt: #eeeeee;         /* "Download Our Mobile App" band */
  --color-border: #dddddd;         /* line above Our Story */
  --color-divider: rgb(34 34 34 / 0.17); /* footer divider */
  --color-dropdown-text: #33373d;  /* mobile dropdown links */
  --color-social-bg: rgb(191 224 177 / 0.19);

  /* Typography */
  --font-body: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-body);
  --text-xl: 48px;                 /* hero + "Take a Look" headings (all widths) */
  --text-lg: 40px;                 /* section headings */
  --text-md: 20px;                 /* intro text, card titles, footer text */
  --text-base: 18px;               /* body copy, buttons, nav */
  --leading: 1.4;

  /* Spacing and shape */
  --widget-gap: 20px;              /* Elementor's default gap between stacked widgets */
  --section-pad: 96px;
  --gutter: 24px;
  --container: 1140px;
  --container-narrow: 960px;       /* Our Story */
  --container-hero: 660px;         /* hero + Get Started text */
  --radius: 3px;

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

/* ============ 2. Fonts ============ */
@font-face { font-family: "Albert Sans"; src: url("/assets/fonts/albert-sans-latin-variable.woff2") format("woff2"); font-weight: 400 700; 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: 16px; line-height: var(--leading); color: var(--color-primary); background: var(--color-bg); overflow-x: clip; }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 400; line-height: 1.4; margin: 0; color: var(--color-primary); }
p { margin: 0; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ============ 4. Layout ============ */
.section { position: relative; padding: var(--section-pad) var(--gutter); }
.container { width: 100%; max-width: var(--container); margin-inline: auto; }
.container--narrow { max-width: var(--container-narrow); }
.stack > * + * { margin-top: var(--widget-gap); }   /* Elementor widget rhythm: 20px between widgets */
/* Elementor spacer widgets: the spacer height plus the widget gap above and below it */
.stack > .spacer-12 { margin-top: calc(2 * var(--widget-gap) + 12px); }
.stack > .spacer-20 { margin-top: calc(2 * var(--widget-gap) + 20px); }
.stack > .spacer-24 { margin-top: calc(2 * var(--widget-gap) + 24px); }
.stack > .spacer-32 { margin-top: calc(2 * var(--widget-gap) + 32px); }
.stack > .spacer-48 { margin-top: calc(2 * var(--widget-gap) + 48px); }

/* Two-column split (image + text). Image column has 32px on the inside edge, text column 32px. */
.split { display: flex; align-items: center; }
.split > * { width: 50%; min-width: 0; }
.split__media { padding-right: 32px; }
.split__body { padding-left: 32px; }
.split--top { align-items: flex-start; }
@media (max-width: 767px) {
  .split { flex-direction: column; align-items: stretch; }
  .split > * { width: 100%; padding: 0; }
  .split__media { margin-bottom: 32px; }
  .split--reverse-mobile { flex-direction: column-reverse; }
  .split--reverse-mobile .split__media { margin-bottom: 0; }
  .split--reverse-mobile .split__body { margin-bottom: 32px; }
}

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

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

/* === Component: site-header ===
 * White bar, 60px. Desktop: logo (150px, 48px gap), text nav, light-green "Order Now" right.
 * <= 1024px: light-green burger left, logo centred, full-width white dropdown under the bar.
 * Not sticky (the original scrolls away).
 */
.site-header { position: relative; z-index: 50; background: var(--color-bg); }
.site-header__inner { display: flex; align-items: center; min-height: 60px; padding: 0 var(--gutter); }
.site-header__logo { flex: none; width: 150px; margin-right: 48px; }
.site-header__logo img { width: 150px; }
.site-header .site-header__cta { margin-left: auto; font-size: 16px; }
.site-nav__list { display: flex; list-style: none; margin: 0; padding: 0; }
.site-nav__list a { display: flex; padding: 20px; font-size: var(--text-base); line-height: 20px; color: var(--color-primary); transition: all var(--duration-nav); }
.site-nav__list a:hover, .site-nav__list a:focus-visible { background: var(--color-accent); color: var(--color-primary); }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 33px; height: 33px; padding: 0; border: 0; border-radius: var(--radius); background: var(--color-accent); color: var(--color-primary); font-size: 22px; cursor: pointer; position: relative; }
.nav-toggle::after { content: ""; position: absolute; inset: -6px; } /* 44px tap target */
.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 (max-width: 1024px) {
  .site-header__inner { padding: 16px var(--gutter); min-height: 60px; position: relative; }
  .nav-toggle { display: inline-flex; position: absolute; left: var(--gutter); top: 16px; }
  .site-header__logo { margin: 0 auto; } /* centred in the bar, as the original */
  .site-header .site-header__cta { display: none; }
  .site-nav { position: absolute; top: 59px; left: 0; right: 0; display: grid; grid-template-rows: 0fr; align-items: stretch; 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__inner { overflow: hidden; min-height: 0; }
  .site-nav__list { display: block; background: var(--color-bg); }
  .site-nav__list a { padding: 10px 20px; color: var(--color-dropdown-text); }
}

/* === Component: site-footer (id="contact") ===
 * Four columns (Company / Get In Touch / Opening Times / Install Our App), divider, then
 * copyright + Facebook. Stacks at <= 767px with Facebook above the copyright.
 */
.site-footer { padding: 64px var(--gutter) 0; margin-bottom: 32px; }
.site-footer__columns, .site-footer__divider, .site-footer__bar { max-width: var(--container); margin-inline: auto; }
.site-footer__columns { display: grid; grid-template-columns: 22.667% 28.25% 31.083% 17.979%; }
.site-footer__col--touch, .site-footer__col--hours { padding-left: 12px; }
.site-footer__col--app { padding-left: 24px; }
.site-footer__heading { font-size: var(--text-md); font-weight: 600; line-height: 20px; letter-spacing: -0.04em; margin-bottom: 64px; }
.site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__links li + li { margin-top: 12px; }
.site-footer__links a { font-size: var(--text-base); font-weight: 400; line-height: 24px; letter-spacing: -0.03em; }
.site-footer__text, .site-footer__copyright { font-size: var(--text-md); line-height: 32px; letter-spacing: -0.03em; }
.site-footer__badges { display: inline-block; margin-top: 4px; }
.site-footer__badges img { width: 150px; }
.site-footer__divider { border: 0; border-top: 1px solid var(--color-divider); margin-top: 64px; margin-bottom: 84px; }
.site-footer__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--color-social-bg); color: var(--color-primary); font-size: 16px; }
.social-icon:hover { opacity: 0.9; }
@media (max-width: 767px) {
  .site-footer__columns { display: block; }
  .site-footer__col { padding: 0; margin-bottom: 24px; }
  .site-footer__col:last-child { margin-bottom: 0; }
  .site-footer__divider { margin-top: 48px; margin-bottom: 68px; }
  .site-footer__bar { flex-direction: column-reverse; align-items: flex-start; gap: 24px; }
}

/* === Component: button ===
 * Dark green with light-green text (default) or light green with dark text (--accent).
 * No hover change on the original.
 */
.button { display: inline-block; padding: 16px 24px 12px; border-radius: var(--radius); background: var(--color-primary); color: var(--color-accent); font-size: var(--text-base); font-weight: 400; line-height: 1; text-align: center; transition: all var(--duration); }
.button--accent { background: var(--color-accent); color: var(--color-primary); }
.button--lg { font-size: 20px; }

/* === Component: section-heading === */
.heading-xl { font-size: var(--text-xl); }
.heading-lg { font-size: var(--text-lg); }
.intro { font-size: var(--text-md); line-height: 26px; }
.copy { font-size: var(--text-base); line-height: 1.4; }
.text-center { text-align: center; }

/* === Component: image-band (hero / Get Started: photo with a white wash, centred text) === */
.image-band { position: relative; display: flex; align-items: center; background: var(--band-image) center / cover no-repeat; padding: 0 var(--gutter); }
.image-band::before { content: ""; position: absolute; inset: 0; background: #ffffff; opacity: var(--band-wash, 0.45); }
.image-band__content { position: relative; width: 100%; max-width: var(--container-hero); margin-inline: auto; text-align: center; }
.image-band--hero { min-height: 720px; }
.image-band--cta { min-height: 448px; padding: 24px 24px 24px 42px; --band-wash: 0.65; }

/* === Component: gallery (4 columns, 4:5 crops, GLightbox; 1 column on mobile) === */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.gallery a { display: block; }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 767px) {
  .gallery { grid-template-columns: 1fr; }
}

/* === Component: feature (icon-box: icon left, bold title, text under the title) === */
.feature { display: flex; max-width: 480px; }
.feature__icon { flex: none; font-size: 24px; line-height: 24px; height: 24px; }
.feature__icon .icon { display: block; width: 24px; height: 24px; }
.feature__title { font-size: var(--text-md); font-weight: 600; line-height: 26px; margin-bottom: 8px; }
.feature__text { font-size: var(--text-base); line-height: 24px; }

/* === Component: gallery lightbox (GLightbox skin) === */
.glightbox-clean .gslide-title { font-family: var(--font-body); }

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

/* === Page: / (home) === */
.story { border-top: 1px solid var(--color-border); }
.app-band { background: var(--color-bg-alt); }
.app-band .split__body { padding-top: 48px; }
@media (max-width: 767px) {
  .app-band .split__body { padding-top: 0; }
}

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