/* ===========================================================================
   QuickNote — marketing landing page
   Standalone stylesheet (the app shell uses static/style.css). Shares the same
   design tokens and auto light/dark via prefers-color-scheme.
   =========================================================================== */

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

:root {
    --bg: #ffffff;
    --bg-elev: #ffffff;
    --bg-sunken: #f7f8fa;
    --surface-hover: #f0f2f5;
    --sel: #e8f0fe;
    --sel-text: #0b1f44;
    --text: #1a1c20;
    --text-muted: #5f6672;
    --text-faint: #9aa1ac;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-solid: #2563eb;
    --on-accent: #ffffff;
    --border: #e6e8ec;
    --border-strong: #d4d8df;
    --focus-ring: rgba(37, 99, 235, 0.30);
    --shadow: 0 12px 40px rgba(18, 24, 40, 0.18);
    --shadow-lg: 0 30px 80px rgba(18, 24, 40, 0.20);
    --kbd-bg: #f1f3f6;
    --kbd-border: #d8dce2;
    --glow: radial-gradient(60% 60% at 50% 0%, rgba(37, 99, 235, 0.10), transparent 70%);

    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --content-max: 1040px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, sans-serif;
    --font-mono: 'SF Mono', ui-monospace, 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16181d;
        --bg-elev: #1b1e24;
        --bg-sunken: #131519;
        --surface-hover: #232730;
        --sel: #21304a;
        --sel-text: #eaf1ff;
        --text: #e7e9ee;
        --text-muted: #9aa1ac;
        --text-faint: #6b7280;
        --accent: #6bb3ff;
        --accent-hover: #8cc5ff;
        --accent-solid: #2f6fed;
        --on-accent: #ffffff;
        --border: #2a2e37;
        --border-strong: #3a3f4b;
        --focus-ring: rgba(107, 179, 255, 0.35);
        --shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
        --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.6);
        --kbd-bg: #232730;
        --kbd-border: #3a3f4b;
        --glow: radial-gradient(60% 60% at 50% 0%, rgba(107, 179, 255, 0.10), transparent 70%);
    }
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    background-image: var(--glow);
    background-repeat: no-repeat;
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

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

kbd {
    font-family: var(--font);
    font-size: .82em;
    background: var(--kbd-bg);
    border: 1px solid var(--kbd-border);
    border-radius: 4px;
    padding: 1px 6px;
    color: var(--text-muted);
    white-space: nowrap;
}

code {
    font-family: var(--font-mono);
    font-size: .88em;
    background: var(--bg-sunken);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-sunken);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background .14s, border-color .14s, transform .14s, box-shadow .14s;
}
.btn:hover { background: var(--surface-hover); transform: translateY(-1px); }
.btn-primary {
    background: var(--accent-solid);
    border-color: var(--accent-solid);
    color: var(--on-accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: transparent; }
.btn-lg { padding: 13px 26px; font-size: 16px; border-radius: var(--radius-lg); }

/* ---- Top nav ------------------------------------------------------------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 14px 24px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand-mark { color: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: 4px; }

/* Language switch (EN / TR) */
.lang-switch {
    display: inline-flex;
    background: var(--bg-sunken);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    overflow: hidden;
}
.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    padding: 6px 11px;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] { background: var(--accent-solid); color: var(--on-accent); }

