/*
 * site.css: the only stylesheet for nisastaincliffe.co.uk (Nisa Local Staincliffe).
 *
 * 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 menu collapses to the burger at ≤ 1024px; columns stack at ≤ 767px.
 *   The header is sticky from 768px up only (as the original).
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.card--wide) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's Elementor kit and computed styles) */
  --color-text: #000000;
  --color-bg: #ffffff;
  --color-accent: #15d4ff;          /* cyan: nav underline, badges, card captions, mobile menu text */
  --color-header: #6c6c6c;          /* header bar, mobile dropdown, hero shape dividers */
  --color-toggle: #3a3a3a;          /* burger button */
  --color-menu-hover: #4e4e4e;      /* mobile menu item text on hover */
  --color-footer: #959492;
  --color-button-border: #868686;
  --color-white: #ffffff;

  /* Typography (Poppins everywhere; Elementor kit: headings 48/700, text 16) */
  --font-body: "Poppins", sans-serif;
  --text-base: 16px;
  --text-h2: 48px;
  --text-h3: 24px;
  --text-big-button: 36px;

  /* Spacing and shape */
  --container: 1440px;
  --container-footer: 1280px;
  --gutter: 30px;                   /* section side padding */
  --section-gap: 120px;
  --radius-button: 19px;
  --radius-card: 75px;

  /* Motion (match the original's timings) */
  --duration: 300ms;
  --duration-card-zoom: 1500ms;
  --ease: ease;
}

/* ============ 2. Fonts ============ */
/* Poppins (Google Fonts, OFL), self-hosted latin subset: 200 (copyright line), 400, 700. */
@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-400.woff2") format("woff2"); font-weight: 400; 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; }

/* ============ 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: var(--text-base); line-height: normal; color: var(--color-text); background: var(--color-bg); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1; text-transform: capitalize; }
p { margin: 16px 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.page-title { display: none; } /* the original theme printed "Home Page" as an H1 and hid it */

/* ============ 4. Layout ============ */
.section { padding-inline: var(--gutter); }
.container { max-width: var(--container); margin-inline: auto; }
/* Rows of equal columns (Elementor inner sections). Stack on mobile. */
.columns { display: flex; }
.columns > * { flex: 1 1 0; min-width: 0; }
@media (max-width: 767px) {
  .columns { flex-direction: column; }
}

/* ============ 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: button ===
 * White pill with grey border (Order Now, Download, View What's In Store). */
.button { display: inline-block; padding: 12px 24px; font-family: var(--font-body); font-size: var(--text-base); font-weight: 700; line-height: 1; text-transform: capitalize; color: #000; background: var(--color-white); border: 3px solid var(--color-button-border); border-radius: var(--radius-button); text-align: center; }
.button--big { font-size: var(--text-big-button); }
@media (max-width: 767px) {
  .button--big { font-size: var(--text-base); }
}

/* === Component: section-heading === */
.section-heading { font-size: var(--text-h2); text-align: center; }

/* === Component: site-header ===
 * Grey bar: logo | anchor menu | Order Now. Sticky from 768px up; burger menu at ≤ 1024px. */
.site-header { position: relative; z-index: 50; background: var(--color-header); padding: 25px var(--gutter); }
.site-header__inner { display: flex; align-items: center; max-width: var(--container); margin-inline: auto; }
.site-header__logo { width: 25.346%; }
.site-header__logo img { width: 23%; filter: brightness(1.01) contrast(2) saturate(0); }
.site-header__nav { width: 49.596%; }
.site-header__cta { width: 24.722%; text-align: right; }
@media (min-width: 768px) {
  .site-header { position: sticky; top: 0; }
}

/* Desktop menu: white bold items with a cyan underline on hover and on the section in view */
.site-nav__list { display: flex; justify-content: center; list-style: none; margin: 0; padding: 0; }
.site-nav a { position: relative; display: block; padding: 13px 20px; font-weight: 700; line-height: 20px; text-transform: capitalize; color: var(--color-white); }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--color-accent); opacity: 0; transition: opacity var(--duration) var(--ease); }
.site-nav a:hover::after, .site-nav a:focus-visible::after, .site-nav a.is-active::after { opacity: 1; }

