/*
 * site.css: the only stylesheet for harrystakeaway.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        wraps and section spacing
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         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 header menu collapses to the burger at ≤ 1024px; the header is sticky at ≥ 768px.
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.button-group--app) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's computed styles) */
  --color-bg: #1c1c1a;          /* page and header background */
  --color-bg-hero: #2c2c2c;     /* hero background */
  --color-text: #ffffff;
  --color-heading: #6ec1e4;     /* light blue section headings */
  --color-divider: #71dbe7;     /* thin lines beside section headings */
  --color-divider-alt: #6ec1e4; /* line under the About Us text */
  --color-gold: #d2a22e;        /* buttons, phone icon */
  --color-button-text: #1c1c1a;
  --color-nav-active: #dadada;  /* nav hover + current section */
  --color-dropdown-text: #33373d;
  --color-dropdown-hover: #3f444b;
  --color-social-bg: #ffffff;
  --color-social-icon: #1c1c1a;
  --color-social-icon-footer: #1f1f1f;

  /* Typography */
  --font-body: "Inter", Arial, sans-serif;
  --font-display: "DM Serif Display", Georgia, serif;
  --text-base: 20px;           /* Elementor text widgets are 20px everywhere */
  --text-heading: 45px;        /* ABOUT US / OUR MENU */
  --text-app-small: 48px;      /* "Order Via Our" */
  --text-app-large: 64px;      /* "Mobile App" */
  --text-footer-heading: 24px;

  /* Spacing and shape */
  --wrap-wide: 1280px;         /* header, icon boxes, footer */
  --wrap: 1140px;              /* app section, map */
  --gutter: 30px;              /* section side padding */
  --col-pad: 10px;             /* Elementor column padding */
  --widget-gap: 20px;          /* Elementor widget spacing */
  --radius-button: 10px;
  --radius-map: 30px;
  --header-height: 120px;

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

/* ============ 2. Fonts ============ */
/* Inter (variable, latin) and DM Serif Display 400 (latin): Google Fonts, SIL Open Font Licence, self-hosted. */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-var.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: "DM Serif Display"; src: url("/assets/fonts/dm-serif-display-latin-400.woff2") format("woff2"); font-weight: 400; 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; }

/* ============ 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-bg); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }
.icon { display: block; width: 1em; height: 1em; fill: currentColor; }
/* Sections reached from the menu stop below the sticky header (as Elementor's anchor scroll did) */
[id] { scroll-margin-top: var(--header-height); }
@media (max-width: 767px) { [id] { scroll-margin-top: 0; } }

/* ============ 4. Layout ============ */
.wrap-wide { max-width: var(--wrap-wide); margin-inline: auto; }
.wrap { max-width: var(--wrap); margin-inline: auto; }
@media (max-width: 1024px) { .wrap { max-width: 1024px; } }

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

/* === Component: skip-link === */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 0.5rem 1rem; background: #fff; color: #000; }
.skip-link:focus { left: 1rem; }

/* === Component: site-header ===
 * Dark bar: menu left (60%), social icons right (40%). ≥1025px: inline menu.
 * ≤1024px: white square burger (centred in the left column) opening a full-width white dropdown
 * that overlays the page. ≤767px: burger and icons stacked and centred; header not sticky.
 */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--color-bg); padding: 25px var(--gutter); }
.site-header__inner { max-width: var(--wrap-wide); margin-inline: auto; display: grid; grid-template-columns: 59.922% 40.04%; align-items: center; }
.site-header__nav, .site-header__social { padding: var(--col-pad); }
.site-header__social .social-icons { justify-content: flex-end; }

