/*
 * site.css: the only stylesheet for albertospizzacompany.co.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, columns, section gaps
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules
 *   7. Utilities
 *
 * Breakpoints (Elementor defaults, as on the original; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *
 * The original is an Elementor page: a 1140px "boxed" container whose columns have 10px
 * padding, 20px between widgets, and 70px spacer sections between blocks. The values below
 * reproduce those measurements (design-system/orig-measure.txt).
 */

/* ============ 1. Tokens ============ */
:root {
  --color-text: #323232;          /* body copy, menu headings, nav links */
  --color-red: #e3372d;           /* About/Get in touch headings, Order online button, footer bar */
  --color-white: #ffffff;
  --color-bg-alt: #f2f2f2;        /* Our menu section */
  --color-dropdown-text: #494c4f; /* mobile menu items and toggle */
  --color-toggle-bg: rgb(0 0 0 / 0.05);

  --font-display: "Staatliches", Impact, "Arial Narrow", sans-serif; /* headings, footer bar */
  --font-body: "Roboto", Arial, sans-serif;                          /* text, nav, buttons */

  --container: 1140px;
  --col-pad: 10px;          /* Elementor column padding */
  --widget-gap: 20px;       /* Elementor space between widgets */
  --spacer: 70px;           /* 50px spacer widget + column padding */

  --duration: 300ms;
  --ease: ease;
  --ease-pointer: cubic-bezier(0.58, 0.3, 0.005, 1); /* Elementor nav pointer fade */
}

/* ============ 2. Fonts ============ */
/* Self-hosted Google Fonts (latin subset). Staatliches has one weight (400); headings ask
   for 600, so browsers synthesise bold exactly as on the original. Roboto is the variable file. */
@font-face { font-family: "Staatliches"; src: url("/assets/fonts/staatliches-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-variable.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; font-family: var(--font-body); font-size: 16px; line-height: normal; color: var(--color-text); background: var(--color-white); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1; margin: 0; }
p { margin: 16px 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-text); outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* Elementor boxed container: 1140px, full width below that. Columns add their own 10px padding. */
.container { width: 100%; max-width: var(--container); margin-inline: auto; }
.col { padding: var(--col-pad); }
/* Stack of widgets with Elementor's 20px gap */
.stack > * + * { margin-top: var(--widget-gap); }
.text { display: flow-root; }  /* keeps the 16px paragraph margins inside, as Elementor's text widget does */
.spacer-top { margin-top: var(--spacer); }
.spacer-bottom { margin-bottom: var(--spacer); }

/* ============ 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 (logo column + nav column; not sticky, as the original) === */
.site-header { position: relative; z-index: 50; background: var(--color-white); }
.site-header__inner { display: flex; align-items: flex-start; }
.site-header__logo { width: 50%; padding: var(--col-pad); }
.site-header__logo img { width: 60px; height: 60px; }
.site-header__nav { width: 50%; padding: var(--col-pad); }
@media (max-width: 1024px) and (min-width: 768px) {
  .site-header__logo { width: 25%; }
  .site-header__nav { width: 75%; }
}
@media (max-width: 767px) {
  .site-header__inner { align-items: stretch; }
  .site-header__nav { display: flex; flex-direction: column; justify-content: center; }
}

/* === Component: nav (desktop/tablet: right-aligned links with underline pointer; <= 767px: burger + in-flow dropdown) === */
.nav-toggle { display: none; position: relative; align-items: center; justify-content: center; margin: 0 auto; padding: 5.5px; border: 0; border-radius: 3px; background: var(--color-toggle-bg); color: var(--color-dropdown-text); cursor: pointer; }
.nav-toggle::after { content: ""; position: absolute; inset: -6px; } /* 45px touch area, same look */
.nav-toggle svg { display: block; width: 22px; height: 22px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open, .nav-toggle[aria-expanded="false"] .nav-toggle__close { display: none; }
.site-nav__list { display: flex; flex-wrap: wrap; justify-content: flex-end; list-style: none; margin: 0; padding: 0; }
.site-nav a { position: relative; display: block; padding: 13px 20px; font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 20px; color: var(--color-text); text-decoration: none; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--color-text); opacity: 0; transition: opacity var(--duration) var(--ease-pointer); }
.site-nav a:hover::after, .site-nav a:focus-visible::after { opacity: 1; }
@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  /* Slide-down: grid row 0fr -> 1fr; the nav stretches so the list is clipped while it animates. */
  .site-nav { display: grid; grid-template-rows: 0fr; align-items: stretch; visibility: hidden; background: var(--color-white); transition: grid-template-rows var(--duration) var(--ease), visibility 0s var(--duration); }
  .site-nav.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; text-align: center; }
  .site-nav a { padding: 10px 20px; color: var(--color-dropdown-text); }
  .site-nav a::after { display: none; }
  .site-nav.no-transition { transition: none; } /* set by site.js when a menu link is clicked */
}

