/* =========================================================
   Techiea — site.css
   Light + dark theme, Bootstrap 5.3.8, Lexend
   ========================================================= */

:root {
    --t-font: 'Lexend', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --t-bg: #f8fafc;
    --t-surface: #ffffff;
    --t-surface-2: #eef4f8;
    --t-text: #0f172a;
    --t-muted: #64748b;
    --t-primary: #4f46e5;
    --t-primary-2: #6366f1;
    --t-primary-soft: rgba(79, 70, 229, 0.1);
    --t-accent: #0d9488;
    --t-accent-soft: rgba(13, 148, 136, 0.1);
    --t-border: rgba(15, 23, 42, 0.08);
    --t-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
    --t-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
    --t-navbar-bg: rgba(248, 250, 252, 0.82);
    --t-hero-glow: rgba(79, 70, 229, 0.16);
    --t-ring-track: #e2e8f0;
    --t-radius: 1.25rem;
    --bs-body-font-family: var(--t-font);
    --bs-body-bg: var(--t-bg);
    --bs-body-color: var(--t-text);
    --bs-border-color: var(--t-border);
    --bs-secondary-color: var(--t-muted);
    --bs-link-color: var(--t-primary);
    --bs-link-hover-color: var(--t-primary-2);
}

[data-bs-theme="dark"] {
    --t-bg: #070b14;
    --t-surface: #0f172a;
    --t-surface-2: #151f35;
    --t-text: #e6edf7;
    --t-muted: #94a3b8;
    --t-primary: #818cf8;
    --t-primary-2: #a5b4fc;
    --t-primary-soft: rgba(129, 140, 248, 0.14);
    --t-accent: #2dd4bf;
    --t-accent-soft: rgba(45, 212, 191, 0.12);
    --t-border: rgba(226, 232, 240, 0.1);
    --t-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
    --t-shadow: 0 26px 60px rgba(0, 0, 0, 0.48);
    --t-navbar-bg: rgba(7, 11, 20, 0.8);
    --t-hero-glow: rgba(129, 140, 248, 0.18);
    --t-ring-track: #243047;
    --bs-body-bg: var(--t-bg);
    --bs-body-color: var(--t-text);
    --bs-border-color: var(--t-border);
    --bs-secondary-color: var(--t-muted);
}

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: var(--bs-body-font-family);
    background: var(--t-bg);
    color: var(--t-text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(79, 70, 229, 0.2);
}

[data-bs-theme="dark"] ::selection {
    background: rgba(129, 140, 248, 0.35);
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

:focus-visible {
    outline: 2px solid var(--t-primary);
    outline-offset: 3px;
    border-radius: 0.35rem;
}

section[id] {
    scroll-margin-top: 5rem;
}

/* ---------- Utility ---------- */
.text-brand {
    color: var(--t-primary) !important;
}

.bg-brand-soft {
    background: var(--t-primary-soft) !important;
    color: var(--t-primary) !important;
}

.bg-soft {
    background: var(--t-surface-2) !important;
}

.letter-spacing {
    letter-spacing: 0.12em;
}

.icon-xxs {
    font-size: 0.45rem;
    vertical-align: middle;
}

/* ---------- Navbar ---------- */
.site-navbar {
    background: var(--t-navbar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    z-index: 1030;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .site-navbar.scrolled {
        border-bottom-color: var(--t-border);
        box-shadow: var(--t-shadow-sm);
    }

.navbar-brand {
    color: var(--t-text);
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-grid;
    place-items: center;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--t-primary), var(--t-accent));
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
    font-size: 1.05rem;
}

.navbar .nav-link {
    color: var(--t-muted);
    font-weight: 500;
    padding-inline: 0.75rem;
    border-radius: 0.55rem;
}

    .navbar .nav-link:hover,
    .navbar .nav-link.active {
        color: var(--t-text);
    }

.navbar-toggler {
    border-color: var(--t-border);
}

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem var(--t-primary-soft);
    }

