/*
 * site.css: the only stylesheet for thefishinnatherstone.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        containers
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules
 *   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 (archived Elementor Pro "dropdown: mobile").
 *   The FREE Mobile App columns stack at ≤ 1024px; the footer columns stack at ≤ 767px.
 *
 * Values come from the original's Elementor CSS (post-17.css, archived post-17 for the nav)
 * and computed styles measured on the live site (design-system/src/live-measure.txt).
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-header: #949699;         /* header bar grey; also the button hover */
  --color-primary: #273c88;        /* brand blue: app band, "THE FISH INN" heading */
  --color-dark: #343434;           /* hero overlay (70%), image band base */
  --color-dropdown: #0c0c0c;       /* mobile nav dropdown */
  --color-device: #e3e4e6;         /* silver phone frame */
  --color-device-detail: #c4c5c8;  /* silver phone home button, camera, speaker */

  /* Typography */
  --font-body: "Open Sans", sans-serif;   /* text, buttons, hero heading */
  --font-heading: "Oswald", sans-serif;   /* app heading, footer name, nav */
  --font-bar: "Mulish", sans-serif;       /* bottom bar (the original's "Muli", manifest d6) */

  /* Layout */
  --container: 1140px;             /* Elementor boxed width */
  --gutter: 16px;                  /* section side padding where the original had it */
  --shadow-header: 0 0 10px 0 rgb(0 0 0 / 0.5);
  --divider-height: 30px;          /* Elementor "tilt" shape dividers */

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

/* ============ 2. Fonts ============ */
/* Self-hosted Google Fonts (SIL OFL), latin subset. Open Sans and Oswald are variable fonts
 * (one file covers the weights used: Open Sans 400/600/700, Oswald 400/600). Mulish 300. */
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/opensans-var-latin.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("/assets/fonts/oswald-var-latin.woff2") format("woff2"); font-weight: 200 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Mulish"; src: url("/assets/fonts/mulish-300-latin.woff2") format("woff2"); font-weight: 300; 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, h4 { margin: 0; font-weight: inherit; }
p { margin: 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; }
/* The header is sticky: keep anchor targets (#contact) clear of it. */
[id] { scroll-margin-top: 170px; }

/* ============ 4. Layout ============ */
main > section { display: flow-root; }
.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; }
.icon { display: inline-block; width: 1em; height: 1em; fill: currentColor; flex: none; }

/* === Component: page-header (theme h1 "Home", hidden on the original; kept for SEO) === */
.page-header { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* === Component: site-header ===
 * Grey #949699 bar with a shadow, sticky at the top on all widths (Elementor Pro sticky, restored d1).
 * Logo column 24.474% (logo 180px; 100px centred on mobile), nav column 75.526%, 10px column padding.
 * Mobile: stacked (logo, then the burger bar). */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--color-header); box-shadow: var(--shadow-header); }
.site-header__inner { display: flex; align-items: stretch; }
.site-header__logo { flex: 0 0 24.474%; padding: 10px; }
.site-header__logo img { width: 180px; }
@media (max-width: 767px) {
  .site-header__inner { flex-direction: column; }
  .site-header__logo { flex: none; }
  .site-header__logo img { width: 100px; margin-inline: auto; }
}

/* === Component: site-nav (restored from Wayback 2023-12-14, manifest d1/d7) ===
 * ≥768px: horizontal, right-aligned; Oswald 16px/600 uppercase, 0.4px tracking, white, 13px 15px.
 * ≤767px: full-width burger bar (white icon), then a #0c0c0c dropdown with centred items that
 * slides open (grid rows 0fr → 1fr; nav align-items: stretch so the list is clipped while animating). */