/* === Component: page-title-hidden (the theme's "Home" H1, hidden on the original too) === */
/* Uses .visually-hidden (utilities). */

/* === Component: hero (full-width background image, dark overlay, centred heading) === */
/* Background images keep the original's settings: centred, natural size, repeating. */
.hero { position: relative; display: flex; align-items: center; min-height: 500px; background-position: center center; }
.hero::before { content: ""; position: absolute; inset: 0; background: #000; opacity: 0.5; }
.hero__inner { position: relative; width: 100%; padding: var(--col-pad); }
.hero__title { color: var(--color-white); font-size: 52px; text-align: center; }

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

/* === Component: button === */
.button { display: inline-block; border-radius: 4px; font-family: var(--font-body); font-weight: 500; text-decoration: none; text-align: center; transition: all var(--duration); }
.button--red { padding: 15px 30px; font-size: 16px; line-height: 16px; background: var(--color-red); color: var(--color-white); }
.button--outline { padding: 20px 40px; font-size: 18px; line-height: 18px; border: 3px solid var(--color-white); border-radius: 5px; background: transparent; color: var(--color-white); }

/* === Component: about (text + image, 50/50) === */
.about { display: flex; }
.about__text, .about__media { width: 50%; }
.about__media img { width: 100%; }
@media (max-width: 1024px) {
  .about__text { padding: 30px; }
}
@media (max-width: 767px) {
  .about__text { width: auto; flex: 1; margin: 15px; }
  .about__media { display: none; }
}

/* === Component: menu-cards (white cards on grey, 3 columns; 1 column on mobile) === */
.menu-section { background: var(--color-bg-alt); }
.menu-section__heading { padding: 60px var(--col-pad) var(--col-pad); }
.menu-cards { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0; padding: 0 0 40px; }
.menu-card { margin: 10px; padding: var(--col-pad); background: var(--color-white); text-align: center; }
.menu-card__icon { display: block; width: 50px; height: 54px; margin: 0 auto; padding-bottom: 4px; color: var(--color-text); }
.menu-card__icon svg { display: block; width: 50px; height: 50px; fill: currentColor; }
.menu-card__title { margin-top: var(--widget-gap); font-size: 20px; color: var(--color-text); }
.menu-card__text { margin-top: var(--widget-gap); }
@media (max-width: 767px) {
  .menu-cards { grid-template-columns: 1fr; }
}

/* === Component: app-band (background image, light overlay, centred text + outline button) === */
.app-band { position: relative; display: flex; align-items: center; min-height: 400px; background-position: center center; }
.app-band::before { content: ""; position: absolute; inset: 0; background: #000; opacity: 0.3; }
.app-band__inner { position: relative; padding: var(--col-pad); text-align: center; color: var(--color-white); }
.app-band__title { font-size: 42px; color: var(--color-white); }
@media (max-width: 767px) {
  .app-band__title { padding-top: 20px; }
  .app-band__action { padding-bottom: 20px; }
}

/* === Component: contact (address/phone/hours + map; 20/80, 25/75 on tablet, stacked on mobile) === */
.contact { display: flex; }
.contact__info { width: 20%; }
.contact__map { width: 80%; }
@media (max-width: 1024px) and (min-width: 768px) {
  .contact__info { width: 25%; }
  .contact__map { width: 75%; }
}
@media (max-width: 767px) {
  .contact { display: block; }
  .contact__info, .contact__map { width: 100%; }
}

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

/* === Component: site-footer (red bar: business name left, credit right) === */
.site-footer { background: var(--color-red); color: var(--color-white); font-family: var(--font-display); font-size: 16px; font-weight: 400; }
.site-footer__inner { display: flex; align-items: center; }
.site-footer__col { width: 50%; }
.site-footer__col--right { text-align: right; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { text-decoration: underline; }

/* === Component: error-page (404) === */
.error-page { padding: 60px var(--col-pad) 70px; text-align: center; }
.error-page__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; list-style: none; margin: 24px 0 0; padding: 0; }

/* === Component: contact-email (replaces WordPress forms; unused on this site, kept for future use) === */
.contact-email { display: grid; gap: 16px; justify-items: start; }
.contact-email__address { font-weight: 600; word-break: break-word; }

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