/*
 * site.css: the only stylesheet for therexcafe.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        container
 *   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
 *
 * Values come from the live site's computed styles (design-system/live-styles.json).
 * The original is one Elementor page; spacing mirrors Elementor's 10px column padding,
 * 20px widget spacing and 1140px boxed container so positions match pixel for pixel.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours */
  --color-text: #000000;
  --color-bg: #ffffff;
  --color-teal: #008f72;          /* footer, bottom of gradients */
  --color-teal-light: #04caa2;    /* top of the logo band gradient */
  --color-border: #000000;        /* logo band top/bottom border */
  --color-on-teal: #ffffff;
  --color-button-bg: rgb(255 255 255 / 0.25);
  --color-facebook: #3b5998;
  --color-tripadvisor: #589442;
  --shadow-photo: 0 0 10px 0 rgb(0 0 0 / 0.26);

  /* Typography */
  --font-body: "Roboto", sans-serif;     /* self-hosted variable font */
  --text-prose: 18px;   --leading-prose: 42px;   --weight-prose: 500;
  --text-title: 24px;   --weight-title: 600;      /* THE REX CAFE */
  --text-button: 22px;  --weight-button: 700;
  --text-small: 16px;                             /* copyright line */

  /* Spacing and shape */
  --container: 1140px;
  --col-pad: 10px;          /* Elementor "default" column gap (each side) */
  --widget-gap: 20px;       /* Elementor space between widgets */
  --radius-button: 15px;

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

/* ============ 2. Fonts ============ */
/* Roboto (Google Fonts, SIL OFL), latin subset, variable weight; used weights 400/500/600/700. */
@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; }
/* No smooth scrolling: the original's #contact jump is instant. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: normal; color: var(--color-text); background: var(--color-bg); }
img, svg { max-width: 100%; }
img { height: auto; display: inline-block; vertical-align: middle; border: 0; }
h1, h2, h3 { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-text); outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* Boxed container (Elementor "boxed": max 1140px, full width below that) with the
   column's 10px padding. */
.container { max-width: var(--container); margin-inline: auto; padding: var(--col-pad); }

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

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

/* === Component: icon-sprite (inline SVG symbols in shared/header.html) === */
.icon-sprite { display: none; }

/* === Component: hero (full-width photo; fixed background on desktop like the original) === */
.hero { min-height: 600px; background-color: var(--color-bg); background-repeat: no-repeat; background-size: cover; background-position: 0 50%; }
@media (min-width: 1025px) { .hero { background-attachment: fixed; } }
@media (max-width: 1024px) { .hero { background-position: 0 0; } }
@media (max-width: 767px)  { .hero { min-height: 200px; } }
.hero--compact { min-height: 200px; }   /* 404 page */

/* === Component: logo-band (teal gradient strip, black borders, round logo overlapping it) === */
.logo-band { position: relative; z-index: 2; height: 130px; border-block: 5px solid var(--color-border); background: linear-gradient(180deg, var(--color-teal-light) 0%, var(--color-teal) 100%); display: flex; justify-content: center; align-items: flex-start; padding-inline: 20px; }
.logo-band__logo { width: 300px; margin-top: -90px; }
.logo-band a { display: block; border-radius: 50%; }

/* === Component: intro (white-to-teal gradient section holding the text and the cards) === */
.intro { background: linear-gradient(180deg, #ffffff 40%, var(--color-teal) 100%); padding-top: 120px; }
.intro__text { margin-block: 42px; padding: var(--col-pad); }

/* === Component: prose (centred Roboto copy with the original's hard line breaks) === */
.prose { font-size: var(--text-prose); font-weight: var(--weight-prose); line-height: var(--leading-prose); text-align: center; }
.prose p { margin: 18px 0; }
.prose--on-teal { color: var(--color-on-teal); }

/* === Component: cards (three round photos, each with a button; stack on mobile) === */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 42px 0 110px; }
.card { padding: var(--col-pad); text-align: center; }
.card__photo { width: 150px; height: 150px; border-radius: 50%; box-shadow: var(--shadow-photo); margin-bottom: var(--widget-gap); }
@media (max-width: 767px) { .cards { grid-template-columns: 100%; } }

/* === Component: button (translucent white, rounded; no hover change on the original) === */
.button { display: inline-block; padding: 15px 30px; border-radius: var(--radius-button); background: var(--color-button-bg); color: var(--color-on-teal); font-family: var(--font-body); font-size: var(--text-button); font-weight: var(--weight-button); line-height: 1; text-align: center; text-decoration: none; transition: all var(--duration) var(--ease); }

/* === Component: site-footer (teal: name, address, socials, copyright; #contact target) === */
.site-footer { background: var(--color-teal); color: var(--color-on-teal); text-align: center; }
.site-footer__title { font-size: var(--text-title); font-weight: var(--weight-title); line-height: 1; margin-bottom: var(--widget-gap); }
.site-footer__address { margin-bottom: var(--widget-gap); display: flow-root; }
.site-footer__copyright { margin: 62px 0 42px; font-size: var(--text-small); font-weight: 400; line-height: 1; }
.site-footer__copyright a { color: inherit; text-decoration: none; }
.site-footer__copyright a:hover { text-decoration: underline; }

/* === Component: social-icons (brand-coloured rounded squares, 50px, 25px glyph) === */
.social-icons { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 10%; color: #ffffff; transition: all var(--duration) var(--ease); }
.social-icon svg { width: auto; height: 25px; fill: currentColor; }
.social-icon--facebook { background: var(--color-facebook); }
.social-icon--tripadvisor { background: var(--color-tripadvisor); }

/* === Component: contact-email (for a future mailto block; the original has no form) === */
.contact-email { display: grid; gap: 12px; justify-items: center; text-align: center; }
.contact-email__address { font-weight: 600; word-break: break-word; }

/* === Component: not-found (404 page body) === */
.not-found { padding: 40px 10px 110px; text-align: center; }
.not-found__title { font-size: 36px; font-weight: 600; line-height: 1.2; margin-bottom: 20px; }
.not-found .button { margin: 6px; }

/* ============ 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) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
