/*
 * site.css: the only stylesheet for neweasttakeaway.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        containers, sections, two-column split
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (Elementor defaults on the original; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *   - <= 767px: columns stack, text centred, hero 400px tall, app section padding 42px
 *   - <= 1024px: app heading 38px, app divider full column width
 *   - >= 1025px (mouse/trackpad): app section background is fixed
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.section-heading--start) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's computed styles) */
  --color-primary: #b31c20;        /* hero overlay, heading dividers */
  --color-dark: #231f20;           /* welcome heading, app overlay, footer */
  --color-accent: #30c947;         /* button hover */
  --color-text: #000000;           /* welcome copy */
  --color-bg: #ffffff;
  --color-white: #ffffff;

  /* Typography */
  --font-body: "Lato", sans-serif;     /* paragraph copy */
  --font-heading: Arial, sans-serif;   /* headings, button, footer */
  --text-section-heading: 42px;        /* app heading: 38px <= 1024px, 32px <= 767px */
  --leading-heading: 68px;

  /* Spacing and shape */
  --widget-pad: 10px;              /* Elementor column padding */
  --container-wide: 1140px;        /* hero */
  --container: 900px;              /* every other section */
  --divider: 10px;                 /* heading underline thickness */

  /* Motion (original timings) */
  --duration: 300ms;
  --ease: ease;
}

