/*
 * site.css: the only stylesheet for Shakes 'N' Cakes (shakesncakesaberdeen.co.uk).
 *
 * Sections, in order:
 *   1. Tokens        colours, fonts, spacing (custom properties)
 *   2. Fonts         @font-face for self-hosted Google Fonts
 *   3. Base          reset and element defaults
 *   4. Layout        container, sections, two-column rows
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         page-specific rules: "=== Page: <path> ==="
 *   7. Utilities
 *
 * Breakpoints (the original's Elementor breakpoints; media queries can't use custom properties):
 *   mobile  ≤ 767px    tablet 768px–1024px    desktop ≥ 1025px
 *
 * Values come from the original Elementor CSS (post-10.css, post-88.css) and computed styles.
 * Editing: change tokens to restyle the site; add modifier classes rather than changing a
 * component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours */
  --color-purple: #7659a6;        /* header, footer, buttons, headings, icons */
  --color-hero-purple: #780aaa;   /* hero overlay and hero buttons */
  --color-light: #f1f0f0;         /* section backgrounds, light heading on purple */
  --color-text: #333333;          /* theme body text */
  --color-text-dark: #2d2d2d;     /* paragraph text, order notes */
  --color-text-grey: #54595f;     /* location details */
  --color-title: #363636;         /* location names */
  --color-dropdown-active: #1d181f;
  --color-white: #ffffff;

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-text: "Roboto", sans-serif;       /* paragraphs, buttons, notes */
  --font-script: "Caveat Brush", sans-serif; /* section titles, hero buttons */
  --font-nav: "Orienta", sans-serif;       /* navigation */
  --font-detail: "Poppins", sans-serif;    /* location names, details, footer title */

  /* Layout */
  --container: 1100px;
  --container-header: 1140px;
  --container-footer: 1200px;
  --header-h: 48px;               /* sticky header height (desktop); updated per breakpoint */
  --section-pad: 110px;
  --shape-h: 180px;

  /* Motion */
  --duration: 300ms;
  --ease: ease;
}
@media (max-width: 1024px) { :root { --header-h: 90px; } }
@media (max-width: 767px) { :root { --header-h: 108px; --section-pad: 68px; } }

/* ============ 2. Fonts (Google Fonts, self-hosted, latin subset) ============ */
@font-face { font-family: "Caveat Brush"; src: url("/assets/fonts/caveat-brush-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Orienta"; src: url("/assets/fonts/orienta-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("/assets/fonts/roboto-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%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.5; color: var(--color-text); background: var(--color-white); -webkit-font-smoothing: antialiased; }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3 { margin: 0; line-height: 1; }
p { margin: 0 0 0.9rem; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-hero-purple); outline-offset: 2px; }
.site-header a:focus-visible, .site-header button:focus-visible, .site-footer a:focus-visible { outline-color: var(--color-white); }
[id] { scroll-margin-top: var(--header-h); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ============ 4. Layout ============ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; }
.section { position: relative; background: var(--color-light); padding: var(--section-pad) 16px; }
/* Two equal columns side by side from 768px; stacked on mobile.
   .split--reverse-mobile shows the second column first on mobile (Elementor "reverse columns"). */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.split > * { min-width: 0; }
@media (max-width: 767px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse-mobile > :first-child { order: 2; }
}

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

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

/* === Component: social-links (header and footer; round purple icons) === */
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--social-gap, 0px); list-style: none; margin: 0; padding: 0; }
.social-links__link { display: flex; align-items: center; justify-content: center; width: var(--social-box, 48px); height: var(--social-box, 48px); border-radius: 50%; background: var(--color-purple); color: var(--color-white); transition: background-color var(--duration) var(--ease); }
.social-links__link:hover { background: transparent; }
.social-links__link svg { width: var(--social-icon, 20px); height: var(--social-icon, 20px); fill: currentColor; }
.social-links--footer { --social-gap: 15px; }
@media (max-width: 1024px) {
  .social-links { --social-icon: 15px; --social-box: 45px; --social-gap: 10px; }
}
@media (max-width: 767px) { .social-links { --social-gap: 20px; } }

