/*
 * site.css: the only stylesheet for jd-bakes.co.uk.
 *
 * 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, columns
 *   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 header menu collapses into the burger dropdown at <= 1024px (Elementor "tablet").
 *   The header is sticky from 768px up and static (stacked) on mobile, as on the original.
 *
 * Values come from the original's Elementor CSS (post-25.css) and computed styles.
 * 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 (Elementor values; the purples are semi-transparent on the original too) */
  --color-purple: #643897db;          /* buttons, About band, Download borders, headings */
  --color-purple-light: #89439edb;    /* header gradient top, footer, dropdown menu */
  --color-white: #ffffff;
  --color-nav: #fffcfc;               /* header menu links */
  --color-nav-active: #dadada;        /* header menu hover/current section */
  --color-hero-heading: #2c2c2c;
  --color-hero-box: #ffffff8a;
  --color-text: #000000;
  --color-arrow: rgb(238 238 238 / 0.9);
  --color-bg: #ffffff;

  /* Typography */
  --font-display: "Baloo 2", sans-serif;   /* headings, menu, buttons */
  --font-hero: "Barlow", sans-serif;       /* "Deliciously Crafted Cakes For" */
  --font-body: "Inter", sans-serif;        /* body copy, footer links */
  --font-footer: "Roboto", sans-serif;     /* footer headings and text */

  /* Spacing and shape (Elementor: 10px column padding, 20px between widgets) */
  --col-pad: 10px;
  --widget-gap: 20px;
  --radius-button: 3px;

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

/* ============ 2. Fonts ============ */
/* Google Fonts, self-hosted (latin subset). Baloo 2, Inter and Roboto are variable fonts. */
@font-face { font-family: "Baloo 2"; src: url("/assets/fonts/baloo2-latin-var.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/barlow-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@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; }
@font-face { font-family: "Roboto"; src: url("/assets/fonts/roboto-latin-var.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; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); overflow-x: hidden; }
main { flex: 1 0 auto; }  /* short pages (404) keep the footer at the bottom */
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; line-height: 1; }
p { margin: 20px 0; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-purple); outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* Elementor-style section > container > columns. Columns carry 10px padding. */
.container { width: 100%; max-width: 1140px; margin-inline: auto; display: flex; flex-wrap: wrap; }
.container--wide { max-width: 1440px; }
.container--footer { max-width: 1280px; }
.col { width: 100%; padding: var(--col-pad); display: flex; flex-direction: column; justify-content: center; }
.col--center { align-items: center; text-align: center; }
@media (min-width: 768px) {
  .col--half { width: 50%; }
}

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

/* === Component: site-header ===
 * Purple gradient bar: menu (left), logo hanging below the bar (centre), social icons (right).
 * >= 768px: sticky at the top (the original is Elementor Pro sticky with a spacer, so the
 * hero starts below it). <= 767px: static, stacked burger / logo / icons.
 */
.site-header { position: relative; z-index: 10; padding: 25px 30px; background-image: linear-gradient(180deg, var(--color-purple-light) 0%, var(--color-purple) 100%); }
.site-header__inner { max-width: 1440px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; }
.site-header__col { width: 100%; padding: var(--col-pad); }
.site-header__col--logo { align-self: flex-start; }
.site-header__logo img { display: block; width: 100%; max-width: 151px; margin: 0 auto; }
.site-header__social { display: flex; justify-content: center; gap: 10px; }
@media (min-width: 768px) {
  .site-header { position: sticky; top: 0; }
  .site-header__col--nav { width: 40.525%; }
  .site-header__col--logo { width: 18.236%; }
  .site-header__col--social { width: 40.876%; }
  .site-header__logo img { margin-bottom: -100px; }
  .site-header__social { justify-content: flex-end; gap: 5px; }
}

/* === Component: nav-toggle (burger, <= 1024px) === */
.nav-toggle { display: none; align-items: center; justify-content: center; margin: 0 auto; width: 33px; height: 33px; padding: 0; border: 0; border-radius: var(--radius-button); background: var(--color-white); color: var(--color-purple); 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; }

/* === Component: site-nav ===
 * Desktop: horizontal links, Baloo 2 600 20px, 30px apart; current section (scroll-spy) and
 * hover turn #dadada. <= 1024px: full-width dropdown under the burger that slides open.
 */
.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 30px; }
.site-nav a { display: block; padding: 13px 0; font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 20px; color: var(--color-nav); transition: color var(--duration-nav), background-color var(--duration-nav); }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.is-active { color: var(--color-nav-active); }
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: 87px; z-index: 20; background: var(--color-purple-light); transform: scaleY(0); transform-origin: top; visibility: hidden; transition: transform var(--duration) var(--ease), visibility var(--duration); }
  .site-nav.is-open { transform: scaleY(1); visibility: visible; }
  .site-nav__list { display: block; }
  .site-nav a { padding: 10px 20px; color: var(--color-white); }
  .site-nav a.is-active { color: var(--color-white); }
  .site-nav a:hover, .site-nav a:focus-visible { color: var(--color-purple); background: var(--color-white); }
}
@media (max-width: 767px) {
  .site-nav { top: 78px; }
}