/* ---------- Buttons ---------- */
.btn-brand {
    background: linear-gradient(135deg, var(--t-primary), #7c3aed);
    border: 0;
    color: #fff;
    font-weight: 600;
    border-radius: 0.8rem;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

    .btn-brand:hover,
    .btn-brand:focus {
        color: #fff;
        filter: brightness(1.06);
        transform: translateY(-1px);
        box-shadow: 0 12px 26px rgba(79, 70, 229, 0.28);
    }

    .btn-brand:active {
        transform: translateY(0);
        box-shadow: 0 6px 14px rgba(79, 70, 229, 0.2);
    }

.btn-soft {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    color: var(--t-text);
    font-weight: 500;
    border-radius: 0.8rem;
}

    .btn-soft:hover,
    .btn-soft:focus {
        background: var(--t-surface-2);
        border-color: var(--t-border);
        color: var(--t-text);
    }

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

.dropdown-toggle::after {
    margin-left: 0.35rem;
}

.dropdown-menu {
    --bs-dropdown-bg: var(--t-surface);
    --bs-dropdown-border-color: var(--t-border);
    --bs-dropdown-link-active-bg: var(--t-primary);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

    .theme-option.active::after {
        content: "✓";
        margin-left: auto;
        font-weight: 700;
    }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
    overflow: hidden;
}

    .hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at 18% 8%, var(--t-hero-glow), transparent 55%), radial-gradient(ellipse at 92% 24%, var(--t-accent-soft), transparent 50%);
        pointer-events: none;
    }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: var(--t-primary-soft);
    color: var(--t-primary);
    font-size: 0.8rem;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.gradient-text {
    background: linear-gradient(120deg, var(--t-primary), var(--t-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-visual {
    position: relative;
}

.hero-dashboard {
    position: relative;
    z-index: 1;
    border-radius: 1.5rem;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    box-shadow: var(--t-shadow);
}

.float-badge {
    position: absolute;
    right: -0.5rem;
    bottom: 2rem;
    z-index: 2;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: 1rem;
    box-shadow: var(--t-shadow-sm);
    padding: 0.75rem 1rem;
    align-items: center;
    gap: 0.65rem;
}

/* ---------- Score ring & bars ---------- */
.score-ring {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient( var(--t-primary) calc(var(--score, 0) * 1%), var(--t-ring-track) 0 );
    position: relative;
    flex-shrink: 0;
}

    .score-ring::before {
        content: "";
        position: absolute;
        inset: 0.65rem;
        border-radius: 50%;
        background: var(--t-surface);
    }

    .score-ring span {
        position: relative;
        z-index: 1;
        font-size: 1.55rem;
        font-weight: 700;
        letter-spacing: -0.04em;
    }

.bar-track {
    height: 0.5rem;
    background: var(--t-surface-2);
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: var(--value, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--t-primary), var(--t-accent));
    transition: width 0.7s ease;
}

.mini-stat {
    background: var(--t-surface-2);
    border-radius: 0.9rem;
    padding: 0.75rem 0.9rem;
}

    .mini-stat strong {
        display: block;
        font-size: 0.95rem;
    }

/* ---------- Stats ---------- */
.stat-card {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius);
    padding: 1.25rem 1rem;
    height: 100%;
}

.stat-number {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

/* ---------- Sections ---------- */
.section {
    padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--t-primary);
}

.section-title {
    font-size: clamp(1.9rem, 3.5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

/* ---------- Cards ---------- */
.card {
    --bs-card-bg: var(--t-surface);
    --bs-card-border-color: var(--t-border);
}

.subject-card,
.feature-card,
.stage-card,
.testimonial-card,
.scorecard-preview,
.test-card {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

    .subject-card:hover,
    .feature-card:hover,
    .stage-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--t-shadow-sm);
        border-color: rgba(79, 70, 229, 0.25);
    }

[data-bs-theme="dark"] .subject-card:hover,
[data-bs-theme="dark"] .feature-card:hover,
[data-bs-theme="dark"] .stage-card:hover {
    border-color: rgba(129, 140, 248, 0.35);
}

/* ---------- Icon tiles ---------- */
.icon-tile {
    width: 3rem;
    height: 3rem;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 0.85rem;
    font-size: 1.2rem;
    background: var(--t-primary-soft);
    color: var(--t-primary);
}

    .icon-tile.is-indigo {
        background: var(--t-primary-soft);
        color: var(--t-primary);
    }

    .icon-tile.is-teal {
        background: var(--t-accent-soft);
        color: var(--t-accent);
    }

    .icon-tile.is-amber {
        background: rgba(245, 158, 11, 0.12);
        color: #d97706;
    }

[data-bs-theme="dark"] .icon-tile.is-amber {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
}

/* ---------- Steps & check list ---------- */
.step-number {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--t-primary-soft);
    color: var(--t-primary);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.check-list {
    display: grid;
    gap: 0.85rem;
}

    .check-list li {
        display: flex;
        gap: 0.7rem;
        align-items: flex-start;
        color: var(--t-muted);
        font-size: 0.95rem;
    }

        .check-list li i {
            color: var(--t-accent);
            font-size: 1.05rem;
            line-height: 1.5;
            flex-shrink: 0;
        }

        .check-list li strong {
            color: var(--t-text);
            font-weight: 600;
        }

/* ---------- Progress & test options ---------- */
.progress-thin {
    height: 0.4rem;
    border-radius: 999px;
    background: var(--t-surface-2);
}

    .progress-thin .progress-bar {
        background: linear-gradient(90deg, var(--t-primary), var(--t-accent));
        border-radius: inherit;
    }

.option-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--t-border);
    border-radius: 0.85rem;
    background: var(--t-surface);
    font-weight: 500;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

    .option-row:hover {
        border-color: rgba(79, 70, 229, 0.35);
        background: var(--t-surface-2);
    }

    .option-row.is-selected {
        border-color: var(--t-primary);
        background: var(--t-primary-soft);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    }

.option-key {
    display: inline-grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    flex-shrink: 0;
    border-radius: 0.55rem;
    background: var(--t-surface-2);
    color: var(--t-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.option-row.is-selected .option-key {
    background: var(--t-primary);
    color: #fff;
}

/* ---------- Testimonial ---------- */
.testimonial-card blockquote {
    font-size: 0.95rem;
    color: var(--t-muted);
    line-height: 1.7;
    margin: 0;
}

.testimonial-card .text-warning i {
    font-size: 0.8rem;
}

/* ---------- CTA panel ---------- */
.cta-panel {
    position: relative;
    overflow: hidden;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #0d9488 130%);
    color: #fff;
    box-shadow: 0 30px 70px rgba(79, 70, 229, 0.32);
}

    .cta-panel::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.22), transparent 45%), radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.12), transparent 40%);
        pointer-events: none;
    }

    .cta-panel .btn-light {
        border-radius: 0.85rem;
        color: #4f46e5;
    }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--t-surface);
    border-top: 1px solid var(--t-border);
    color: var(--t-text);
}

