/* ============================================================
   base.css — tokens, reset, and chrome shared by every page
   (navbar, buttons, trust chips). Page-specific styles live in
   index.css (landing), survey.css, legal.css.
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

:root {
    /* color */
    --navy: #0d2137;
    --blue: #2563eb;
    --blue-dark: #1d53d8;
    --body: #5b6b81;
    --muted: #97a3b3;
    --disc: #dbe8fb;
    --disc-deep: #cfe2fa;
    --card: #f6f8fb;
    --card-line: #eef2f8;
    --soft: #e9f1fc;
    --line: #e7edf4;

    /* type */
    --heading: "Plus Jakarta Sans", "Inter", sans-serif;
    --fs-xs: 0.8125rem;   /* 13px */
    --fs-sm: 0.875rem;    /* 14px */
    --fs-md: 0.9375rem;   /* 15px */
    --fs-lg: 1.0625rem;   /* 17px */

    /* space (8px scale) */
    --s1: 8px;
    --s2: 16px;
    --s3: 24px;
    --s4: 32px;
    --s5: 40px;
    --s6: 48px;
    --s7: 64px;
    --s8: 72px;

    /* shape + elevation */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 16px;
    --shadow-card: 0 12px 28px rgba(37, 99, 235, 0.12);
    --shadow-btn: 0 8px 18px rgba(37, 99, 235, 0.25);

    --max: 1180px;
    --pad: clamp(20px, 4vw, 32px);
}

body {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    color: var(--navy);
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

h1,
h2 {
    font-family: var(--heading);
    color: var(--navy);
    line-height: 1.2;
}

.section-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad);
}

/* ============ Shared keyframes ============ */
@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pop {
    from {
        opacity: 0;
        transform: scale(0.55);
    }
    70% {
        opacity: 1;
        transform: scale(1.07);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes nav-drop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes shine {
    0% {
        left: -45%;
    }
    16% {
        left: 115%;
    }
    100% {
        left: 115%;
    }
}

/* ============ Navbar ============ */
.navbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 20;
    animation: nav-drop 0.5s ease-out both;
}

.navbar-inner {
    max-width: var(--max);
    margin: 0 auto;
    min-height: 64px;
    padding: 8px var(--pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(20px, 3vw, 44px);
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand img {
    width: clamp(150px, 12vw, 180px);
    height: auto;
}

.navbar-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 2.5vw, 36px);
    margin-left: auto;
}

.navbar-links a {
    color: var(--navy);
    font-size: var(--fs-sm);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.18s ease;
}

.navbar-links a:hover,
.navbar-links a:focus-visible {
    color: var(--blue);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2vw, 24px);
    flex-shrink: 0;
}

/* desktop nav stays lean: the hero benefits already carry the trust message */
.navbar .trust-row {
    display: none;
}

.trust-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--body);
    font-size: var(--fs-xs);
    font-weight: 500;
    white-space: nowrap;
}

.trust-row svg {
    width: 20px;
    height: 20px;
    fill: var(--blue);
    flex-shrink: 0;
}

.trust-row .dot {
    color: #c3ccd8;
}

.navbar-cta {
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 8px;
    background: var(--blue);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: var(--fs-sm);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.navbar-cta:hover,
.navbar-cta:focus-visible {
    background: var(--blue-dark);
    box-shadow: 0 9px 20px rgba(37, 99, 235, 0.27);
    transform: translateY(-1px);
}

/* ============ Primary button ============ */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    padding: 16px 28px;
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-btn);
    transition: background 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    /* never let a flex row squeeze the button narrower than its label --
       overflow:hidden (for the shine sweep) would clip the text instead of spilling */
    flex-shrink: 0;
    max-width: 100%;
}

.cta-button:hover,
.cta-button:focus-visible {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

/* periodic shine sweep across primary CTAs */
.cta-button::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -45%;
    width: 34%;
    background: linear-gradient(105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.32) 50%,
        transparent 100%);
    transform: skewX(-20deg);
    animation: shine 5.5s ease-in-out 2.8s infinite;
    pointer-events: none;
}

.cta-button span {
    transition: transform 0.18s ease;
}

.cta-button:hover span,
.cta-button:focus-visible span {
    transform: translateX(3px);
}

/* ============ Trust chips (landing banner + survey done) ============ */
.cta-trust {
    display: flex;
    align-items: center;
    gap: var(--s2);
    margin-top: var(--s2);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--body);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.trust-item svg {
    width: 14px;
    height: 14px;
    fill: var(--blue);
    flex-shrink: 0;
}

/* ============ Responsive navbar ============ */
@media (max-width: 1024px) {
    .navbar-inner {
        gap: var(--s3);
    }

    .navbar-links {
        gap: var(--s3);
    }
}

@media (max-width: 640px) {
    :root {
        --pad: 32px;
    }

    .navbar-inner {
        min-height: 70px;
        gap: 12px;
        padding: 10px var(--pad);
    }

    .brand img {
        width: clamp(145px, 43vw, 170px);
    }

    .navbar-links {
        display: none;
    }

    .navbar-actions {
        margin-left: auto;
    }

    .navbar-cta {
        min-height: 40px;
        padding: 10px 12px;
        font-size: 0.75rem;
    }

    .cta-button {
        font-size: 0.95rem;
        padding: 15px 16px;
    }

    .cta-trust {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 14px;
    }

    .trust-item {
        font-size: var(--fs-xs);
        white-space: nowrap;
    }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .navbar,
    .cta-button::after {
        animation: none;
    }

    .cta-button,
    .cta-button span {
        transition: none;
    }
}