/* === Component: site-header (sticky purple bar: centred menu + social icons) === */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--color-purple); box-shadow: 0 0 10px rgb(0 0 0 / 0.5); padding: 0 16px; }
.site-header__inner { display: grid; grid-template-columns: 85.965% 14.035%; align-items: center; max-width: var(--container-header); margin-inline: auto; }
.site-nav__list { display: flex; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.site-nav__list a { display: flex; padding: 13px 16px; font-family: var(--font-nav); font-size: 16px; font-weight: 600; line-height: 20px; letter-spacing: 0.3px; text-transform: uppercase; color: var(--color-white); }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 100%; height: 33px; padding: 0; border: 0; border-radius: 3px; background: rgb(0 0 0 / 0.05); color: var(--color-white); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; fill: currentColor; }
.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: 767px) {
  .site-header__inner { grid-template-columns: 1fr; }
  .site-header__nav { margin: 10px; }
  .nav-toggle { display: flex; }
  /* Slide-down dropdown (grid 0fr → 1fr); align-items: stretch keeps the list clipped while it opens */
  .site-nav { display: grid; grid-template-rows: 0fr; align-items: stretch; margin-top: 10px; 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.is-instant { transition: none; }
  .site-nav__inner { overflow: hidden; min-height: 0; }
  .site-nav__list { display: block; }
  .site-nav__list a { justify-content: center; padding: 16px 20px; font-weight: 500; }
  .site-nav__list a:hover, .site-nav__list a:focus-visible, .site-nav__list a[aria-current="page"] { background: var(--color-dropdown-active); }
  .nav-open .site-header__nav { margin-bottom: 10px; }
}

/* === Component: site-footer (purple; "follow us", social icons, copyright + credit) === */
.site-footer { background: var(--color-purple); padding: 50px 0; color: var(--color-white); text-align: center; }
.site-footer__inner { max-width: var(--container-footer); margin-inline: auto; padding: 10px; }
.site-footer__title { padding-bottom: 20px; margin-bottom: 20px; font-family: var(--font-detail); font-size: 25px; font-weight: 600; line-height: 1; text-transform: uppercase; color: var(--color-white); }
.site-footer .social-links { margin-bottom: 20px; }
.site-footer__copyright { margin: 0 0 0.9rem; font-family: var(--font-text); font-size: 16px; line-height: 1.5; }
.site-footer__copyright a { color: inherit; }
@media (max-width: 1024px) { .site-footer__title { font-size: 20px; } }
@media (max-width: 767px) { .site-footer__copyright { font-size: 11px; } }

/* === Component: section-title (Caveat Brush heading) === */
.section-title { font-family: var(--font-script); font-size: 68px; font-weight: 600; line-height: 110px; letter-spacing: 1px; color: var(--color-purple); }
.section-title--light { color: var(--color-light); }
@media (max-width: 1024px) { .section-title { font-size: 42px; line-height: 68px; text-align: start; } }
@media (max-width: 767px) { .section-title { text-align: center; } }

/* === Component: lead-text (large Roboto paragraphs) === */
.lead-text { font-family: var(--font-text); font-size: 26px; line-height: 42px; color: var(--color-text-dark); }
.lead-text--light { color: var(--color-light); }
@media (max-width: 1024px) { .lead-text { font-size: 16px; line-height: 26px; } }
@media (max-width: 767px) { .lead-text { text-align: center; } }

/* === Component: button (pill, white border; grows on hover) === */
.button { display: inline-block; padding: 15px 30px; border: 3px solid var(--color-white); border-radius: 25px; background: var(--color-purple); color: var(--color-white); font-family: var(--font-text); font-size: 16px; font-weight: 500; line-height: 16px; text-align: center; cursor: pointer; transition: background-color var(--duration), color var(--duration), border-color var(--duration), transform var(--duration); }
.button:hover, .button:focus-visible { background: var(--color-white); color: var(--color-purple); transform: scale(1.1); }
.button--ghost { background: transparent; }
.button-row { margin: 0; }
@media (max-width: 767px) { .button-row { padding-top: 16px; text-align: center; } }

/* === Component: shape-divider (Elementor "mountains" wave at the top of a section) === */
.shape-divider { position: absolute; top: -1px; left: 0; width: 100%; height: var(--shape-h); overflow: hidden; line-height: 0; pointer-events: none; }
.shape-divider svg { display: block; width: calc(100% + 1.3px); height: 100%; max-width: none; fill: var(--color-white); }
.section > .container { position: relative; }

/* === Component: hero (background slideshow, purple overlay, logo, two buttons) === */
.hero { position: relative; display: flex; align-items: center; min-height: 100vh; overflow: hidden; background: var(--color-hero-purple); }
.hero__slides { position: absolute; inset: 0; z-index: 0; }
.hero__slides .swiper-slide { background-size: cover; background-position: center; }
.hero__slides .swiper-slide:not(:first-child) { visibility: hidden; }
.hero__slides.swiper-initialized .swiper-slide { visibility: visible; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--color-hero-purple); opacity: 0.65; }
.hero__content { position: relative; z-index: 2; width: 100%; text-align: center; }
.hero__logo { width: 768px; max-width: 100%; margin-inline: auto; }
.hero__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px; list-style: none; margin: 0; padding: 0; }
.hero__button { display: inline-block; padding: 15px 25px; border: 2px solid var(--color-white); border-radius: 20px; background: var(--color-hero-purple); color: var(--color-white); font-family: var(--font-script); font-size: 30px; font-weight: 600; line-height: 30px; }
@media (max-width: 767px) {
  .hero { min-height: 0; }
  .hero__buttons { flex-direction: column; align-items: center; padding: 20px; }
}

