/* =====================================================================
   Northlight — promotional site stylesheet
   Mobile-first, responsive, light + dark via prefers-color-scheme.
   Aesthetic: deep neutrals + a warm-to-cool "color temperature" accent.
   No external fonts, no trackers.
   ===================================================================== */

/* ---- Design tokens -------------------------------------------------- */
:root {
    /* Color-temperature accent pair */
    --warm: #ff9d5c;   /* tungsten / amber  */
    --warm-deep: #ff7a3c;
    --cool: #5cc8ff;   /* daylight / blue   */
    --cool-deep: #3aa0e6;

    /* Light theme neutrals (default) */
    --bg:        #f4f5f7;
    --bg-raised: #ffffff;
    --bg-sunken: #eaecef;
    --ink:       #14181c;
    --ink-soft:  #46505a;
    --ink-faint: #6b7680;
    --line:      #d9dde2;
    --line-soft: #e6e9ed;

    --accent:      var(--warm-deep);
    --accent-ink:  #ffffff;
    --focus:       #2b7fff;

    --radius:   14px;
    --radius-sm: 9px;
    --shadow:  0 1px 2px rgba(20, 24, 28, .06), 0 8px 24px rgba(20, 24, 28, .08);
    --shadow-lg: 0 20px 60px rgba(20, 24, 28, .16);
    --maxw: 1120px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
            Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #0e1114;
        --bg-raised: #171b20;
        --bg-sunken: #0a0d10;
        --ink:       #eef1f4;
        --ink-soft:  #b3bcc5;
        --ink-faint: #7d8792;
        --line:      #262c33;
        --line-soft: #1d2228;

        --accent:     var(--warm);
        --accent-ink: #1a1206;
        --focus:      #6ea8ff;
        --shadow:  0 1px 2px rgba(0, 0, 0, .5), 0 10px 30px rgba(0, 0, 0, .45);
        --shadow-lg: 0 24px 70px rgba(0, 0, 0, .6);
    }
}

/* ---- Reset-ish ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

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

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--accent); color: var(--accent-ink);
    padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---- Buttons -------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--accent); color: var(--accent-ink);
    font-weight: 650; font-size: 1rem;
    padding: .8rem 1.4rem; border-radius: 999px;
    border: 1px solid transparent; cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.05); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-small { padding: .5rem 1rem; font-size: .92rem; }
.btn-ghost {
    background: transparent; color: var(--ink);
    border-color: var(--line);
}
.btn-ghost:hover { filter: none; background: var(--bg-sunken); }

/* ---- Header / nav --------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 62px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 1.15rem; }
.brand-mark {
    width: 20px; height: 20px; border-radius: 6px; flex: none;
    background: linear-gradient(135deg, var(--warm), var(--cool));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}

.site-nav ul { list-style: none; display: flex; align-items: center; gap: .35rem; margin: 0; padding: 0; }
.site-nav a {
    color: var(--ink-soft); font-weight: 550; font-size: .98rem;
    padding: .5rem .8rem; border-radius: 8px; display: block;
}
.site-nav a:hover { color: var(--ink); background: var(--bg-sunken); text-decoration: none; }
.site-nav a.active { color: var(--ink); background: var(--bg-sunken); }
.site-nav a.active::after {
    content: ""; display: block; height: 2px; margin-top: 3px; border-radius: 2px;
    background: linear-gradient(90deg, var(--warm), var(--cool));
}
.nav-cta { margin-left: .4rem; }
.nav-cta .btn { color: var(--accent-ink); }

.nav-toggle {
    display: none;
    background: transparent; border: 1px solid var(--line);
    border-radius: 9px; width: 42px; height: 38px; cursor: pointer;
    padding: 0; align-items: center; justify-content: center;
}
.nav-toggle-bar { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle-bar + .nav-toggle-bar { margin-top: 4px; }
.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: 760px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--bg-raised); border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow); display: none;
    }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem; }
    .site-nav a { padding: .8rem 1rem; border-radius: 10px; }
    .site-nav a.active::after { display: none; }
    .nav-cta { margin: .4rem 0 0; }
    .nav-cta .btn { justify-content: center; width: 100%; }
}

/* ---- Sections ------------------------------------------------------- */
section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section-tight { padding: clamp(2rem, 5vw, 3rem) 0; }
.eyebrow {
    display: inline-block; text-transform: uppercase; letter-spacing: .12em;
    font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: .8rem;
}
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }

