/*
 * site.css: the only stylesheet for sugar-rush.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
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (from the original Elementor CSS; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px (burger menu, sticky header)    desktop >= 1025px
 *   The original also had an Elementor "laptop" breakpoint at 1920px; the values built here are
 *   the ones it used up to 1920px (see SITE.md "Known differences" for wider screens).
 *
 * Values come from the original Elementor page CSS (post-13.css) and computed styles of the live page
 * (design-system/orig-measure.json). Absolute decorations (scribbles, arrows) keep the original px offsets.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours */
  --color-header: #259bd0;       /* header pill */
  --color-blue: #00a6e2;         /* blue buttons, "Tasty", wavy line, About border */
  --color-pink: #e4327e;         /* pink buttons, "Delicious", footer band, Contact Us */
  --color-navy: #222953;         /* headings, burger button */
  --color-sky: #6fd9ff;          /* product row background */
  --color-nav-hover: #ffc5de;    /* header link hover / active */
  --color-black: #000000;
  --color-white: #ffffff;
  --color-text: #333333;
  --color-muted: #7a7a7a;        /* contact card intro */
  --color-dropdown: #33373d;     /* mobile dropdown links */
  --color-dropdown-hover: #3f444b;
  --color-social: rgb(255 255 255 / 0.22);

  /* Typography */
  --font-display: "Yeseva One", Georgia, serif;
  --font-body: "Poppins", Arial, sans-serif;

  /* Layout */
  --container: 1280px;
  --section-pad: 30px;
  --col-pad: 10px;
  --radius-pill: 74px;
  --shadow-card: 0 0 10px 0 rgb(0 0 0 / 0.12);

  /* Motion */
  --duration: 300ms;
  --ease: ease;
}

/* ============ 2. Fonts ============ */
/* Self-hosted Google Fonts (latin subset). */
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-200.woff2") format("woff2"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Yeseva One"; src: url("/assets/fonts/yeseva-one-latin-400.woff2") format("woff2"); font-weight: 400; 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; overflow-x: hidden; font-family: var(--font-body); font-size: 1rem; line-height: 1.5; color: var(--color-text); background: var(--color-white); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1; }
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-navy); outline-offset: 2px; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ============ 4. Layout ============ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; }
@media (max-width: 1024px) { .container { max-width: 1024px; } }
@media (max-width: 767px) { .container { max-width: 767px; } }

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

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

/* === Component: button (Poppins 500 20px; colour modifiers) === */
.button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: 4px; background: var(--color-pink); color: var(--color-white); font-family: var(--font-body); font-size: 20px; font-weight: 500; line-height: 20px; text-align: center; cursor: pointer; transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; }
.button:hover { color: var(--color-white); }
.button--blue { background: var(--color-blue); }
.button--group { border-radius: 3px; }
/* Hero "Order Now": 40px Poppins 600, rounded 14px (20px on mobile) */
.button--hero { background: var(--color-blue); font-size: 40px; font-weight: 600; line-height: 40px; border-radius: 14px; transition: background-color var(--duration) var(--ease); }
@media (max-width: 767px) { .button--hero { font-size: 20px; line-height: 20px; } }

/* === Component: button-group (two buttons; wraps on narrow columns, centred on mobile) === */
.button-group { display: flex; flex-wrap: wrap; gap: var(--button-gap, 26px); margin: 0; padding: 0; list-style: none; }
.button-group--wide { --button-gap: 28px; }
@media (max-width: 1024px) {
  .button-group { --button-gap: 17px; }
  .button-group--wide { --button-gap: 13px; }
}
@media (max-width: 767px) { .button-group { justify-content: center; } }

/* === Component: site-header (blue pill; logo + 5 anchor links; burger <= 1024px; sticky only 768-1024px as on the original) === */
.site-header { position: relative; z-index: 10; margin-top: 15px; padding: 0 var(--section-pad); transition: background-color var(--duration) var(--ease); }
.site-header__bar { max-width: var(--container); margin-inline: auto; padding: var(--col-pad); border-radius: var(--radius-pill); background: var(--color-header); }
.site-header__inner { display: grid; grid-template-columns: 16.802% 1fr; align-items: center; padding: 0; }
.site-header__logo { display: block; padding: var(--col-pad); text-align: center; }
.site-header__logo img { display: inline-block; width: 69%; vertical-align: middle; }
.site-header__menu { position: relative; padding: var(--col-pad); }
.nav-toggle { display: none; }
.site-nav__list { display: flex; margin: 0; padding: 0; list-style: none; }
.site-nav__list li { flex: 1 1 auto; text-align: center; }
.site-nav a { display: block; padding: 13px 20px; font-family: var(--font-body); font-size: 16px; font-weight: 700; line-height: 20px; color: var(--color-white); }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.is-active { color: var(--color-nav-hover); }

