/*
 * site.css: the only stylesheet for flameandstonepizza.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        containers, split (two-column) sections
 *   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 site; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.title--keep) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's computed styles) */
  --color-red: #d31e26;          /* brand red: hero, contact panel, kickers */
  --color-dark: #203032;         /* dark slate: about panel, menu cards, footer, body text on white */
  --color-white: #ffffff;
  --color-nav-hover: rgb(255 255 255 / 0.53); /* #FFFFFF87 on the original nav */
  --color-dropdown-text: #494c4f; /* Elementor Pro dropdown defaults */
  --color-dropdown-hover: #55595c;
  --color-bg: #ffffff;

  /* Typography */
  --font-body: "Lexend", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --text-kicker: 28px;            /* small heading above titles ("About us") */
  --text-title: 46px;             /* section titles; 36px on mobile */
  --text-title-mobile: 36px;
  --text-body: 20px;              /* paragraphs; 16px on mobile */
  --text-body-mobile: 16px;
  --text-nav: 18px;
  --leading: 1.6;

  /* Layout */
  --container: 1280px;            /* Elementor boxed width */
  --gutter: 10px;                 /* Elementor "default" column gap (each side) */
  --radius: 3px;

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

/* ============ 2. Fonts ============ */
/* Lexend (Google Fonts, OFL), self-hosted variable font; weights used: 400, 600. */
@font-face { font-family: "Lexend"; src: url("/assets/fonts/lexend-latin-variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lexend"; src: url("/assets/fonts/lexend-latin-ext-variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ============ 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: 16px; line-height: var(--leading); color: var(--color-dark); background: var(--color-bg); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-body); line-height: 1; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* Boxed container like Elementor's (1280px incl. 10px column gutters). */
.container { width: 100%; max-width: var(--container); margin-inline: auto; }

/* Split: two 50% columns, vertically centred; stacks below 1025px. */
.split { display: flex; align-items: center; }
.split__col { width: 50%; }
@media (max-width: 1024px) {
  .split { flex-wrap: wrap; }
  .split__col { width: 100%; }
}

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

/* === Component: site-header ===
 * Sits over the top of the hero (the original header lived inside the red hero section).
 * Logo column 17.143%, nav column the rest; burger + dropdown at <= 767px (Elementor "dropdown-mobile").
 */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--container) - 2 * var(--gutter)); margin-inline: auto; padding-top: 40px; }
.site-header__logo { flex: 0 0 17.143%; }
.site-header__logo img { width: 116px; }
.site-nav { flex: 1 1 auto; }
.site-nav__list { display: flex; flex-wrap: wrap; gap: 0 40px; list-style: none; margin: 0; padding: 0; }
.site-nav__list a { display: block; font-size: var(--text-nav); font-weight: 400; line-height: 20px; color: var(--color-white); white-space: nowrap; transition: color var(--duration-nav); }
.site-nav__list a:hover, .site-nav__list a:focus { color: var(--color-nav-hover); }
.nav-toggle { display: none; }
@media (max-width: 1024px) {
  .site-header__inner { width: 100%; max-width: none; padding-inline: 40px; }
  .site-nav { margin-left: 40px; }
}
@media (max-width: 767px) {
  .site-header__inner { flex-direction: column; align-items: stretch; }
  .site-header__logo { flex: none; align-self: center; margin-bottom: 20px; }
  .site-nav { margin-left: 0; }
  /* Burger: 33px square like Elementor's toggle; the ::after widens the tap target to 45px. */
  .nav-toggle { position: relative; display: flex; align-items: center; justify-content: center; width: 33px; height: 33px; margin: 0 auto; padding: 0; border: 0; border-radius: var(--radius); background: rgb(0 0 0 / 0.05); color: var(--color-white); cursor: pointer; }
  .nav-toggle::after { content: ""; position: absolute; inset: -6px; }
  .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; }
  /* Dropdown: full-width white panel 10px below the toggle, slides open (grid 0fr -> 1fr). */
  .site-header { --dropdown-top: 10px; }
  .site-nav { display: flex; flex-direction: column; align-items: stretch; }
  .site-nav__menu { position: absolute; left: 0; right: 0; top: calc(100% + var(--dropdown-top)); display: grid; grid-template-rows: 0fr; visibility: hidden; background: var(--color-white); transition: grid-template-rows var(--duration) var(--ease), visibility 0s linear var(--duration); }
  .site-nav__menu.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--duration) var(--ease), visibility 0s; }
  .site-nav__list { display: block; min-height: 0; overflow: hidden; }
  .site-nav__list a { padding: 12px 20px; border-left: 8px solid transparent; color: var(--color-dropdown-text); }
  .site-nav__list a:hover, .site-nav__list a:focus { color: var(--color-white); background: var(--color-dropdown-hover); }
}

