@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ---------- Design Tokens ---------- */

:root {
    --primary: #000282;
    --primary-dark: #000160;
    --primary-light: #1a1a9e;
    --surface: #f5f6f8;
    --surface-raised: #ffffff;
    --text: #1a1a2e;
    --text-muted: #5c5c7a;
    --accent: #0055d4;
    --border: #e2e4e9;
    --focus: #0055d4;
    --btn: #000282;
    --btn-hover: #000160;
    --radius: 12px;
    --radius-lg: 20px;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #ffffff;
        --primary-dark: #e0e0e0;
        --primary-light: #f5f5f5;
        --surface: #292828;
        --surface-raised: #2d2d2d;
        --text: #ededf0;
        --text-muted: #9e9eab;
        --accent: #ffffff;
        --border: #2a2a32;
        --focus: #ffffff;
        --btn: #000282;
        --btn-hover: #000160;
    }
}


/* ---------- Resets ---------- */

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

html {
    scroll-padding-top: 80px;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

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

input, button, textarea, select {
    font: inherit;
}

h1, h2, h3, h4, h5, h6, p {
    overflow-wrap: break-word;
}


/* ---------- Focus & Accessibility ---------- */

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

/* Skip link — visually hidden until focused */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 200;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0 0 8px 8px;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}


/* ---------- Header ---------- */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .logo {
    height: 36px;
    width: auto;
    transition: opacity 0.2s ease;
}
header .logo:hover {
    opacity: 0.85;
}

/* Swap logo in dark mode via a utility class set in the template */
@media (prefers-color-scheme: dark) {
    .logo-swap-dark .logo-normal { display: none; }
    .logo-swap-dark .logo-dark-mode { display: block; }
}
@media (prefers-color-scheme: light) {
    .logo-swap-dark .logo-normal { display: block; }
    .logo-swap-dark .logo-dark-mode { display: none; }
}

nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 28px;
}
.nav-list a {
    position: relative;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.92rem;
    transition: color 0.2s;
}
.nav-list a:hover {
    color: var(--primary);
}
.nav-list a.is-current {
    color: var(--primary);
    font-weight: 600;
}
.nav-list a.is-current::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 9px 22px;
    background: var(--btn);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover {
    background: var(--btn-hover);
    transform: translateY(-1px);
}


/* ---------- Hero ---------- */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 40px 90px;
    color: white;
    background-color: #000282;
    position: relative;
    overflow: hidden;
}

.hero-inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.hero-logo {
    height: 80px;
    width: auto;
    margin: 0 auto 24px;
}

.hero > h1,
.hero > h2,
.hero h2,
.hero-inner > h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero--short > h1,
.hero--short > h2 {
    margin-bottom: 0;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

.hero--short {
    padding: 50px 40px;
}


/* ---------- Content (generic) ---------- */

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px clamp(20px, 5vw, 50px);
    gap: 30px;
}

.about-content {
    max-width: 680px;
    margin: 0 auto;
}
.about-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}



/* ---------- Policy Pages (Termly embeds) ---------- */

.policy-content {
    max-width: 820px;
    margin: 0 auto;
    text-align: left;
    align-items: stretch;
    width: 100%;
}

.policy-content [name="termly-embed"] {
    width: 100%;
}

.policy-iframe {
    width: 100%;
    min-height: 80vh;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-raised);
}

/* ---------- Solutions ---------- */

.solutions {
    padding: 80px 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 12px;
}
.section-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.service-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    margin-bottom: 4px;
}

.service-icon {
    width: 48px;
    height: 48px;
    background: var(--surface);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    transition: background 0.25s;
}
.service-icon img {
    width: 24px;
    height: 24px;
}
.service-card:hover .service-icon {
    background: var(--brand, var(--primary));
}
.service-card:hover .service-icon img {
    filter: brightness(0) invert(1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: none;
    border-color: var(--brand, var(--primary));
}

@media (prefers-color-scheme: dark) {
    .service-card:hover {
        box-shadow: none;
    }
    .service-icon img {
        filter: brightness(0) invert(1);
    }
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}
.service-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.65;
}
.service-card .card-arrow {
    margin-top: auto;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.25s, transform 0.25s;
}
.service-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--brand, var(--primary));
}


/* ---------- Subscribe ---------- */

.subscribe {
    background: var(--surface-raised);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 70px 40px;
    text-align: center;
}
.subscribe-inner {
    max-width: 560px;
    margin: 0 auto;
}
.subscribe h2 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}
.subscribe p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 30px;
}
.subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--btn);
    color: white;
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.2s;
}
.subscribe-btn:hover {
    background: var(--btn-hover);
    transform: translateY(-2px);
}


/* ---------- Form Embed ---------- */

.form-embed {
    width: 100%;
    max-width: 700px;
    position: relative;
}
.form-embed iframe {
    border: none;
    outline: none;
}

.form-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.form-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .form-loading-spinner {
        animation: none;
        border-top-color: var(--border);
        opacity: 0.5;
    }
}


/* ---------- Termly ---------- */

.termly-policy {
    margin: 5px 25px;
}
.termly-policy ul {
    margin: 5px 25px;
}


/* ---------- Footer ---------- */

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px 30px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}
footer .sitelist {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 10px;
    margin: 7px 0;
}
footer a {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}
footer a:hover {
    color: var(--primary);
}
.pluslist li + li::before {
    content: '+';
    margin-right: 10px;
    opacity: 0.7;
}
footer .sitelist:not(.pluslist) li + li::before {
    content: '|';
    margin-right: 10px;
    opacity: 0.4;
}


/* ---------- Reveal Animations ---------- */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.hero .reveal {
    transform: translateY(16px);
}


/* ---------- Reduced Motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        transition-delay: 0ms !important;
        animation-delay: 0ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .service-card:hover {
        transform: none;
    }

    .nav-cta:hover,
    .subscribe-btn:hover {
        transform: none;
    }
}


/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    header {
        padding: 14px 20px;
    }
    nav {
        gap: 20px;
    }
    .nav-list {
        gap: 16px;
    }
    .nav-list a {
        font-size: 0.85rem;
    }
    .nav-cta {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    .hero {
        padding: 70px 24px 60px;
    }
    .hero-logo {
        height: 60px;
    }
    .hero h2 {
        font-size: 2rem;
    }
    .hero--short {
        padding: 40px 24px;
    }
    .solutions {
        padding: 60px 20px;
    }
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    .content {
        padding: 40px 20px;
    }
    .subscribe {
        padding: 50px 20px;
    }
    footer {
        padding: 24px 20px;
        gap: 6px;
    }
    footer .sitelist {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 8px;
    }
    footer .sitelist.pluslist li + li::before,
    footer .sitelist:not(.pluslist) li + li::before {
        content: none;
    }
    footer > a {
        margin-top: 4px;
    }
}