.site-nav { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; align-items: stretch; padding: 10px; }
.site-nav__list { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.site-nav__list a { display: block; padding: 13px 15px; font-family: var(--font-heading); font-size: 16px; font-weight: 600; line-height: 20px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--color-white); }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 100%; height: 44px; padding: 0; border: 0; border-radius: 3px; background: rgb(0 0 0 / 0.05); 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) {
  .site-nav { padding-top: 0; }
  .nav-toggle { display: inline-flex; }
  .site-nav__menu { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--duration) ease, margin-top var(--duration) ease, visibility 0s linear var(--duration); }
  .site-nav__menu.is-open { grid-template-rows: 1fr; margin-top: 10px; visibility: visible; transition: grid-template-rows var(--duration) ease, margin-top var(--duration) ease, visibility 0s; }
  .site-nav__list { display: block; min-height: 0; overflow: hidden; background: var(--color-dropdown); text-align: center; }
  .site-nav__list a { padding: 10px 15px; }
}

/* === Component: shape-divider (Elementor "tilt" dividers, inline SVG, white) ===
 * Same geometry as Elementor: SVG 100% + 1.3px wide, 30px tall, mirrored (rotateY 180°);
 * the bottom divider is the top one rotated 180°. */
.shape-divider { position: absolute; left: 0; z-index: 2; width: 100%; overflow: hidden; line-height: 0; direction: ltr; pointer-events: none; }
.shape-divider svg { display: block; position: relative; left: 50%; width: calc(100% + 1.3px); max-width: none; height: var(--divider-height); transform: translateX(-50%) rotateY(180deg); }
.shape-divider path { fill: var(--color-white); }
.shape-divider--top { top: -1px; }
.shape-divider--bottom { bottom: -1px; transform: rotate(180deg); }

/* === Component: hero (photo band: fishinnbg2.jpg under a #343434 70% overlay, tilt divider) ===
 * Min-height 600px (400px ≤1024px); heading centred vertically. */
.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 600px; background: var(--color-dark) url("/wp-content/uploads/2019/12/fishinnbg2.jpg") center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--color-dark); opacity: 0.7; }
.hero__title { font-family: var(--font-body); font-size: 42px; font-weight: 700; line-height: 1; text-align: center; color: var(--color-white); }
@media (max-width: 1024px) {
  .hero { min-height: 400px; }
}

/* === Component: app-promo (blue FREE Mobile App band: phone mockup + text + button) ===
 * #273c88, 110px top/bottom padding, tilt dividers; two equal columns ≥1025px,
 * stacked (phone above the text) ≤1024px. */
.app-promo { position: relative; padding: 110px 0; background: var(--color-primary); color: var(--color-white); }
.app-promo__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.app-promo__media { display: flex; justify-content: center; }
.app-promo__body { text-align: center; }
.app-promo__title { margin-bottom: 26px; font-family: var(--font-heading); font-size: 68px; font-weight: 400; line-height: 110px; letter-spacing: 1px; }
.app-promo__text { display: flow-root; } /* Elementor widgets are flex items: margins never collapse */
.app-promo__text p { margin: 16px 0; font-size: 16px; line-height: 42px; }
.app-promo__action { margin-top: 26px; }
@media (max-width: 1024px) {
  .app-promo__inner { grid-template-columns: 1fr; }
  .app-promo__media .device { margin-bottom: 42px; }
  .app-promo__title { font-size: 42px; line-height: 68px; }
  .app-promo__text p { line-height: 26px; }
}
@media (max-width: 767px) {
  .app-promo__action { padding-top: 16px; }
}

/* === Component: device (phone mockup, restored Elementor Extras widget, silver skin, manifest d2) ===
 * 277×574 phone SVG at max-width 200px; the screen (9:16, 88.8% wide, 11.7% from the top) shows
 * the app screenshot. */
.device { position: relative; width: 200px; max-width: 100%; }
.device__shape { display: block; width: 100%; height: auto; }
.device__shape .device__body { fill: var(--color-device); }
.device__shape .device__overlay { fill: var(--color-device-detail); }
.device__screen { position: absolute; top: 11.7%; left: 50%; width: 88.80866%; aspect-ratio: 9 / 16; transform: translateX(-50%); overflow: hidden; }
.device__screen img { width: 100%; height: 100%; object-fit: cover; }