/* === Component: social-icons (white circles, purple icon; the original links have no href) === */
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 50%; background: var(--color-white); color: var(--color-purple-light); }
.social-icon svg { width: 25px; height: 25px; fill: currentColor; }

/* === Component: button === */
.button { display: inline-block; padding: 12px 24px; border-radius: var(--radius-button); background: var(--color-purple); color: var(--color-white); font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1; text-align: center; transition: all var(--duration); }
.button-group { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 767px) {
  .button-group { flex-direction: column; align-items: center; gap: 0; }
}

/* === Component: section-heading (Baloo 2 headings) === */
.heading { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1; color: var(--color-white); }
.heading--purple { color: var(--color-purple); }
.text { font-family: var(--font-body); font-size: 20px; font-weight: 400; line-height: 31px; color: var(--color-white); display: flow-root; }
.text--narrow { width: 71.268%; margin-inline: auto; }
.stack > * + * { margin-top: var(--widget-gap); }
.stack > .text + * { margin-top: 0; }  /* Elementor: fixed-width text widgets have no bottom gap */

/* === Component: hero (full-height background with a translucent white box) === */
.hero { min-height: 100vh; padding: 0 30px; display: flex; align-items: center; background-position: center center; background-size: cover; }
.hero__box { width: 100%; padding: 50px 0; background: var(--color-hero-box); text-align: center; }
.hero__kicker { font-family: var(--font-hero); font-size: 40px; font-weight: 400; color: var(--color-hero-heading); }
.hero__title { font-family: var(--font-display); font-size: 80px; font-weight: 700; color: var(--color-purple); }
@media (max-width: 767px) {
  .hero__kicker { font-size: 27px; }
  .hero__title { font-size: 44px; }
}

/* === Component: band (About: purple band, round photo overlapping it on desktop) === */
.band { margin: 200px 0 120px; padding: 0 34px; background: var(--color-purple); }
.band__media { display: flex; justify-content: center; }
.band__media img { display: block; margin: -120px 0; }
@media (max-width: 1024px) {
  .band { padding: 50px 34px; }
  .band__media img { margin: 0; }
}

/* === Component: carousel-section (background image, centred heading/text/carousel/buttons) === */
.carousel-section { margin: 200px 0 120px; padding: 30px; background-position: center center; background-repeat: no-repeat; background-size: cover; }
.carousel-section .spacer { height: 10px; }

/* === Component: carousel (Swiper; library CSS in /assets/vendor/swiper-14.3.0/) ===
 * 1 slide < 767px, 2 at 767-1023px, 4 from 1024px; images stay at most 264px, centred.
 */
