/*
 * site.css: the only stylesheet for firstchoicederby.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        tile rows and columns
 *   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 CSS; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *   Body text also steps up from 15px/1.66 to 16px/1.5 at 48em (768px), as the original theme did.
 *
 * Layout model (matches the original Elementor grid): every row is at most 980px wide and
 * centred; each column has 10px padding, so content lines up on a 960px column.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's computed styles) */
  --color-page: #64a2db;          /* body colour under the background image */
  --color-red: #d32027;           /* offer banner, MENU tile, review tile */
  --color-orange: #ef8117;        /* ORDER NOW tile */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-text: #333333;          /* default body text */

  /* Typography */
  --font-body: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
  --font-display: "Sigmar One", sans-serif;      /* phone number, ORDER NOW */
  --font-tile: "Open Sans", sans-serif;           /* MENU, review */
  --text-base: 15px;
  --leading: 1.66;
  --text-sm: 14px;
  --shadow-text-hard: 3px 2px 0 #000000;          /* phone number */
  --shadow-text-menu: 2px 3px 0 #000000;          /* MENU */
  --shadow-text-soft: 0 5px 10px #000000;         /* ORDER NOW */

  /* Spacing and shape */
  --gutter: 10px;                 /* column padding */
  --gap: 20px;                    /* space between stacked widgets */
  --row-max: 980px;               /* row width incl. column padding (960px content) */
  --footer-max: 1140px;           /* copyright row */
  --tile-menu-height: 145px;
  --tile-big-height: 313px;
}

/* ============ 2. Fonts ============ */
/* All self-hosted, latin subset, SIL Open Font License. Libre Franklin came from the
   Twenty Seventeen theme; Sigmar One and Open Sans from Google Fonts. Libre Franklin 700 is
   not loaded on purpose: the original asked for bold and the browser used the 800 face. */
