/* ==========================================================================
   Foundation — design tokens, layout primitives, and shared site chrome
   (header, navigation, buttons, footer). Both pages load this file.

   Single committed light theme. Visual language: technical drawing —
   white ground, graphite linework, brand red reserved for emphasis.
   ========================================================================== */

/* Fonts are served from this site (no Google Fonts request). Both are variable
   fonts, so one file per subset covers every weight. Licence: SIL OFL 1.1. */

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url(fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url(fonts/outfit-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url(fonts/outfit-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light;

    /* Surfaces */
    --bg: #ffffff;
    --bg-subtle: #f6f7f9;
    /* Bottom colour of the white-to-grey fade inside each section band.
       Body text keeps 5.0:1 contrast even at the very bottom. */
    --band-fade: #e6eaef;
    --header-bg: rgba(255, 255, 255, 0.85);

    /* Rules & borders */
    --rule: rgba(15, 23, 42, 0.10);
    --rule-strong: rgba(15, 23, 42, 0.18);

    /* Type */
    --text-main: #0b1220;
    --text-muted: #55637a;

    /* Accent — the brand red from logo.svg (#ED1C24) darkened to the same hue.
       #ED1C24 itself is only ~3.9:1 on white and fails AA for body text, so the
       UI uses this darker step (~6.9:1) instead. */
    --accent: #b3151c;
    --accent-ink: #8e1016;

    /* Deep ink — the footer band, and anything that anchors the page end */
    --ink-deep: #0b1220;
    --ink-deep-soft: #94a3b8;
    --ink-deep-rule: rgba(255, 255, 255, 0.12);

    /* Chips / tags */
    --tag-bg: rgba(15, 23, 42, 0.035);
    --tag-border: rgba(15, 23, 42, 0.10);

    /* Layout */
    --content-max: 1200px;
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --section-y: clamp(4rem, 9vw, 7.5rem);
    --header-h: 80px;

    --font-main: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
}

/* Present for screen readers and search engines, invisible on screen. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

::selection {
    background: var(--accent);
    color: #ffffff;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Layout primitives
   A band spans the full viewport width and carries the background; the
   container inside it holds the content to a readable measure.
   -------------------------------------------------------------------------- */
.band {
    width: 100%;
}

.band--ink {
    background: var(--ink-deep);
    color: #ffffff;
}

.band--pad {
    padding-block: var(--section-y);
}

.container {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.75rem;
    border-radius: 99px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.25s, border-color 0.25s, color 0.25s,
                transform 0.25s, box-shadow 0.25s;
}

.btn--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.btn--primary:hover {
    background: var(--accent-ink);
    border-color: var(--accent-ink);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(179, 21, 28, 0.22);
}

.btn--sm {
    padding: 0.65rem 1.4rem;
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--rule);
}

/* The blur lives on a pseudo-element so the header itself never becomes a
   containing block for fixed-position descendants (backdrop-filter does that). */
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    z-index: -1;
}

.site-header .container {
    position: relative;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    height: 44px;
    display: block;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-nav a:not(.btn) {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.25s;
}

.site-nav a:not(.btn):hover {
    color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Footer — the deep ink band that ends the page.

   One markup block, used identically on every page. The landing page adds
   body.landing, which reflows the same content into a dense band so it fits
   inside a fixed viewport without hiding anything.
   -------------------------------------------------------------------------- */
.site-footer {
    margin-top: auto;
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3rem);
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.footer-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.5rem;
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--ink-deep-soft);
    font-style: normal;
}

.footer-contact a {
    color: var(--ink-deep-soft);
    text-decoration: none;
    transition: color 0.25s;
}

.footer-contact a:hover {
    color: #ffffff;
}

.footer-contact strong {
    color: #ffffff;
    font-weight: 600;
}

/* Social */
.footer-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-social a {
    color: var(--ink-deep-soft);
    display: inline-flex;
    transition: color 0.25s, transform 0.25s;
}

