/* ========================================================================== 
   Bubsby Landing + Legal Styles
   Palette follows Bubsby Colour Guide (single source of truth)
   ========================================================================== */

:root {
    --primary: #5B7C99;
    --primary-dark: #4E6E88;
    --secondary: #7FA99B;
    --background: #F6F5F2;
    --surface: #FFFFFF;
    --text: #2F2F2F;
    --text-muted: #7A7A7A;
    --divider: #D8D8D8;
    --warning: #E0B973;
    --error: #D96C6C;
    --info: #9BB7D4;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow-soft: 0 8px 28px rgba(47, 47, 47, 0.08);
    --shadow-card: 0 4px 18px rgba(47, 47, 47, 0.05);

    --space-xs: 0.5rem;
    --space-sm: 0.875rem;
    --space-md: 1.25rem;
    --space-lg: 1.75rem;
    --space-xl: 2.5rem;
    --space-2xl: 3.5rem;
    --space-3xl: 5rem;

    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    width: min(1120px, 100% - 2rem);
    margin: 0 auto;
}

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

h1,
h2,
h3 {
    letter-spacing: -0.02em;
}

p {
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

ul {
    margin: 0;
    padding-left: 1.15rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-weight: 700;
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
    transition: 180ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: var(--surface);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--surface);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--divider);
}

.btn-secondary:hover {
    background: var(--background);
    color: var(--text);
}

.btn-accent {
    background: var(--secondary);
    color: var(--surface);
}

.btn-accent:hover {
    filter: brightness(0.94);
    color: var(--surface);
}

.btn-lg {
    font-size: 1rem;
    padding: 0.95rem 1.5rem;
}

/* Nav */
.nav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(246, 245, 242, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(216, 216, 216, 0.8);
}

