/*
 * site.css: the only stylesheet for streetpasta.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        containers, section spacing
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (Elementor's, from the original page CSS; media queries can't use custom properties):
 *   mobile  ≤ 767px    tablet 768px–1024px    desktop ≥ 1025px
 *   The split desktop nav shows from 768px; below that the burger menu (as the original).
 *
 * Values come from the original Elementor page CSS (post-7.css, Internet Archive copy
 * 2025-04-23) and computed styles of the live page (design-system/live-measure.json).
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours */
  --color-navy: #253b53;         /* page/header/footer background, dark buttons, dark text */
  --color-gold: #f1ae31;         /* nav links, header border, gold buttons, app band, gallery frame */
  --color-white: #ffffff;
  --color-muted: #7a7a7a;        /* contact card intro (Elementor global text colour) */
  --color-burger-icon: #33373d;  /* burger icon and mobile dropdown links */
  --color-dropdown-hover: #55595c;
  --color-overlay: rgb(37 59 83 / 0.4); /* hero photo overlay */
  --shadow-card: 0 0 10px 0 rgb(0 0 0 / 0.12);

  /* Typography */
  /* Original heading font "Xhers" (commercial, unlicensed) → closest Google Font: Antonio, uppercase (decision d3) */
  --font-heading: "Antonio", "Arial Narrow", sans-serif;
  --heading-weight: 500;
  --heading-tracking: -0.02em;   /* Antonio is slightly wider than Xhers; keeps the original line breaks */
  --font-body: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
  --text-nav: 18px;
  --text-h2: 63px;
  --text-h2-gallery: 64px;
  --text-card-title: 64px;
  --text-footer-heading: 32px;
  --text-body: 20px;             /* section copy and footer text (1.25rem) */
  --text-button: 20px;
  --text-button-tab: 24px;

  /* Layout */
  --container: 1080px;           /* content sections */
  --container-wide: 1280px;      /* header and footer */
  --gutter: 32px;
  --section-space: 120px;
  --radius-button: 8px;
  --radius-tab: 16px;

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

/* ============ 2. Fonts ============ */
/* Self-hosted Google Fonts (latin subset, OFL). Both are variable fonts: one file covers every weight used. */
@font-face { font-family: "Antonio"; src: url("/assets/fonts/antonio-latin-variable.woff2") format("woff2"); font-weight: 100 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/assets/fonts/source-sans-3-latin-variable.woff2") format("woff2"); font-weight: 200 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: 1rem; line-height: 1.5; color: var(--color-white); background: var(--color-navy) url("/wp-content/uploads/2023/05/bricks.png"); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-white); outline-offset: 2px; }

/* ============ 4. Layout ============ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; }

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

/* === Component: heading (Antonio uppercase display headings, 63px, line-height 1) === */
.heading { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: var(--text-h2); line-height: 1; letter-spacing: var(--heading-tracking); text-transform: uppercase; color: var(--color-white); }
.heading--gold { color: var(--color-gold); }
.heading--navy { color: var(--color-navy); }
.heading--center { text-align: center; }

/* === Component: text (section copy: Source Sans 20px/1.5, max 440px wide) === */
.text { max-width: 440px; margin-bottom: 72px; /* 40px paragraph margin + 32px spacer, as live */ font-family: var(--font-body); font-size: var(--text-body); font-weight: 400; line-height: 1.5; }

/* === Component: button ===
 * .button          gold background, navy text, 8px corners (Download App, Order Now)
 * .button--navy    navy background, gold text (Order Here, Download App in the app band)
 * .button--tab-top / --tab-bottom   24px tabs with rounded bottom / top corners (hero, menu cards) */
.button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border: 0; border-radius: var(--radius-button); background: var(--color-gold); color: var(--color-navy); font-family: var(--font-heading); font-size: var(--text-button); font-weight: var(--heading-weight); line-height: 1; letter-spacing: var(--heading-tracking); text-transform: uppercase; text-align: center; text-decoration: none; cursor: pointer; transition: all var(--duration) var(--ease); }
.button--navy { background: var(--color-navy); color: var(--color-gold); }
.button--tab-top, .button--tab-bottom { font-size: var(--text-button-tab); }
.button--tab-top { border-radius: 0 0 var(--radius-tab) var(--radius-tab); }   /* hangs from the edge above */
.button--tab-bottom { border-radius: var(--radius-tab) var(--radius-tab) 0 0; } /* sits on the edge below */
.button-row { display: flex; flex-wrap: wrap; align-items: center; }
.button-row .button + .button { margin-left: 12px; }
@media (max-width: 767px) {
  .button-row { flex-direction: column; align-items: stretch; }
  .button-row .button + .button { margin: 12px 0 0; }
}