/* ---- Sections ------------------------------------------------------------ */
main { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -0.02em; }
.section-head p { color: var(--text-muted); margin-top: 12px; font-size: 17px; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { text-align: center; padding: 64px 0 48px; }
.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    background: var(--sel);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 22px;
}
.hero h1 {
    font-size: clamp(34px, 6.4vw, 62px);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: -0.03em;
}
.hero h1 .accent { color: var(--accent); }
.lede {
    max-width: 620px;
    margin: 22px auto 0;
    font-size: clamp(17px, 2.2vw, 20px);
    color: var(--text-muted);
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.hero-foot { margin-top: 20px; font-size: 13px; color: var(--text-faint); }

/* ---- Demo window --------------------------------------------------------- */
.demo .demo-foot { text-align: center; margin-top: 24px; color: var(--text-muted); font-size: 15px; }

.window {
    max-width: 860px;
    margin: 0 auto;
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.window-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    background: var(--bg-sunken);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.window-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.window-bar .dot.red { background: #ff5f57; }
.window-bar .dot.amber { background: #febc2e; }
.window-bar .dot.green { background: #28c840; }
.window-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--text-faint);
    font-weight: 600;
}

/* The demo app — mirrors the real nvAlt shell */
.qn { display: flex; flex-direction: column; height: 460px; }
.qn-omni-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 16px 12px;
    background: var(--bg-sunken);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 0 11px;
    transition: border-color .12s, box-shadow .12s;
}
.qn-omni-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.qn-omni-icon { color: var(--text-faint); flex-shrink: 0; }
.qn-omni {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 15px;
    padding: 11px 0;
    font-family: var(--font);
}
.qn-omni::placeholder { color: var(--text-faint); }

.qn-body { flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border); }

.qn-list { list-style: none; overflow-y: auto; max-height: 190px; border-bottom: 1px solid var(--border); }
.qn-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 9px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
}
.qn-row:hover { background: var(--surface-hover); }
.qn-row.selected { background: var(--sel); border-left-color: var(--accent); }
.qn-row.selected .qn-row-title { color: var(--sel-text); }
.qn-row-main { flex: 1; min-width: 0; }
.qn-row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qn-row-snippet { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.qn-row-snippet b { color: var(--accent); font-weight: 600; }
.qn-row-date { font-size: 12px; color: var(--text-faint); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.qn-row.create-row .qn-row-title { color: var(--accent); }
.qn-row.create-row .qn-row-quote { color: var(--text); font-weight: 700; }

.qn-editor-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.qn-editor-bar { display: flex; align-items: center; gap: 10px; padding: 7px 16px; min-height: 30px; }
.qn-meta { font-size: 12px; color: var(--text-faint); }
.qn-save { font-size: 12px; color: var(--accent); margin-left: auto; }
.qn-editor {
    flex: 1;
    min-height: 0;
    width: 100%;
    background: transparent;
    color: var(--text);
    border: none;
    outline: none;
    resize: none;
    padding: 2px 16px 14px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.65;
}
.qn-editor::placeholder { color: var(--text-faint); }

.qn-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-faint);
}
.qn-hints { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qn-count { flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ---- Features ------------------------------------------------------------ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.feature {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color .14s, transform .14s, box-shadow .14s;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    background: var(--bg-sunken);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 14px;
}
.feature h3 { font-size: 17px; font-weight: 700; }
.feature p { color: var(--text-muted); margin-top: 7px; font-size: 14.5px; }

/* ---- Usage / steps ------------------------------------------------------- */
.usage { display: grid; gap: 40px; }
.steps { list-style: none; display: grid; gap: 18px; max-width: 720px; margin: 0 auto; width: 100%; }
.step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
}
.step-num {
    flex-shrink: 0;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-solid);
    color: var(--on-accent);
    border-radius: 50%;
    font-weight: 800;
    font-size: 16px;
}
.step h3 { font-size: 17px; font-weight: 700; }
.step p { color: var(--text-muted); margin-top: 5px; font-size: 15px; }

.shortcuts {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    background: var(--bg-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
}
.shortcuts h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.shortcuts ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 22px; margin-top: 14px; }
.shortcuts li { display: flex; align-items: center; gap: 8px; }
.shortcuts li span { color: var(--text-muted); font-size: 14px; }
.shortcuts-mac { margin-top: 14px; font-size: 13px; color: var(--text-faint); }

/* ---- Final CTA ----------------------------------------------------------- */
.cta {
    text-align: center;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 56px 24px;
    margin: 24px 0 72px;
    box-shadow: var(--shadow);
}
.cta h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.cta p { color: var(--text-muted); margin-top: 12px; }
.cta .btn { margin-top: 24px; }
.cta-foot { font-size: 13px; color: var(--text-faint); margin-top: 18px; }

/* ---- Footer -------------------------------------------------------------- */
.site-foot {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 28px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-faint);
    font-size: 14px;
}

/* ---- Accessibility & motion ---------------------------------------------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 720px) {
    .nav-links { display: none; }
    .lang-switch { margin-left: auto; }
    section { padding: 52px 0; }
    .qn { height: 420px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