/* === Component: about (text column + gallery slider column) === */
.about__text { padding: 0; }
.about__media { padding: 49px 20px 20px; }
@media (max-width: 767px) { .about__text { padding: 26px 0; } }

/* === Component: gallery-slider (Swiper main image + thumbnail grid; GLightbox on click) === */
.gallery-slider { display: flex; align-items: flex-start; gap: 4px; }
.gallery-slider__main { width: 69%; min-width: 0; flex: none; margin: 0; }
.gallery-slider__main .swiper-slide { aspect-ratio: 3 / 2; }
.gallery-slider__main .swiper-slide a { display: block; height: 100%; }
.gallery-slider__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-slider__thumbs { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; list-style: none; margin: 0; padding: 0; }
.gallery-slider__thumbs button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.gallery-slider__thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
@media (max-width: 767px) {
  .gallery-slider { flex-direction: column; }
  .gallery-slider__main { width: 100%; }
  .gallery-slider__thumbs { width: 100%; grid-template-columns: repeat(6, 1fr); }
}

/* === Component: app-promo (tiled purple background with parallax, phone mockup) === */
.app-promo { position: relative; overflow: hidden; background: var(--color-purple); padding: var(--section-pad) 16px; }
.app-promo__bg { position: absolute; inset: -20% 0; background: var(--color-purple) url("/wp-content/uploads/2019/06/shakesncakes-background-tile.png") repeat; }
.app-promo > .container { position: relative; }
.app-promo__text { padding: 0; }
@media (max-width: 767px) { .app-promo__text { padding: 26px 0; } }

