/* ==========================================================================
   UK WEB AGENCY — DESIGN SYSTEM
   Aesthetic: engineering / blueprint. Navy + amber + teal.
   Flat bordered panels, no drop shadows, one deliberate hero moment.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
    /* Colour */
    --ink-900: #0E1C2B;
    --ink-800: #16283B;
    --paper-50: #F7F8F5;
    --paper-100: #EDEFEA;
    --line-light: #DCE1DD;
    --line-dark: #24405A;
    --amber-500: #E8A33D;
    --amber-600: #CC8A28;
    --teal-500: #2F6F62;
    --teal-400: #3C8A79;
    --text-dark: #14212E;
    --text-body: #3E4A55;
    --text-muted: #66727C;
    --text-on-dark: #F3F5F2;
    --text-muted-on-dark: #9FB0BE;
    --white: #FFFFFF;
    --danger: #B3432B;

    /* Type */
    --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', Consolas, monospace;

    /* Type scale (~1.25 ratio) */
    --text-xs: 0.8rem;
    --text-sm: 0.9rem;
    --text-base: 1rem;
    --text-md: 1.25rem;
    --text-lg: 1.563rem;
    --text-xl: 1.953rem;
    --text-2xl: 2.441rem;
    --text-3xl: 3.052rem;

    /* Spacing */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3rem;
    --space-6: 4.5rem;
    --space-7: 6rem;

    /* Layout */
    --container-width: 1180px;
    --radius: 3px; /* small, engineered — not soft/plastic */
    --border-width: 1px;
    --transition: 160ms ease;
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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; }
}
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-body);
    background: var(--paper-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* Focus visibility — accessibility, never remove */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--amber-500);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink-900);
    color: var(--text-on-dark);
    padding: var(--space-1) var(--space-2);
    z-index: 999;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text-dark);
    line-height: 1.15;
    margin: 0 0 var(--space-2);
    font-weight: 600;
    letter-spacing: -0.01em;
}
h1 { font-size: var(--text-3xl); font-weight: 700; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }
p { margin: 0 0 var(--space-2); max-width: 65ch; }
.section-intro p { max-width: 60ch; }
.lede { font-size: var(--text-md); color: var(--text-body); }
.mono-tag {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--teal-500);
}
strong { color: var(--text-dark); }

@media (max-width: 640px) {
    h1 { font-size: var(--text-2xl); }
    h2 { font-size: var(--text-xl); }
}

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-3);
}
.section { padding: var(--space-6) 0; }
.section-dark { background: var(--ink-900); color: var(--text-on-dark); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--text-on-dark); }
.section-dark p { color: var(--text-muted-on-dark); }
.section-alt { background: var(--paper-100); }

.grid { display: grid; gap: var(--space-3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-sm);
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius);
    border: var(--border-width) solid transparent;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    white-space: nowrap;
}
.btn-primary { background: var(--amber-500); color: var(--ink-900); }
.btn-primary:hover { background: var(--amber-600); }
.btn-secondary { background: transparent; color: var(--text-on-dark); border-color: var(--line-dark); }
.section:not(.section-dark) .btn-secondary { color: var(--text-dark); border-color: var(--line-light); }
.btn-secondary:hover { border-color: var(--amber-500); }
.btn-outline { background: transparent; color: var(--teal-500); border-color: var(--teal-500); }
.btn-outline:hover { background: var(--teal-500); color: var(--white); }
.btn-large { padding: 1.1rem 2rem; font-size: var(--text-base); }
.btn-small { padding: 0.55rem 1rem; font-size: var(--text-xs); }

.cta-pair {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-3) 0;
}