@media (max-width: 1024px) {
  /* Sticky on tablet; once scrolled the whole bar turns blue (Elementor sticky + background opacity effect). */
  .site-header { position: sticky; top: 0; }
  .site-header.is-scrolled { background: var(--color-header); }
  /* Anchor targets stop below the sticky header (header height grows from 108px at 768 to 139px at 1024). */
  main [id] { scroll-margin-top: calc(108px + (100vw - 768px) * 0.121); }
  .site-header__inner { grid-template-columns: 16% 1fr; }
  .site-header__menu { display: flex; justify-content: center; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 8px; border: 0; border-radius: 3px; background: var(--color-navy); color: var(--color-pink); cursor: pointer; }
  .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; }
  /* Dropdown: white, full page width (site.js data-nav-stretch), 10px below the button, overlays the page.
   * Slides open with grid 0fr -> 1fr; align-items: stretch keeps the list clipped while it animates. */
  .site-nav { position: absolute; z-index: 9997; top: 100%; left: 0; width: 100%; display: grid; grid-template-rows: 0fr; align-items: stretch; background: var(--color-white); transition: grid-template-rows var(--duration) var(--ease); }
  .site-nav.is-open { grid-template-rows: 1fr; }
  .site-nav.is-instant { transition: none; }
  .site-nav__inner { overflow: hidden; min-height: 0; }
  .site-nav:not(.is-open) .site-nav__inner { visibility: hidden; transition: visibility 0s var(--duration); }
  .site-nav__list { flex-direction: column; }
  .site-nav__list li { text-align: left; }
  .site-nav a, .site-nav a.is-active { padding: 10px 20px; font-size: 13px; color: var(--color-dropdown); }
  .site-nav a:hover, .site-nav a:focus-visible { color: var(--color-white); background: var(--color-dropdown-hover); }
}
@media (max-width: 767px) {
  .site-header { position: relative; }
  .site-header.is-scrolled { background: none; }
  main [id] { scroll-margin-top: 0; }
  .site-header__inner { grid-template-columns: 1fr; }
  .site-header__logo img { width: 38%; }
}

/* === Component: section-title (Yeseva One display headings) === */
.section-title { font-family: var(--font-display); font-weight: 400; line-height: 1; }