.nav-toggle { display: none; align-items: center; justify-content: center; margin: 0 auto; padding: 6.75px; font-size: 27px; background: #fff; color: #000; border: 0; border-radius: 3px; 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; }

.site-nav__list { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 13px 20px; font-size: 20px; font-weight: 500; line-height: 20px; text-transform: uppercase; color: var(--color-text); transition: color var(--duration-nav); }
.site-nav a:hover, .site-nav a:focus, .site-nav a.is-active { color: var(--color-nav-active); }

@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  /* Dropdown: grid row 0fr → 1fr, clipped while it animates (align-items: stretch, see run notes) */
  .site-nav { position: absolute; left: 0; right: 0; top: 90px; z-index: 60; display: grid; grid-template-rows: 0fr; align-items: stretch; background: #fff; visibility: hidden; transition: grid-template-rows var(--duration) var(--ease), visibility 0s linear var(--duration); }
  .site-nav.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--duration) var(--ease), visibility 0s; }
  .site-nav.is-instant { transition: none; }
  .site-nav__panel { overflow: hidden; min-height: 0; }
  .site-nav__list { display: block; }
  .site-nav a { padding: 10px 20px; color: var(--color-dropdown-text); transition: none; }
  .site-nav a.is-active { color: var(--color-dropdown-text); }
  .site-nav a:hover, .site-nav a:focus { background: var(--color-dropdown-hover); color: #fff; }
}
@media (max-width: 767px) {
  .site-header { position: relative; }
  .site-header__inner { grid-template-columns: 100%; }
  .site-header__social .social-icons { justify-content: center; gap: 10px; }
  .site-nav { top: 86px; }
}

/* === Component: social-icons (white circles, dark glyphs; header and footer) === */
.social-icons { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; margin: 0; padding: 0; }
.social-icons__link { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 50%; background: var(--color-social-bg); color: var(--color-social-icon); font-size: 25px; transition: opacity var(--duration); }
.social-icons__link:hover { opacity: 0.9; }
.social-icons--footer .social-icons__link { color: var(--color-social-icon-footer); }
.icon--instagram { width: 0.875em; }

/* === Component: button / button-group (gold, Inter 20px semibold, radius 10px; no hover change on the original) === */
.button { display: inline-flex; align-items: center; justify-content: center; padding: 13px 30px; border-radius: var(--radius-button); background: var(--color-gold); color: var(--color-button-text); font-family: var(--font-body); font-size: 20px; font-weight: 600; line-height: 20px; text-decoration: none; }
.button-group { --button-gap: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--button-gap); list-style: none; margin: 0; padding: 0; }
.button-group--app { --button-gap: 19px; }
@media (max-width: 1024px) { .button-group { --button-gap: 30px; } .button-group--app { --button-gap: 15px; } }
@media (max-width: 767px) { .button-group { --button-gap: 20px; } .button-group--app { --button-gap: 26px; } }

/* === Component: section-heading (light-blue DM Serif title between two thin lines) ===
 * Columns 39.4% / 20% / 40% as on the original, so long titles wrap at the same widths
 * (OUR MENU wraps at tablet sizes, as it did). Stacks (line, title, line) on mobile.
 */
.section-heading { display: grid; grid-template-columns: 39.383% 19.961% 39.988%; align-items: center; }
.section-heading::before, .section-heading::after { content: ""; display: block; height: 1px; margin-block: 15px; background: var(--color-divider); }
.section-heading__title { font-family: var(--font-display); font-size: var(--text-heading); font-weight: 400; line-height: 1; text-align: center; color: var(--color-heading); }
.section-heading--menu { grid-template-columns: 40% 20% 39.332%; }
@media (max-width: 767px) {
  .section-heading, .section-heading--menu { grid-template-columns: 100%; }
}

/* === Component: divider (thin full-width line) === */
.divider { height: 1px; margin-block: 15px; background: var(--color-divider-alt); border: 0; }

/* === Component: text-block (Elementor text widget: Inter 20px white, centred, 1em paragraph margins) === */
.text-block { display: flow-root; font-size: var(--text-base); line-height: normal; text-align: center; color: var(--color-text); }
.text-block p { margin-block: 1em; }
.text-block--tight p { margin: 0; }

/* === Component: icon-box (icon above a short bold title) === */
.icon-boxes { display: grid; grid-template-columns: repeat(3, 1fr); max-width: calc(var(--wrap-wide) + 2 * var(--gutter)); margin-inline: auto; padding: 60px var(--gutter); }
.icon-box { padding: var(--col-pad); display: flex; flex-direction: column; align-items: center; gap: 15px; text-align: center; }
.icon-box__icon { display: block; width: 50px; height: 50px; }
.icon-box__icon--glyph { font-size: 50px; color: var(--color-gold); }
.icon-box__title { align-self: stretch; margin-block: 1em; font-size: 1.17rem; font-weight: 600; line-height: normal; color: var(--color-text); }
@media (max-width: 767px) { .icon-boxes { grid-template-columns: 100%; } }