/* ============ 2. Fonts ============ */
/* Self-hosted Google Font (SIL OFL), latin subset. Only Lato 400 is used visibly. */
@font-face { font-family: "Lato"; src: url("/assets/fonts/lato-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%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-heading); font-size: 16px; line-height: normal; color: var(--color-text); background: var(--color-bg); }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* Containers carry Elementor's 10px column padding inside them. */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding: var(--widget-pad); position: relative; z-index: 1; }
.container--wide { max-width: var(--container-wide); }
.section { position: relative; }

/* Two equal columns; stacks at <= 767px */
.split { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.split > * { padding: var(--widget-pad); min-width: 0; }
@media (max-width: 767px) {
  .split { grid-template-columns: 1fr; }
}

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

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

/* === Component: site-topline (the original's empty 1px nav bar with a soft shadow; no menu) === */
.site-topline { position: relative; z-index: 100; height: 1px; background: var(--color-bg); box-shadow: 0 0 10px 0 rgb(0 0 0 / 0.5); }

/* === Component: overlay (coloured layer over a background image) === */
.has-overlay { isolation: isolate; }
.has-overlay::before { content: ""; position: absolute; inset: 0; z-index: 0; background: var(--overlay-color); opacity: var(--overlay-opacity); pointer-events: none; }

/* === Component: hero (background photo, red overlay, centred logo) === */
.hero { background: url("/wp-content/uploads/2019/06/neweast-heroimage.jpg") center center / cover no-repeat; --overlay-color: var(--color-primary); --overlay-opacity: 0.8; }
.hero__inner { display: flex; align-items: center; justify-content: center; min-height: 600px; padding: 0; }
.hero__content { width: 100%; padding: var(--widget-pad); }
.hero__logo { width: 60%; margin-inline: auto; }
@media (max-width: 767px) {
  .hero__inner { min-height: 400px; }
}

/* === Component: section-heading (Arial 600, red 10px bar behind the lower part of the text) ===
 * The bar sits --divider-offset above the heading's bottom edge, --divider-width wide.
 * Modifiers: --start (left-aligned bar and text), --light (white text). */
.section-heading { position: relative; z-index: 0; font-family: var(--font-heading); font-size: var(--text-section-heading); font-weight: 600; line-height: var(--leading-heading); color: var(--color-dark); text-align: center; margin-bottom: var(--heading-after, 14px); }
.section-heading::after { content: ""; position: absolute; z-index: -1; top: calc(100% - var(--divider-offset, 24px)); left: 50%; width: var(--divider-width, 524px); max-width: 100%; height: var(--divider); background: var(--color-primary); transform: translateX(-50%); }
.section-heading--start { text-align: start; }
.section-heading--start::after { left: 0; transform: none; }
.section-heading--light { color: var(--color-white); }
@media (max-width: 767px) {
  .section-heading, .section-heading--start { text-align: center; }
  .section-heading::after, .section-heading--start::after { --divider-width: 80%; left: 50%; transform: translateX(-50%); }
}

/* === Component: copy (Lato paragraphs; margins kept inside the block) === */
.copy { display: flow-root; font-family: var(--font-body); font-size: 18px; font-weight: 400; line-height: 36px; letter-spacing: 0.3px; color: var(--color-text); text-align: center; }
.copy p { margin: 18px 0; }
.copy--large { font-size: 26px; line-height: 42px; color: var(--color-white); text-align: start; }
.copy--large p { margin: 26px 0; }
@media (max-width: 767px) {
  .copy--large { text-align: center; }
}

/* === Component: welcome (white intro section) === */
.welcome { padding: 42px 0; }

/* === Component: app-promo (photo with dark overlay, heading, text, outlined button) === */
.app-promo { padding: 110px 0; background: url("/wp-content/uploads/2019/06/neweast-parallax.jpg") center center / cover no-repeat; --overlay-color: var(--color-dark); --overlay-opacity: 0.85; }
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
  .app-promo { background-attachment: fixed; }
}
.app-promo .section-heading { --divider-width: 385px; --divider-offset: 23px; --heading-after: -4px; }
.app-promo__action { margin-top: 36px; }
@media (max-width: 1024px) {
  .app-promo { --text-section-heading: 38px; }
  .app-promo .section-heading { --divider-width: 100%; }
}
@media (max-width: 767px) {
  .app-promo { padding: 42px 0; --text-section-heading: 32px; }
  .app-promo__action { text-align: center; }
  .app-promo__empty { padding: 0; height: 1px; }
}

/* === Component: button (outlined white, fills green on hover) === */
.button { display: inline-block; padding: 15px 30px; border: 3px solid var(--color-white); border-radius: 0; background: transparent; color: var(--color-white); font-family: var(--font-heading); font-size: 18px; font-weight: 600; line-height: 1; letter-spacing: 0.3px; text-align: center; cursor: pointer; transition: all var(--duration) var(--ease); }
.button:hover, .button:focus-visible { background: var(--color-accent); border-color: transparent; color: var(--color-white); }

/* === Component: site-footer (logo + phone | name + address; dark) === */
.site-footer { background: var(--color-dark); color: var(--color-white); }
.footer-contact { padding: 68px 0; }
.footer-contact__main { padding: 0 16px; }
.footer-contact__logo { width: 240px; margin-bottom: 46px; }
.footer-contact__address { text-align: end; }
.footer-contact__name { font-family: var(--font-heading); font-size: 26px; font-weight: 600; line-height: 1; letter-spacing: 0.3px; color: var(--color-white); margin-bottom: 16px; }
.footer-contact__lines { display: flow-root; font-size: 16px; letter-spacing: 0.3px; line-height: normal; }
.footer-contact__lines p { margin: 16px 0; }
@media (max-width: 767px) {
  .footer-contact__main { padding: 0; text-align: center; }
  .footer-contact__logo { margin-inline: auto; }
  .footer-contact__address { padding: 68px 0 0; text-align: center; }
}

/* === Component: icon-list (icon + text rows, white) === */
.icon-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 26px; }
.icon-list__item { display: flex; align-items: center; }
.icon-list__icon { flex: 0 0 auto; display: inline-flex; justify-content: flex-start; width: 32.5px; height: 26px; margin-right: 16px; color: var(--color-white); }
.icon-list__icon svg { width: 26px; height: 26px; fill: currentColor; }
.icon-list__text { padding-left: 5px; font-family: var(--font-heading); font-size: 16px; font-weight: 400; letter-spacing: 0.3px; line-height: normal; color: var(--color-white); }
@media (max-width: 767px) {
  .icon-list { justify-items: center; }
}

/* === Component: footer-bar (copyright | credit, h5 style) === */
.footer-bar__text { padding: 10px; font-family: var(--font-heading); font-size: 16px; font-weight: 400; line-height: 26px; letter-spacing: 0.3px; color: var(--color-white); }
.footer-bar__text--end { text-align: end; }
.footer-bar__text a { color: var(--color-white); text-decoration: underline; }
@media (max-width: 767px) {
  .footer-bar__text, .footer-bar__text--end { text-align: center; }
}

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

/* === Page: /404.html === */
.not-found .hero__content { text-align: center; color: var(--color-white); }
.not-found__logo { width: min(300px, 60%); margin: 0 auto 24px; }
.not-found__title { font-family: var(--font-heading); font-size: 42px; font-weight: 600; line-height: 68px; color: var(--color-white); }
.not-found__text { max-width: 640px; margin: 8px auto 0; font-family: var(--font-body); font-size: 18px; line-height: 36px; letter-spacing: 0.3px; }
.not-found__actions { margin-top: 28px; }
.not-found__links { margin-top: 20px; font-size: 16px; }
.not-found__links a { text-decoration: underline; }

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