.nav-container {
    width: min(1120px, 100% - 2rem);
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-logo img {
    height: 34px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links > a:not(.btn) {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
}

/* Sections */
section,
header {
    padding: var(--space-2xl) 0;
}

.section-lead {
    margin-top: var(--space-sm);
    color: var(--text-muted);
    max-width: 720px;
}

/* Hero */
.hero {
    padding-top: clamp(2.2rem, 5vw, 4rem);
    padding-bottom: var(--space-2xl);
    background:
        radial-gradient(circle at 90% -10%, rgba(155, 183, 212, 0.35), transparent 36%),
        radial-gradient(circle at -5% 35%, rgba(127, 169, 155, 0.22), transparent 32%),
        var(--background);
}

.eyebrow {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(91, 124, 153, 0.35);
    border-radius: var(--radius-pill);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero h1 {
    margin-top: var(--space-md);
    font-size: clamp(2rem, 7vw, 3.4rem);
    line-height: 1.08;
    max-width: 780px;
}

.hero-subtitle {
    margin-top: var(--space-md);
    max-width: 760px;
    color: var(--text-muted);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.hero-cta {
    margin-top: var(--space-lg);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-trust {
    margin-top: var(--space-md);
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.hero-grid {
    margin-top: var(--space-xl);
    display: grid;
    gap: 1rem;
}

.hero-card {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-card);
}

.hero-card h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.hero-card-chaos {
    border-left: 5px solid var(--warning);
}

.hero-card-relief {
    border-left: 5px solid var(--secondary);
}

.hero-card ul li {
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Problem */
.problem {
    background: var(--surface);
}

.problem h2 {
    font-size: clamp(1.5rem, 4.8vw, 2.4rem);
    max-width: 820px;
}

.problem-list {
    margin-top: var(--space-lg);
    display: grid;
    gap: 0.8rem;
}

.problem-list p {
    margin: 0;
    background: rgba(155, 183, 212, 0.14);
    border: 1px solid rgba(91, 124, 153, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.85rem 0.95rem;
    font-weight: 600;
}

/* How */
.how {
    background: linear-gradient(180deg, var(--background), rgba(155, 183, 212, 0.14));
}

.how h2 {
    font-size: clamp(1.5rem, 4.8vw, 2.3rem);
}

.steps {
    margin-top: var(--space-lg);
    display: grid;
    gap: 0.95rem;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 1.05rem;
}

.step-number {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--surface);
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 0.7rem;
}

.step-card h3 {
    font-size: 1.05rem;
}

.step-card p {
    margin-top: 0.45rem;
    color: var(--text-muted);
}

/* Use cases */
.use-cases {
    background: var(--surface);
}

.use-cases h2 {
    font-size: clamp(1.5rem, 4.8vw, 2.3rem);
}

.case-grid {
    margin-top: var(--space-lg);
    display: grid;
    gap: 0.95rem;
}

.case-card {
    background: var(--background);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.case-chaos {
    font-weight: 700;
    color: var(--text);
}

.case-solution {
    margin-top: 0.45rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.case-outcome {
    margin-top: 0.45rem;
    color: var(--secondary);
    font-weight: 700;
}

/* Features */
.features {
    background: linear-gradient(180deg, var(--background), var(--surface));
}

.features h2 {
    font-size: clamp(1.5rem, 4.8vw, 2.3rem);
}

.feature-grid {
    margin-top: var(--space-lg);
    display: grid;
    gap: 0.95rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-card);
}

.feature-card h3 {
    font-size: 1.06rem;
    color: var(--primary-dark);
}

.feature-card p {
    margin-top: 0.45rem;
    color: var(--text-muted);
}

/* Comparison */
.comparison {
    background: var(--surface);
}

.comparison h2 {
    font-size: clamp(1.5rem, 4.8vw, 2.3rem);
}

.compare-grid {
    margin-top: var(--space-lg);
    display: grid;
    gap: 0.95rem;
}

.compare-card {
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--background);
}

.compare-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.compare-card li {
    margin-bottom: 0.38rem;
    color: var(--text-muted);
}

.compare-card-bubsby {
    background: rgba(155, 183, 212, 0.18);
    border-color: rgba(91, 124, 153, 0.35);
}

.compare-card-bubsby h3 {
    color: var(--primary-dark);
}

.compare-footnote {
    margin-top: 0.8rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Urgency */
.urgency {
    background: var(--text);
    color: var(--surface);
    text-align: center;
}

.urgency h2,
.urgency p {
    color: var(--surface);
}

.urgency p {
    margin: var(--space-sm) auto var(--space-lg);
    max-width: 700px;
    opacity: 0.93;
}

/* Final CTA */
.final-cta {
    background: var(--background);
    text-align: center;
}

.final-cta h2 {
    font-size: clamp(1.7rem, 5.2vw, 2.9rem);
    line-height: 1.15;
}

.final-cta p {
    margin: var(--space-sm) auto var(--space-lg);
    max-width: 600px;
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: #242424;
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-content {
    display: grid;
    gap: var(--space-lg);
}

.footer-brand img {
    height: 30px;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    margin-top: 0.6rem;
    color: rgba(255, 255, 255, 0.72);
}

.footer-links h4 {
    color: var(--surface);
    margin-bottom: 0.5rem;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.42rem;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--surface);
}

.footer-bottom {
    margin-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.85rem;
}

/* Legal pages */
.legal-content {
    padding: var(--space-2xl) 0;
    background: var(--surface);
}

.legal-content h1 {
    font-size: clamp(1.9rem, 5.5vw, 2.6rem);
    color: var(--primary-dark);
}

.last-updated {
    margin-top: 0.45rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.legal-content section {
    margin-top: var(--space-lg);
    border-bottom: 1px solid var(--divider);
    padding-bottom: var(--space-lg);
}

.legal-content h2 {
    font-size: clamp(1.3rem, 3.8vw, 1.65rem);
}

.legal-content h3 {
    margin-top: var(--space-md);
    margin-bottom: 0.45rem;
    font-size: 1.06rem;
    color: var(--primary-dark);
}

.legal-content p,
.legal-content li {
    color: var(--text);
}

.compliance-note {
    background: rgba(155, 183, 212, 0.14);
    border: 1px solid rgba(91, 124, 153, 0.24) !important;
    border-radius: var(--radius-sm);
    padding: 1rem !important;
}

/* Responsive */
@media (min-width: 760px) {
    .hero-grid,
    .steps,
    .case-grid,
    .feature-grid,
    .compare-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-content {
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .steps,
    .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .case-grid,
    .compare-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 880px) {
    .nav-links > a:not(.btn) {
        display: none;
    }
}

@media (max-width: 620px) {
    .nav-container {
        min-height: 66px;
    }

    section,
    header {
        padding: var(--space-xl) 0;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta .btn,
    .urgency .btn,
    .final-cta .btn {
        width: 100%;
    }

    .btn-lg {
        font-size: 0.98rem;
    }
}