/* === Component: site-header (navy bar, gold 5px bottom border, split nav either side of the logo; not sticky) === */
.site-header { position: relative; z-index: 20; padding: 16px var(--gutter); border-bottom: 5px solid var(--color-gold); background: var(--color-navy); }
.site-header__inner { display: grid; grid-template-columns: 42% 15.666% 42%; align-items: center; max-width: var(--container-wide); margin-inline: auto; }
.site-header__logo { justify-self: center; }
.site-header__logo img { width: 64px; height: auto; }
.site-nav__list { display: flex; flex-wrap: wrap; gap: 8px 48px; list-style: none; margin: 0; padding: 0; }
.site-nav--left .site-nav__list { justify-content: flex-end; }
.site-nav--right .site-nav__list { justify-content: flex-start; }
.site-nav a { display: block; font-family: var(--font-heading); font-size: var(--text-nav); font-weight: var(--heading-weight); line-height: 20px; letter-spacing: var(--heading-tracking); text-transform: uppercase; color: var(--color-gold); }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--color-white); }
.mobile-nav { display: none; }

@media (max-width: 767px) {
  .site-header__inner { grid-template-columns: 75% 25%; }
  .site-nav { display: none; }
  .site-header__logo { justify-self: start; }
  .mobile-nav { display: block; justify-self: end; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; width: 33px; height: 33px; padding: 0; border: 0; border-radius: 3px; background: var(--color-gold); color: var(--color-burger-icon); 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; }
  /* Dropdown: full width, white, opens just below the toggle over the page (Elementor Pro "stretch").
   * Grid 0fr → 1fr slide; align-items: stretch keeps the list clipped while it animates. */
  .mobile-nav__panel { position: absolute; left: 0; right: 0; top: 61.5px; display: grid; grid-template-rows: 0fr; align-items: stretch; background: var(--color-white); visibility: hidden; transition: grid-template-rows var(--duration) var(--ease), visibility 0s linear var(--duration); }
  .mobile-nav__panel.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--duration) var(--ease), visibility 0s; }
  .mobile-nav__inner { overflow: hidden; min-height: 0; }
  .mobile-nav__list { list-style: none; margin: 0; padding: 0; }
  .mobile-nav__list a { display: flex; align-items: center; min-height: 44px; padding: 10px 20px; font-family: var(--font-heading); font-size: var(--text-nav); font-weight: var(--heading-weight); line-height: 20px; letter-spacing: var(--heading-tracking); text-transform: uppercase; color: var(--color-burger-icon); }
  .mobile-nav__list a:hover, .mobile-nav__list a:focus-visible { background: var(--color-dropdown-hover); color: var(--color-white); }
}

/* === Component: hero (photo with navy overlay; Order Now tab, "Welcome To", logo, Scroll Down tab) === */
.hero { position: relative; display: flex; flex-direction: column; background-position: center; background-size: cover; } /* background image set inline */
.hero::before { content: ""; position: absolute; inset: 0; background: var(--color-overlay); }
.hero > * { position: relative; }
.hero__order { align-self: flex-end; }
.hero__body { margin: 64px 0; text-align: center; }
.hero__body .heading { margin-bottom: 24px; }
.hero__logo { width: 285px; margin-inline: auto; }
.hero__scroll { align-self: center; }
@media (max-width: 767px) {
  .hero__order { align-self: center; }
}

/* === Component: split (two columns, vertically centred: story and app sections) === */
.split { padding: var(--section-space) var(--gutter); }
.split__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.split__body .heading { margin-bottom: 16px; }
.split__media img { margin-inline: auto; }
.split--story .split__body { margin-right: 32px; }
.split--app { background: var(--color-gold); color: var(--color-navy); }
.split--app .split__body { margin-left: 48px; }
@media (max-width: 767px) {
  .split__inner { grid-template-columns: 1fr; }
  .split--story .split__body { margin: 0 0 32px; }
  .split--app .split__body { margin: 32px 0 0; }
}

/* === Component: menu-cards (2×2 photo cards, each with a tab button hanging below) === */
.menu-cards { padding: 0 var(--gutter) var(--section-space); }
.menu-cards .heading { margin-bottom: 48px; }
.menu-cards__grid { display: grid; grid-template-columns: 1fr 1fr; }
.menu-card { display: flex; flex-direction: column; align-items: center; padding: 15px; }
.menu-card img { width: 100%; height: 400px; object-fit: cover; }
@media (max-width: 767px) {
  .menu-cards__grid { grid-template-columns: 1fr; }
}

