/*
 * site.css: the only stylesheet for kingfishharpenden.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, 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 (image above text in About), text centred
 *   - ≤ 1024px: section headings 68px line height, body copy 26px line height
 *   - ≥ 1025px (mouse/trackpad): App section background is fixed
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.split--reverse-mobile) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's computed styles) */
  --color-primary: #0072a7;        /* headings, button, footer */
  --color-primary-light: #2daadf;  /* hero gradient top, button hover */
  --color-text: #2d2d2d;           /* About copy */
  --color-text-dark: #0c0c0c;      /* App copy */
  --color-bg: #ffffff;
  --color-bg-alt: #fafafa;         /* About section */
  --color-footer-heading: #f1f0f0;
  --color-facebook: #3b5998;
  --color-instagram: #262626;
  --color-white: #ffffff;

  /* Typography */
  --font-body: "Roboto", sans-serif;
  --font-heading: "Montserrat", sans-serif;
  --font-footer-bar: sans-serif;   /* original asked for "Muli", which was never loaded: visitors saw the system sans-serif */
  --text-base: 16px;
  --text-hero: 26px;
  --text-section-heading: 42px;
  --leading-copy: 42px;            /* ≤1024px: 26px */
  --leading-heading: 110px;        /* ≤1024px: 68px */

  /* Spacing and shape */
  --gutter: 16px;
  --space-section: 110px;          /* ≤767px: 68px */
  --container: 1140px;
  --radius-button: 25px;

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

/* ============ 2. Fonts ============ */
/* Self-hosted Google Fonts (SIL OFL), latin subset. Roboto is one variable file (400–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; }
@font-face { font-family: "Montserrat"; src: url("/assets/fonts/montserrat-900-latin.woff2") format("woff2"); font-weight: 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: var(--text-base); line-height: 1.5; 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 { margin: 0; line-height: 1; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ============ 4. Layout ============ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; position: relative; z-index: 1; }
.section { position: relative; padding: var(--space-section) var(--gutter); }

/* Two equal columns, vertically centred; stacks at ≤767px */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 767px) {
  :root { --space-section: 68px; }
  .split { grid-template-columns: 1fr; }
  .split--reverse-mobile > :last-child { order: -1; }
}
@media (max-width: 1024px) {
  :root { --leading-copy: 26px; --leading-heading: 68px; }
}

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

/* === Component: skip-link === */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 8px 16px; background: var(--color-bg); color: var(--color-primary); }
.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: 2; height: 1px; background: var(--color-bg); box-shadow: 0 0 10px 0 rgb(0 0 0 / 0.5); }

/* === Component: hero (gradient, drifting bubbles, logo, subtitle) === */
.hero { position: relative; overflow: hidden; background-image: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-primary) 100%); padding: 120px 0 150px; text-align: center; }
.hero__logo { width: 360px; margin: 0 auto 20px; }
.hero__subtitle { font-family: var(--font-body); font-size: var(--text-hero); font-weight: 600; line-height: 42px; letter-spacing: 0.3px; color: var(--color-white); text-shadow: 0 1px 6px rgb(0 0 0 / 0.3); }
.hero__content { position: relative; z-index: 1; }

/* === Component: bubbles (replaces particles.js: 10 translucent white circles drifting up) ===
 * Each .bubble sets --x (left), --size, --dur, --delay and --rest (resting offset used when
 * motion is reduced). Negative delays spread them over the hero from the first frame. */
.bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bubble { position: absolute; left: var(--x); bottom: calc(-1 * var(--size)); width: var(--size); height: var(--size); border-radius: 50%; background: rgb(255 255 255 / 0.16); animation: bubble-rise var(--dur) linear var(--delay) infinite; }
.bubble:nth-child(1) { --x: 7%; --size: 46px; --dur: 21s; --delay: -6s; --rest: 380px; }
.bubble:nth-child(2) { --x: 20%; --size: 58px; --dur: 24s; --delay: -15s; --rest: 520px; }
.bubble:nth-child(3) { --x: 10%; --size: 32px; --dur: 18s; --delay: -11s; --rest: 230px; }
.bubble:nth-child(4) { --x: 41%; --size: 18px; --dur: 17s; --delay: -3s; --rest: 610px; }
.bubble:nth-child(5) { --x: 51%; --size: 28px; --dur: 20s; --delay: -17s; --rest: 560px; }
.bubble:nth-child(6) { --x: 61%; --size: 18px; --dur: 16s; --delay: -9s; --rest: 490px; }
.bubble:nth-child(7) { --x: 82%; --size: 52px; --dur: 22s; --delay: -14s; --rest: 450px; }
.bubble:nth-child(8) { --x: 88%; --size: 36px; --dur: 19s; --delay: -12s; --rest: 400px; }
.bubble:nth-child(9) { --x: 92%; --size: 40px; --dur: 23s; --delay: -19s; --rest: 560px; }
.bubble:nth-child(10) { --x: 94%; --size: 38px; --dur: 20s; --delay: -5s; --rest: 150px; }
@keyframes bubble-rise {
  from { transform: translate(0, 0); }
  25% { transform: translate(6px, -200px); }
  50% { transform: translate(-4px, -400px); }
  75% { transform: translate(5px, -600px); }
  to { transform: translate(0, -820px); }
}

/* === Component: section-heading (Montserrat 900 uppercase blue) === */
.section-heading { font-family: var(--font-heading); font-size: var(--text-section-heading); font-weight: 900; line-height: var(--leading-heading); text-transform: uppercase; color: var(--color-primary); }