/* === Component: phone-mockup (CSS phone frame around a screenshot) === */
.phone-mockup { width: 100%; max-width: 200px; margin-inline: auto; }
.phone-mockup__frame { position: relative; aspect-ratio: 200 / 414; padding: 24.5% 4.6% 25%; border-radius: 13% / 6.3%; background: var(--color-text-dark); }
.phone-mockup__frame::before { content: ""; position: absolute; top: 5.8%; left: 50%; width: 17%; height: 0.8%; border-radius: 4px; background: #555; transform: translateX(-30%); box-shadow: -2.2em 0 0 -0.05em #555; }
.phone-mockup__frame::after { content: ""; position: absolute; bottom: 5.5%; left: 50%; width: 15%; aspect-ratio: 1; border-radius: 50%; background: #555; transform: translateX(-50%); }
.phone-mockup__screen { width: 100%; height: 100%; overflow: hidden; background: #000; }
.phone-mockup__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (max-width: 1024px) { .phone-mockup { max-width: 120px; } }

/* === Component: locations (title row + 2-column grid of location cards) === */
.locations { background: var(--color-light); padding: 50px 0 0; }
.locations__head { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.locations__head > * { padding: 10px; }
.locations__head .button-row { text-align: center; }
.locations__row { display: grid; grid-template-columns: 1fr 1fr; align-items: start; padding-bottom: 50px; }
.location { padding: 6px 16px 16px; }
@media (max-width: 767px) {
  .locations__head, .locations__row { grid-template-columns: 1fr; }
}

/* === Component: location-card (icon box, order note, icon list, map) === */
.location__title { display: flex; align-items: center; gap: 20px; padding: 16px 0; font-family: var(--font-detail); font-size: 18px; font-weight: 600; line-height: 2.6em; letter-spacing: 0.8px; text-transform: uppercase; color: var(--color-title); }
.location__title > span:last-child { margin-top: 8px; }
.location__icon { display: inline-flex; flex: none; padding: 16.5px; background: var(--color-purple); color: var(--color-white); }
.location__icon svg { width: 33px; height: 33px; fill: currentColor; }
.location__note { font-family: var(--font-text); font-size: 16px; font-weight: 700; line-height: 42px; text-align: center; color: var(--color-text-dark); }
.location__note a { color: inherit; }
.icon-list { list-style: none; margin: 0; padding: 0; }
.icon-list li { display: flex; align-items: center; }
.icon-list li + li { margin-top: 6px; }
.icon-list a { display: flex; align-items: center; color: inherit; }
.icon-list svg { flex: none; width: 25px; height: 20px; margin-right: 10px; fill: var(--color-purple); }
.icon-list__text { padding-left: 5px; font-family: var(--font-detail); font-size: 16px; line-height: 2.3em; color: var(--color-text-grey); }
.location .map { margin-top: 20px; }
.location--no-spacer .map { margin-top: 0; } /* the original had a 20px spacer above the map only in the first row */
@media (max-width: 1024px) {
  .location__title { font-size: 13px; letter-spacing: 0; }
  .location__icon { padding: 9px; }
  .location__icon svg { width: 18px; height: 18px; }
  .location__note { line-height: 26px; }
  .icon-list__text { font-size: 12px; line-height: 2.7em; }
}
@media (max-width: 767px) {
  .location__title { flex-direction: column; gap: 20px; padding: 20px 0 0; text-align: center; }
  .icon-list__text { font-size: 15px; line-height: 2.1em; }
}

/* === Component: map (keyless Google Maps iframe) === */
.map { display: block; width: 100%; height: 300px; border: 0; }

/* === Component: masonry-gallery (gallery page; GLightbox on click) ===
   site.js (masonry module) positions items into the shortest column; without JS, CSS columns. */
.masonry { --masonry-cols: 3; --masonry-gap: 24px; columns: var(--masonry-cols); column-gap: var(--masonry-gap); }
.masonry__item { break-inside: avoid; margin-bottom: var(--masonry-gap); }
.masonry.is-laid-out { position: relative; columns: auto; }
.masonry.is-laid-out .masonry__item { position: absolute; margin: 0; }
.masonry__item a { display: block; }
.masonry__item img { width: 100%; }
@media (max-width: 1024px) { .masonry { --masonry-cols: 2; } }
@media (max-width: 767px) { .masonry { --masonry-cols: 1; } }

/* === Component: lightbox (GLightbox styling to match the original's dark slideshow) === */
.glightbox-clean .gslide-description { background: transparent; }
.glightbox-clean .gslide-title { margin: 0; font-family: var(--font-body); font-size: 14px; font-weight: 400; color: #ffffff; text-align: center; }
.glightbox-clean .gdesc-inner { padding: 10px 0; }
.glightbox-mobile .glightbox-container .gslide-description { background: transparent; }

/* === Component: slider (Swiper; library CSS in /assets/vendor/swiper-14.3.0/) === */
.swiper { --swiper-theme-color: var(--color-purple); }

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

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

/* === Page: /gallery/ === */
.gallery-page__title { padding-bottom: 26px; }
@media (max-width: 767px) { .gallery-page > .container { padding: 26px 0; } }

/* === Page: /404.html === */
.not-found .section-title { line-height: 1.3; margin-bottom: 26px; }
.not-found__links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
@media (max-width: 767px) { .not-found__links { justify-content: center; } }

/* ============ 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; }
  .button:hover, .button:focus-visible { transform: none; }
}
