/*
 * site.css: the only stylesheet for diplockscafe.co.uk.
 *
 * 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        container, sections
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (Elementor defaults on the original; media queries can't use custom properties):
 *   mobile  ≤ 767px    tablet 768px–1024px    desktop ≥ 1025px
 *   The burger menu, centred hero and smaller headings apply ≤ 1024px; columns stack ≤ 767px.
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.button--outline) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (Elementor kit globals on the original) */
  --color-primary: #13d22c;      /* kit primary: header, sections, buttons, headings */
  --color-white: #ffffff;        /* kit secondary + text */
  --color-text: #ffffff;
  --shadow-logo: 0 0 20px 0 rgb(0 0 0 / 0.22);

  /* Typography */
  --font-display: "Bayon", sans-serif;   /* headings, nav, buttons */
  --font-body: "Inter", sans-serif;      /* paragraphs */
  --font-accent: "Satoshi", sans-serif;  /* footer */
  --text-hero: 85px;
  --text-h2: 60px;
  --text-nav: 27px;
  --text-button: 20px;
  --text-body: 20px;
  --text-footer: 20px;

  /* Layout */
  --container: 1280px;
  --gutter: 10px;
  --header-h: 136px;           /* sticky header height (used for anchor offsets) */
  --hero-pull: -138px;         /* the hero slides up under the header, as on the original */
  --radius-button: 6px;

  /* Motion */
  --duration: 300ms;
  --ease: ease;
}
@media (max-width: 1024px) {
  :root { --text-hero: 65px; --text-h2: 40px; --text-body: 16px; --header-h: 101px; }
}
@media (max-width: 767px) {
  :root { --header-h: 87px; }
}

/* ============ 2. Fonts ============ */
/* Bayon and Inter: Google Fonts (OFL), latin subset, self-hosted. Inter is one variable file. */
@font-face { font-family: "Bayon"; src: url("/assets/fonts/bayon-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Satoshi: Fontshare, ITF Free Font License (free for commercial use). Kept at its original uploads URL.
   Declared as a single normal weight, exactly as the original Elementor custom font, so it renders the same. */
@font-face { font-family: "Satoshi"; src: url("/wp-content/uploads/2023/10/Satoshi-Variable.ttf") format("truetype"); font-weight: normal; 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-h); }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: normal; color: var(--color-text); background: var(--color-white); overflow-x: clip; }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ============ 4. Layout ============ */
/* Elementor boxed container: 1280px content; side padding comes from each section. */
.container { width: 100%; max-width: var(--container); margin-inline: auto; }

/* ============ 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; }
.skip-link:focus { left: 16px; }

/* === Component: site-header (green sticky bar: overhanging round logo, anchor nav, social icons) === */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--color-primary); }
.site-header__inner { position: relative; display: flex; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding: 10px var(--gutter); }
.site-header__brand { flex: 0 0 20%; display: flex; justify-content: center; align-items: flex-start; margin-bottom: -55px; padding: 10px; }
.site-header__logo { display: block; width: 64%; text-align: center; }
.site-header__logo img { width: 100%; border-radius: 100px; box-shadow: var(--shadow-logo); }
.site-header__nav { flex: 0 0 50%; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; }
.site-header__social { flex: 0 0 20%; display: flex; justify-content: flex-end; align-items: flex-end; padding: 10px; }
.site-nav__list { display: flex; flex-wrap: wrap; }
.site-nav__list a { display: block; padding: 13px 8px; font-family: var(--font-display); font-size: var(--text-nav); line-height: 20px; color: var(--color-white); }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 33px; height: 33px; margin: 0 auto; padding: 5.5px; border: 0; border-radius: 3px; background: var(--color-primary); color: var(--color-white); font-size: 22px; cursor: pointer; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] { background: var(--color-white); color: var(--color-primary); }
.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__brand { padding: 10px; }
  .site-header__nav { flex-basis: 60%; align-items: center; }
  .nav-toggle { display: inline-flex; position: relative; }
  .nav-toggle::after { content: ""; position: absolute; inset: -6px; } /* 44px tap target */
  .site-nav { position: absolute; left: 0; right: 0; top: calc(100% - 10px); display: grid; grid-template-rows: 0fr; align-items: stretch; visibility: hidden; background: var(--color-primary); 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; }
  .site-nav__list a { display: flex; justify-content: center; padding: 10px 20px; }
  .site-nav__list a:hover, .site-nav__list a:focus-visible { background: var(--color-white); color: var(--color-primary); }
}
@media (max-width: 767px) {
  .site-header__brand { flex-basis: 50%; margin-bottom: 0; padding: 0; }
  .site-header__logo { width: 38%; }
  .site-header__nav { flex-basis: 50%; }
  .site-header__social { display: none; }
}

