/*
Theme Name: SKB Theme
Theme URI: https://skblawfirm.co.uk
Author: SKB Law / Unbranded Digital
Author URI: https://unbranded.digital
Description: Bespoke theme for SKB Law — family law expertise. Built with ACF flexible content components.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: skb_theme
*/

/* =====================================================================
   SKB Law — Design System tokens
   ===================================================================== */
:root {
    /* Brand purples */
    --c-purple-deep: #19003f;
    --c-purple-700: #3f0082;
    --c-purple-600: #6c2dc9;
    --c-purple-500: #8200db;
    --c-purple-400: #9810fa;
    --c-purple-50: #f3eeff;

    /* Neutrals */
    --c-ink: #0d071a;
    --c-text: #4a5565;
    --c-text-muted: #6a7282;
    --c-text-subtle: #99a1af;
    --c-text-strong: #364153;
    --c-border: #dedde1;
    --c-bg: #ffffff;
    --c-bg-soft: #f2f1f3;

    /* Status */
    --c-green-50: #e6f6ec;
    --c-green-700: #1f7a3a;
    --c-rose-50: #fdeaf2;
    --c-rose-700: #b1276b;

    /* Type */
    --font-display: 'Sora', system-ui, -apple-system, sans-serif;
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

    /* Layout */
    --container-max: 1440px;
    --container-pad: 24px;

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 180ms;
    --t-base: 280ms;
    --t-slow: 480ms;

    /* Elevation */
    --shadow-sm: 0 1px 3px rgba(13, 7, 26, 0.06), 0 1px 2px rgba(13, 7, 26, 0.04);
    --shadow-md: 0 8px 24px rgba(13, 7, 26, 0.08), 0 2px 6px rgba(13, 7, 26, 0.04);
    --shadow-lg: 0 18px 48px rgba(63, 0, 130, 0.18);
}

@media (min-width: 768px) {
    :root { --container-pad: 40px; }
}

@media (min-width: 1200px) {
    :root { --container-pad: 64px; }
}

/* -------- Reset / base -------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg { display: block; max-width: 100%; }

button {
    font-family: inherit;
    cursor: pointer;
    border: 0;
    background: none;
    color: inherit;
}

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* -------- Typography helpers -------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 11.2px;
    letter-spacing: 1.34px;
    text-transform: uppercase;
    color: var(--c-purple-600);
}

.eyebrow::before {
    content: '';
    width: 36px;
    height: 1px;
    background: var(--c-purple-600);
}

.eyebrow.is-light { color: rgba(255, 255, 255, 0.5); }
.eyebrow.is-light::before { background: var(--c-purple-600); }
.eyebrow.is-center { justify-content: center; }

.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--c-ink);
    letter-spacing: -1.08px;
    line-height: 1.1;
    font-size: clamp(28px, 4vw, 36px);
    margin-top: 16px;
}

.section-title.is-light { color: #fff; }
.section-title .accent { color: var(--c-purple-600); }
.section-title .soft { font-weight: 600; }

.section-lede {
    font-size: 16px;
    line-height: 1.5;
    color: var(--c-text-muted);
    margin-top: 16px;
    max-width: 620px;
}

.section-lede.is-center { margin-inline: auto; text-align: center; }

/* -------- Buttons -------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 9999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    transition: transform var(--t-fast) var(--ease-out),
                background var(--t-fast) var(--ease-out),
                border-color var(--t-fast) var(--ease-out),
                color var(--t-fast) var(--ease-out),
                box-shadow var(--t-fast) var(--ease-out);
    will-change: transform;
}

.btn--lg { padding: 16px 28px; font-size: 16px; }

.btn--primary { background: var(--c-purple-700); color: #fff; }
.btn--primary:hover {
    background: var(--c-purple-500);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--ghost {
    background: transparent;
    color: var(--c-purple-700);
    border: 1px solid var(--c-purple-700);
}
.btn--ghost:hover {
    background: var(--c-purple-700);
    color: #fff;
    transform: translateY(-2px);
}

.btn--ghost-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.btn--ghost-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}
.btn--bright {
    background:  var(--c-purple-500);
    border: 1px solid var(--c-purple-500);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.btn--bright:hover {
    background: var(--c-purple-50);
    border: 1px solid #fff;
    color: var(--c-ink);
    transform: translateY(-2px);
}
.btn--inverse { background: #fff; color: var(--c-purple-500); }
.btn--inverse:hover {
    background: var(--c-purple-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn .icon { width: 16px; height: 16px; flex: none; }

/* -------- Tag / pill -------- */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    background: var(--c-purple-50);
    color: var(--c-purple-600);
    font-weight: 600;
    font-size: 12px;
    line-height: 1.33;
}

/* -------- Card base -------- */
.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 28px;
    transition: transform var(--t-base) var(--ease-out),
                box-shadow var(--t-base) var(--ease-out),
                border-color var(--t-base) var(--ease-out);
}

a.card,
.card.is-link { cursor: pointer; }

a.card:hover,
.card.is-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-purple-600);
}

/* -------- Section -------- */
.section { padding-block: 96px; position: relative; }

@media (max-width: 767px) {
    .section { padding-block: 64px; }
}

.section--soft  { background: var(--c-purple-50); }
.section--muted { background: var(--c-bg-soft); }
.section--dark  { background: var(--c-purple-deep); color: rgba(255, 255, 255, 0.85); }

.section-header { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.section-header.is-center { align-items: center; text-align: center; }
.section-header.is-split {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.section-header.is-split .header-text { max-width: 560px; }

/* -------- Card link arrow -------- */
.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c-purple-500);
    transition: gap var(--t-fast) var(--ease-out);
}

.card-link svg { width: 16px; height: 14px; transition: transform var(--t-fast) var(--ease-out); }

a.card:hover .card-link svg,
.card.is-link:hover .card-link svg { transform: translateX(4px); }

/* -------- Reveal animations -------- */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--t-slow) var(--ease-out),
                transform var(--t-slow) var(--ease-out);
}

.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* -------- Visually hidden -------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -------- Skip link -------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--c-purple-700);
    color: #fff;
    padding: 12px 20px;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