/* --------------------------------------------------------------------------
   6. HEADER / NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ink-900);
    border-bottom: var(--border-width) solid var(--line-dark);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}
.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-md);
    color: var(--text-on-dark);
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.5rem;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-on-dark);
}
.primary-nav { display: flex; align-items: center; gap: var(--space-4); }
.primary-nav > ul { display: flex; gap: var(--space-3); align-items: center; }
.primary-nav > ul > li { position: relative; }
.primary-nav > ul > li > a {
    color: var(--text-muted-on-dark);
    font-size: var(--text-sm);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}
.primary-nav > ul > li > a:hover,
.primary-nav > ul > li > a.active { color: var(--text-on-dark); border-color: var(--amber-500); }

.has-dropdown .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--ink-800);
    border: var(--border-width) solid var(--line-dark);
    min-width: 240px;
    padding: var(--space-1) 0;
    margin-top: var(--space-1);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown li a {
    display: block;
    padding: 0.6rem var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-muted-on-dark);
}
.dropdown li a:hover, .dropdown li a.active { color: var(--amber-500); background: var(--ink-900); }

.nav-cta { flex-shrink: 0; }

@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: fixed;
        top: 0; right: 0;
        height: 100vh;
        width: min(320px, 85vw);
        background: var(--ink-900);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-6) var(--space-3) var(--space-3);
        transform: translateX(100%);
        transition: transform var(--transition);
        overflow-y: auto;
    }
    .primary-nav.is-open { transform: translateX(0); }
    .primary-nav > ul { flex-direction: column; align-items: flex-start; width: 100%; gap: 0; }
    .primary-nav > ul > li { width: 100%; }
    .has-dropdown .dropdown { position: static; display: block; border: none; background: none; margin: 0 0 0 var(--space-2); }
    .nav-cta { margin-top: var(--space-3); width: 100%; justify-content: center; }
}

/* --------------------------------------------------------------------------
   7. HERO — schematic node/line diagram (the one bold moment)
   -------------------------------------------------------------------------- */
.hero {
    background: var(--ink-900);
    color: var(--text-on-dark);
    padding: var(--space-7) 0;
    overflow: hidden;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-5);
    align-items: center;
}
.hero h1 { color: var(--white); }
.hero p { color: var(--text-muted-on-dark); }

