/* John Haverkate — auteurssite
   Donker, filmisch thema geïnspireerd op Het Zevende Charter / Xara. */

:root {
    --bg: #0a0e17;
    --bg-alt: #10161f;
    --panel: #141b26;
    --panel-border: #232c3a;
    --text: #e9edf3;
    --text-dim: #a7b0bf;
    --accent: #d97a3d;
    --accent-bright: #ef9553;
    --accent-dim: #8a4c26;
    --link: #eef1f5;
    --radius: 4px;
    --max-width: 1180px;
    --font-heading: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--text-dim); }

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

/* ---------- Header / navigation ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--panel-border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    letter-spacing: 0.02em;
}
.site-logo span { color: var(--accent-bright); }
.site-logo-img { height: 40px; width: auto; }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.main-nav a:hover,
.main-nav a.active { color: var(--accent-bright); text-decoration: none; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--panel-border);
    color: var(--text);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 1.1rem;
    cursor: pointer;
}

/* ---------- Layout: sidebar + main ---------- */

.page-body {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    align-items: start;
}

.profile-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    overflow: hidden;
    position: sticky;
    top: 96px;
}

.profile-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    filter: grayscale(0.15);
}

.profile-card .body { padding: 20px; text-align: center; }
.profile-card h3 { margin-bottom: 2px; font-size: 1.25rem; }
.profile-card .role { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; }

.social-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}
.social-row a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 1px solid var(--panel-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text);
    font-size: 0.95rem;
}
.social-row a:hover { background: var(--accent-dim); text-decoration: none; }

.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--accent);
    background: transparent;
    color: #fff;
    transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--accent); text-decoration: none; }
.btn-solid { background: var(--accent); border-color: var(--accent); }
.btn-solid:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
.btn-block { display: block; width: 100%; }

.content-main { min-width: 0; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    background: linear-gradient(100deg, rgba(6,9,15,0.94) 30%, rgba(6,9,15,0.55) 75%),
                var(--hero-image, none) center/cover no-repeat;
    border-radius: 10px;
    padding: 56px;
    border: 1px solid var(--panel-border);
    margin-bottom: 40px;
}
.hero .eyebrow {
    color: var(--accent-bright);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 12px;
}
.hero p { color: #cfd6e1; font-size: 1.05rem; max-width: 60ch; }
.hero .divider {
    width: 64px; height: 3px; background: var(--accent);
    margin: 20px 0;
    border: none;
}

/* ---------- Newsletter box ---------- */

.newsletter-box {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 32px;
    margin: 40px 0;
}
.newsletter-box h2 { margin-bottom: 10px; }
.newsletter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.newsletter-form input[type=text],
.newsletter-form input[type=email] {
    flex: 1 1 220px;
}

/* ---------- Forms ---------- */

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
}
input[type=text], input[type=email], input[type=password], textarea, select {
    width: 100%;
    background: var(--bg-alt);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 12px 14px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 16px;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
}
textarea { min-height: 140px; resize: vertical; }
.field-honeypot { position: absolute; left: -9999px; }

/* ---------- Cards / lists (blog) ---------- */

.post-list { display: flex; flex-direction: column; gap: 28px; }
.post-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 28px;
}
.post-card .meta {
    font-size: 0.8rem;
    color: var(--accent-bright);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.post-card h2 { margin-bottom: 10px; font-size: 1.4rem; }
.post-card h2 a { color: #fff; }
.post-card .excerpt { margin-bottom: 12px; }

.post-single .meta {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 24px;
}
.post-single .content h2 { margin-top: 1.4em; }
.post-single .content img { border-radius: 6px; margin: 1em 0; }
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--panel-border);
    font-size: 0.9rem;
}

/* ---------- Rich text content ---------- */

.rich-content::after { content: ""; display: table; clear: both; }
/* Match the editor exactly: a single Enter just starts the next line (no
   added gap); an actual blank line (Enter twice) is what creates visual
   space, via the empty paragraph Quill inserts for it. */
.rich-content p { margin: 0; color: var(--text-dim); }
.rich-content ul, .rich-content ol { color: var(--text-dim); padding-left: 1.3em; margin-bottom: 1em; }

