/* CodeNotes site — "Paper" direction (Figma: CodeNotes — Website redesign) */
:root {
    --bg: #F7F4EE;
    --surface: #FFFFFF;
    --bar: #F1ECE2;
    --border: #E4DED2;
    --win-border: #D9D2C3;
    --text: #1C1917;
    --muted: #6B645A;
    --accent: #D9480F;
    --accent-soft: rgba(217, 72, 15, 0.12);
    --on-accent: #FFFFFF;
    --ink: #1C1917;
    --on-ink: #F7F4EE;

    --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --gutter: 56px;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { max-width: 1328px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header { display: flex; align-items: center; gap: 36px; padding: 22px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 600; font-size: 20px; }
.logo-mark {
    width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--on-accent);
    display: grid; place-items: center; font-size: 16px; line-height: 1;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) { font-size: 15px; font-weight: 500; color: var(--muted); transition: color .15s; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--text); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; line-height: 1.2;
    border: 1px solid transparent; transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #BF3F0B; }
.btn-ghost { border-color: var(--border); background: transparent; color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 15px 26px; font-size: 16px; }

/* Hero */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 0 80px; gap: 48px; }
.hero-copy { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.eyebrow {
    display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
    font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.5rem, 6vw, 3.9rem); line-height: 1.08; letter-spacing: -0.03em; max-width: 14.5em; }
.hero .lede { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 680px; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 14px; font-weight: 500; color: var(--muted); list-style: none; }
.footnote { font-size: 13px; color: var(--muted); opacity: 0.85; max-width: 680px; }

/* App window mock */
.window {
    width: 100%; max-width: 540px; text-align: left; background: var(--surface); border: 1px solid var(--win-border);
    border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px -28px rgba(28, 25, 23, 0.35);
}
.window-bar, .window-status { display: flex; align-items: center; gap: 14px; background: var(--bar); padding: 13px 14px; }
.window-status { padding: 7px 14px; gap: 7px; font-size: 11px; }
.lights { display: flex; gap: 8px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.lights i:nth-child(1) { background: #FF5F57; } .lights i:nth-child(2) { background: #FEBC2E; } .lights i:nth-child(3) { background: #28C840; }
.window-title { font-size: 12px; font-weight: 600; color: var(--muted); }
.opacity { margin-left: auto; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.opacity .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.slider { width: 68px; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.slider b { display: block; width: 70%; height: 100%; background: var(--accent); }
.window-body { padding: 20px 22px 22px; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; display: grid; gap: 9px; }
.window-body .h { color: var(--accent); font-weight: 500; font-size: 14px; }
.window-body .dim { color: var(--muted); }
.window-status .on { color: var(--accent); font-weight: 500; display: flex; align-items: center; gap: 7px; font-family: var(--font-body); }
.window-status .on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.window-status .stats { margin-left: auto; font-family: var(--font-mono); color: var(--muted); }

/* Sections */
section { padding: 72px 0; }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.14; letter-spacing: -0.025em; }
.section-head p { font-size: 18px; color: var(--muted); max-width: 640px; }

.features { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); grid-auto-flow: column; column-gap: 56px; list-style: none; }
.feature { display: grid; grid-template-columns: auto 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--border); }
.feature .n { font-family: var(--font-heading); font-weight: 600; font-size: 30px; color: var(--accent); line-height: 1.1; min-width: 2ch; }
.feature h3 { font-size: 24px; margin-bottom: 8px; }
.feature p { font-size: 16px; line-height: 1.6; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chips li { padding: 10px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 15px; font-weight: 500; }
#languages .section-head { margin-bottom: 28px; }

.download { padding: 24px 0 72px; }
.download-card {
    background: var(--ink); color: var(--on-ink); border-radius: 28px; padding: 64px 32px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.download-card h2 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); line-height: 1.12; max-width: 17em; }
.download-card p { font-size: 18px; opacity: 0.8; }

/* Footer */
.site-footer { display: flex; align-items: center; gap: 28px; padding: 28px 0; font-size: 14px; color: var(--muted); }
.site-footer nav { margin-left: auto; display: flex; gap: 28px; }
.site-footer a:hover { color: var(--text); }

/* Legal pages */
.doc { max-width: 720px; margin: 0 auto; padding: 48px 0 96px; }
.doc .back { display: inline-block; font-size: 14px; font-weight: 500; color: var(--accent); margin-bottom: 28px; }
.doc h1 { font-size: clamp(2.4rem, 6vw, 3.5rem); line-height: 1.1; letter-spacing: -0.03em; }
.doc .updated { margin: 14px 0 32px; font-size: 14px; color: var(--muted); }
.doc .lead { font-size: 20px; line-height: 1.6; margin-bottom: 28px; }
.doc section { padding: 28px 0; border-top: 1px solid var(--border); }
.doc h2 { font-size: 26px; line-height: 1.25; margin-bottom: 12px; }
.doc section p { color: var(--muted); line-height: 1.7; }
.doc section p a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Responsive */
@media (max-width: 900px) {
    :root { --gutter: 24px; }
    .features { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
    .nav a:not(.btn) { display: none; }
    .hero { padding-top: 32px; }
}
@media (max-width: 520px) {
    .site-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
    .site-footer nav { margin-left: 0; flex-wrap: wrap; gap: 16px; }
    .feature { grid-template-columns: 1fr; gap: 8px; }
    .download-card { padding: 48px 20px; border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn { transition: none; }
}