/* === Component: site-footer ===
 * Dark bar in the boxed container: logo 14.628% | nav 51.704% (desktop only) | credit (right).
 * Tablet: logo left, credit right. Mobile: stacked and centred.
 */
.site-footer__inner { display: flex; align-items: center; max-width: var(--container); margin-inline: auto; padding: 30px; background: var(--color-dark); color: var(--color-white); }
.site-footer__logo { flex: 0 0 14.628%; }
.site-footer__logo img { width: 116px; }
.site-footer__nav { flex: 0 0 51.704%; }
.footer-nav__list { display: flex; flex-wrap: wrap; gap: 0 40px; list-style: none; margin: 0; padding: 0; }
.footer-nav__list a { display: block; font-size: var(--text-nav); line-height: 20px; color: var(--color-white); white-space: nowrap; transition: color var(--duration-nav); }
.footer-nav__list a:hover, .footer-nav__list a:focus { color: var(--color-nav-hover); }
.site-footer__credit { flex: 1 1 auto; margin: 0; font-size: var(--text-body); line-height: var(--leading); text-align: end; }
.site-footer__credit a { color: var(--color-white); }
@media (max-width: 1024px) {
  .site-footer__logo { flex-basis: 50%; }
  .site-footer__nav { display: none; }
  .site-footer__credit { flex-basis: 50%; }
}
@media (max-width: 767px) {
  .site-footer__inner { flex-direction: column; text-align: center; }
  .site-footer__logo { flex: none; margin-bottom: 20px; }
  .site-footer__credit { flex: none; width: 100%; text-align: center; }
}

/* === Component: section-heading ===
 * Kicker (28px) above a title (46px, 36px on mobile). Both are h2 on the original.
 * Colour modifiers: --light (white, on red/dark), --red (kicker on white), default title dark.
 */
.kicker { font-size: var(--text-kicker); font-weight: 400; line-height: 1; color: var(--color-dark); }
.kicker--red { color: var(--color-red); }
.kicker--light { color: var(--color-white); }
.title { font-size: var(--text-title); font-weight: 600; line-height: 1; color: var(--color-dark); }
.title--light { color: var(--color-white); }
.kicker + .title { margin-top: 20px; }
.title + .copy { padding-top: 20px; } /* padding, so it adds to the paragraph's own 1em margin as on the original */
@media (max-width: 767px) {
  .title { font-size: var(--text-title-mobile); }
  .title--keep { font-size: var(--text-title); } /* "View our tasty menu" stays 46px on mobile */
}

/* === Component: copy (paragraph text, 20px / 1.6; 16px on mobile) === */
.copy { font-size: var(--text-body); line-height: var(--leading); }
.copy p { margin-block: 1em; }
.copy--light { color: var(--color-white); }
@media (max-width: 767px) {
  .copy { font-size: var(--text-body-mobile); }
  .copy--keep { font-size: var(--text-body); } /* hero lead stays 20px on mobile */
}

/* === Component: button (Elementor button look) === */
.button { display: inline-block; padding: 15px; border-radius: var(--radius); font-size: 20px; font-weight: 400; line-height: 1; text-align: center; transition: all var(--duration); }
.button--light { background: var(--color-white); color: var(--color-dark); }

/* === Component: hero ===
 * Red section, pizza photo (background.jpg) right-aligned on desktop only; the header overlays the top.
 * Inner column: header space on top, text centred in what's left, 50px spacer at the bottom.
 */