/* ---- Hero ----------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(70% 60% at 12% 0%, color-mix(in srgb, var(--warm) 26%, transparent), transparent 60%),
        radial-gradient(70% 60% at 92% 20%, color-mix(in srgb, var(--cool) 24%, transparent), transparent 60%);
    opacity: .8;
}
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-copy h1 { margin-bottom: .6rem; }
.hero-copy .lead { max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-meta { margin-top: 1.2rem; color: var(--ink-faint); font-size: .95rem; }

.hero-shot {
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-lg); border: 1px solid var(--line);
    background: var(--bg-raised);
}
.hero-shot img { width: 100%; display: block; }

@media (min-width: 900px) {
    .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
}

/* ---- Platform badges ------------------------------------------------ */
.badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; list-style: none; padding: 0; }
.badge {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .45rem .9rem; border-radius: 999px;
    background: var(--bg-raised); border: 1px solid var(--line);
    font-size: .9rem; font-weight: 600; color: var(--ink-soft);
}
.badge svg { width: 16px; height: 16px; }

/* ---- How it works (steps) ------------------------------------------ */
.steps { display: grid; gap: 1.2rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
    background: var(--bg-raised); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
    position: relative;
}
.step-num {
    font-family: var(--mono); font-size: .85rem; font-weight: 700;
    width: 34px; height: 34px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--accent-ink); margin-bottom: .9rem;
    background: linear-gradient(135deg, var(--warm-deep), var(--cool-deep));
}
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--ink-soft); font-size: .97rem; margin: 0; }

/* ---- Features ------------------------------------------------------- */
.feature-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }

.feature {
    display: flex; gap: .85rem; padding: 1.1rem;
    background: var(--bg-raised); border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
}
.feature .dot {
    flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: .45rem;
    background: linear-gradient(135deg, var(--warm), var(--cool));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.feature p { margin: 0; font-size: .98rem; color: var(--ink-soft); }
.feature strong { color: var(--ink); display: block; }

/* ---- The core idea callout ----------------------------------------- */
.formula {
    background: var(--bg-sunken); border: 1px solid var(--line);
    border-radius: var(--radius); padding: clamp(1.4rem, 4vw, 2.2rem);
    text-align: center;
}
.formula code {
    font-family: var(--mono); font-size: clamp(1rem, 3.2vw, 1.4rem);
    display: inline-block; padding: .3rem .2rem; letter-spacing: -.01em;
    background: none;
}
.formula .warm-cool { color: var(--ink-soft); font-size: .98rem; margin-top: .6rem; }
.temp-scale {
    height: 8px; border-radius: 999px; margin: 1.2rem auto 0; max-width: 420px;
    background: linear-gradient(90deg, var(--cool), #dfe6ea, var(--warm));
}

/* ---- CTA band ------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band .btn { margin-top: 1rem; }

/* ---- Docs layout ---------------------------------------------------- */
.docs-layout { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) {
    .docs-layout { grid-template-columns: 240px 1fr; gap: 3rem; }
}
.docs-nav {
    position: sticky; top: 78px; align-self: start;
    font-size: .95rem;
}
.docs-nav h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); }
.docs-nav ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.docs-nav a { display: block; padding: .4rem .9rem; color: var(--ink-soft); margin-left: -2px; border-left: 2px solid transparent; }
.docs-nav a:hover { color: var(--ink); text-decoration: none; border-left-color: var(--accent); }
@media (max-width: 899px) {
    .docs-nav { position: static; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; background: var(--bg-raised); }
}

.doc-section { scroll-margin-top: 84px; margin-bottom: 2.6rem; }
.doc-section h2 { border-bottom: 1px solid var(--line-soft); padding-bottom: .4rem; }
.doc-section h3 { margin-top: 1.6rem; }
.doc-section p, .doc-section li { color: var(--ink-soft); }
.doc-section ul, .doc-section ol { padding-left: 1.3rem; }
.doc-section li { margin-bottom: .4rem; }
.doc-section code { font-family: var(--mono); font-size: .9em; background: var(--bg-sunken); padding: .1em .4em; border-radius: 5px; }

.callout {
    border-left: 3px solid var(--accent); background: var(--bg-sunken);
    padding: 1rem 1.2rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.2rem 0;
}
.callout p:last-child { margin-bottom: 0; }

.mode-cards { display: grid; gap: 1rem; margin: 1.2rem 0; }
@media (min-width: 720px) { .mode-cards { grid-template-columns: repeat(3, 1fr); } }
.mode-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem; }
.mode-card h4 { margin: 0 0 .3rem; color: var(--ink); }
.mode-card p { margin: 0; font-size: .95rem; }