.hero-schematic {
    position: relative;
    height: 320px;
    border: var(--border-width) solid var(--line-dark);
    background:
        linear-gradient(var(--line-dark) 1px, transparent 1px) 0 0/40px 40px,
        linear-gradient(90deg, var(--line-dark) 1px, transparent 1px) 0 0/40px 40px;
    background-color: var(--ink-800);
}
.hero-node {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(232, 163, 61, 0.15);
}
.hero-node.teal { background: var(--teal-400); box-shadow: 0 0 0 4px rgba(60, 138, 121, 0.18); }
.hero-node[data-n="1"] { top: 30%; left: 15%; }
.hero-node[data-n="2"] { top: 65%; left: 45%; }
.hero-node[data-n="3"] { top: 25%; left: 75%; }
.hero-label {
    position: absolute;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted-on-dark);
}
.hero-line {
    position: absolute;
    height: 1px;
    background: var(--line-dark);
    transform-origin: left center;
}
@media (prefers-reduced-motion: no-preference) {
    .hero-node { animation: pulse 2.4s ease-in-out infinite; }
    .hero-node[data-n="2"] { animation-delay: 0.4s; }
    .hero-node[data-n="3"] { animation-delay: 0.8s; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-schematic { height: 220px; }
}

/* --------------------------------------------------------------------------
   8. PANELS / CARDS — bordered, corner-bracket accent, no shadows
   -------------------------------------------------------------------------- */
.panel {
    position: relative;
    background: var(--white);
    border: var(--border-width) solid var(--line-light);
    padding: var(--space-3);
    transition: border-color var(--transition);
}
.section-dark .panel { background: var(--ink-800); border-color: var(--line-dark); }
.panel::before {
    content: "";
    position: absolute;
    top: -1px; left: -1px;
    width: 18px; height: 18px;
    border-top: 2px solid var(--amber-500);
    border-left: 2px solid var(--amber-500);
    opacity: 0;
    transition: opacity var(--transition);
}
.panel:hover::before { opacity: 1; }
.panel:hover { border-color: var(--amber-500); }
.panel h3 { margin-bottom: var(--space-1); }
.panel .mono-tag { display: block; margin-bottom: var(--space-1); }

.trust-points { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.trust-points li {
    font-size: var(--text-sm);
    font-weight: 500;
    padding: var(--space-2);
    border-left: 2px solid var(--amber-500);
    background: var(--paper-100);
}
@media (max-width: 900px) { .trust-points { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .trust-points { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   9. PROCESS — genuinely sequential, numbering justified
   -------------------------------------------------------------------------- */
.process-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-2);
    position: relative;
}
.process-steps::before {
    content: "";
    position: absolute;
    top: 28px; left: 0; right: 0;
    height: 1px;
    background: var(--line-light);
}
.section-dark .process-steps::before { background: var(--line-dark); }
.process-step { position: relative; padding-top: var(--space-5); }
.process-step .step-number {
    position: absolute;
    top: 0; left: 0;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--amber-500);
    background: var(--paper-50);
    padding-right: var(--space-1);
}
.section-dark .process-step .step-number { background: var(--ink-900); }
@media (max-width: 900px) {
    .process-steps { grid-template-columns: repeat(2, 1fr); }
    .process-steps::before { display: none; }
}
@media (max-width: 640px) { .process-steps { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   10. CTA BLOCKS
   -------------------------------------------------------------------------- */
.final-cta {
    background: var(--ink-900);
    color: var(--text-on-dark);
    padding: var(--space-6) 0;
    text-align: left;
    border-top: 2px solid var(--amber-500);
}
.final-cta h2 { color: var(--white); }
.final-cta p { color: var(--text-muted-on-dark); margin-bottom: var(--space-3); }

.audit-promo {
    background: var(--teal-500);
    color: var(--white);
    padding: var(--space-4) 0;
}
.audit-promo h3, .audit-promo p { color: var(--white); }
.audit-promo .btn-outline { color: var(--white); border-color: var(--white); }
.audit-promo .btn-outline:hover { background: var(--white); color: var(--teal-500); }

/* --------------------------------------------------------------------------
   11. FAQ ACCORDION
   -------------------------------------------------------------------------- */
.faq-item { border-bottom: var(--border-width) solid var(--line-light); }
.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: var(--space-2) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-dark);
    font-size: var(--text-base);
}
.faq-question .faq-icon { font-family: var(--font-mono); color: var(--amber-600); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
}
.faq-item.is-open .faq-answer { max-height: 600px; padding-bottom: var(--space-2); }

/* --------------------------------------------------------------------------
   12. FORMS
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: var(--space-2); }
label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--text-dark); margin-bottom: 0.35rem; }
input, textarea, select {
    width: 100%;
    font-family: var(--font-body);
    font-size: var(--text-base);
    padding: 0.75rem;
    border: var(--border-width) solid var(--line-light);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text-dark);
}
input:focus, textarea:focus, select:focus { border-color: var(--amber-500); }
.form-hint { font-size: var(--text-xs); color: var(--text-muted); }
.form-error { font-size: var(--text-xs); color: var(--danger); }

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */
.site-footer { background: var(--ink-900); color: var(--text-muted-on-dark); padding-top: var(--space-6); }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--space-4);
    padding-bottom: var(--space-5);
    border-bottom: var(--border-width) solid var(--line-dark);
}
.footer-logo { font-family: var(--font-display); font-weight: 700; color: var(--white); font-size: var(--text-md); margin-bottom: var(--space-1); }
.footer-nav h3, .footer-contact h3 { color: var(--white); font-size: var(--text-sm); margin-bottom: var(--space-2); }
.footer-nav ul li, .footer-contact ul li { margin-bottom: 0.5rem; font-size: var(--text-sm); }
.footer-nav a:hover, .footer-contact a:hover { color: var(--amber-500); }
.footer-social { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.footer-social a { font-size: var(--text-xs); color: var(--text-muted-on-dark); }
.footer-badges { margin-top: var(--space-2); }
.footer-legal {
    padding: var(--space-3) var(--space-3);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-2);
    font-size: var(--text-xs);
}
.footer-legal-links { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.footer-legal-links a:hover { color: var(--amber-500); }
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   14. COOKIE CONSENT (UK PECR)
   -------------------------------------------------------------------------- */
.cookie-consent {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--ink-900);
    color: var(--text-on-dark);
    border-top: var(--border-width) solid var(--line-dark);
    padding: var(--space-2) var(--space-3);
    z-index: 200;
    transform: translateY(100%);
    transition: transform var(--transition);
}
.cookie-consent.is-visible { transform: translateY(0); }
.cookie-consent-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}
.cookie-consent p { margin: 0; font-size: var(--text-sm); color: var(--text-muted-on-dark); max-width: 60ch; }
.cookie-consent a { color: var(--amber-500); }
.cookie-consent-actions { display: flex; gap: var(--space-1); flex-shrink: 0; }

/* --------------------------------------------------------------------------
   15. BREADCRUMBS
   -------------------------------------------------------------------------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-3); }
.breadcrumb a:hover { color: var(--amber-600); }
.breadcrumb .sep { color: var(--line-light); }
