/*
 * site.css: the only stylesheet for paparazzidouglas.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, split (two-column) layout
 *   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 kit; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *   The nav switches to the burger menu at <= 767px (768 still shows the horizontal menu).
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.button--light) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's computed styles) */
  --color-navy: #003352;          /* nav bar, headings, buttons, app section */
  --color-text: #2d2d2d;          /* story paragraph */
  --color-ink: #000000;           /* footer contact text, bottom bar */
  --color-light: #f1f0f0;         /* text on the navy app section */
  --color-bg: #ffffff;
  --color-bg-alt: #fafafa;        /* story section, contact footer */
  --color-white: #ffffff;
  --color-facebook: #3b5998;
  --color-instagram: #262626;
  --color-phone-frame: #e4e6e7;   /* app mockup frame */
  --color-phone-screen: #ebecec;  /* app mockup screen */

  /* Typography */
  --font-body: "Open Sans", Arial, sans-serif;
  --font-heading: "Oswald", "Arial Narrow", sans-serif;
  --text-base: 16px;
  --text-display: 68px;           /* section headings (H2) on desktop */
  --text-display-lh: 110px;
  --text-display-sm: 42px;        /* section headings at <= 1024px */
  --text-display-sm-lh: 68px;
  --text-lead: 26px;              /* app section paragraph on desktop */
  --text-footer-heading: 26px;

  /* Spacing and shape */
  --space-section: 110px;         /* top/bottom padding of the content sections */
  --space-section-sm: 68px;       /* at <= 767px */
  --space-footer: 42px;
  --gutter: 16px;                 /* side padding of every section */
  --container: 1140px;
  --nav-height: 46px;
  --shadow-nav: 0 0 10px 0 rgb(0 0 0 / 0.5);

  /* Motion (match the original's timings) */
  --duration: 300ms;
  --ease: ease;
}

/* ============ 2. Fonts ============ */
/* Google Fonts, self-hosted (latin subset, variable weight files). */
@font-face { font-family: "Oswald"; src: url("/assets/fonts/oswald-latin-500-600.woff2") format("woff2"); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-latin-300-600.woff2") format("woff2"); font-weight: 300 600; 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; font-weight: 600; }
p { margin: 1em 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* Elementor "boxed" container: 1140px, side padding 16px on the section. */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--space-section); }
.section--alt { background: var(--color-bg-alt); }
.section--navy { background: var(--color-navy); color: var(--color-light); }

/* Two equal columns, vertically centred; stacks at <= 767px.
   .split--media-first-mobile puts the second column (media) first on mobile, as the original did. */
.split { display: flex; align-items: center; }
.split > * { flex: 1 1 50%; min-width: 0; }
@media (max-width: 767px) {
  .section { padding-block: var(--space-section-sm); }
  .split { flex-direction: column; align-items: stretch; text-align: center; }
  .split--media-first-mobile > :last-child { order: -1; }
  .split__text { padding-block: 26px; }
}

/* ============ 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-navy); }
.skip-link:focus { left: var(--gutter); }

/* === Component: site-header (fixed navy bar over the hero, as Elementor Pro sticky) === */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--color-navy); box-shadow: var(--shadow-nav); }
.site-header__inner { display: flex; flex-direction: column; align-items: stretch; }
.nav-toggle { display: none; }
.site-nav__list { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 13px 16px; font-family: var(--font-heading); font-size: 16px; font-weight: 600; line-height: 20px; letter-spacing: 1px; text-transform: uppercase; color: var(--color-white); text-decoration: none; }
@media (max-width: 767px) {
  /* Full-width burger toggle; the menu slides down below it (grid 0fr -> 1fr). */
  .nav-toggle { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 0; background: none; border: 0; color: var(--color-white); cursor: pointer; }
  .nav-toggle svg { width: 22px; height: 22px; }
  .nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-close { display: block; }
  .site-nav { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--duration) var(--ease); }
  .site-nav.is-open { grid-template-rows: 1fr; }
  .site-nav__list { flex-direction: column; flex-wrap: nowrap; min-height: 0; overflow: hidden; visibility: hidden; transition: visibility var(--duration); }
  .site-nav.is-open .site-nav__list { visibility: visible; }
  .site-nav a { padding: 16px 20px; font-weight: 500; text-align: center; }
  .site-nav a:hover, .site-nav a:focus-visible { background: #1d181f; }
}

/* === Component: hero (background image, white 52% overlay, logo slides in) === */
.hero { position: relative; display: flex; align-items: center; min-height: 60vh; background: center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--color-white); opacity: 0.52; }
.hero__inner { position: relative; width: min(100%, var(--container)); margin-inline: auto; padding: 10px; }
.hero__logo { width: 291px; }
/* On the original the hero is pulled up 46px under a 43px mobile bar, so it starts 3px above the page top. */
@media (max-width: 767px) { .hero { margin-top: -3px; } }