/* === Component: gallery (double gold frame, "Gallery" tab on the frame, 3 columns; GLightbox) === */
.gallery-section { padding: 0 var(--gutter) var(--section-space); }
.gallery-frame { padding: 12px; border: 3px solid var(--color-gold); }
.gallery-frame__inner { display: flex; flex-direction: column; align-items: center; padding: 32px; border: 3px solid var(--color-gold); }
.gallery-frame__title { margin: -80px 0 40px; /* the tab takes no height on the original: -80 + 72 + 40 = 32px gap */ padding: 4px 12px; border-radius: 6px; background: var(--color-white); font-size: var(--text-h2-gallery); }
.gallery { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); width: calc(100% + 20px); margin-right: -20px; margin-bottom: -20px; } /* each item keeps 20px right/bottom space, as the original */
.gallery__item { display: flex; justify-content: center; align-items: flex-start; padding: 0 20px 20px 0; }
.gallery__item a { display: block; }
.gallery__item img { width: auto; max-width: 100%; }
@media (max-width: 767px) {
  .gallery-frame__title { margin: -70px 0 46px; font-size: 48px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery__item img { width: 100%; }
}
/* GLightbox: match the original Elementor lightbox (dark backdrop) */
.glightbox-clean .goverlay { background: rgb(0 0 0 / 0.87); }

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

/* === Component: site-footer (navy band; contact card overlapping the map; 3 columns; copyright bar) === */
.site-footer { padding: 80px var(--gutter) 64px; background: var(--color-navy); color: var(--color-white); }
.site-footer__inner { display: grid; grid-template-columns: 38.046% 61.954%; max-width: var(--container-wide); margin-inline: auto; }
.site-footer__main { display: flex; flex-direction: column; justify-content: space-between; margin-left: 64px; }
.site-footer__cols { display: grid; grid-template-columns: 35% 45.664% 19%; }
.site-footer__heading { margin-bottom: 32px; white-space: nowrap; font-family: var(--font-heading); font-size: var(--text-footer-heading); font-weight: var(--heading-weight); line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; }
.site-footer__text { margin-bottom: 40px; font-size: var(--text-body); font-weight: 500; line-height: 1.8; letter-spacing: -0.02em; }
.site-footer__list { margin: 0; padding: 0; list-style: none; font-size: var(--text-body); font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.site-footer__list li + li { margin-top: 20px; }
.site-footer__hours { margin-top: 8px; }
.site-footer__bar { margin: 32px 0 0; padding-bottom: 40px; font-size: var(--text-body); font-weight: 500; line-height: 1.8; letter-spacing: -0.02em; }
@media (max-width: 1024px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__main { margin: 64px 0 0; }
  .site-footer__cols { grid-template-columns: 32% 43% 25%; }
  .site-footer__bar { margin-top: 64px; }
}
@media (max-width: 767px) {
  .site-footer__cols { grid-template-columns: 1fr; }
  .site-footer__col:not(:last-child) { margin-bottom: 40px; }
  .site-footer__bar { margin-top: 64px; } /* 40px spacer + 24px empty social-icons column on the original */
}

/* === Component: contact-email (white card that held the Elementor Pro form; heading + intro only, decision d2) === */
.contact-email { position: relative; z-index: 1; align-self: start; margin-top: -240px; padding: 48px; border-radius: 16px; background: var(--color-white); box-shadow: var(--shadow-card); }
.contact-email__title { font-family: var(--font-heading); font-size: var(--text-card-title); font-weight: var(--heading-weight); line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; color: var(--color-navy); }
.contact-email__intro { margin-top: 12px; font-family: var(--font-body); font-size: 1.375rem; font-weight: 500; line-height: 1; letter-spacing: -0.02em; color: var(--color-muted); }
@media (max-width: 1024px) { .contact-email { margin-top: -200px; padding: 32px; } }
@media (max-width: 767px) {
  .contact-email__title { font-size: 2.5rem; }
  .contact-email__intro { line-height: 1.5; }
}

/* === Component: not-found (404 page body) === */
.not-found { padding: 120px var(--gutter) 300px; text-align: center; } /* bottom space for the overlapping contact card */
.not-found__text { max-width: 40em; margin: 24px auto 32px; font-size: var(--text-body); }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

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