.footer-social a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-social svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* Statutory company details — published exactly as on the current site. */
.footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem 2rem;
    border-top: 1px solid var(--ink-deep-rule);
    padding-block: 1.1rem 1.75rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.7;
    color: var(--ink-deep-soft);
}

.site-footer :focus-visible {
    outline-color: #ffffff;
}

/* --- Compact variant: same content, denser, for the fixed landing screen --- */
body.landing .footer-main {
    flex-wrap: nowrap;
    align-items: center;
    padding-block: 1rem;
    gap: 2.5rem;
}

body.landing .footer-contact {
    font-size: 0.85rem;
}

body.landing .footer-legal {
    padding-block: 0.8rem 1rem;
    font-size: 0.68rem;
}

/* Short desktop screens: every pixel the footer gives back goes to the panels. */
@media (min-width: 861px) and (max-height: 760px) {
    body.landing .footer-main {
        padding-block: 0.7rem;
    }
    body.landing .footer-legal {
    padding-block: 0.55rem 0.75rem;
}
}

@media (max-width: 860px) {
    .footer-main {
        flex-direction: column;
        align-items: flex-start;
    }

    body.landing .footer-main {
        flex-direction: column;
        flex-wrap: wrap;
        align-items: flex-start;
        padding-block: 2rem;
        gap: 1.5rem;
    }
}

/* --------------------------------------------------------------------------
   Anchor navigation — offset targets so the sticky header never covers them
   -------------------------------------------------------------------------- */
[id] {
    scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* --------------------------------------------------------------------------
   Prose — long-form text pages (privacy policy, and later legal pages)
   -------------------------------------------------------------------------- */
.prose {
    max-width: 46rem;
}

.prose h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.prose-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.prose h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 2.25rem 0 0.75rem;
}

.prose p,
.prose li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.prose p + p,
.prose ul + p {
    margin-top: 0.9rem;
}

.prose ul {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.6rem;
    padding-left: 1.25rem;
}

.prose strong {
    color: var(--text-main);
}

.prose a {
    color: var(--accent);
    text-underline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Small phones — the header keeps its items inline; just tighten them
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .site-nav {
        gap: 1rem;
    }
    .site-nav a:not(.btn) {
        font-size: 0.85rem;
    }
    .site-nav .btn--sm {
        padding: 0.55rem 1.1rem;
        font-size: 0.85rem;
    }
    .logo img {
        height: 38px;
    }
}

/* The narrowest phones: header gaps and button padding give back the few
   pixels that logo + "Services" + button need to share one line. */
@media (max-width: 360px) {
    .site-header .container {
        gap: 1rem;
    }
    .site-nav {
        gap: 0.75rem;
    }
    .site-nav .btn--sm {
        padding-inline: 0.9rem;
    }
}

/* --------------------------------------------------------------------------
   Legal row — statutory company particulars, one item per list entry so a
   line only ever breaks between particulars, never inside one
   -------------------------------------------------------------------------- */
.legal-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
    padding: 0;
    /* Every item carries a leading separator; the list is pulled left by one
       separator width and clipped there, so no wrapped line begins with "·". */
    margin: 0 0 0 -1.2rem;
    clip-path: inset(0 0 0 1.2rem);
}

.legal-list li {
    white-space: nowrap;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-shrink: 0;
    font-family: var(--font-main);
    font-size: 0.82rem;
    line-height: 1.7;
}

.footer-links a {
    color: var(--ink-deep-soft);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.25s;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 860px) {
    .footer-legal {
        flex-direction: column;
    }
    .legal-list {
        flex-direction: column;
        gap: 0.15rem;
    }
    /* Phones: particulars stack one per line and may wrap inside themselves. */
    .legal-list li {
        white-space: normal;
    }
}

.legal-list li::before {
    content: "·";
    display: inline-block;
    width: 1.2rem;
    text-align: center;
    opacity: 0.5;
}

@media (max-width: 860px) {
    .footer-contact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    .legal-list {
        margin-left: 0;
        clip-path: none;
    }
    .legal-list li::before {
        content: none;
    }
}