.hero { padding: 10px 0; background: var(--color-red) url("/wp-content/uploads/2022/02/background.jpg") no-repeat right center; }
.hero__inner { display: flex; flex-direction: column; width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--container) - 2 * var(--gutter)); min-height: 700px; margin-inline: auto; padding: 107px 0 50px; }
.hero__content { margin-block: auto; }
.hero .kicker + .title { margin-top: 0; }
.hero .title + .copy { padding-top: 0; }
@media (max-width: 1024px) {
  .hero { padding: 40px; background-image: none; }
  .hero__inner { width: 100%; max-width: none; padding-top: 47px; }
}
@media (max-width: 767px) {
  .hero__inner { padding-top: 100px; }
}

/* === Component: about (dark text panel left, photo overlapping right) === */
.about__text { padding: 300px 100px; background: var(--color-dark); }
.about__media { padding-right: 100px; }
.about__media img { width: calc(100% + 100px); max-width: none; margin-left: -100px; }
@media (max-width: 1024px) {
  .about__text { padding: 50px; }
  .about__media { padding-right: 0; }
  .about__media img { width: 100%; margin-left: 0; }
}

/* === Component: app-promo (text left, phone mockup on a red square right) === */
.app-promo { margin-top: 50px; min-height: 720px; background: url("/wp-content/uploads/2022/02/redsquare.jpg") no-repeat right center; }
.app-promo__text { padding: 100px; }
.app-promo__badges { display: inline-block; vertical-align: top; margin-top: 20px; }
.app-promo__badges img { width: 365px; }
.app-promo__media img { margin-inline: auto; }
@media (max-width: 1024px) {
  .app-promo { margin-top: 0; min-height: 0; background-image: none; }
  .app-promo__text { padding: 50px; }
}

/* === Component: menu-intro (centred kicker + title above the cards) === */
.menu-intro { margin: 50px auto 30px; padding: var(--gutter); text-align: center; }
.menu-intro .title { margin-bottom: 20px; }

/* === Component: menu-card (photo + dark caption with title and link) === */
.menu-cards { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 150px; }
.menu-card { padding: var(--gutter); }
.menu-card__img { width: 100%; }
.menu-card__body { padding: 15px 20px; background: var(--color-dark); line-height: 1; }
.menu-card__title { font-size: var(--text-kicker); font-weight: 400; line-height: 1; color: var(--color-white); margin-bottom: 10px; }
.menu-card__link { display: inline-block; border-radius: var(--radius); font-size: 18px; line-height: 1; color: var(--color-white); }
@media (max-width: 1024px) { .menu-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .menu-cards { grid-template-columns: 1fr; margin-bottom: 50px; } }

/* === Component: contact-panel (red details panel left, map overlapping right) === */
.contact { margin-bottom: 100px; }
.contact__text { padding: 300px 200px 300px 100px; background: var(--color-red); }
.contact__text .title { margin-bottom: 80px; }
.contact__media { padding-right: 100px; }
.contact__media .map { width: calc(100% + 100px); max-width: none; height: 800px; margin-left: -100px; }
@media (max-width: 1024px) {
  .contact { margin-bottom: 0; }
  .contact__text { padding: 50px; }
  .contact__media { padding-right: 0; }
  .contact__media .map { width: 100%; height: 500px; margin-left: 0; }
}

/* === Component: contact-item (PNG icon + h3 + text) === */
.contact-item { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 30px; }
.contact-item:last-child { margin-bottom: 0; }
.contact-item__icon { width: 50px; height: 50px; margin-right: 10px; }
.contact-item__title { font-size: 24px; font-weight: 400; line-height: 1; color: var(--color-white); }
.contact-item__text { flex: 0 0 100%; padding: 10px 0 0 10px; }
.contact-item__text--lines p { margin: 0 0 1.6em; } /* phone: number plus an empty line, as on the original */

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

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

/* === Page: /404 === */
.hero--short .hero__inner { min-height: 520px; }
.not-found { padding: 80px 20px 100px; text-align: center; }
.not-found .copy { margin-top: 20px; }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 40px; margin: 30px 0 0; padding: 0; list-style: none; font-size: 18px; }
.not-found__links a { color: var(--color-red); }
.not-found__links a:hover, .not-found__links a:focus { color: var(--color-dark); }

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