/* === Component: copy (body text blocks; paragraph margins kept inside the block) === */
.copy { display: flow-root; font-size: var(--text-base); line-height: var(--leading-copy); }
.copy p { margin: 16px 0; }
.copy--dark { color: var(--color-text-dark); }
@media (max-width: 767px) {
  .copy, .section-heading { text-align: center; }
}

/* === Component: shape-divider (tilt, top of a section) === */
.shape-divider { position: absolute; top: -1px; left: 0; width: 100%; overflow: hidden; line-height: 0; z-index: 0; pointer-events: none; }
.shape-divider svg { display: block; position: relative; left: 50%; transform: translateX(-50%); width: calc(100% + 1.3px); height: 500px; }
.shape-divider path { fill: var(--color-bg); }

/* === Component: about (text + image, grey background, tilt divider) === */
.about { background: var(--color-bg-alt); }
.about__image { width: calc(100% - 32px); margin: 16px; }
@media (max-width: 767px) {
  .about__text { padding: 26px 0; }
}

/* === Component: app-promo (fixed background image, heading, text, button) === */
.app-promo { background: url("/wp-content/uploads/2019/09/fishchipsbg.jpg") center center / cover no-repeat; }
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
  .app-promo { background-attachment: fixed; }
}
.app-promo__action { margin-top: 42px; }
@media (max-width: 767px) {
  .app-promo__text { padding: 26px 0; }
  .app-promo__action { padding-top: 16px; text-align: center; }
}

/* === Component: button (rounded, grows on hover) === */
.button { display: inline-block; padding: 15px 30px; border-radius: var(--radius-button); background: var(--color-primary); color: var(--color-white); font-family: var(--font-body); font-size: 16px; font-weight: 500; line-height: 16px; text-align: center; text-decoration: none; border: 0; cursor: pointer; transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease); }
.button:hover, .button:focus-visible { background: var(--color-primary-light); color: var(--color-white); transform: scale(1.1); }

/* === Component: site-footer (contact block, address, bottom bar) === */
.site-footer { background: var(--color-primary); color: var(--color-white); padding-bottom: 20px; }
.footer-contact { padding: 42px var(--gutter); }
.footer-contact__grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.footer-contact__logo { width: 240px; margin-bottom: 46px; }
.footer-contact__address { padding-top: 16px; text-align: end; }
.footer-contact__name { font-family: var(--font-body); font-size: 26px; font-weight: 600; line-height: 26px; letter-spacing: 0.3px; color: var(--color-footer-heading); margin-bottom: 16px; }
.footer-contact__lines { display: flow-root; letter-spacing: 0.3px; line-height: normal; }
.footer-contact__lines p { margin: 16px 0; }
@media (max-width: 767px) {
  .footer-contact__grid { grid-template-columns: 1fr; }
  .footer-contact__main { text-align: center; }
  .footer-contact__logo { margin-inline: auto; }
  .footer-contact__address { padding-top: 0; text-align: center; }
}

/* === Component: icon-list (email / phone with icons) === */
.icon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.icon-list__item { display: flex; align-items: center; }
.icon-list__icon { flex: 0 0 32.5px; width: 32.5px; height: 26px; display: inline-flex; justify-content: center; margin-right: 16px; color: var(--color-white); }
.icon-list__icon svg { width: 26px; height: 26px; fill: currentColor; }
.icon-list__text { line-height: normal; font-size: 16px; font-weight: 600; letter-spacing: 0.3px; color: var(--color-white); }
@media (max-width: 767px) {
  .icon-list { justify-items: center; }
}

/* === Component: social-icons (round brand-coloured icons) === */
.social-icons { display: flex; flex-wrap: wrap; gap: 16px; margin: 40px 0 0; list-style: none; padding: 0; }
.social-icons li { display: flex; }
.social-icons__link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: var(--color-white); }
.social-icons__link::after { content: ""; position: absolute; inset: -6px; } /* 44px tap target, same look */
.social-icons__link svg { height: 16px; width: auto; fill: currentColor; }
.social-icons__link--facebook { background: var(--color-facebook); }
.social-icons__link--instagram { background: var(--color-instagram); }
@media (max-width: 767px) {
  .social-icons { justify-content: center; margin: 20px 0 42px; }
}

/* === Component: footer-bar (copyright | credit) === */
.footer-bar { padding: 0 var(--gutter); }
.footer-bar__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 50px; }
.footer-bar__text { font-family: var(--font-footer-bar); font-size: 16px; font-weight: 300; line-height: 16px; color: var(--color-white); }
.footer-bar__text--end { text-align: end; }
.footer-bar__text a { color: var(--color-white); }
@media (max-width: 767px) {
  .footer-bar__inner { grid-template-columns: 1fr; align-content: center; gap: 9px; }
  .footer-bar__text, .footer-bar__text--end { text-align: center; }
}

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

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

/* === Page: /404.html === */
.not-found { padding-inline: var(--gutter); }
.not-found__text { max-width: 640px; margin: 16px auto 0; color: var(--color-white); line-height: 26px; }
.not-found__actions { margin-top: 32px; }
.not-found__links { margin-top: 24px; color: var(--color-white); }
.not-found__links a { color: var(--color-white); text-decoration: underline; }
.button--light { background: var(--color-white); color: var(--color-primary); }
.button--light:hover, .button--light:focus-visible { background: var(--color-primary-light); color: var(--color-white); }

/* ============ 7. Utilities ============ */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-center { text-align: center; }

/* ============ 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; }
  .bubble { animation: none !important; transform: translateY(calc(-1 * var(--rest))); }
}
