/* =========================================================================
   TESSA marketing site — base stylesheet
   Brand tokens + reset + typography + buttons + container + utilities.
   Page-specific styles live in their own files or page <style> blocks.
   ========================================================================= */

:root {
    --navy: #2574ab;
    --navy-dark: #1B5A87;
    --navy-darker: #143E5E;
    --cyan: #6eb6de;
    --cyan-light: #bfddef;
    --ink: #1e2937;
    --slate: #4b5563;
    --rule: #e1e5eb;
    --tint: #f5f8fb;
    --bg: #ffffff;

    --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(15, 42, 71, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 42, 71, 0.08);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }

html, body { min-height: 100%; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Sticky footer: body is a flex column so <main> can grow
       to fill remaining viewport space, pinning the footer to
       the bottom when content is short. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

/* Typography */
h1, h2, h3, h4 {
    margin: 0 0 0.5em;
    line-height: 1.2;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
code, pre { font-family: var(--font-mono); font-size: 0.95em; }

/* Links */
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-dark); text-decoration: underline; }

/* Container */
.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    min-height: 44px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.btn-primary:hover {
    background: var(--navy-dark);
    border-color: var(--navy-dark);
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: var(--navy);
    border-color: var(--navy);
}
.btn-secondary:hover {
    background: var(--tint);
    color: var(--navy-dark);
    border-color: var(--navy-dark);
}

.btn-sm {
    padding: 8px 16px;
    min-height: 36px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 14px 28px;
    min-height: 48px;
    font-size: 1rem;
}

/* Closing CTA pattern — used at the bottom of multiple marketing pages */
.section-cta {
    background: var(--tint);
    border-top: 1px solid var(--rule);
}
.final-cta {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}
.final-cta h2 {
    margin-bottom: 28px;
}

/* Utilities */
.text-slate { color: var(--slate); }
.text-muted { color: #6b7280; font-size: 0.875rem; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* Section spacing */
.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-tint { background: var(--tint); }

@media (max-width: 768px) {
    .section { padding: 48px 0; }
}

/* =========================================================================
   Header
   ========================================================================= */

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
}
.site-brand:hover { text-decoration: none; }
.site-brand img { height: 36px; width: auto; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.site-nav a {
    color: var(--ink);
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.site-nav a:hover {
    color: var(--navy);
    text-decoration: none;
}
.site-nav a.active {
    color: var(--navy);
    border-bottom-color: var(--navy);
}
.site-nav a.nav-cta {
    border-bottom: 1px solid var(--navy);
    color: #fff;
}
.site-nav a.nav-cta:hover { color: #fff; }

/* Mobile nav toggle (hamburger) */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 0;
}
.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
    transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

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

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--rule);
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.22s ease;
    }
    .site-nav.open { max-height: 80vh; }

    .site-nav a {
        padding: 16px 24px;
        border-bottom: 1px solid var(--rule);
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .site-nav a.active { border-bottom-color: var(--rule); background: var(--tint); }
    .site-nav a.nav-cta {
        margin: 16px 24px;
        border-radius: var(--radius);
        justify-content: center;
        background: var(--navy);
    }
    .site-nav a.nav-cta.active { background: var(--navy); }
}

/* =========================================================================
   Footer
   ========================================================================= */

.site-footer {
    background: var(--tint);
    border-top: 1px solid var(--rule);
    padding: 32px 0;
}
.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.site-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--slate);
    font-weight: 600;
}
.site-footer-brand:hover { color: var(--navy); text-decoration: none; }
.site-footer-brand img { height: 24px; width: 24px; }

.site-footer-links {
    display: flex;
    gap: 20px;
}
.site-footer-links a { color: var(--slate); font-size: 0.9rem; }
.site-footer-links a:hover { color: var(--navy); }

.site-footer-copy {
    color: var(--slate);
    font-size: 0.85rem;
}

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