/* nodewriter — marketing & auth pages
   The app itself (canvas/editor) is styled separately in frontend/src/styles
*/

:root {
    --ink: #1a1a1a;
    --ink-mid: #4a4a4a;
    --ink-faint: #8a8a8a;
    --paper: #fafaf9;
    --paper-card: #ffffff;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --rule: #e5e5e5;

    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;

    --max-w: 1100px;
    --radius: 8px;
    --radius-lg: 14px;
    --shadow: 0 2px 12px rgba(26, 26, 26, 0.06);
}

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

body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

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

h1, h2, h3 { line-height: 1.25; margin-top: 0; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--rule);
    background: var(--paper-card);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ink);
}
.logo:hover { text-decoration: none; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Buttons */
.btn {
    display: inline-block;
    font-family: var(--font-ui);
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
}

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

.btn-secondary { background: var(--paper-card); color: var(--ink); border-color: var(--rule); }
.btn-secondary:hover { background: var(--paper); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.875rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1.05rem; }
.btn-full { width: 100%; }

/* Hero */
.hero {
    text-align: center;
    padding: 5rem 1.5rem 4rem;
    max-width: 720px;
    margin: 0 auto;
}

.hero-logo {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.75rem;
    object-fit: cover;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero-sub { color: var(--ink-mid); font-size: 1.15rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding: 2rem 1.5rem 5rem;
    max-width: var(--max-w);
    margin: 0 auto;
}

.feature h3 { margin-bottom: 0.5rem; }
.feature p { color: var(--ink-mid); }

/* Auth pages */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 4rem 1.5rem;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    background: var(--paper-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.auth-title { font-size: 1.5rem; margin-bottom: 0.25rem; }
.auth-sub { color: var(--ink-mid); margin-bottom: 1.5rem; }

.auth-form { display: flex; flex-direction: column; gap: 0.4rem; }
.auth-form label { font-size: 0.875rem; font-weight: 600; margin-top: 0.75rem; }
.auth-form input {
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}
.auth-form button { margin-top: 1.5rem; }

.auth-error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.auth-success {
    background: #f0fdf4;
    color: #15803d;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.auth-switch { text-align: center; margin-top: 1.25rem; font-size: 0.9rem; }

/* Prose (privacy page etc) */
.prose { max-width: 720px; margin: 3rem auto; padding: 0 1.5rem; }
.prose h2 { margin-top: 2rem; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--rule);
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--ink-faint);
    font-size: 0.875rem;
}

.footer-inner nav { display: flex; gap: 1.25rem; }