.carousel {
  width: 100%;
  --swiper-pagination-bullet-size: 6px; --swiper-pagination-bullet-horizontal-gap: 6px; --swiper-pagination-color: #000;
  --swiper-pagination-bullet-inactive-color: #000; --swiper-pagination-bullet-inactive-opacity: 0.2; --swiper-pagination-bottom: 5px;
  --swiper-navigation-size: 25px; --swiper-navigation-top-offset: calc(50% - 15px); --swiper-navigation-sides-offset: 10px; --swiper-navigation-color: var(--color-arrow);
}
.carousel .swiper { padding-bottom: 30px; }  /* dots sit below the slides */
.carousel .swiper-slide { text-align: center; }
.carousel .swiper-slide img { display: inline; width: 264px; height: auto; max-width: 100%; object-fit: initial; vertical-align: baseline; }
.carousel figure { margin: 0; }
.carousel .swiper-pagination { height: 18px; line-height: 18px; }
.carousel .swiper-pagination-bullet { vertical-align: middle; }
.carousel__arrow { padding: 0; border: 0; background: none; }
.carousel__arrow svg { width: 25px; height: 25px; fill: currentColor; }

/* === Component: app-download (purple top/bottom borders, phone mockup overlapping them) === */
.app-download { border-style: solid; border-width: 120px 0; border-color: var(--color-purple); }
.app-download__title { font-family: var(--font-display); font-size: 60px; font-weight: 600; line-height: 48px; color: var(--color-purple); }
.app-download__text { font-weight: 700; color: var(--color-text); }
.app-download__label { font-family: var(--font-body); font-size: 24px; font-weight: 600; line-height: 1; color: var(--color-purple); }
.app-download__badges img { display: block; }
.app-download__phone { margin: -120px 0; align-items: center; justify-content: flex-start; }
.app-download__phone img { display: block; }
@media (max-width: 1024px) {
  .app-download { padding: 30px 0; }
}
@media (max-width: 767px) {
  .app-download__phone { margin: 0; }
}

/* === Component: map (keyless Google Maps iframe, rounded top corners) === */
.map-section { margin: 120px 0 -9px; }
.map-section .container { overflow: hidden; border-radius: 50px 50px 0 0; }
.map { display: block; width: 100%; height: 300px; border: 0; }

/* === Component: site-footer (the original's "Contact" section: links, address, hours, icons, credit) === */
.site-footer { position: relative; padding: 60px 30px; background: var(--color-purple-light); color: var(--color-white); }
.site-footer__col { width: 100%; padding: var(--col-pad); }
.site-footer__heading { font-family: var(--font-footer); font-size: 24px; font-weight: 400; line-height: 1; color: var(--color-white); margin-bottom: var(--widget-gap); }
.site-footer__links { list-style: none; margin: 0; padding: 0; font-family: var(--font-body); font-size: 20px; }
.site-footer__links li + li { margin-top: 3px; }
.site-footer__links li:not(:last-child) { padding-bottom: 3px; }
.site-footer__text { font-family: var(--font-footer); font-size: 20px; }
.site-footer__text p { margin: 0; }
.site-footer__text--caps { text-transform: capitalize; }
.site-footer__social { display: flex; gap: 5px; margin-bottom: var(--widget-gap); }
.site-footer__small { font-family: var(--font-footer); font-size: 24px; font-weight: 400; line-height: 1; color: var(--color-white); }
.site-footer__small a { color: inherit; }
@media (min-width: 768px) {
  .site-footer__col--links { width: 25%; }
  .site-footer__col--address { width: 19.844%; }
  .site-footer__col--hours { width: 24.921%; }
  .site-footer__col--social { width: 30.235%; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .site-footer__col--links { width: 20%; }
  .site-footer__col--address { width: 40%; }
  .site-footer__col--hours { width: 20%; }
  .site-footer__col--social { width: 20%; }
}

/* === Component: not-found (404 page) === */
.not-found { padding: 120px 30px; text-align: center; }
.not-found .heading { margin-bottom: 20px; }
.not-found .text { color: var(--color-text); }
.not-found__links { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

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