/* === Component: wavy-divider (Elementor "curved" divider: 60% wide, 13.4px tall, 92.7px pattern) === */
.wavy-divider { display: block; width: 60%; height: 13.4px; margin-block: 2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 24 24' fill='none' stroke='%2300A6E2' stroke-width='6.5' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cpath d='M0,6c6,0,6,13,12,13S18,6,24,6'/%3E%3C/svg%3E") repeat-x 0 0 / 92.7px 100%; }

/* === Component: deco (absolutely placed decorative images; hidden <= 1024px as on the original) === */
.deco { position: absolute; z-index: 1; display: block; pointer-events: none; }
@media (max-width: 1024px) { .deco { display: none; } }

/* === Component: hero (stacked headline, wavy line, Order Now; waffle photo as background on desktop) === */
.hero { position: relative; z-index: 0; margin-top: -197px; padding: 60px var(--section-pad) 0; background: url("/wp-content/uploads/2023/06/heropng-1.png") no-repeat right center / contain; }
.hero__inner { display: flex; align-items: center; min-height: 100vh; max-width: var(--container); margin-inline: auto; }
.hero__content { position: relative; width: 56.741%; padding: 30px; }
.hero__line { font-family: var(--font-display); font-size: 69px; line-height: 1; }
.hero__line:nth-of-type(2) { font-size: 70px; }
.hero__line:nth-of-type(3), .hero__line:nth-of-type(4) { font-size: 71px; }
.hero__line--pink { color: var(--color-pink); }
.hero__line--navy { color: var(--color-navy); }
.hero__line--blue { color: var(--color-blue); }
.hero .button { margin-top: 77px; }
.hero__lines { left: 320px; top: -34px; width: 93px; height: 93px; }
.hero__arrow { left: 285px; top: 341px; width: 100px; }
@media (max-width: 1024px) {
  /* The original's tablet margin-top 0 was overridden by its 1920px rule, hiding "Delicious" under the header; restored here (decision d9). */
  .hero { margin-top: 0; background-image: none; }
  .hero__inner { min-height: 60vh; }
  .hero__content { width: 100%; text-align: center; }
  .wavy-divider { margin-inline: auto; }
}
@media (max-width: 767px) {
  .hero__line:nth-of-type(1) { font-size: 48px; }
  .hero__line:nth-of-type(2) { font-size: 57px; }
  .hero__line:nth-of-type(3) { font-size: 61px; }
  .hero__line:nth-of-type(4) { font-size: 42px; }
  .hero .button { margin-top: 30px; }
}

/* === Component: about ("Who are we?": blue-bordered box, two text columns, buttons, donut banner, scribbles) === */
.about { margin-top: 60px; padding: 50px var(--section-pad); border: 3px solid var(--color-blue); }
.about__inner { position: relative; padding: var(--col-pad); }
.about__title { padding-top: 20px; margin-bottom: 10px; font-size: 60px; color: var(--color-black); }
.about__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.about__col { padding: var(--col-pad); }
.about__text p { margin: 16px 0; font-size: 16px; line-height: 24px; color: var(--color-black); }
.about__text--light p { font-weight: 300; }
.about__banner { display: block; width: 100%; margin-top: 32px; }
.about__scribble--blue { left: 1135px; top: 245px; width: 183px; height: 183px; }
.about__scribble--pink { left: -21px; top: 414px; width: 165px; height: 165px; }
@media (max-width: 767px) {
  .about__title { font-size: 40px; }
  .about__cols { grid-template-columns: 1fr; }
}

/* === Component: product-row (light blue band: three products with View Menu) === */
.product-row { padding: 50px var(--section-pad); background: var(--color-sky); }
.product-row__inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: var(--col-pad); text-align: center; }
.product__title { width: 100%; font-size: 42px; color: var(--color-black); }
.product__image { display: block; margin-top: 25px; }
.product__image--waffle { width: 49%; }
.product__image--cookie { width: 32%; }
.product .button { margin-top: 25px; }
.product--waffle .button { margin-top: 28px; }
.product--cookie .button { margin-top: 35px; }
@media (max-width: 767px) { .product-row__inner { grid-template-columns: 1fr; } }

