/*
Theme Name:  Copycat
Theme URI:   https://www.copycatboek.nl/
Description: Modern, responsive thema voor de promosite van de jeugdroman Copycat (L. en S. Burgers). Zara's geheime weblog, het doolhofspel en de boeklezer. Donkere thriller-sfeer met dagboekpapier als leesoppervlak.
Author:      Datastudio
Version:     1.0.0
Requires PHP: 8.1
Text Domain: copycat
*/

/* ============================================================
   Tokens
   ============================================================ */
:root {
    --ink:        #141020;  /* diepe aubergine-nacht, warmer dan zwart */
    --night:      #1e1830;  /* verhoogde vlakken op donker */
    --edge:       #2e2746;  /* randen op donker */
    --paper:      #f5efe0;  /* dagboekpapier (leesoppervlak) */
    --paper-ink:  #241f2e;  /* tekst op papier */
    --paper-soft: #6c6478;  /* secundaire tekst op papier */
    --marker:     #ffd400;  /* handtekening-accent (maze/logo-geel) */
    --marker-deep:#e8b800;
    --whisper:    #a79fc0;  /* gedempt lavendel op donker */
    --secret:     #ff4d5e;  /* "top secret", zeer spaarzaam */

    --measure: 64ch;
    --radius: 14px;
    --gap: clamp(1rem, 3vw, 2rem);
    --shell: 1024px;

    --font-display: "Fraunces", Georgia, serif;
    --font-ui: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
}

