/*
 * site.css: the only stylesheet for scranwiches.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, sections
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (Elementor defaults used by the original; media queries can't use custom properties):
 *   mobile  ≤ 767px    tablet 768px–1024px    desktop ≥ 1025px
 *
 * All values below come from the original's computed styles (Elementor post-6.css) measured
 * at 1440 / 1024 / 768 / 375 (design-system/orig-measure.json).
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours */
  --color-text: #000000;          /* intro text */
  --color-bg: #ffffff;
  --color-inverse: #ffffff;       /* text on coloured bands and footer */
  --color-green: #83b334;         /* "Order online" band */
  --color-gold: #daac26;          /* "Download our app" band */
  --color-dark: #39382f;          /* "Get in touch" + bottom bar */
  --color-button-hover-text: #1e1e1e;

  /* Typography: Permanent Marker for all visible text (only weight 400 exists; the
     original asks for 300 on copy and 800 on headings, so the browser shows 400 and a
     synthetic bold, exactly as on the original). */
  --font-marker: "Permanent Marker", sans-serif;
  --text-copy: 1.6rem;            /* 25.6px; 1rem at ≤767px */
  --text-heading: 3rem;           /* 48px; 2rem at ≤767px */
  --text-button: 1.6rem;          /* 1.2rem at ≤767px */
  --text-bar: 16px;               /* 14px at ≤767px */
  --leading-copy: 1.4em;

  /* Spacing (Elementor: 10px column padding, 20px between widgets) */
  --gap-widget: 20px;
  --pad-column: 10px;
  --container: 1140px;
  --band-photo-height: 400px;

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

/* ============ 2. Fonts ============ */
@font-face { font-family: "Permanent Marker"; src: url("/assets/fonts/permanent-marker-latin-400.woff2") format("woff2"); font-weight: 400; 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; color: var(--color-text); background: var(--color-bg); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; }
h1, h2 { margin: 0; padding: 0; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ============ 4. Layout ============ */
/* Boxed Elementor container: 1140px max, no side padding of its own; each column adds 10px. */
.container { max-width: var(--container); margin-inline: auto; display: flex; }
.column { flex: 1 1 100%; min-width: 0; padding: var(--pad-column); display: flex; flex-direction: column; gap: var(--gap-widget); }
.column--half { flex-basis: 50%; }
@media (max-width: 767px) {
  .container--stack { flex-direction: column; }
  .container--stack > .column--half { flex-basis: auto; }
}

/* Text in Elementor text-editor widgets: paragraphs keep their 1em margins (they don't
   collapse inside flex columns). */
.copy { font-family: var(--font-marker); font-size: var(--text-copy); font-weight: 300; line-height: var(--leading-copy); margin: 0; }
.copy p { margin: 1em 0; }
@media (max-width: 767px) { :root { --text-copy: 1rem; --text-heading: 2rem; --text-button: 1.2rem; --text-bar: 14px; } }

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

/* === Component: skip-link === */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 0.5rem 1rem; background: var(--color-bg); color: var(--color-text); }
.skip-link:focus { left: 1rem; }

/* === Component: band-heading (white uppercase Permanent Marker heading) === */
.band-heading { font-family: var(--font-marker); font-size: var(--text-heading); font-weight: 800; line-height: 1; text-transform: uppercase; color: var(--color-inverse); }

/* === Component: intro (logo + text on white with a 25% patterned overlay) === */
.intro { position: relative; z-index: 2; background: var(--color-bg); padding: 100px 0; }
.intro::before { content: ""; position: absolute; inset: 0; background: #000 url("/wp-content/uploads/2021/04/background.jpg") center / cover no-repeat; opacity: 0.25; }
.intro > .container { position: relative; max-width: 800px; min-height: 600px; align-items: center; }
.intro .column { text-align: center; }
.intro__logo { display: block; width: 400px; max-width: 100%; margin-inline: auto; }
.intro .copy { color: var(--color-text); }
@media (max-width: 767px) { .intro__logo { max-width: 75%; } }

/* === Component: photo-band (400px full-width photo; image set per band with a modifier) === */
.photo-band { min-height: var(--band-photo-height); background-position: center center; background-size: cover; background-repeat: no-repeat; }
.photo-band--1 { background-image: url("/wp-content/uploads/2021/04/70490115_509872179801297_86501521809735680_n.jpg"); }
.photo-band--2 { background-image: url("/wp-content/uploads/2021/04/167434770_902957370492774_8923098288318650019_n.jpg"); }
.photo-band--3 { background-image: url("/wp-content/uploads/2021/04/169305896_906223516832826_3664004394945702023_n.jpg"); }
/* Fixed (parallax-style) only on desktop, as in the original's Elementor CSS (decision d5). */
@media (min-width: 1025px) { .photo-band { background-attachment: fixed; } }

/* === Component: cta-band (coloured band: heading, text, button or badge) === */
.cta-band { padding: 100px 0; color: var(--color-inverse); text-align: center; }
.cta-band--green { background: var(--color-green); }
.cta-band--gold { background: var(--color-gold); }
.cta-band__badge { display: block; width: 400px; max-width: 100%; margin-inline: auto; }
.cta-band__badge img { display: block; width: 100%; height: auto; }

/* === Component: button (outline, white; fills white on hover) === */
.button-wrap { text-align: center; }
.button { display: inline-block; padding: 20px 40px; border: 3px solid var(--color-inverse); border-radius: 0; background: transparent; color: var(--color-inverse); font-family: var(--font-marker); font-size: var(--text-button); font-weight: 500; line-height: 1; text-transform: uppercase; text-decoration: none; transition: all var(--duration) var(--ease); }
.button:hover, .button:focus { background: var(--color-inverse); color: var(--color-button-hover-text); }
@media (max-width: 767px) { .button { display: block; width: 100%; } }

/* === Component: site-footer ("Get in touch": address, phone, email, hours, map; then bottom bar) === */
.site-footer { background: var(--color-dark); color: var(--color-inverse); }
.contact { padding: 150px 0; }
.contact .copy { color: var(--color-inverse); }
.contact__hours div { margin: 0; }
.contact__map-col { padding: 0; }
@media (max-width: 1024px) { .contact { padding: 100px 50px; } }
@media (max-width: 767px) { .contact { padding: 50px 20px; } }

/* === Component: map (keyless Google Maps iframe) === */
.map { display: block; width: 100%; height: 610px; border: 0; }
@media (max-width: 767px) { .map { height: 300px; } }

/* === Component: footer-bar (copyright left, credit right) === */
.footer-bar .container { align-items: center; }
.footer-bar .column { font-family: var(--font-marker); font-size: var(--text-bar); font-weight: 400; text-transform: uppercase; color: var(--color-inverse); }
.footer-bar__copyright { margin: 1em 0; }
.footer-bar__credit-col { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.footer-bar__credit { margin: 0; text-align: right; }
.footer-bar__credit a { color: inherit; text-decoration: none; }
.footer-bar__credit a:hover { text-decoration: underline; }
@media (max-width: 767px) {
  .footer-bar .column--copyright { flex-basis: 55%; }
  .footer-bar .footer-bar__credit-col { flex-basis: 45%; }
}

/* === Component: not-found (404 page) === */
.not-found { padding: 100px 0; text-align: center; color: var(--color-text); }
.not-found .band-heading { color: var(--color-text); }
.not-found a { color: inherit; }

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