/* === Component: section-heading (Oswald display heading) === */
.section-heading { font-family: var(--font-heading); font-size: var(--text-display); font-weight: 600; line-height: var(--text-display-lh); letter-spacing: 1px; color: var(--color-navy); }
.section--navy .section-heading { color: var(--color-light); }
@media (max-width: 1024px) {
  .section-heading { font-size: var(--text-display-sm); line-height: var(--text-display-sm-lh); }
}

/* === Component: prose (story text) === */
.prose { line-height: 42px; color: var(--color-text); }
.prose--lead { font-size: var(--text-lead); color: var(--color-light); }
@media (max-width: 1024px) {
  .prose { line-height: 26px; }
  .prose--lead { font-size: 16px; }
}

/* === Component: button (outline; fills and grows on hover) === */
.button { display: inline-block; padding: 15px 30px; border: 3px solid var(--color-navy); border-radius: 0; background: transparent; color: var(--color-navy); font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 16px; letter-spacing: 1px; text-align: center; text-decoration: none; transition: transform var(--duration), background-color var(--duration), color var(--duration), border-color var(--duration); }
.button:hover, .button:focus-visible { background: var(--color-navy); color: var(--color-white); transform: scale(1.1); }
.button--light { border-color: var(--color-white); color: var(--color-white); }
.button--light:hover, .button--light:focus-visible { background: var(--color-white); color: var(--color-navy); }
/* Button rows: each button sits in its own half-width cell, 10px in, 26px below the text. */
.button-row { display: flex; }
.button-row__cell { flex: 1 1 50%; padding: 10px; }
.button-row__cell .button { margin-top: 26px; }
.button-single { padding-top: 26px; }
@media (max-width: 767px) {
  .button-row { flex-direction: column; }
  .button-row__cell { padding-top: 26px; }
  .button-single { padding-top: 42px; }
}

/* === Component: phone-mockup (static phone frame with the logo on screen) === */
.phone-mockup { position: relative; width: 200px; max-width: 100%; margin-inline: auto; aspect-ratio: 277 / 574; }
.phone-mockup__frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.phone-mockup__screen { position: absolute; left: 5.5%; right: 5.5%; top: 11.6%; bottom: 12%; display: flex; align-items: center; background: var(--color-phone-screen); border-radius: 3px; }
.phone-mockup__screen img { width: 100%; }

/* === Component: site-footer (contact block + black bottom bar) === */
.site-footer { color: var(--color-ink); line-height: normal; }
.site-footer__contact { background: var(--color-bg-alt); padding: var(--space-footer) var(--gutter); }
.site-footer__cols { display: flex; align-items: flex-start; width: min(100%, var(--container)); margin-inline: auto; }
.site-footer__cols > * { flex: 1 1 50%; min-width: 0; }
.site-footer__logo { width: 150px; margin-bottom: 20px; }
.site-footer__phone { display: flex; align-items: center; margin: 0 0 20px; font-weight: 600; letter-spacing: 0.3px; }
.site-footer__phone svg { width: 33px; height: 26px; margin-right: 16px; fill: currentColor; }
.site-footer__phone span { padding-left: 5px; }
.site-footer__address { padding-top: 16px; text-align: end; letter-spacing: 0.3px; }
.site-footer__name { margin-bottom: 16px; font-family: var(--font-heading); font-size: var(--text-footer-heading); font-weight: 600; line-height: 1; letter-spacing: 0.3px; color: var(--color-ink); }
.site-footer__lines { display: flow-root; }
.site-footer__lines p { margin: 16px 0; }
.site-footer__bar { background: var(--color-ink); color: var(--color-white); padding-inline: var(--gutter); }
.site-footer__bar-inner { display: flex; align-items: center; min-height: 50px; width: min(100%, var(--container)); margin-inline: auto; }
.site-footer__bar p { flex: 1 1 50%; margin: 0; font-size: 16px; font-weight: 300; line-height: 16px; }
.site-footer__credit { text-align: end; }
.site-footer__credit a { text-decoration: none; }
@media (max-width: 767px) {
  .site-footer__cols { flex-direction: column; align-items: stretch; }
  .site-footer__phone { justify-content: center; }
  .site-footer__address { padding-top: 0; text-align: center; }
  .site-footer__bar-inner { flex-direction: column; justify-content: center; }
  .site-footer__bar p { flex: none; width: 100%; text-align: center; }
}

/* === Component: social-icons (square brand tiles, white icon) === */
.social-icons { display: flex; gap: 16px; margin: 0; padding: 20px 0 0; list-style: none; }
.social-icons a { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 10%; color: var(--color-white); transition: opacity var(--duration); }
.social-icons a:hover { opacity: 0.9; }
.social-icons svg { width: 26px; height: 26px; fill: currentColor; }
.social-icons__facebook { background: var(--color-facebook); }
.social-icons__instagram { background: var(--color-instagram); }
@media (max-width: 767px) {
  .social-icons { justify-content: center; padding: 0 0 42px; }
}

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

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

/* === Page: /404.html === */
.not-found { text-align: center; }
.not-found .prose { line-height: 26px; }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 26px; }

/* ============ 7. Utilities ============ */
/* Inline SVG icon sprite in the header partial (symbols referenced with <use>). */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.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; }
}
