/*
 * site.css: the only stylesheet for rubychinese-takeaway.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, sections
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (media queries can't use custom properties):
 *   Elementor:      mobile <= 767px    tablet 768px-1024px (no tablet-specific rules on this site)    desktop >= 1025px
 *   Body text (from the twentyseventeen theme the original ran on):
 *                   < 480px 15px / 1.66    480px-767px 18px / 1.66    >= 768px 16px / 1.5
 *
 * Values come from the original's computed styles (Elementor page 2, kit 55, twentyseventeen).
 * Editing: change tokens to restyle the site; add new components as new blocks.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours */
  --color-text: #333333;             /* theme body text (404 page only) */
  --color-bg: #ffffff;
  --color-ruby: #a40c0c;             /* top strip and info band */
  --color-ruby-glass: rgb(164 12 12 / 0.66); /* Order Now button */
  --color-on-ruby: #ffffff;          /* text on the red band and hero */
  --color-heading: #000000;          /* info band headings (black on red, as original) */
  --color-copyright: #0c0c0c;
  --color-link: #222222;
  --color-link-hover: #000000;
  --hero-overlay: rgb(0 0 0 / 0.3);

  /* Typography */
  --font-body: "Roboto", Arial, Helvetica, sans-serif;
  --font-serif: "Alike", Georgia, serif;               /* phone number, copyright line */
  --font-heading: "Times New Roman", sans-serif;       /* exactly the original's stack */
  --text-base: 15px;
  --leading: 1.66;
  --text-hero: 19px;
  --text-heading: 24px;
  --text-phone: 16px;
  --text-copyright: 18px;
  --text-button: 15px;

  /* Spacing and shape */
  --gutter: 10px;                    /* Elementor column padding */
  --widget-gap: 20px;                /* space between stacked widgets */
  --container: 1140px;
  --hero-content: 500px;
  --hero-min-height: 500px;
  --strip-height: 41px;              /* 20px from 768px */
  --map-height: 300px;
  --radius-pill: 50px;

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

@media (min-width: 480px) {
  :root { --text-base: 18px; }
}

@media (min-width: 768px) {
  :root {
    --text-base: 16px;
    --leading: 1.5;
    --text-hero: 24px;
    --strip-height: 20px;
  }
}

/* ============ 2. Fonts ============ */
/* Roboto (Google Fonts, SIL OFL), latin subset, variable file covering 300/400. */
@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;
}
/* Alike (Google Fonts, SIL OFL), latin subset, 400 only. */
@font-face {
  font-family: "Alike";
  src: url("/assets/fonts/alike-400-latin.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%; }
body { margin: 0; font-family: var(--font-body); font-size: var(--text-base); line-height: var(--leading); color: var(--color-text); background: var(--color-bg); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1.5em; }
a { color: var(--color-link); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover, a:active { color: var(--color-link-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* Elementor "boxed" section: up to 1140px, columns carry the 10px gutter. */
.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: 0.5rem 1rem; background: var(--color-bg); color: var(--color-link); }
.skip-link:focus { left: 1rem; }

/* === Component: site-header (decorative red strip; the original's nav widget was empty) === */
.site-header { display: block; height: var(--strip-height); background: var(--color-ruby); }

/* === Component: hero (background photo + 30% black overlay, logo, tagline, button) === */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(var(--hero-min-height) + 6px); /* 500px + 3px borders */
  border-block: 3px solid #ffffff;
  background-color: #000000;
  background-image: var(--hero-image);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero__inner { position: relative; width: 100%; max-width: var(--hero-content); margin-inline: auto; padding: var(--gutter); text-align: center; }
.hero__inner > * + * { margin-top: var(--widget-gap); }
.hero__logo { margin-inline: auto; width: auto; max-width: 100%; }
.hero__text { display: flow-root; /* keeps the paragraph margin inside, like the original widget */ font-family: var(--font-body); font-size: var(--text-hero); color: var(--color-on-ruby); }
.hero__action { display: flex; justify-content: center; }
@media (max-width: 767px) {
  .hero__logo { width: 60%; }
}

/* === Component: button (Order Now pill; no hover change, as original) === */
.button {
  position: relative;
  display: inline-block;
  padding: 10px 40px;
  border: 2px solid #ffffff;
  border-radius: var(--radius-pill);
  background: var(--color-ruby-glass);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: var(--text-button);
  font-weight: 300;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
}
.button:hover, .button:active { color: #ffffff; }
/* Invisible enlarged tap area (button is 39px tall, as original) */
.button::after { content: ""; position: absolute; inset: -4px 0; }

/* === Component: info-band (red band: Contact / Address / Opening Times) === */
.info-band { background: var(--color-ruby); color: var(--color-on-ruby); }
.info-band__inner { display: flex; align-items: center; min-height: 200px; }
.info-band__col { flex: 1 1 0; min-width: 0; padding: var(--gutter); text-align: center; }
.info-band__col > * + * { margin-top: var(--widget-gap); }
.info-band__title { font-family: var(--font-heading); font-size: var(--text-heading); font-weight: 600; line-height: 1; text-transform: uppercase; color: var(--color-heading); }
.info-band__text { font-family: var(--font-body); }
.info-band__text--serif { font-family: var(--font-serif); font-size: var(--text-phone); }
@media (max-width: 767px) {
  .info-band { padding: 30px; }
  .info-band__inner { display: block; min-height: 0; }
  .info-band__col--roomy { padding: 20px; }
}

/* === Component: site-footer (copyright row, then the full-width map, as original) === */
.site-footer { display: block; }
.site-footer__bar { padding: var(--gutter); }
.site-footer__copyright { margin: 0 0 1.5em; padding-top: 20px; font-family: var(--font-serif); font-size: var(--text-copyright); font-weight: 400; color: var(--color-copyright); text-align: center; }
.site-footer__copyright a { text-decoration: underline; }

/* === Component: map === */
.map { display: block; width: 100%; height: var(--map-height); border: 0; }

/* === Component: contact-email (template only: this site had no forms) === */
.contact-email { display: grid; gap: var(--widget-gap); justify-items: center; text-align: center; }
.contact-email__address { font-weight: 600; word-break: break-word; }
.contact-email__phone a { color: inherit; }

/* === Component: not-found (404 page body) === */
.not-found { padding: 60px var(--gutter); text-align: center; color: var(--color-text); }
.not-found__title { margin-bottom: var(--widget-gap); font-family: var(--font-heading); font-size: var(--text-heading); font-weight: 600; line-height: 1; text-transform: uppercase; color: var(--color-heading); }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin: 0; padding: 0; list-style: none; }
.not-found__links a { display: inline-block; min-height: 44px; padding-block: 10px; text-decoration: underline; }

/* ============ 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 { transition-duration: 0.01ms !important; }
}
