/*
 * site.css: the only stylesheet for crumbsdiner.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
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (the original Elementor ones; media queries can't use custom properties):
 *   mobile  ≤ 767px    tablet 768px–1024px    desktop ≥ 1025px
 *   The main nav collapses to the burger at ≤ 767px (Elementor "dropdown: mobile").
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.split--accent) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's computed styles) */
  --color-black: #000000;
  --color-white: #ffffff;
  --color-light: #f1f1f6;          /* About, footer and bottom bar background; app text */
  --color-light-heading: #f1f0f0;  /* app heading */
  --color-text: #2d2d2d;           /* About paragraph */
  --color-address: #111110;        /* footer address; hero overlay */
  --color-accent: #aa4d53;         /* app band, footer credit */
  --color-nav-active: #1d181f;     /* mobile menu hover/current item */
  --color-twitter: #1da1f2;
  --color-facebook: #3b5998;
  --color-instagram: #262626;

  /* Typography */
  --font-body: "Open Sans", sans-serif;
  --font-credit: "Roboto", sans-serif;

  /* Layout */
  --container: 1140px;
  --gutter: 16px;                  /* section side padding */

  /* Motion (the original's timings) */
  --duration: 0.3s;
  --duration-nav-link: 0.4s;
}

/* ============ 2. Fonts ============ */
/* Self-hosted Google Fonts (SIL OFL), latin subset, variable weight files. */
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-latin-variable.woff2") format("woff2"); font-weight: 300 800; 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: 1.5; color: var(--color-black); background: var(--color-white); }
img, svg { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3 { margin: 0; font-family: var(--font-body); font-weight: 600; line-height: 1; }
p { margin: 1em 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
ul { margin: 0; padding: 0; list-style: none; }

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

/* === Component: icon-sprite (inline SVG symbols in the header partial) === */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* === Component: site-header ===
 * Black bar with a soft shadow, not sticky. The hero below slides 46px under it
 * (the original's hero has margin-top: -46px). */
.site-header { position: relative; z-index: 10; padding: 0 var(--gutter); background: var(--color-black); box-shadow: 0 0 10px 0 rgb(0 0 0 / 0.5); }

/* === Component: site-nav ===
 * Desktop/tablet: centred row of uppercase links (Open Sans 600 16px, 1px tracking), no hover change.
 * Mobile (≤767px): burger toggle; the list slides down (grid rows 0fr → 1fr, 0.3s) inside the bar. */
.site-nav { display: grid; justify-items: center; align-items: stretch; }
.site-nav__menu { width: 100%; }
.site-nav__list { display: flex; flex-wrap: wrap; justify-content: center; }
.site-nav__list a { display: block; padding: 13px 16px; font-size: 16px; font-weight: 600; line-height: 20px; letter-spacing: 1px; text-transform: uppercase; color: var(--color-white); transition: var(--duration-nav-link); }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--color-white); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; fill: currentColor; }
.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; }
@media (max-width: 767px) {
  .nav-toggle { display: inline-flex; }
  .site-nav__menu { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--duration) ease, visibility 0s linear var(--duration); }
  .site-nav__menu.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--duration) ease, visibility 0s; }
  .site-nav__list { display: block; min-height: 0; overflow: hidden; text-align: center; }
  .site-nav__list a { padding: 16px; font-weight: 500; transition: none; }
  .site-nav__list a:hover, .site-nav__list a:focus-visible, .site-nav__list a[aria-current="page"] { background: var(--color-nav-active); }
}

/* === Component: page-header (hidden page title, as on the original theme) === */
.page-header { display: none; }

/* === Component: hero ===
 * Photo background with a #111110 overlay at 75%, 60vh tall, logo centred and fading in (1.25s).
 * Fixed background only on desktop pointers (the original turned it off on mobile). */
.hero { position: relative; display: flex; align-items: center; min-height: 60vh; margin-top: -46px; background: url("/wp-content/uploads/2020/02/crumbs-diner-1.jpg") top center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--color-address); opacity: 0.75; }
.hero__inner { position: relative; padding: 10px; }
.hero__logo { width: 360px; margin-inline: auto; }
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
  .hero { background-attachment: fixed; }
}

