/* Previo shared base — nav, footer, palette, typography.
   Page-specific layout stays inline per page. */

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

:root {
    --black:    #0C0D0F;
    --black-2:  #141517;
    --ivory:    #F5F3EF;
    --ivory-2:  #E8E5DF;
    --white:    #FAFAF8;
    --mid:      #8A8A86;
    --dim:      #5A5A57;
    --teal:     #0D9488;
    --teal-lt:  #14B8A6;
    --clear:    #059669;
    --caution:  #D97706;
    --danger:   #DC2626;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--black);
    color: var(--ivory);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.light { background: var(--ivory); color: var(--black); }

a { color: inherit; }

.contain {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3.5rem;
}

.contain-narrow {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 3.5rem;
}

.label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.label-dark { color: var(--mid); }
.label-light { color: var(--dim); }

/* ── Nav ── */
nav.top-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3.5rem;
    background: transparent;
    transition: background 0.4s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}
nav.top-nav.scrolled,
nav.top-nav.solid {
    background: rgba(12, 13, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: rgba(255,255,255,0.06);
}

.logo {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--ivory);
    text-decoration: none;
}
.logo-dot { color: var(--teal); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}
.nav-links a {
    font-size: 0.8rem;
    color: var(--mid);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--ivory); }
.nav-links a.active { color: var(--ivory); }

.lang-switch {
    font-size: 0.72rem;
    color: var(--dim);
    text-decoration: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: color 0.2s, border-color 0.2s;
}
.lang-switch:hover {
    color: var(--ivory);
    border-color: rgba(255,255,255,0.25);
}

/* ── Page hero (shared across sub-pages) ── */
.page-hero {
    padding: 10rem 0 5rem;
}
.page-hero h1 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
    font-weight: 400;
    max-width: 820px;
    margin-bottom: 1.5rem;
}
.page-hero .lede {
    font-size: 1.05rem;
    color: var(--mid);
    line-height: 1.7;
    max-width: 640px;
}

/* Body prose ── dark */
.prose p {
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--ivory);
    margin-bottom: 1.25rem;
}
.prose p.quiet { color: var(--mid); }
.prose h2 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 400;
    margin: 3.5rem 0 1.5rem;
}
.prose h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--ivory);
    margin: 2rem 0 0.75rem;
}
.prose ul { margin: 0 0 1.5rem 1.25rem; }
.prose li {
    font-size: 0.95rem;
    color: var(--ivory);
    margin-bottom: 0.4rem;
    line-height: 1.7;
}
.prose a {
    color: var(--teal);
    text-decoration: none;
    border-bottom: 1px solid rgba(13, 148, 136, 0.4);
}
.prose a:hover { border-bottom-color: var(--teal); }

/* CTA buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    background: var(--ivory);
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn.btn-outline {
    background: transparent;
    color: var(--ivory);
    border: 1px solid rgba(255,255,255,0.18);
}
.btn.btn-outline:hover { border-color: var(--ivory); opacity: 1; }
.btn.btn-teal {
    background: var(--teal);
    color: #fff;
}
.btn.btn-teal:hover { background: var(--teal-lt); opacity: 1; }

/* ── Footer ── */
footer.site-footer {
    padding: 3rem 3.5rem;
    background: var(--black);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.footer-left p {
    font-size: 0.72rem;
    color: var(--dim);
}
.footer-left a {
    color: var(--dim);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-left a:hover { color: var(--mid); }
.footer-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.footer-right a {
    font-size: 0.72rem;
    color: var(--dim);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-right a:hover { color: var(--mid); }

/* ── Utility: section padding ── */
.section-dark { background: var(--black); color: var(--ivory); }
.section-light { background: var(--ivory); color: var(--black); }
.section-pad { padding: 6rem 0 7rem; }

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 860px) {
    .contain, .contain-narrow { padding: 0 2rem; }
    nav.top-nav { padding: 1.25rem 2rem; }
    .nav-links { gap: 1.25rem; }
    .nav-links a:not(.lang-switch) { font-size: 0.75rem; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-right { flex-direction: column; gap: 1rem; }
    .page-hero { padding: 8rem 0 3.5rem; }
    .section-pad { padding: 4rem 0 5rem; }
}
@media (max-width: 520px) {
    .nav-links a:not(.lang-switch):not(:first-child) { display: none; }
}

/* ── Lead-capture modal (assets/lead-form.js) ── */
.lead-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.lead-modal.open { display: block; }
.lead-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(12, 13, 15, 0.55);
    backdrop-filter: blur(2px);
}
.lead-modal-card {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(440px, calc(100vw - 2.5rem));
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    background: var(--white);
    color: var(--black);
    padding: 2.25rem 2.25rem 2rem;
    border: 1px solid var(--ivory-2);
}
.lead-modal-card h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.9rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}
.lead-modal-sub { font-size: 0.9rem; color: var(--dim); margin-bottom: 1.5rem; }
.lead-modal-close {
    position: absolute; top: 0.9rem; right: 1.1rem;
    background: none; border: none; cursor: pointer;
    font-size: 1.5rem; line-height: 1; color: var(--mid);
}
.lead-modal-close:hover { color: var(--black); }
.lead-form label {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 1rem;
}
.lead-form input:not([type="hidden"]):not([name="website"]),
.lead-form textarea {
    display: block; width: 100%;
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    font: inherit; font-size: 0.95rem;
    color: var(--black);
    background: var(--ivory);
    border: 1px solid var(--ivory-2);
    border-radius: 0;
}
.lead-form input:focus, .lead-form textarea:focus {
    outline: none; border-color: var(--teal);
}
.lead-form-submit { width: 100%; justify-content: center; margin-top: 0.25rem; }
.lead-form-note { margin-top: 1rem; font-size: 0.95rem; line-height: 1.55; }
.lead-form-note.ok { color: var(--clear); }
.lead-form-note.err { color: var(--danger); }
.lead-form-note a { color: var(--teal); text-decoration: none; border-bottom: 1px solid rgba(13,148,136,0.4); }