/* ============================================================
   Reset / basis
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #000 url('assets/img/layout/bg.jpg') top center no-repeat fixed;
    color: #efeaf8;
    font-family: var(--font-ui);
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -0.015em; }

/* focus zichtbaar */
:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; border-radius: 4px; }

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--marker); color: var(--ink); padding: .6rem 1rem; border-radius: 8px; }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(20, 16, 32, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--edge);
}
.site-header__inner {
    display: flex; align-items: center; gap: 1.5rem;
    padding: .85rem 0;
}
.masthead__door { flex: 0 0 auto; height: 50px; width: auto; display: block; border-radius: 6px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { width: clamp(118px, 16vw, 160px); }
.brand:focus-visible { outline-offset: 6px; }
@media (max-width: 40rem) { .masthead__door { height: 40px; } }

.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin: 0; padding: 0; }
.nav a {
    display: block; text-decoration: none; color: var(--whisper);
    font-weight: 600; font-size: .95rem; padding: .5rem .8rem; border-radius: 8px;
    transition: color .15s, background-color .15s;
}
.nav a:hover { color: #fff; background: var(--night); }
.nav .current-menu-item > a,
.nav .current_page_item > a { color: var(--marker); }

.nav-toggle { display: none; }

/* ============================================================
   Masthead — overgenomen uit de originele site
   ============================================================ */
.masthead { background: #000; overflow-x: hidden; }
.masthead__inner { width: 1024px; max-width: 100%; margin: 0 auto; }

.masthead__bar {
    position: relative;
    height: 148px;
    background: url('assets/img/layout/header_bg.jpg') repeat-x;
    display: flex;
    align-items: flex-start;
}
.headerdeur {
    flex: 0 0 auto;
    width: 162px; height: 119px;
    margin: 29px 0 0 26px;
    background: url('assets/img/layout/headerdeur_bg.jpg') no-repeat;
}
.logo {
    flex: 0 0 auto;
    width: 517px; height: 122px;
    margin: 16px 0 0 13px;
    background: url('assets/img/layout/copycat_logo.png') left center no-repeat;
    background-size: contain;
}
.mast-tv {
    flex: 0 0 auto;
    position: relative;
    width: 249px; height: 166px;
    margin: 16px 32px 0 auto;
    background: url('assets/img/layout/videoplayer.jpg') no-repeat;
}
.mast-tv__screen {
    position: absolute; left: 13px; top: 22px;
    width: 223px; height: 112px;
    object-fit: cover; background: #000; border: 0; display: block;
}

.mnav { display: flex; align-items: center; height: 34px; background: #000; }
.navdeur {
    flex: 0 0 auto;
    width: 151px; height: 34px;
    margin: 0 20px 0 32px; /* sluit onder de headerdeur aan (die staat op 26px) */
    background: url('assets/img/layout/navdeur_bg.jpg') no-repeat;
}
.mnav ul { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.mnav li { margin: 0; }
.mnav a { display: block; padding: 0 9px; line-height: 0; }
.mnav img { display: block; height: 26px; width: auto; }
.mnav a:focus-visible { outline: 2px solid var(--marker); outline-offset: -2px; }

/* ============================================================
   Content-gebied in de originele stijl
   ============================================================ */
.content-area { background: #f1f1f2; padding: 12px; margin-bottom: 1.5rem; }
.cc-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 60rem) { .cc-grid { grid-template-columns: 300px minmax(0, 1fr); align-items: start; } }

.kaderkop {
    display: flex; align-items: center; gap: 9px;
    min-height: 34px; padding: 5px 12px;
    background: url('assets/img/layout/kader_kop.jpg') repeat-x;
    color: #000; font-family: var(--font-ui); font-weight: 700; font-size: 1.05rem; line-height: 1.15;
}
.kaderkop .block { width: 10px; height: 10px; background: #000; flex: 0 0 auto; }
.kaderkop a { color: #000; text-decoration: none; }
.kaderkop a:hover { text-decoration: underline; }
.kaderkop-bottom { height: 6px; background: #8b8d90; }

.kader {
    background: #d0d2d3; color: #141414; font-family: var(--font-ui);
    padding: 14px 16px 18px; line-height: 1.55; margin-bottom: 12px; font-size: 1rem;
}
.kader p { margin: 0 0 .8em; }
.kader p:last-child { margin-bottom: 0; }
.kader a { color: #9a6f2e; font-weight: 700; text-decoration: none; }
.kader a:hover { text-decoration: underline; }
.cc-date { color: #555 !important; }

.kader--profiel img { width: 100%; max-width: 240px; display: block; margin-bottom: 12px; }
.kader--profiel p { margin: 0 0 .55em; }
.kader--profiel b { color: #8a6a2a; }

.cc-profile { position: sticky; top: 12px; }
@media (max-width: 60rem) { .cc-profile { position: static; } }
/* op een aflevering staat het artikel eerst in de DOM; profiel toch links tonen */
.single .cc-profile { order: -1; }

/* content + afbeeldingen binnen de kader */
.cc-article i, .cc-article em { color: #555; }
.cc-article img { max-width: 100%; height: auto; }
.cc-article .img_medium, .cc-article .img_small, .cc-article .img_medium_r { float: right; max-width: 42%; margin: .2em 0 .9em 1em; }
.kader--stage { background: #d0d2d3; }

/* vorige/volgende binnen de grijze kader */
.kader .episode-nav { border-top: 1px solid rgba(0, 0, 0, .2); margin-top: 1.5rem; padding-top: 1.2rem; }
.kader .episode-nav__link { background: #e6e7e8; border-color: rgba(0, 0, 0, .2); }
.kader .episode-nav__link:hover { background: #fff; border-color: var(--marker-deep); }
.kader .episode-nav__dir { color: #555; }
.kader .episode-nav__ep { color: #141414; }

/* ============================================================
   Hero (voorpagina) — de "copycat"-dubbel op één plek
   ============================================================ */
.hero { position: relative; padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem); overflow: hidden; }
.hero__kicker {
    display: inline-flex; align-items: center; gap: .6rem;
    font-weight: 700; font-size: .8rem; color: var(--ink);
    background: var(--marker); padding: .3rem .7rem; border-radius: 999px;
    transform: rotate(-1.5deg);
}
.hero__title {
    position: relative;
    font-size: clamp(2.4rem, 7vw, 5rem);
    margin: 1.1rem 0 .6rem;
    max-width: 18ch;
}
/* de echo: een tweede, verschoven kopie — kopie-kat */
.hero__title::before {
    content: attr(data-echo);
    position: absolute; left: .12em; top: .14em;
    color: transparent; -webkit-text-stroke: 1px var(--edge);
    z-index: -1; pointer-events: none;
}
.hero__meta { color: var(--whisper); font-weight: 600; font-size: .95rem; margin-bottom: 1rem; }
.hero__teaser { font-family: var(--font-display); font-size: clamp(1.1rem, 2.5vw, 1.4rem); color: #e7e1f2; max-width: var(--measure); line-height: 1.5; }

/* ============================================================
   Knoppen
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-ui); font-weight: 700; font-size: 1rem;
    text-decoration: none; cursor: pointer; border: 0;
    padding: .7rem 1.2rem; border-radius: 10px;
    background: var(--marker); color: var(--ink);
    transition: transform .12s ease, background-color .15s;
}
.btn:hover { background: #ffdf33; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px var(--edge); }
.btn--ghost:hover { background: var(--night); }

/* ============================================================
   Afleveringenlijst
   ============================================================ */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: clamp(2.5rem,6vw,4rem) 0 1.5rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.section-head p { color: var(--whisper); margin: 0; }

.episodes { display: grid; gap: 1px; background: var(--edge); border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; }
.episode {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem;
    padding: 1.1rem 1.35rem; background: var(--night); text-decoration: none; color: inherit;
    transition: background-color .15s;
}
.episode:hover { background: #241d3a; }
.episode__num { font-family: var(--font-display); font-size: 1.5rem; color: var(--marker); font-weight: 600; min-width: 2.2ch; text-align: right; }
.episode__body h3 { font-size: 1.15rem; margin: 0 0 .15rem; }
.episode__body p { margin: 0; color: var(--whisper); font-size: .95rem; }
.episode__date { color: var(--paper-soft); font-size: .85rem; white-space: nowrap; }

/* ============================================================
   Voorpagina: Zara-profiel links + weblog-feed ernaast
   ============================================================ */
.home { padding: clamp(2rem, 5vw, 3.5rem) 0 2rem; }
.home__grid { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 60rem) {
    .home__grid { grid-template-columns: 17rem minmax(0, 1fr); align-items: start; }
}
.home__profile { position: sticky; top: 5.5rem; }

.feed__head { margin-bottom: 1.5rem; }
.feed__head .eyebrow { color: var(--marker); font-weight: 700; font-size: .85rem; }
.feed__head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: .2rem; }

.post-card {
    background: var(--night); border: 1px solid var(--edge); border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 1.75rem); margin-bottom: 1.1rem;
}
.post-card__title { font-size: 1.4rem; margin: 0 0 .2rem; }
.post-card__title a { text-decoration: none; }
.post-card__title a:hover { color: var(--marker); }
.post-card__date { color: var(--paper-soft); font-size: .85rem; }
.post-card__teaser { margin: .85rem 0 1rem; color: #e7e1f2; }
.readmore { color: var(--marker); font-weight: 700; text-decoration: none; }
.readmore:hover { text-decoration: underline; }

/* Trailer-blok bovenaan de voorpagina */
.trailer { padding: clamp(2rem, 5vw, 3.5rem) 0 1rem; }
.trailer__inner { display: grid; gap: clamp(1rem, 3vw, 2rem); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 48rem) { .trailer__inner { grid-template-columns: 1fr minmax(220px, 300px); } }
.trailer__intro .eyebrow { color: var(--marker); font-weight: 700; font-size: .85rem; }
.trailer__title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: .15rem 0 .1rem; }
.trailer__sub { font-family: var(--font-display); font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: #e7e1f2; margin: 0; }
.trailer__by { color: var(--whisper); font-weight: 600; margin: .35rem 0 1rem; }
.trailer__pitch { color: var(--whisper); max-width: 42ch; }
.trailer__video video {
    width: 100%; aspect-ratio: 1366 / 768; display: block;
    border-radius: var(--radius); background: #000;
    box-shadow: 0 22px 55px -22px rgba(0, 0, 0, .8);
}
@media (max-width: 60rem) {
    .home__profile { position: static; }
}

/* ============================================================
   Leespagina (weblog/pagina) — dagboekpapier
   ============================================================ */
.reading { padding: clamp(2rem, 5vw, 3.5rem) 0 4rem; }
.reading__grid { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 60rem) {
    .reading__grid { grid-template-columns: minmax(0, 1fr) 17rem; align-items: start; }
}

.page-head { margin-bottom: 1.5rem; }
.page-head .eyebrow { color: var(--marker); font-weight: 700; font-size: .85rem; }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin-top: .3rem; }
.page-head time { color: var(--whisper); font-weight: 600; }

.paper {
    background: var(--paper); color: var(--paper-ink);
    border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 3rem);
    box-shadow: 0 22px 50px -24px rgba(0,0,0,.7);
}
.paper .prose {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-size: 1.15rem; line-height: 1.72; max-width: var(--measure);
}
.paper .prose p { margin: 0 0 1.15em; }
.paper .prose h2, .paper .prose h3 { color: var(--paper-ink); margin-top: 1.6em; }
.paper .prose a { color: #7a3df0; text-decoration: underline; text-underline-offset: 2px; }
.paper .prose i, .paper .prose em { color: var(--paper-soft); }
.paper .prose img { border-radius: 10px; margin: 1.5em 0; }
.paper .prose img.alignright, .paper .prose .img_medium, .paper .prose .img_small { float: right; max-width: 42%; margin: .3em 0 1em 1.5em; }

/* profielkaart (Zara) */
.aside-card { background: var(--night); border: 1px solid var(--edge); border-radius: var(--radius); padding: 1.35rem; position: sticky; top: 5.5rem; }
.aside-card img { border-radius: 10px; margin-bottom: .9rem; }
.aside-card h3 { font-size: 1.1rem; margin: 0 0 .5rem; }
.aside-card dl { margin: 0; font-size: .95rem; }
.aside-card dt { color: var(--marker); font-weight: 700; font-size: .78rem; margin-top: .6rem; }
.aside-card dd { margin: 0; color: #e7e1f2; }

/* Vorige/volgende-navigatie per aflevering */
.episode-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; }
.episode-nav__link {
    display: inline-flex; flex-direction: column; gap: .15rem;
    text-decoration: none; padding: .75rem 1.1rem; max-width: 48%;
    background: var(--night); border: 1px solid var(--edge); border-radius: 12px;
    transition: background-color .15s, border-color .15s;
}
.episode-nav__link:hover { background: #241d3a; border-color: var(--marker); }
.episode-nav__next { margin-left: auto; text-align: right; }
.episode-nav__dir { color: var(--marker); font-weight: 700; font-size: .8rem; }
.episode-nav__ep { font-family: var(--font-display); font-size: 1.05rem; color: #fff; }

/* in het leesgedeelte (dagboekpapier): lichte knoppen */
.paper .episode-nav { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid rgba(0, 0, 0, .12); }
.paper .episode-nav__link { background: #fff; border-color: rgba(0, 0, 0, .14); }
.paper .episode-nav__link:hover { background: #faf6ec; border-color: var(--marker-deep); }
.paper .episode-nav__dir { color: var(--paper-soft); }
.paper .episode-nav__ep { color: var(--paper-ink); }

/* ============================================================
   Reacties
   ============================================================ */
.comments { margin-top: 2.5rem; }
.comments h2 { font-size: 1.4rem; }
.comment-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.comment-list li { background: var(--night); border: 1px solid var(--edge); border-radius: 12px; padding: 1rem 1.2rem; }
.comment-author { font-weight: 700; }
.comment-meta { color: var(--paper-soft); font-size: .82rem; }
.comment-respond { margin-top: 1.5rem; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form textarea {
    width: 100%; background: var(--night); border: 1px solid var(--edge); color: #fff;
    border-radius: 10px; padding: .7rem .85rem; font: inherit; margin-top: .35rem;
}
.comment-form label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: .8rem; }

/* ============================================================
   Stage-pagina's (spel / boek)
   ============================================================ */
.stage-page { padding: clamp(2rem,5vw,3.5rem) 0 4rem; }
.stage-page .lead { color: var(--whisper); max-width: var(--measure); }

/* ============================================================
   Footer
   ============================================================ */
#main { flex: 1 0 auto; }
.site-footer { border-top: 1px solid var(--edge); background: var(--night); padding: 2.5rem 0; margin-top: 3rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; color: var(--whisper); font-size: .9rem; }
.site-footer a { color: var(--whisper); }
.site-footer a:hover { color: var(--marker); }

/* ============================================================
   Mobiel
   ============================================================ */
@media (max-width: 52rem) {
    .site-header__inner { flex-wrap: wrap; }
    .nav-toggle {
        display: inline-flex; margin-left: .5rem; background: var(--night); color: #fff;
        border: 1px solid var(--edge); border-radius: 8px; padding: .5rem .8rem; font: inherit; font-weight: 700; cursor: pointer;
    }
    .nav-toggle { margin-left: auto; }
    .nav { flex-basis: 100%; margin-left: 0; display: none; order: 3; }
    .nav[data-open="true"] { display: block; }
    .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .nav a { padding: .7rem .4rem; border-radius: 0; border-bottom: 1px solid var(--edge); }
    .lang { border-left: 0; padding-left: .4rem; margin: .5rem 0 0; }
    .episode { grid-template-columns: auto 1fr; }
    .episode__date { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
