/* =====================================================================
   Softbrite Reviews — Unified Design System (base.css)
   Loaded once via home/includes/header.php on every public page.
   Page-specific styles (style.css / about.css / review.css) build on
   the tokens defined here. Do NOT rename tokens without a global sweep.
   ===================================================================== */

/* ------- Reset ------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ------- Design tokens ------- */
:root {
    /* Brand — trust-forward teal */
    --brand-50:  #f0fdfa;
    --brand-100: #ccfbf1;
    --brand-200: #99f6e4;
    --brand-300: #5eead4;
    --brand-400: #2dd4bf;
    --brand-500: #14b8a6;
    --brand-600: #0d9488;
    --brand-700: #0f766e;
    --brand-800: #115e59;
    --brand-900: #0c3d3a;

    /* Neutrals (slate) */
    --ink-900: #0f172a;
    --ink-800: #1e293b;
    --ink-700: #334155;
    --ink-600: #475569;
    --ink-500: #64748b;
    --ink-400: #94a3b8;
    --line:    #e2e8f0;
    --line-soft: #f1f5f9;
    --surface: #ffffff;
    --bg:      #f8fafc;

    /* Accents */
    --star:    #f59e0b;   /* amber — universal review-star colour */
    --star-soft: #fffbeb;
    --success: #16a34a;
    --success-soft: #ecfdf5;
    --danger:  #e11d48;
    --danger-soft: #fff1f2;

    /* Gradients */
    --grad-brand: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-500) 100%);
    --grad-brand-deep: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 55%, var(--brand-800) 100%);

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);
    --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.16);

    /* Radii */
    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    /* ---- Legacy aliases (kept so existing inline var() references resolve) ---- */
    --color-primary:        var(--brand-800);
    --color-primary-light:  var(--brand-600);
    --color-accent:         var(--brand-600);
    --color-accent-light:   var(--brand-800);
    --color-success:        var(--success);
    --color-warning:        var(--star);
    --color-danger:         var(--danger);
    --color-text-dark:      var(--ink-800);
    --color-text-light:     var(--ink-500);
    --color-bg-light:       var(--bg);
    --color-bg-white:       var(--surface);
    --color-gradient-start: var(--brand-700);
    --color-gradient-end:   var(--brand-500);
}

/* ------- Base typography ------- */
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
    color: var(--ink-800);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Inter', sans-serif;
    color: var(--ink-900);
    line-height: 1.25;
    font-weight: 700;
}

a { color: var(--brand-700); }

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

::selection { background: var(--brand-200); color: var(--brand-900); }

:focus-visible {
    outline: 3px solid var(--brand-400);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ------- Header / navigation ------- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ink-900);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: transform 0.25s ease;
}

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

.logo img { width: 52px; height: auto; }

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--grad-brand);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
    flex-shrink: 0;
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

header nav a {
    position: relative;
    text-decoration: none;
    color: var(--ink-700);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 2px;
    transition: color 0.25s ease;
}

header nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--brand-600);
    border-radius: 2px;
    transition: width 0.28s ease;
}

header nav a:hover,
header nav a.active { color: var(--brand-700); }

header nav a:hover::after,
header nav a.active::after { width: 100%; }

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink-800);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    header nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.32s ease;
    }

    header nav.open { max-height: 340px; }

    header nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 24px 1rem;
    }

    header nav li { border-bottom: 1px solid var(--line-soft); }

    header nav a {
        display: block;
        padding: 0.9rem 0;
        font-size: 1rem;
    }

    header nav a::after { display: none; }

    .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ------- Breadcrumb ------- */
.breadcrumb {
    background: #fff;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.88rem;
    color: var(--ink-500);
}

.breadcrumb .container { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.breadcrumb a {
    color: var(--brand-700);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb a:hover { text-decoration: underline; }

/* ------- Generic page header (about / legal / reviews) ------- */
.page-header {
    background: var(--grad-brand-deep);
    color: #fff;
    padding: 4rem 0 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(94, 234, 212, 0.18), transparent 55%);
    pointer-events: none;
}

.page-header .container { position: relative; z-index: 1; }

.page-header h1 {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.page-header p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ------- Buttons ------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--grad-brand);
    color: #fff;
    padding: 0.95rem 1.9rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(13, 148, 136, 0.4);
    filter: brightness(1.03);
}

.btn-primary:active { transform: translateY(0); }

/* ------- Footer (supports both markup variants used across the site) ------- */
footer {
    background: var(--grad-brand-deep);
    color: rgba(255, 255, 255, 0.82);
    padding: 3.5rem 0 2rem;
    margin-top: 4.5rem;
}

.footer-content {
    display: grid;
    gap: 2.5rem 3rem;
    margin-bottom: 2.5rem;
}

/* index.php variant: 4 cols with logo section */
footer:has(.footer-logo-section) .footer-content {
    grid-template-columns: 2fr 1fr 1fr 1fr;
}

/* about/legal/review variant: 3 cols */
footer:has(.footer-info) .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
}

.footer-logo-section { max-width: 360px; }

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.9rem;
    letter-spacing: -0.01em;
}

.footer-logo span { color: var(--brand-200); }

.footer-logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.4rem;
}

.footer-logo-section p,
.footer-info p {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.72);
}

.footer-nav h4,
.references h4 {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 1.1rem;
    font-weight: 700;
}

.footer-nav ul,
.references ul { list-style: none; padding: 0; }

.footer-nav a,
.references a {
    display: inline-block;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    padding: 6px 0;
    font-size: 0.9rem;
    transition: color 0.25s ease, transform 0.25s ease;
}

.footer-nav a:hover,
.references a:hover {
    color: #fff;
    transform: translateX(3px);
}

/* Independent website notice */
.footer-notice {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-notice h4 {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 0.01em;
}

.footer-notice p {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
    line-height: 1.7;
    margin-bottom: 0.6rem;
    max-width: 960px;
}

.footer-notice p:last-child { margin-bottom: 0; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
}

.footer-bottom p { margin: 0; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

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

/* ------- Trust / verification strip (independence disclosure) ------- */
.verify-strip {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem 2rem;
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.verify-strip .verify-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.verify-strip .verify-ico {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--brand-50);
    color: var(--brand-700);
    border: 1px solid var(--brand-100);
}

.verify-strip h4 {
    font-size: 1rem;
    margin-bottom: 3px;
    color: var(--ink-900);
}

.verify-strip p {
    font-size: 0.88rem;
    color: var(--ink-500);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    footer:has(.footer-logo-section) .footer-content,
    footer:has(.footer-info) .footer-content {
        grid-template-columns: 1fr;
    }
    .footer-logo-section { grid-column: auto; }
}