/* ---- Gallery -------------------------------------------------------- */
.gallery-grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.gallery-item {
    margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm);
    overflow: hidden; background: var(--bg-raised); box-shadow: var(--shadow);
}
.gallery-item button {
    display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
    background: var(--bg-sunken);
}
.gallery-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.gallery-item figcaption { padding: .7rem .9rem; font-size: .92rem; color: var(--ink-soft); font-weight: 550; }
.gallery-empty { text-align: center; color: var(--ink-faint); padding: 3rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; z-index: 200; display: none;
    align-items: center; justify-content: center;
    background: rgba(6, 8, 10, .9);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    padding: 4vmin;
}
.lightbox.open { display: flex; }
.lightbox-figure { margin: 0; max-width: 92vw; max-height: 92vh; text-align: center; }
.lightbox-figure img { max-width: 92vw; max-height: 80vh; width: auto; margin: 0 auto; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox-figure figcaption { color: #fff; margin-top: .9rem; font-size: 1rem; }
.lightbox-counter { color: rgba(255,255,255,.6); font-size: .85rem; margin-top: .3rem; }
.lightbox button.lb-ctrl {
    position: absolute; background: rgba(255,255,255,.12); color: #fff;
    border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
    width: 48px; height: 48px; font-size: 1.4rem; cursor: pointer; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.lightbox button.lb-ctrl:hover { background: rgba(255,255,255,.24); }
.lb-close { top: 3vmin; right: 3vmin; }
.lb-prev { left: 2vmin; top: 50%; transform: translateY(-50%); }
.lb-next { right: 2vmin; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
    .lb-prev { left: 50%; top: auto; bottom: 3vmin; transform: translateX(-60px); }
    .lb-next { right: 50%; top: auto; bottom: 3vmin; transform: translateX(60px); }
}

/* ---- Contact form --------------------------------------------------- */
.form-layout { display: grid; gap: 2.5rem; }
@media (min-width: 860px) { .form-layout { grid-template-columns: 1.3fr 1fr; } }

.contact-form { display: grid; gap: 1.1rem; max-width: 560px; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field .req { color: var(--accent); }
.field input, .field textarea {
    font: inherit; color: var(--ink);
    background: var(--bg-raised); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: .75rem .9rem; width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.field .error-msg { color: #d23b3b; font-size: .85rem; }
@media (prefers-color-scheme: dark) { .field .error-msg { color: #ff8080; } }
.field.has-error input, .field.has-error textarea { border-color: #d23b3b; }

/* Honeypot — visually hidden but present for bots. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: .88rem; color: var(--ink-faint); }

.alert { padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.4rem; border: 1px solid; }
.alert-success { background: color-mix(in srgb, #2fa860 16%, var(--bg-raised)); border-color: #2fa860; color: var(--ink); }
.alert-error { background: color-mix(in srgb, #d23b3b 14%, var(--bg-raised)); border-color: #d23b3b; color: var(--ink); }
.alert strong { display: block; margin-bottom: .2rem; }

.contact-aside { color: var(--ink-soft); }
.contact-aside h3 { color: var(--ink); }
.contact-aside ul { list-style: none; padding: 0; margin: 0; }
.contact-aside li { padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }

/* ---- Footer --------------------------------------------------------- */
.site-footer {
    margin-top: 2rem; border-top: 1px solid var(--line);
    background: var(--bg-sunken); padding: 3rem 0 2.5rem;
}
.footer-inner { display: grid; gap: 2rem; }
@media (min-width: 720px) { .footer-inner { grid-template-columns: 1.5fr 1fr; } }
.footer-brand .brand-name { font-size: 1.1rem; font-weight: 800; }
.footer-brand .brand-mark { display: inline-block; vertical-align: middle; margin-right: .4rem; }
.footer-tagline { color: var(--ink-soft); margin: .6rem 0 .3rem; max-width: 42ch; }
.footer-req { color: var(--ink-faint); font-size: .9rem; margin: 0; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.footer-nav a { color: var(--ink-soft); }
.footer-legal { margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.footer-legal p { font-size: .82rem; color: var(--ink-faint); margin: 0 0 .6rem; max-width: 90ch; }
.footer-legal .copyright { color: var(--ink-soft); }

/* ---- Utility -------------------------------------------------------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