/* === Component: map (keyless Google Maps iframe, rounded top corners and soft shadow) === */
.map-block { padding-top: 50px; }
.map-block__frame { overflow: hidden; border-radius: var(--radius-map) var(--radius-map) 0 0; box-shadow: 0 0 10px rgb(0 0 0 / 0.5); }
.map { display: block; width: 100%; height: 300px; border: 0; }

/* === Component: site-footer (#contact: four columns, white Inter text) === */
.site-footer { position: relative; padding: 60px var(--gutter); box-shadow: 0 -10px 29px rgb(0 0 0 / 0.5); font-size: 20px; line-height: normal; }
.site-footer__inner { max-width: var(--wrap-wide); margin-inline: auto; display: grid; grid-template-columns: 25% 19.844% 24.921% 30.235%; align-items: start; }
.site-footer__col { padding: var(--col-pad); }
.site-footer__heading, .site-footer__copyright, .site-footer__credit { font-size: var(--text-footer-heading); font-weight: 400; line-height: 1; }
.site-footer__heading { margin-bottom: var(--widget-gap); }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer__links a { transition: color var(--duration); }
.site-footer__hours { text-transform: capitalize; }
.site-footer .social-icons { margin-bottom: var(--widget-gap); }
.site-footer__copyright b { font-weight: 700; }
.site-footer__credit a { color: inherit; }
@media (max-width: 767px) { .site-footer__inner { grid-template-columns: 100%; } }

/* === Component: contact-email ===
 * Not used: the original has no forms and shows no email address. Kept so a future contact
 * block (mailto button + visible address) has a ready style.
 */
.contact-email { display: grid; gap: 1rem; justify-items: start; }
.contact-email__address { font-weight: 600; word-break: break-word; }

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

/* === Page: / (hero) === */
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 83vh; background: var(--color-bg-hero); }
.hero__brand { width: min(640px, 100%); margin-left: auto; display: flex; flex-direction: column; align-items: center; }
.hero__logo { width: 477px; }
.hero__photo { width: 100%; }
@media (max-width: 1024px) { .hero { min-height: 44vh; } }
@media (max-width: 767px) {
  .hero { grid-template-columns: 100%; min-height: 83vh; }
  .hero__brand { width: 100%; padding: 30px; }
}

/* === Page: / (about) === */
.about { padding-block: 120px; background: url("/wp-content/uploads/2023/09/Rectangle-23.png") center / cover no-repeat; }
.about__text { max-width: 640px; margin-inline: auto; }
@media (max-width: 767px) { .about__text { padding: 30px; } }

/* === Page: / (menu) === */
.menu-intro { margin-block: 120px; }
.menu-intro__body { display: grid; grid-template-columns: 25% 49.665% 25%; align-items: start; margin-top: 30px; }
.menu-intro__img--left { width: 75%; }
.menu-intro__img--right { width: 75%; margin-left: auto; }
.menu-intro__main { display: flex; flex-direction: column; align-items: center; }
.menu-intro__text { max-width: 579.984px; }
.menu-intro .button-group { margin-top: 15px; }
@media (max-width: 1024px) {
  .menu-intro__body { align-items: center; }
  .menu-intro__main { align-self: start; }
  .menu-intro .button-group { margin-top: 10px; }
}
@media (max-width: 767px) {
  .menu-intro__body { grid-template-columns: 100%; }
  .menu-intro__side { display: none; }
  .menu-intro__text { padding: 30px; }
}

/* === Page: / (app download) === */
.app { padding: var(--gutter); background: url("/wp-content/uploads/2023/09/Mobile-app-Background.png") center / cover; }
.app__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.app__col { padding: var(--col-pad); }
.app__title { font-family: var(--font-display); font-weight: 400; line-height: 1; text-align: center; color: var(--color-heading); }
.app__title--small { font-size: var(--text-app-small); }
.app__title--large { font-size: var(--text-app-large); }
.app__text { margin-bottom: var(--widget-gap); }
.app__mockup { display: block; width: fit-content; margin-inline: auto; }
@media (max-width: 767px) {
  .app__inner { grid-template-columns: 100%; }
}

/* === Page: /404.html (not-found message between the section lines, as the home page headings) === */
.not-found { padding-block: 120px; min-height: 50vh; }
.not-found__text { max-width: 640px; margin-inline: auto; padding-inline: var(--gutter); }

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