/* Burger */
.nav-toggle { display: none; align-items: center; justify-content: center; width: 45px; height: 45px; margin: 0 auto; padding: 7.5px; border: 0; border-radius: 3px; background: var(--color-toggle); color: var(--color-accent); cursor: pointer; }
.nav-toggle:hover, .nav-toggle:focus-visible { color: var(--color-menu-hover); }
.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) {
  .nav-toggle { display: flex; }
  /* Dropdown: full width of the header, just under the burger (top: auto keeps its in-flow position),
     sliding open with a grid 0fr -> 1fr row (as the original's 0.3s max-height). */
  .site-nav { position: absolute; left: 0; right: 0; top: auto; margin-top: 10px; display: grid; grid-template-rows: 0fr; align-items: stretch; background: var(--color-header); transition: grid-template-rows var(--duration) var(--ease); }
  .site-nav.is-open { grid-template-rows: 1fr; }
  .site-nav.is-instant { transition: none; }
  .site-nav__clip { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s linear var(--duration); }
  .site-nav.is-open .site-nav__clip { visibility: visible; transition-delay: 0s; }
  .site-nav__list { flex-direction: column; }
  .site-nav a { padding: 10px 20px; text-align: center; color: var(--color-accent); }
  .site-nav a::after { display: none; }
  .site-nav a:hover, .site-nav a:focus-visible { background: var(--color-accent); color: var(--color-menu-hover); }
  .site-header__logo img { width: 56px; }
}
@media (max-width: 767px) {
  .site-header__inner { flex-direction: column; }
  .site-header__logo, .site-header__nav, .site-header__cta { width: 100%; text-align: center; }
  .site-header__logo img { width: 72px; margin: 0 auto 17px; }
  .site-header__nav { margin-bottom: 17px; }
  .site-header__cta { margin-top: 17px; }
}

/* === Component: hero ===
 * Full-height photo with a dark overlay, grey tilted shape dividers top and bottom, logo roundel + button. */