/* === Component: button (DOWNLOAD APP) ===
 * Transparent, 3px white border, Open Sans 600 16px, 1px tracking, 15px 30px (208×52 on the original).
 * Hover/focus: #949699 background and border, Elementor "grow" (scale 1.1, 0.3s). */
.button { display: inline-block; padding: 15px 30px; border: 3px solid currentColor; border-radius: 0; background: transparent; font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1; letter-spacing: 1px; color: var(--color-white); transition: all var(--duration); }
.button:hover, .button:focus-visible { background: var(--color-header); border-color: var(--color-header); color: var(--color-white); transform: scale(1.1); }

/* === Component: image-band (fishinnbg3.jpg at 30% over #343434, tilt dividers, no content) ===
 * Fixed background only on desktop pointers (the original fixed it ≥1025px; touch browsers ignore it). */
.image-band { position: relative; isolation: isolate; min-height: 360px; background: var(--color-dark); }
.image-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("/wp-content/uploads/2019/12/fishinnbg3.jpg") center / cover no-repeat; opacity: 0.3; }
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
  .image-band::before { background-attachment: fixed; }
}

/* === Component: footer-contact (white contact section: logo left, name/address/phone right) ===
 * 42px 16px padding; two equal columns ≥768px, stacked and centred ≤767px. Phone hidden on phones
 * (as the original). id="contact" is the nav's Contact target. */
.footer-contact { padding: 42px var(--gutter); background: var(--color-white); }
.footer-contact__inner { display: grid; grid-template-columns: 1fr 1fr; max-width: var(--container); margin-inline: auto; }
.footer-contact__brand img { width: 240px; padding-bottom: 26px; box-sizing: content-box; }
.footer-contact__details { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; padding-top: 16px; text-align: right; }
.footer-contact__name { font-family: var(--font-heading); font-size: 26px; font-weight: 600; line-height: 1; letter-spacing: 0.3px; color: var(--color-primary); }
.footer-contact__address { display: flow-root; }
.footer-contact__address p { margin: 16px 0; font-size: 16px; line-height: 42px; letter-spacing: 0.3px; }
.footer-contact__phone { display: flex; align-items: center; font-size: 16px; font-weight: 600; letter-spacing: 0.3px; }
.footer-contact__phone .icon { width: 26px; height: 26px; margin-inline-end: 16px; }
@media (max-width: 767px) {
  .footer-contact__inner { grid-template-columns: 1fr; }
  .footer-contact__brand img { margin-inline: auto; margin-bottom: 20px; }
  .footer-contact__details { align-items: center; padding: 0 0 16px; text-align: center; }
  .footer-contact__phone { display: none; }
}

/* === Component: site-footer (white bottom bar: © line left, Powered by OrderYOYO right) ===
 * Min-height 50px, columns padded 10px; Mulish 300 16px black. Stacked and centred ≤767px. */
.site-footer__bar { border-top: 1px solid rgb(255 255 255 / 0.19); background: var(--color-white); }
.site-footer__bar-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; max-width: var(--container); min-height: 50px; margin-inline: auto; }
.site-footer__copyright, .site-footer__credit { padding: 10px; font-family: var(--font-bar); font-size: 16px; font-weight: 300; line-height: 1; color: var(--color-black); }
.site-footer__credit { text-align: right; }
@media (max-width: 767px) {
  .site-footer__bar-inner { grid-template-columns: 1fr; }
  .site-footer__copyright { padding: 0; }
  .site-footer__copyright, .site-footer__credit { text-align: center; }
}

/* === 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: 700; word-break: break-word; }

/* === Component: not-found (404 page: blue band in the app-promo style) === */
.not-found { padding: 110px 16px; background: var(--color-primary); color: var(--color-white); text-align: center; }
.not-found__title { margin-bottom: 26px; font-family: var(--font-heading); font-size: 68px; font-weight: 400; line-height: 1.2; letter-spacing: 1px; }
.not-found__text { margin-bottom: 26px; font-size: 16px; line-height: 42px; }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
@media (max-width: 1024px) {
  .not-found__title { font-size: 42px; }
  .not-found__text { line-height: 26px; }
}

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