/*
 * site.css: the only stylesheet for planetpapadum.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, two-column rows
 *   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 header switches to the hamburger menu at ≤ 1024px (as the original).
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.dish-carousel--dark) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original Elementor kit: primary #512067, text #232323) */
  --color-primary: #512067;
  --color-primary-contrast: #ffffff;
  --color-text: #232323;
  --color-bg: #ffffff;
  --color-header-bg: rgb(81 32 103 / 0.98);
  --color-hero-overlay: #aaaaaa;

  /* Typography */
  --font-heading: "Josefin Sans", sans-serif;   /* headings, nav, buttons, dish titles */
  --font-body: "Libre Franklin", sans-serif;    /* text */
  --font-accent: "Roboto", sans-serif;          /* hero outline buttons */
  --text-base: 16px;
  --text-h2: 50.5px;          /* "About Us", "Dine In", "Takeaway" */
  --text-h2-small: 32px;      /* "Follow Us" */
  --leading: normal;

  /* Layout */
  --container: 1280px;
  --header-height: 86px;      /* desktop; 73px at ≤1024px */

  /* Motion (Elementor defaults) */
  --duration: 300ms;
  --ease: ease;
}
@media (max-width: 1024px) {
  :root { --header-height: 73px; }
}

/* ============ 2. Fonts ============ */
/* Self-hosted Google Fonts, latin subset (variable files: one file covers the weights listed). */
@font-face { font-family: "Josefin Sans"; src: url("/assets/fonts/josefin-sans-latin-400-600.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/assets/fonts/libre-franklin-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("/assets/fonts/roboto-latin-500.woff2") format("woff2"); font-weight: 500; 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: var(--leading); color: var(--color-text); background: var(--color-bg); overflow-x: clip; }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); margin: 0; }
p { margin: 16px 0; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease); }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ============ 4. Layout ============ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; }
.section-title { font-family: var(--font-heading); font-size: var(--text-h2); font-weight: 600; line-height: 1; text-transform: uppercase; color: var(--color-primary); text-align: center; }
.section-title--light { color: #fff; }
.section-title--small { font-size: var(--text-h2-small); }

/* Two equal columns ≥768px, stacked below (Elementor 50% containers with 10px padding) */
.split { display: flex; flex-wrap: wrap; }
.split > * { width: 100%; padding: 10px; display: flex; flex-direction: column; }
@media (min-width: 768px) {
  .split { flex-wrap: nowrap; }
  .split > * { width: 50%; }
}

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

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

/* === Component: site-header ===
 * Fixed bar over the page. Its purple background (.site-header__bg) starts at 23% opacity
 * and fades to full as the page scrolls (site.js "scrollfade", GSAP ScrollTrigger),
 * like the original Elementor motion effect. Anchor nav with a purple "pill" on the
 * current section (site.js "spy"). Hamburger + full-width dropdown at ≤1024px.
 */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 60; padding: 20px 10px; }