.hero { position: relative; display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 0 var(--gutter); background-position: 0 0; background-size: auto; overflow: hidden; text-align: center; } /* photo at natural size from the top left, as the original */
@media (max-width: 767px) {
  .hero { background-position: center center; }
}
.hero::before { content: ""; position: absolute; inset: 0; background: #000; opacity: 0.81; }
.hero__content { position: relative; z-index: 2; }
.hero__logo { width: 283px; margin: 0 auto 50px; filter: brightness(1.09) saturate(2); }

/* === Component: shape-divider (Elementor "opacity tilt") === */
.shape-divider { position: absolute; left: 0; width: 100%; overflow: hidden; line-height: 0; direction: ltr; z-index: 1; pointer-events: none; }
.shape-divider svg { display: block; position: relative; left: 50%; transform: translateX(-50%); }
.shape-divider path { fill: var(--color-header); }
.shape-divider--top { top: -1px; }
.shape-divider--top svg { width: calc(200% + 1.3px); height: 153px; }
.shape-divider--bottom { bottom: -1px; transform: rotate(180deg); }
.shape-divider--bottom svg { width: calc(197% + 1.3px); height: 264px; transform: translateX(-50%) rotateY(180deg); }

/* === Component: deals ===
 * Three offer photos with a cyan badge sticker overlapping the top-right corner. */
.deals { margin-block: var(--section-gap); }
.deals .section-heading { margin-bottom: 72px; }
.deal { position: relative; padding: 10px; }
.deal__image { margin: 0 auto; }
/* Badge: natural size (176px) but never wider than the space right of its offset (as the original's shrink-to-fit). */
.deal__badge { position: absolute; top: -51px; left: 303px; width: min(176px, calc(100% - 303px)); }
@media (max-width: 1024px) {
  .deal__badge { top: -10px; left: 137px; width: min(176px, calc(100% - 137px)); }
}
@media (max-width: 767px) {
  .deal__badge { top: -26px; left: 189px; width: min(176px, calc(100% - 189px)); }
}

/* === Component: category-card ===
 * Browse cards: rounded photo with a cyan caption band; the photo zooms in slowly on hover. Not links. */
.browse { margin-block: var(--section-gap); }
.browse .section-heading { margin-bottom: 72px; }
.browse__grid { padding: 30px; }
.browse__col { padding: 10px; }
.browse__col > .category-card + .category-card { margin-top: 50px; }
.browse__more { margin-top: 50px; text-align: center; }
.category-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-card); isolation: isolate; }
.category-card__media { position: relative; min-height: 292px; overflow: hidden; }
.category-card__bg { position: absolute; inset: 0; background: center / cover no-repeat; transition: transform var(--duration-card-zoom) var(--ease); }
.category-card:hover .category-card__bg { transform: scale(1.2); }
.category-card__caption { display: flex; align-items: center; justify-content: center; min-height: 100px; padding: 35px; background: var(--color-accent); text-align: center; }
.category-card__title { font-size: 24px; line-height: 35px; color: #000; }
@media (max-width: 1024px) {
  .category-card__media { min-height: 145px; }
  .category-card__title { font-size: 16px; line-height: 25px; }
}
@media (max-width: 767px) {
  .browse .section-heading { margin-bottom: 36px; }
  .browse__more { margin-top: 67px; }
}

/* === Component: app-promo ===
 * "Download our app" band: grey tilted background image, text left, phone mockup right. */
.app-promo { padding: 120px var(--gutter); background: center / cover no-repeat; }
.app-promo__row { align-items: center; }
.app-promo__text { flex: 0 0 59.929%; }
.app-promo__media { flex: 0 0 40.037%; }
.app-promo__title { font-size: var(--text-h2); margin-bottom: 24px; }
.app-promo__subtitle { font-size: var(--text-h3); }
.app-promo__mockup { margin: 0 auto; }
@media (max-width: 767px) {
  .app-promo__text, .app-promo__media { flex-basis: auto; }
}

/* === Component: map === */
.map { display: block; width: 100%; height: 300px; border: 0; }

/* === Component: site-footer === */
.site-footer { background: var(--color-footer); padding: 120px var(--gutter); }
.site-footer__inner { max-width: var(--container-footer); margin-inline: auto; padding: 10px; }
.site-footer__col { padding: 10px; }
.site-footer__heading { font-size: var(--text-h3); line-height: 1; margin-bottom: 10px; }
.site-footer__heading--wide { margin-bottom: 20px; }
.site-footer__heading--badges { margin-bottom: 19px; }
.site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__links li { line-height: 16px; }
.site-footer__links li + li { margin-top: 20px; }
.site-footer__links a { display: inline-block; line-height: 1; }
.site-footer__text { display: flow-root; } /* keeps the 10px heading gap and the 16px paragraph margins separate, as the original */
.site-footer__badges { display: inline-block; }
.site-footer__divider { width: 90%; margin: 40px 0 15px; border: 0; border-top: 1px solid #000; }
.site-footer__copyright { margin: 0; font-size: 16px; font-weight: 200; line-height: 1; text-transform: capitalize; }
.site-footer__copyright strong { font-weight: 400; }
@media (max-width: 1024px) {
  .site-footer__heading { font-size: 16px; }
  .site-footer__heading--badges { margin-bottom: 25px; }
  .site-footer__divider { margin-inline: auto; }
  .site-footer__copyright { font-size: 24px; }
}

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

/* === Page: /404.html === */
.not-found { margin-block: var(--section-gap); text-align: center; }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; list-style: none; margin: 32px 0 0; padding: 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; }
}