/* === Component: split (text column + image column; image first on mobile) === */
.split { padding: 110px var(--gutter); background: var(--color-light); }
.split__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.split__body { display: flex; flex-direction: column; align-items: stretch; } /* flex: margins don't collapse, as in Elementor's widget stack */
.split__title { font-size: 68px; line-height: 110px; letter-spacing: 1px; color: var(--color-black); }
.split__text { font-size: 27px; line-height: 42px; color: var(--color-text); }
.split__text p { margin: 27px 0; }
.split__actions { margin-top: 26px; }
.split__media img { width: 100%; }
.split--accent { background: linear-gradient(rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.2)), var(--color-accent); }
.split--accent .split__title { font-size: 42px; color: var(--color-light-heading); }
.split--accent .split__text { font-size: 26px; color: var(--color-light); }
.split--accent .split__text p { margin: 26px 0; }
@media (max-width: 1024px) {
  .split__title, .split--accent .split__title { font-size: 42px; line-height: 68px; }
  .split__text, .split--accent .split__text { font-size: 16px; line-height: 26px; }
  .split__text p, .split--accent .split__text p { margin: 16px 0; }
}
@media (max-width: 767px) {
  .split { padding: 68px var(--gutter); }
  .split__inner { grid-template-columns: 1fr; }
  .split__body { order: 2; padding: 26px 0; text-align: center; }
  .split__media { order: 1; }
  .split__actions { padding-top: 16px; }
}

/* === Component: button (outlined, square; hover turns white) === */
.button { display: inline-block; padding: 15px 30px; border: 2px solid currentColor; border-radius: 0; background: transparent; font-size: 16px; font-weight: 600; line-height: 1; letter-spacing: 1px; color: var(--color-black); text-align: center; transition: all var(--duration); }
.button--light { border-width: 3px; color: var(--color-white); }
.button:hover, .button:focus-visible { background: var(--color-white); color: var(--color-black); border-color: var(--color-white); }

/* === Component: site-footer === */
.site-footer__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.site-footer { background: var(--color-light); }
.site-footer > .site-footer__inner { padding: 42px 0; width: calc(100% - 2 * var(--gutter)); }
.site-footer__brand { display: flex; flex-direction: column; align-items: flex-start; } /* flex: logo and icon margins add up, as on the original */
.site-footer__logo { width: 240px; margin-bottom: 26px; }
.site-footer__address { padding-top: 16px; text-align: end; }
.site-footer__name { font-size: 32px; font-weight: 600; letter-spacing: 0.3px; color: var(--color-black); }
.site-footer__address p { margin: 32px 0 16px; font-size: 16px; line-height: 42px; letter-spacing: 0.3px; color: var(--color-address); }
.site-footer__bar { padding: 0 var(--gutter); }
.site-footer__bar-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 50px; }
.site-footer__copyright { font-size: 16px; font-weight: 300; color: var(--color-black); }
.site-footer__credit { font-family: var(--font-credit); font-size: 16px; font-weight: 500; color: var(--color-accent); text-align: end; }
@media (max-width: 767px) {
  .site-footer__inner, .site-footer__bar-inner { grid-template-columns: 1fr; }
  .site-footer__brand, .site-footer__address, .site-footer__bar-inner { text-align: center; }
  .site-footer__brand { align-items: center; }
  .site-footer__credit { text-align: center; }
  .site-footer__address { padding-top: 0; }
  .site-footer__bar-inner { align-content: center; }
}

/* === Component: social-icons (brand squares, 32px; no links on the original) === */
.social-icons { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.social-icons__item { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10%; color: var(--color-white); transition: opacity var(--duration); }
.social-icons__item:hover { opacity: 0.9; }
.social-icons__item svg { width: 16px; height: 16px; fill: currentColor; }
.social-icons__item--twitter { background: var(--color-twitter); }
.social-icons__item--facebook { background: var(--color-facebook); }
.social-icons__item--instagram { background: var(--color-instagram); }
@media (max-width: 767px) {
  .social-icons { justify-content: center; gap: 32px; margin-top: 20px; padding-bottom: 42px; }
}

/* === Component: contact-email (for any future form replacement; the site has no forms) === */
.contact-email { display: grid; gap: 16px; justify-items: start; }
.contact-email__address { font-weight: 600; word-break: break-word; }

/* === Component: not-found (404 page) === */
.not-found { padding: 110px var(--gutter); background: var(--color-light); }
.not-found__title { font-size: 68px; line-height: 110px; letter-spacing: 1px; }
.not-found__text { font-size: 27px; line-height: 42px; color: var(--color-text); }
.not-found__links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 26px; }
@media (max-width: 1024px) {
  .not-found__title { font-size: 42px; line-height: 68px; }
  .not-found__text { font-size: 16px; line-height: 26px; }
}
@media (max-width: 767px) {
  .not-found { padding: 68px var(--gutter); text-align: center; }
  .not-found__links { justify-content: center; }
}

/* === Component: reveal (GSAP animates these; hidden only once GSAP has loaded) === */
.reveal-ready [data-reveal] { visibility: hidden; }

/* ============ 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; }
  [data-reveal] { visibility: visible !important; }
}