/* === Component: social-icons (round white buttons, green brand icon) === */
.social-icons { display: flex; flex-wrap: wrap; gap: 11px; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 2em; height: 2em; border-radius: 30px; background: var(--color-white); color: var(--color-primary); font-size: 20px; transition: opacity var(--duration) var(--ease); }
.social-icon:hover { opacity: 0.9; }
@media (max-width: 1024px) {
  .site-header .social-icon { font-size: 17px; }
}

/* === Component: button (green; .button--outline is white with a green border) === */
.button { display: inline-block; padding: 10px 25px; border-radius: var(--radius-button); background: var(--color-primary); color: var(--color-white); font-family: var(--font-display); font-size: var(--text-button); font-weight: 400; line-height: 1; text-align: center; transition: all var(--duration) var(--ease); }
.button--outline { border: 2px solid var(--color-primary); background: var(--color-white); color: var(--color-primary); }
.button-row { display: flex; flex-wrap: wrap; gap: 20px; padding: 10px; }
.button-row--center { justify-content: center; }
@media (max-width: 1024px) {
  .button-row--hero { justify-content: center; gap: 10px; }
}

/* === Component: section-title (Bayon heading) === */
.section-title { font-family: var(--font-display); font-size: var(--text-h2); line-height: 1; color: var(--color-primary); }
.section-title--white { color: var(--color-white); }