.footer-heading {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--t-text);
    margin-bottom: 0.9rem;
}

.site-footer ul {
    display: grid;
    gap: 0.5rem;
}

.footer-link {
    color: var(--t-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

    .footer-link:hover,
    .footer-link:focus {
        color: var(--t-primary);
    }

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

    .back-to-top.is-visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

    .reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

/* ---------- Dark theme shadow softening ---------- */
[data-bs-theme="dark"] .brand-mark,
[data-bs-theme="dark"] .btn-brand {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .cta-panel {
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 1rem 0 0.5rem;
    }

    .navbar .nav-link {
        padding: 0.6rem 0.4rem;
    }

    .float-badge {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .score-ring {
        width: 6.5rem;
        height: 6.5rem;
    }

        .score-ring span {
            font-size: 1.25rem;
        }

    .back-to-top {
        right: 0.9rem;
        bottom: 0.9rem;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* =========================================================
   Privacy Policy page
   ========================================================= */

.privacy-hero {
    background: var(--t-surface-2);
    border-bottom: 1px solid var(--t-border);
    padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
}

.privacy-section {
    scroll-margin-top: 6rem;
    padding-bottom: 2.25rem;
    margin-bottom: 2.25rem;
    border-bottom: 1px solid var(--t-border);
}

    .privacy-section:last-of-type {
        border-bottom: 0;
    }

    .privacy-section h2 {
        font-size: 1.35rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        margin-bottom: 1rem;
    }

    .privacy-section h3 {
        font-size: 1.05rem;
        font-weight: 600;
        margin-top: 1.5rem;
        margin-bottom: 0.6rem;
    }

.privacy-body {
    color: var(--t-text);
    font-size: 1rem;
    line-height: 1.75;
}

    .privacy-body p,
    .privacy-body li {
        color: var(--t-muted);
    }

    .privacy-body strong {
        color: var(--t-text);
    }

/* Sticky TOC */
.privacy-toc {
    position: sticky;
    top: 6rem;
}

.toc-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--t-muted);
    margin-bottom: 0.85rem;
}

.privacy-toc ul {
    display: grid;
    gap: 0.35rem;
}

.privacy-toc a {
    display: block;
    padding: 0.3rem 0.6rem;
    border-left: 2px solid transparent;
    border-radius: 0 0.4rem 0.4rem 0;
    color: var(--t-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

    .privacy-toc a:hover,
    .privacy-toc a:focus-visible {
        color: var(--t-primary);
        border-left-color: var(--t-primary);
        background: var(--t-primary-soft);
    }

/* Summary card */
.summary-card {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-left: 4px solid var(--t-primary);
    border-radius: var(--t-radius);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--t-shadow-sm);
}

/* Data tables */
.privacy-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--t-text);
    --bs-table-border-color: var(--t-border);
    font-size: 0.925rem;
}

    .privacy-table thead th {
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--t-muted);
        font-weight: 700;
        border-bottom-width: 1px;
    }

    .privacy-table td:first-child {
        font-weight: 500;
        color: var(--t-text);
        width: 32%;
    }

.privacy-body a:not(.btn) {
    color: var(--t-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

    .privacy-body a:not(.btn):hover {
        color: var(--t-primary-2);
    }

@media (max-width: 991.98px) {
    .privacy-hero {
        padding-top: 2.5rem;
    }

    .privacy-section {
        scroll-margin-top: 4.5rem;
    }
}

/* =========================================================
   Terms of Service — page-specific
   ========================================================= */

/* Terms body reuses .privacy-body typography and spacing. */
.privacy-body ol {
    display: grid;
    gap: 0.6rem;
    padding-left: 1.25rem;
}

    .privacy-body ol li::marker {
        color: var(--t-primary);
        font-weight: 600;
    }

.privacy-body ul li + li {
    margin-top: 0.45rem;
}

.privacy-body h3 + p,
.privacy-body h3 + ul,
.privacy-body h3 + ol {
    margin-top: 0.35rem;
}

/* Emphasise the plain-language summary on the Terms page. */
#summary .summary-card {
    border-left-color: var(--t-accent);
}

    #summary .summary-card h2 i {
        color: var(--t-accent) !important;
    }

/* Slightly denser tables in the definitions section. */
#definitions .privacy-table td:first-child {
    width: 22%;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    #definitions .privacy-table td:first-child {
        white-space: normal;
    }
}