/* Default size when a float is set but no explicit width was chosen. */
.rich-content .ql-img-float-left,
.rich-content img.ql-img-float-left { float: left; width: 38%; margin: 6px 28px 16px 0; }
.rich-content .ql-img-float-right,
.rich-content img.ql-img-float-right { float: right; width: 38%; margin: 6px 0 16px 28px; }
.rich-content .ql-img-float-center,
.rich-content img.ql-img-float-center { float: none; clear: both; display: block; width: 60%; margin: 6px auto 16px; }

/* Explicit width choices from the editor always win over the float default. */
.rich-content .ql-img-width-25 { width: 25%; }
.rich-content .ql-img-width-40 { width: 40%; }
.rich-content .ql-img-width-60 { width: 60%; }
.rich-content .ql-img-width-100 { width: 100%; }

.rich-content .ql-img-float-left img,
.rich-content .ql-img-float-right img,
.rich-content .ql-img-float-center img,
.rich-content .ql-img-width-25 img, .rich-content .ql-img-width-40 img,
.rich-content .ql-img-width-60 img, .rich-content .ql-img-width-100 img { display: block; width: 100%; border-radius: 6px; }
.rich-content img.ql-img-float-left, .rich-content img.ql-img-float-right, .rich-content img.ql-img-float-center { border-radius: 6px; }

@media (max-width: 640px) {
    .rich-content .ql-img-float-left, .rich-content .ql-img-float-right, .rich-content .ql-img-float-center,
    .rich-content img.ql-img-float-left, .rich-content img.ql-img-float-right, .rich-content img.ql-img-float-center { float: none; width: 100%; margin: 0 0 16px; }
}
.rich-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.4em 0;
    padding: 0.2em 1.2em;
    color: var(--text-dim);
    font-style: italic;
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--panel-border);
    padding: 28px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ---------- Flash messages ---------- */

.flash { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.9rem; }
.flash-success { background: rgba(80, 170, 110, 0.12); border: 1px solid #4c9b6a; color: #9fe0b6; }
.flash-error { background: rgba(200, 80, 80, 0.12); border: 1px solid #b5544f; color: #f3a8a4; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .page-body { grid-template-columns: 1fr; }
    .profile-card { position: static; max-width: 320px; }
    .nav-toggle { display: inline-flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 72px; left: 0; right: 0;
        background: var(--bg-alt);
        border-bottom: 1px solid var(--panel-border);
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
    .main-nav li { border-bottom: 1px solid var(--panel-border); }
    .main-nav a { display: block; padding: 14px 0; }
    .hero { padding: 32px 24px; }
}

/* ---------- Shop ---------- */

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}
.shop-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    overflow: hidden;
    display: block;
    color: var(--text);
}
.shop-card:hover { border-color: var(--accent); text-decoration: none; }
.shop-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.shop-card-body { padding: 16px; }
.shop-card-body h2 { font-size: 1.05rem; margin-bottom: 6px; }
.shop-card .price { color: var(--accent-bright); font-weight: 600; }

.shop-product { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.shop-product-cover { border-radius: 8px; width: 100%; }
@media (max-width: 720px) {
    .shop-product { grid-template-columns: 1fr; }
}

.variant-picker { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.variant-option {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 14px 20px;
    cursor: pointer;
    text-align: center;
    color: var(--text);
    font-family: inherit;
    min-width: 130px;
}
.variant-option:hover { border-color: var(--accent-dim); }
.variant-option.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.variant-option-name { display: block; font-weight: 700; color: #fff; margin-bottom: 4px; }
.variant-option-price { display: block; color: var(--accent-bright); font-weight: 600; }

.variant-features {
    list-style: none;
    padding: 20px;
    margin: 0 0 20px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    display: none;
}
.variant-features li { color: var(--text); margin-bottom: 8px; padding-left: 1.4em; position: relative; }
.variant-features li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-bright); font-weight: 700; }
.variant-features li:last-child { margin-bottom: 0; }

.shop-price-row { display: flex; align-items: center; gap: 20px; margin-top: 20px; }
.shop-current-price { font-size: 1.6rem; font-weight: 700; color: var(--accent-bright); }