/* === Component: hero (full-height background image, slides up under the sticky header) === */
.hero { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; margin-top: var(--hero-pull); padding-inline: var(--gutter); background: #333 url("/wp-content/uploads/2023/10/Landing-Page-Diplocks.png") center center / cover no-repeat; }
.hero__inner { width: 100%; max-width: var(--container); margin-inline: auto; padding: 10px; }
.hero__title { font-family: var(--font-display); font-size: var(--text-hero); line-height: 1; color: var(--color-white); }
@media (max-width: 1024px) {
  .hero__title { text-align: center; }
}

/* === Component: about (green band: text left, tilted image right) === */
.about { padding: 60px 0; background: var(--color-primary); }
.about__row { display: flex; padding: 10px; }
.about__text { flex: 1 1 0; padding: 10px; min-width: 0; }
.about__text p { margin: 1em 0; font-family: var(--font-body); font-size: var(--text-body); color: var(--color-white); }
.about__text p:last-child { margin-bottom: calc(1em + 10px); }
.about__media { flex: 1 1 0; display: flex; justify-content: center; align-items: flex-start; padding: 10px; min-width: 0; }
.about__media img { transform: rotate(4.34deg); }
@media (max-width: 1024px) {
  .about { padding-inline: 30px; }
}
@media (max-width: 767px) {
  .about__row { flex-direction: column; }
  .about__text .section-title { text-align: center; }
}

/* === Component: menu-carousel ("Our Menu": heading on a green rule, round photo carousel, buttons) === */
.menu-section { padding: 60px 0; }
.menu-section__head { padding: 10px; border-bottom: 3px solid var(--color-primary); }
.menu-section__head .section-title { padding: 10px; text-align: center; font-size: 60px; } /* stays 60px on tablets, as on the original */
.menu-section__body { padding: 20px; }
.menu-carousel { position: relative; margin-top: 50px; margin-bottom: 50px; padding-bottom: 4px; } /* Elementor's carousel box is 4px taller than the photos */
.menu-carousel .swiper { overflow: hidden; }
.menu-carousel .swiper-slide { display: flex; justify-content: center; }
.menu-carousel__img { width: 247px; height: 247px; max-width: 100%; border: 5px solid var(--color-primary); border-radius: 133px; object-fit: cover; }
.menu-carousel__arrow { position: absolute; top: 50%; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; margin-top: -12.5px; padding: 0; border: 0; background: none; color: var(--color-primary); font-size: 25px; cursor: pointer; }
.menu-carousel__arrow::after { content: ""; position: absolute; inset: -10px; } /* 44px tap target */
.menu-carousel__arrow--prev { left: 10px; }
.menu-carousel__arrow--next { right: 10px; }
/* Without JS: the photos sit in a row that scrolls sideways. */
.menu-carousel .swiper:not(.swiper-initialized) .swiper-wrapper { display: flex; overflow-x: auto; }
.menu-carousel .swiper:not(.swiper-initialized) .swiper-slide { flex: 0 0 25%; }
@media (max-width: 767px) {
  .menu-section__head .section-title { font-size: 40px; }
}
@media (max-width: 1023px) { /* the original carousel switches to 4 per view from 1024px */
  .menu-carousel .swiper:not(.swiper-initialized) .swiper-slide { flex-basis: 100%; }
}

/* === Component: app-promo (background photo: text / phone mock-up / store badges) === */
.app-promo { padding: 60px 0; background: #333 url("/wp-content/uploads/2023/09/app_bg.png") center center / cover no-repeat; }
.app-promo__row { display: flex; }
.app-promo__col { display: flex; flex-direction: column; justify-content: center; padding: 10px; min-width: 0; }
.app-promo__col--text, .app-promo__col--stores { flex: 0 0 25%; }
.app-promo__col--phone { flex: 0 0 50%; align-items: center; }
.app-promo__text { margin: 1em 0; font-size: var(--text-body); text-transform: capitalize; color: var(--color-white); }
.app-promo__rule { margin: 0; padding-block: 15px; border: 0; }
.app-promo__rule::before { content: ""; display: block; border-top: 1px solid var(--color-primary); }
.app-promo__stores img { width: 100%; max-width: 310px; }
@media (max-width: 1024px) {
  .app-promo { padding-inline: 30px; }
  .app-promo__col--text, .app-promo__col--stores { flex-basis: 30%; }
  .app-promo__col--phone { flex-basis: 40%; }
}
@media (max-width: 767px) {
  .app-promo__row { flex-direction: column; }
  .app-promo__col { flex-basis: auto; }
  .app-promo__col--text .section-title, .app-promo__col--stores .section-title { text-align: center; }
  .app-promo__col--stores { padding-top: 10px; }
}

/* === Component: map (green-framed map over a full-width green rule) === */
.find-us { position: relative; padding: 75px var(--gutter) 0; }
.find-us::before { content: ""; position: absolute; top: 185px; left: var(--gutter); right: var(--gutter); border-top: 3px solid var(--color-primary); }
.find-us__frame { position: relative; max-width: var(--container); margin-inline: auto; border: 3px solid var(--color-primary); border-bottom: 0; border-radius: 30px 30px 0 0; overflow: hidden; }
.map { display: block; width: 100%; height: 300px; border: 0; }
@media (max-width: 1024px) {
  .find-us { padding: 55px 60px 0; }
  .find-us::before { top: 175px; left: 0; right: 0; }
}
@media (max-width: 767px) {
  .find-us { padding-inline: 30px; }
}

/* === Component: site-footer (green, four columns: links, address/contact, reviews/hours, social/credit) === */
.site-footer { padding: 60px 0; background: var(--color-primary); color: var(--color-white); }
.site-footer__cols { display: flex; }
.footer-col { flex: 0 0 25%; display: flex; flex-direction: column; padding: 10px; min-width: 0; font-family: var(--font-accent); font-size: var(--text-footer); }
.footer-col__title { margin-bottom: 10px; font-family: var(--font-accent); font-size: 20px; font-weight: 600; line-height: 20px; color: var(--color-white); }
.footer-col__title--tight { margin-bottom: 0; }
.footer-list li { font-weight: 500; }
.footer-list--bold li { font-weight: 600; }
.footer-list + .footer-col__title { margin-top: 10px; }
.footer-gap-16 { margin-top: 16px; }
.footer-gap-50 { margin-top: 50px; }
.footer-col .social-icons { margin-bottom: 16px; }
@media (max-width: 1024px) {
  .site-footer { padding-inline: 30px; }
}
@media (max-width: 767px) {
  .site-footer__cols { flex-direction: column; }
  .footer-col { align-items: center; text-align: center; }
  .footer-col .social-icons { justify-content: center; gap: 22px; }
}

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

/* === Component: page-404 === */
.page-404 { padding: 120px 20px; text-align: center; }
.page-404__title { margin-bottom: 30px; }
.page-404 p { margin: 16px 0; font-size: var(--text-body); color: #333; }
.page-404 .button-row { justify-content: center; }

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

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