.site-header__bg { position: absolute; inset: 0; background: var(--color-header-bg); opacity: 0.23; pointer-events: none; }
.site-header__inner { position: relative; display: flex; flex-direction: column; align-items: stretch; }
.site-nav__list { display: flex; justify-content: center; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: flex; align-items: center; padding: 13px 20px; font-family: var(--font-heading); font-size: 16px; font-weight: 600; line-height: 20px; text-transform: uppercase; color: #fff; background-color: transparent; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.is-active { background-color: var(--color-primary); }
.nav-toggle { display: none; position: relative; margin: 0 auto; padding: 5.5px; width: 33px; height: 33px; border: 0; border-radius: 3px; background: var(--color-primary); color: #fff; cursor: pointer; align-items: center; justify-content: center; transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease); }
.nav-toggle::after { content: ""; position: absolute; inset: -6px; }  /* 45px tap target around the 33px button */
.nav-toggle svg { width: 22px; height: 22px; }
.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; }
.nav-toggle:hover, .nav-toggle:focus-visible { background: #fff; color: var(--color-primary); }
@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  /* Slide-down panel: grid row 0fr → 1fr; the nav stretches (not flex-start) so the list is clipped while it animates */
  .site-nav { display: grid; grid-template-rows: 0fr; position: absolute; top: 43px; left: -10px; right: -10px; background: var(--color-primary); transition: grid-template-rows var(--duration) var(--ease); align-items: stretch; }
  .site-nav.is-open { grid-template-rows: 1fr; }
  .site-nav.is-instant { transition: none; }
  .site-nav__list { flex-direction: column; overflow: hidden; min-height: 0; }
  .site-nav:not(.is-open) .site-nav__list { visibility: hidden; transition: visibility 0s var(--duration); }
  .site-nav a { justify-content: center; padding: 12px 20px; min-height: 44px; }
  .site-nav a.is-active { background-color: transparent; }  /* the original dropdown shows no current-section highlight */
  .site-nav a:hover, .site-nav a:focus-visible { background-color: #fff; color: var(--color-primary); }
}

/* === Component: outline-button (hero "View Menu" / "Order Now") === */
.outline-button { display: inline-block; padding: 12px 24px; border: 1px solid #fff; font-family: var(--font-accent); font-size: 15px; font-weight: 500; line-height: 1; text-transform: uppercase; color: #fff; background-color: transparent; text-align: center; transition: all var(--duration) var(--ease); }
.outline-button:hover, .outline-button:focus-visible { background-color: #fff; color: var(--color-primary); border-color: #fff; }

/* === Component: arrow-link ("Order Now" + long arrow; light on purple, purple on white) === */
.arrow-link { display: inline-flex; align-items: center; padding-left: 5px; font-family: var(--font-heading); font-size: 16px; font-weight: 600; line-height: 25px; text-transform: uppercase; color: var(--color-primary); }
.arrow-link svg { width: 25px; height: auto; margin-left: 7px; fill: currentColor; }
.arrow-link--light { color: #fff; }

/* === Component: hero === */
.hero { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 100vh; background: url("/wp-content/uploads/2020/01/saffron3.jpg") center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--color-hero-overlay); opacity: 0.63; }
.hero > * { position: relative; }
.hero__logo { padding: 20px; }
.hero__logo img { margin-inline: auto; width: 678px; }
.hero__buttons { display: flex; gap: 17px; }
.hero__buttons > * { flex: 1 1 0; }
.hero__buttons > :first-child { text-align: right; }
.hero__enter { padding: 173px 10px 10px; text-align: center; }  /* 163px spacer + 10px container padding */
.hero__enter h2 { font-size: 20px; font-weight: 600; line-height: 1; text-transform: uppercase; }
.hero__enter a { color: #fff; }
.hero__line { display: flex; height: 70px; max-width: var(--container); margin-inline: auto; width: calc(100% - 160px); }
.hero__line::before { content: ""; width: 50%; border-right: 1px solid #fff; }
@media (max-width: 1024px) {
  .hero__logo img { width: 65%; }
  .hero__line { width: 100%; }
}
@media (max-width: 767px) {
  .hero { padding-top: 158px; }
  .hero__logo img { width: 78%; }
  .hero__buttons { flex-direction: column; align-items: center; }
  .hero__buttons > :first-child { text-align: center; }
  .hero__enter h2 { display: none; }
  .hero__line::before { border-right: 0; }
}

/* === Component: about (purple story section with overlapping photos) === */
.about { background: var(--color-primary); padding: 30px; color: #fff; }
.about .split { padding-block: 0; }
.about__text { justify-content: center; }
.about__text .section-title { margin-bottom: 16px; }
.about__text p { margin: 0 0 16px; }  /* flex column: margins don't collapse, so 16px once */
.about__text .section-title { text-align: left; }
.about__photos img:first-child { width: 60%; margin-left: auto; }
.about__photos img:last-child { width: 80%; margin-top: -70px; position: relative; }
@media (max-width: 1024px) {
  .about { padding: 60px; }
  .about__photos { justify-content: center; }
}
@media (max-width: 767px) {
  .about__text .section-title { text-align: center; }
}

/* === Component: band (plain colour or photo strip between sections) === */
.band { display: block; }
.band--purple { background: var(--color-primary); }
.band--photo { height: 372px; background: url("/wp-content/uploads/2023/10/Banner.png") center / cover no-repeat; }

/* === Component: dish-carousel (Swiper; library CSS in /assets/vendor/swiper-14.3.0/)
 * Dine In / Takeaway: image, title, text, "Order Now". 3 per view ≥768px, 1 below.
 * Arrows sit at the screen edges (desktop) or 10px in (≤1024px), like the original.
 */
.dish-section { position: relative; z-index: 10; }
.dish-section__title { margin-bottom: 28px; }
.dish-carousel { position: relative; }
.dish-carousel .swiper { margin-inline: -10px; }
.dish-carousel .swiper-slide { height: auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.dish-card__image img { width: 300px; max-width: 100%; }
.dish-card__title { margin-top: 20px; font-family: var(--font-heading); font-size: 16px; font-weight: 400; text-transform: uppercase; color: var(--color-primary); }
.dish-card__text { font-size: 16px; margin: 16px 0; }
.dish-card__button { display: inline-block; padding: 15px 30px; font-family: var(--font-heading); font-size: 16px; font-weight: 400; line-height: 1; text-transform: uppercase; color: var(--color-primary); background: #fff; }
.dish-carousel--dark .dish-card__title, .dish-carousel--dark .dish-card__text, .dish-carousel--dark .dish-card__button { color: #fff; }
.dish-carousel--dark .dish-card__button { background: transparent; }
.dish-carousel__arrow { position: absolute; top: 50%; z-index: 20; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-top: -18px; padding: 0; border: 0; border-radius: 18px; background: transparent; cursor: pointer; overflow: visible; }
.dish-carousel__arrow svg { flex: none; }
.dish-carousel__arrow--prev { left: -80px; }
.dish-carousel__arrow--next { right: -80px; }
@media (max-width: 1024px) {
  .dish-carousel { padding-inline: 60px; }
  .dish-carousel__arrow--prev { left: -20px; }
  .dish-carousel__arrow--next { right: -20px; }
}

/* === Component: app-promo === */
.app-promo { padding: 80px 0; background: url("/wp-content/uploads/2023/10/app_bg.png") center / cover no-repeat; }
.app-promo .split { padding-inline: 0; }
.app-promo__image img { width: 72%; margin-inline: auto; }
.app-promo__text { justify-content: center; }
.app-promo__text p { margin-bottom: 66px; }  /* 16px paragraph margin + 50px spacer */
@media (max-width: 1024px) {
  .app-promo { padding-inline: 0; }
}
@media (max-width: 767px) {
  .app-promo { padding: 60px 30px; }
}

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

/* === Component: site-footer ("Follow Us", contact row, copyright) === */
.site-footer { padding: 80px 0 70px; background: url("/wp-content/uploads/2023/10/footer_bg.png") center / cover no-repeat; color: #fff; }
.site-footer a { color: #fff; }
.social-icons { display: flex; justify-content: center; gap: 15px; margin: 10px 0 50px; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border: 1px solid #fff; border-radius: 30px; }
.social-icon svg { width: 27px; height: 27px; fill: #fff; }
.site-footer__contact { display: flex; border-block: 1px solid #fff; }
.site-footer__contact > *, .site-footer__bar > * { flex: 1 1 0; padding: 10px; }
.site-footer__contact p, .site-footer__bar p { margin: 16px 0; }
.site-footer__phone { text-align: center; }
.site-footer__email { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; }
.site-footer__bar { display: flex; }
.site-footer__bar > :last-child { text-align: right; }
@media (max-width: 1024px) {
  .site-footer { padding-inline: 30px; }
}
@media (max-width: 767px) {
  .site-footer__contact, .site-footer__bar { flex-direction: column; }
  .site-footer__bar > *, .site-footer__bar > :last-child { text-align: center; }
}

/* === Component: contact-email (kept for a future form; the original had none) === */
.contact-email { display: grid; gap: 16px; justify-items: start; }
.contact-email__address { font-weight: 600; word-break: break-word; }

/* === Component: page-404 === */
.page-404 { padding: calc(var(--header-height) + 80px) 30px 80px; background: var(--color-primary); color: #fff; text-align: center; }
.page-404 p { font-size: 18px; }
.page-404 .arrow-link { margin-top: 16px; }

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

/* === Page: / (section geometry copied from the original containers) ===
 * #dinein: purple band; #menu overlaps it by 154px so the dish images sit half on purple.
 * #takeaway overlaps the next purple band (.band--purple.band--after-takeaway) by 253px.
 */
.home-dinein-band { height: 300px; }
.home-menu { margin-top: -154px; padding: 0 0 102px; }
.home-takeaway { margin-bottom: -253px; padding: 10px; }
.home-takeaway .container { padding-block: 10px; }
.home-takeaway-band { height: 300px; position: relative; z-index: 0; }
@media (max-width: 1024px) {
  .home-dinein-band { height: 259px; }
  .home-menu { padding-inline: 30px; }
  .home-takeaway { margin-bottom: -302px; padding: 30px; }
  .home-takeaway .container { padding-block: 0; }
  .home-takeaway-band { height: 350px; }
}
@media (max-width: 767px) {
  .home-dinein-band { height: 272px; }
  .home-menu { margin-top: -171px; }
  .home-takeaway { margin-bottom: -366px; padding: 30px 30px 100px; }
  .home-takeaway-band { height: 290px; }
}
@media (min-width: 1025px) {
  .home-menu .container, .home-takeaway .container { width: calc(100% - 160px); }
}

/* ============ 7. Utilities ============ */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-center { text-align: center; }

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