/* === Component: app-promo ("Download Our Mobile App": headings, text + buttons, phone, store badges) === */
.app-promo { margin: 120px 0; padding: 0 var(--section-pad); }
.app-promo__inner { position: relative; padding: var(--col-pad); }
.app-promo__title { font-size: 36px; text-align: center; color: var(--color-navy); }
.app-promo__tagline { display: grid; grid-template-columns: 56.507% 43.455%; margin-top: 25px; }
.app-promo__tagline > * { padding: var(--col-pad); }
.app-promo__lead { font-family: var(--font-body); font-size: 77px; font-weight: 200; line-height: 1; text-align: end; color: var(--color-pink); }
.app-promo__big { font-size: 77px; text-transform: capitalize; color: var(--color-navy); }
.app-promo__big--center { margin-top: 10px; text-align: center; }
.app-promo__row { display: flex; flex-wrap: wrap; margin-top: 75px; }
.app-promo__col { position: relative; padding: var(--col-pad); }
.app-promo__col--text { width: 35.475%; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.app-promo__col--phone { width: 30.513%; text-align: center; }
.app-promo__col--stores { width: 33.651%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.app-promo__text { width: 82.244%; border-block: 1px solid var(--color-black); font-size: 20px; line-height: 31px; color: var(--color-black); }
.app-promo__text p { margin: 20px 0; }
.app-promo__col--text .button-group { margin-top: 20px; }
.app-promo__phone { display: inline-block; vertical-align: middle; }
.app-promo__available { width: 82.244%; padding: 20px 0; border-block: 1px solid var(--color-text); font-family: var(--font-body); font-size: 24px; line-height: 24px; color: var(--color-navy); }
.app-promo__badges { display: block; margin-top: 20px; }
.app-promo__badges img { display: block; }
.app-promo__hand { left: -161px; top: 377px; width: 165px; height: 165px; }
.app-promo__arrow { left: 982px; top: 208px; width: 229px; }
.app-promo__arrow img { display: block; width: 78%; margin-inline: auto; transform: rotate(-22deg); }
@media (max-width: 1024px) {
  .app-promo__lead { font-size: 50px; }
  .app-promo__tagline > :last-child { display: flex; align-items: center; }
  .app-promo__big--small { font-size: 52px; }
  .app-promo__col--text { width: 54%; }
  .app-promo__col--phone { width: 32%; }
  .app-promo__text { width: 225.312px; font-size: 18px; }
}
@media (max-width: 767px) {
  .app-promo__inner { padding: 0; }
  .app-promo__tagline { grid-template-columns: 1fr; margin-top: 25px; }
  .app-promo__tagline > :first-child, .app-promo__tagline h2, .app-promo__big--center { display: none; }
  .app-promo__row { margin-top: 20px; }
  .app-promo__col { width: 100% !important; }
  .app-promo__col--text { align-items: stretch; }
  .app-promo__text { width: 100%; font-size: 14px; }
  .app-promo__phone { width: 61%; }
  .app-promo__col--stores { align-items: center; }
  .app-promo__available { width: 100%; max-width: 527px; text-align: center; }
}

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

/* === Component: site-footer (pink band; contact card overlapping the map; 3 columns; copyright bar) === */
.site-footer { padding: 80px 32px 64px; background: var(--color-pink); color: var(--color-white); }
.site-footer__inner { display: grid; grid-template-columns: 38.046% 61.954%; max-width: var(--container); margin-inline: auto; }
.site-footer__main { display: flex; flex-direction: column; justify-content: space-between; margin-left: 64px; }
.site-footer__cols { display: grid; grid-template-columns: 35.502% 40% 24.162%; }
.site-footer__heading { margin-bottom: 32px; font-family: var(--font-body); font-size: 24px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; }
.site-footer__text { font-size: 1.25rem; font-weight: 500; line-height: 1.8; letter-spacing: -0.02em; }
.site-footer__list { margin: 0; padding: 0; list-style: none; font-size: 1.25rem; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.site-footer__list li + li { margin-top: 20px; }
.site-footer__bar { margin: 51.2px 0 19.2px; font-size: 1.2rem; font-weight: 500; line-height: 1.8; letter-spacing: -0.02em; }
@media (max-width: 1024px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__main { margin: 64px 0 0; }
  .site-footer__cols { grid-template-columns: 32% 43% 25%; }
  .site-footer__bar { margin-top: 83.2px; }
}
@media (max-width: 767px) {
  .site-footer__cols { grid-template-columns: 1fr; }
  .site-footer__col:not(:last-child) { margin-bottom: 40px; }
  .site-footer__bar { margin-top: 59.2px; }
}

/* === Component: social-links (36px translucent circles, white icons) === */
.social-links { display: flex; gap: 5px; margin: 32px 0 0; padding: 0; list-style: none; }
.social-links__link { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--color-social); color: var(--color-white); }
.social-links .icon { width: 18px; height: 18px; fill: currentColor; }

/* === Component: contact-email (white card that held the Elementor Pro form; heading + intro only, decision d1) === */
.contact-email { position: relative; z-index: 1; align-self: start; margin-top: -240px; padding: 48px; border-radius: 16px; background: var(--color-white); box-shadow: var(--shadow-card); }
.contact-email__title { font-family: var(--font-body); font-size: 64px; font-weight: 700; line-height: 1; text-align: justify; color: var(--color-pink); }
.contact-email__intro { margin-top: 12px; font-family: var(--font-body); font-size: 1.3rem; font-weight: 400; line-height: 1; letter-spacing: -0.02em; color: var(--color-muted); }
@media (max-width: 1024px) { .contact-email { margin-top: -200px; padding: 32px; } }
@media (max-width: 767px) {
  .contact-email__title { font-size: 48px; }
  .contact-email__intro { font-size: 15px; line-height: 1.5; }
}

/* === Component: not-found (404 page body) === */
.not-found { padding: 120px var(--section-pad) 320px; text-align: center; }
.not-found__title { font-size: 60px; color: var(--color-navy); }
.not-found__text { margin: 24px auto 32px; max-width: 40em; font-size: 18px; color: var(--color-black); }
.not-found .button-group { justify-content: center; }
@media (max-width: 767px) { .not-found__title { font-size: 40px; } }

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