/* =============================================
   BluAuthor — Styles
   ============================================= */

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

:root {
    --bg: #070d17;
    --surface: #0d1520;
    --surface-hover: #111e2e;
    --text: #b8cce0;
    --text-dim: #4a6883;
    --text-faded: #1e3452;
    --accent: #2a7dd4;
    --accent-dim: rgba(42, 125, 212, 0.2);
    --border: #142038;
    --success: #2a7a56;
}

body {
    font-family: 'EB Garamond', Georgia, serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* --- Typography --- */

h1, h2, h3, h4, h5, h6 {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.4rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }

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

main { min-height: calc(100vh - 120px); }

/* --- Layout --- */

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 4rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Buttons --- */

.btn, button.btn {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 12px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    color: var(--text-dim);
}

.btn:hover, button.btn:hover {
    border-color: var(--text-dim);
    color: var(--text);
}

.btn.primary, button.btn.primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.btn.primary:hover, button.btn.primary:hover {
    background: #3a8de4;
    border-color: #3a8de4;
    color: var(--bg);
}

.actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* --- Header --- */

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    padding-bottom: 20px;
}

.brand {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand:hover { color: var(--text); }

.brand img {
    height: 28px;
    opacity: 0.85;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s;
    margin-left: 0;
}

nav a:hover { color: var(--text); }

nav a.cta {
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    padding: 6px 16px;
    font-weight: 600;
}

nav a.cta:hover { background: var(--accent-dim); }

#auth-links a { color: var(--text-dim); }
#auth-links a:hover { color: var(--text); }

/* --- Footer --- */

.site-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 2rem;
    margin-top: 4rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--text-faded);
    text-align: center;
}

.site-footer a { color: var(--text-dim); text-decoration: none; transition: color 0.3s; }
.site-footer a:hover { color: var(--text); }

/* --- Hero --- */

.hero {
    padding: 6rem 2rem 5rem;
    border-bottom: 1px solid var(--border);
    max-width: 1100px;
    margin: 0 auto;
}

.hero h1 { margin-bottom: 0.5rem; }

.hero .lead {
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    max-width: 640px;
}

.hero .features {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.hero .features li {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    padding-left: 1rem;
    border-left: 2px solid var(--accent-dim);
    margin-bottom: 0;
}

.hero .meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    color: var(--text-faded);
    margin-top: 2rem;
    letter-spacing: 0.1em;
}

/* --- Pitch section --- */

.pitch {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
    max-width: 1100px;
    margin: 0 auto;
}

.pitch h2, .pitch h3 { margin-top: 2rem; }
.pitch ul, .pitch ol { color: var(--text-dim); }

/* --- Plans --- */

.plans {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2px;
    margin-top: 2rem;
}

.plans li {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    position: relative;
    transition: background 0.3s;
    margin-bottom: 0;
}

.plans li::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.35s ease;
}

.plans li:hover { background: var(--surface-hover); }
.plans li:hover::after { transform: scaleY(1); }

.plans h3 { font-size: 1.3rem; }

.plans p {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

/* --- Auth forms --- */

.auth {
    max-width: 480px;
    margin: 5rem auto;
    padding: 0 2rem;
}

.auth h1 { margin-bottom: 2rem; }

label {
    display: block;
    margin-bottom: 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
}

label input {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

label input:focus {
    outline: none;
    border-color: var(--accent);
}

.field-warning {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #c04040;
    margin-top: 0.5rem;
}

/* --- Stripe card element --- */

#card-element {
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    margin-top: 0.5rem;
}

#card-errors {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #c04040;
    margin-top: 0.5rem;
}

/* --- Status / notice messages --- */

#status, #notice {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--accent-dim);
    margin-bottom: 1rem;
}

/* --- Admin table --- */

table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

th {
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.6rem;
    color: var(--text-faded);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    vertical-align: middle;
}

tr:hover td { color: var(--text); }

/* --- Doc / generic pages --- */

main.wrap h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

main.wrap ul li,
main.wrap ol li {
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.7;
}

main.wrap:not(.auth) {
    padding-top: 4rem;
    padding-bottom: 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Back link --- */

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s;
}

.back-link:hover { color: var(--text); }

/* --- Responsive --- */

@media (max-width: 768px) {
    nav { gap: 1rem; }
    .hero { padding: 4rem 2rem 3rem; }
    .plans { grid-template-columns: 1fr; }
    section { padding: 3rem 1.5rem; }
}