@font-face { font-family: "Libre Franklin"; src: url("/assets/fonts/libre-franklin-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/assets/fonts/libre-franklin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/assets/fonts/libre-franklin-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Sigmar One"; src: url("/assets/fonts/sigmar-one-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

/* ============ 3. Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }  /* min-height: background image covers short pages (404) */
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading);
  color: var(--color-text);
  background: var(--color-page) url("/wp-content/uploads/2018/06/bg-2.jpg") no-repeat center top / cover;
}
@media (min-width: 48em) {
  body { font-size: 16px; line-height: 1.5; }
}
img { max-width: 100%; height: auto; display: block; }
h1, h2 { margin: 0; font-weight: 400; line-height: 1; }
p { margin: 0 0 1.5em; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* A row of columns. Columns stack below 768px. */
.row { display: flex; width: min(100%, var(--row-max)); margin-inline: auto; }
.row__col { padding: var(--gutter); min-width: 0; }
.row__col--full { flex: 1 1 100%; }
.row__col--side { flex: 0 0 24.561%; }
.row__col--main { flex: 0 0 75.439%; display: flex; align-items: center; }
.row__col--half { flex: 0 0 50%; }
.row__col--third { flex: 0 0 33.333%; }
.row__col--flush { padding: var(--gutter) 0; }   /* tile fills the column side to side */
.row__col--centre { align-self: center; }
.row--footer { width: min(100%, var(--footer-max)); }
.stack > * + * { margin-top: var(--gap); }
@media (max-width: 767px) {
  .row { flex-wrap: wrap; }
  .row__col--side, .row__col--main, .row__col--third, .row__col--half { flex-basis: 100%; }
  .row--keep { flex-wrap: nowrap; }
  .row--keep .row__col--half { flex-basis: 50%; }
}

/* The original had an empty menu section here (two 10px paddings); the space is kept, its
   white mobile bar is not (decision d3). */
main { padding-top: var(--gap); }

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

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

/* === Component: site-header (centred logo + phone number) === */
.site-header { padding: 30px 0; text-align: center; }
.site-header__inner { padding: var(--gutter); }
.site-header__logo { display: block; width: calc(min(960px, 100%) * 0.3); margin-inline: auto; }
.site-header__logo img { width: 100%; }
.site-header__phone {
  margin-top: var(--gap);
  font-family: var(--font-display);
  font-size: 38px;
  color: var(--color-white);
  text-shadow: var(--shadow-text-hard);
}
@media (max-width: 1024px) {
  .site-header__logo { width: calc(min(960px, 100%) * 0.51); }
  .site-header__phone { font-size: 28px; }
}
@media (max-width: 767px) {
  .site-header__logo { width: min(960px, 100%); }
}

/* === Component: offer-banner (red strip, bold uppercase, spaced letters) === */
.offer-banner {
  margin: 0;
  padding: 10px 0;
  background: var(--color-red);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: inherit;
  letter-spacing: 2.3px;
  text-transform: uppercase;
  text-align: center;
}
@media (max-width: 767px) { .offer-banner { padding: 10px; } }

/* === Component: tile (solid colour block with a centred heading link) === */
.tile { display: flex; align-items: center; justify-content: center; text-align: center; }
.tile--red { background: var(--color-red); }
.tile--orange { background: var(--color-orange); }
.tile--menu { min-height: var(--tile-menu-height); padding: var(--gutter); }
.tile--big { min-height: var(--tile-big-height); padding: 20px; }
.tile__heading { width: 100%; color: var(--color-white); }
.tile__heading--menu { font-family: var(--font-tile); font-weight: 500; font-size: 40px; text-shadow: var(--shadow-text-menu); }
.tile__heading--order { font-family: var(--font-display); font-size: 35px; text-shadow: var(--shadow-text-soft); }
.tile__heading--order .tile__big-text { font-size: 50px; }
@media (max-width: 1024px) {
  .tile__heading--menu, .tile__heading--order { font-size: 37px; }
}
@media (max-width: 767px) {
  .tile__heading--menu, .tile__heading--order { font-size: 46px; }
}

/* === Component: tile-photo (image tile; CSS background version for the burger) === */
.tile-photo { display: block; width: 100%; }
.tile-photo--bg { min-height: var(--tile-big-height); background: no-repeat 0 0 / cover; }
/* The original's burger column sits 10px further left at tablet and mobile (Elementor margin quirk, kept). */
@media (max-width: 1024px) {
  .row__col--burger { padding: 0 var(--gutter) 0 0; align-self: center; }
}
@media (max-width: 767px) {
  .row__col--burger { flex-basis: 100%; }
}

/* === Component: review (red quote tile) === */
.review {
  height: 100%;
  margin: 0;
  padding: var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-red);
  color: var(--color-white);
  font-family: var(--font-tile);
  font-weight: 500;
}
.review__quote { font-size: var(--text-sm); text-align: center; }
.review__by { font-size: 15px; text-align: end; }

/* === Component: info-strip (white address / phone / email bar) === */
.info-strip {
  padding: 10px 0;
  background: var(--color-white);
  color: var(--color-black);
  font-size: var(--text-sm);
  font-weight: 300;
  letter-spacing: 2.3px;
  text-align: center;
}
@media (max-width: 767px) { .info-strip { padding: 10px; } }

/* === Component: app-badges (Google Play / App Store) === */
.app-badges__col--start { display: flex; justify-content: flex-end; }
.app-badges__col--end { display: flex; justify-content: flex-start; }
.app-badges a { min-width: 0; }
.app-badges img { width: 98px; }   /* 35% of the 280px badge, as the original */
@media (max-width: 767px) {
  .app-badges img { width: 280px; }
}

/* === Component: site-footer === */
.site-footer__copyright {
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 300;
  letter-spacing: 0.6px;
  text-align: center;
}

/* === Component: contact-email (replaces WordPress forms; not used on this site yet) === */
.contact-email { display: grid; gap: 0.75rem; justify-items: center; padding: 20px; background: var(--color-white); color: var(--color-black); text-align: center; }
.contact-email__address { font-weight: 800; word-break: break-word; }
.contact-email__phone a { color: inherit; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0.75em 1.5em; background: var(--color-red); color: var(--color-white); font: inherit; font-weight: 800; letter-spacing: 2.3px; text-transform: uppercase; border: 0; cursor: pointer; }
.button:hover { filter: brightness(0.92); }

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

/* === Page: 404 === */
.not-found { padding: 30px 20px; background: var(--color-white); color: var(--color-black); text-align: center; }
.not-found__title { margin-bottom: 20px; font-family: var(--font-display); font-size: 35px; color: var(--color-red); }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; margin: 0; }

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