/* — Global Layout & Utilities — */

.container{max-width:var(--content-max);margin:0 auto;padding:0 24px;width:100%}
@media(max-width:768px){.container{padding:0 16px}}

.page{padding:32px 0 64px;min-height:calc(100vh - var(--header-h) - 72px)}
.section{padding:48px 0}
.section-tight{padding:24px 0}
.divider{height:1px;background:var(--border);width:100%}

/* Header / Navbar */
.header{position:sticky;top:0;z-index:40;height:var(--header-h);background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center}
.header--transparent{background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:blur(12px)}
.header__inner{display:flex;align-items:center;justify-content:space-between;gap:24px;width:100%;max-width:var(--content-max);margin:0 auto;padding:0 24px}
@media(max-width:768px){.header__inner{padding:0 16px}}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;letter-spacing:-0.02em;font-size:1.25rem}
.brand__mark{width:32px;height:32px;background:var(--text);color:var(--bg);display:grid;place-items:center;border-radius:7px;font-family:var(--font-serif);font-weight:600;font-size:14px;line-height:1;letter-spacing:-0.02em}
.brand__text{font-family:var(--font-serif);font-weight:600;letter-spacing:-0.02em}
.brand__dot{color:var(--accent-warm)}
.nav{display:flex;align-items:center;gap:28px}
.nav a{font-size:0.875rem;font-weight:500;color:var(--text-secondary);transition:color .15s;position:relative;padding:4px 0}
.nav a:hover,.nav a.active{color:var(--text)}
.nav a.active::after{content:"";position:absolute;left:0;right:0;bottom:-9px;height:2px;background:var(--text)}
.header__actions{display:flex;align-items:center;gap:10px}
.header__search{position:relative;display:none}
@media(min-width:900px){.header__search{display:block}}
.header__search input{width:240px;height:36px;background:var(--bg-subtle);border:1px solid var(--border);border-radius:999px;padding:0 36px 0 36px;font-size:0.875rem;transition:border-color .15s,background .15s}
.header__search input:focus{outline:none;border-color:var(--border-strong);background:var(--surface)}
.header__search .lucide{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--text-tertiary);pointer-events:none}
.mobile-toggle{display:none;width:36px;height:36px;border:1px solid var(--border);border-radius:8px;place-items:center;color:var(--text-secondary)}
@media(max-width:900px){.nav{display:none}.mobile-toggle{display:grid}}
.mobile-menu{position:fixed;inset:var(--header-h) 0 0 0;background:var(--surface);z-index:39;padding:16px;border-top:1px solid var(--border);display:none;flex-direction:column;gap:4px;overflow:auto}
.mobile-menu.open{display:flex}
.mobile-menu a{padding:14px 12px;border-radius:8px;font-weight:500;color:var(--text-secondary);display:flex;align-items:center;gap:12px}
.mobile-menu a.active,.mobile-menu a:hover{background:var(--surface-2);color:var(--text)}

/* Footer */
.footer{border-top:1px solid var(--border);background:var(--surface);padding:48px 0 32px}
.footer__grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:40px}
@media(max-width:900px){.footer__grid{grid-template-columns:1fr 1fr;gap:32px}}
@media(max-width:520px){.footer__grid{grid-template-columns:1fr}}
.footer__brand p{margin-top:12px;color:var(--text-secondary);font-size:0.875rem;line-height:1.6;max-width:320px}
.footer h4{font-size:0.8125rem;font-weight:600;letter-spacing:0.06em;text-transform:uppercase;color:var(--text);margin-bottom:16px}
.footer__links{display:flex;flex-direction:column;gap:10px}
.footer__links a{font-size:0.875rem;color:var(--text-secondary)}
.footer__links a:hover{color:var(--text)}
.footer__bottom{margin-top:40px;padding-top:24px;border-top:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;color:var(--text-tertiary);font-size:0.8125rem}
.footer__social{display:flex;gap:12px}
.footer__social a{width:32px;height:32px;border:1px solid var(--border);border-radius:50%;display:grid;place-items:center;color:var(--text-tertiary);transition:all .15s}
.footer__social a:hover{border-color:var(--border-strong);color:var(--text)}

/* Hero — Editorial */
.hero{padding:48px 0 32px;border-bottom:1px solid var(--border)}
.hero__grid{display:grid;grid-template-columns:1.05fr 0.95fr;gap:48px;align-items:center}
@media(max-width:900px){.hero__grid{grid-template-columns:1fr;gap:32px}}
.hero__eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:0.75rem;letter-spacing:0.08em;text-transform:uppercase;font-weight:600;color:var(--text-tertiary);margin-bottom:16px}
.hero__eyebrow::before{content:"";width:24px;height:1px;background:var(--border-strong);display:block}
.hero h1{font-family:var(--font-serif);font-size:clamp(2.5rem,5vw,4.25rem);line-height:0.95;letter-spacing:-0.03em;font-weight:500;color:var(--text)}
.hero h1 em{font-style:italic;font-weight:400;color:var(--text-secondary)}
.hero__sub{margin-top:20px;font-size:1.0625rem;line-height:1.6;color:var(--text-secondary);max-width:520px}
.hero__stats{display:flex;gap:24px;margin-top:28px;padding-top:24px;border-top:1px solid var(--border)}
.hero__stat-num{font-family:var(--font-serif);font-size:1.5rem;font-weight:600;line-height:1}
.hero__stat-label{font-size:0.75rem;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-tertiary);margin-top:4px}
.hero__actions{display:flex;gap:12px;margin-top:28px;flex-wrap:wrap}
.hero__visual{position:relative;aspect-ratio:4/3;background:var(--surface-2);border:1px solid var(--border);border-radius:16px;overflow:hidden}
.hero__visual img{width:100%;height:100%;object-fit:cover}
.hero__visual-card{position:absolute;bottom:16px;left:16px;right:16px;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:16px;box-shadow:var(--shadow-lg);display:flex;gap:14px;align-items:center}
.hero__visual-card img{width:56px;height:76px;object-fit:cover;border-radius:6px;border:1px solid var(--border);flex-shrink:0}

/* Section headers */
.section-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:24px;flex-wrap:wrap}
.section-head h2{font-family:var(--font-serif);font-size:1.75rem;letter-spacing:-0.02em;font-weight:500;line-height:1}
.section-head p{color:var(--text-secondary);font-size:0.875rem;margin-top:6px}
.section-head a{font-size:0.875rem;font-weight:600;color:var(--text);display:inline-flex;align-items:center;gap:6px;border-bottom:1px solid var(--border-strong);padding-bottom:2px}
.section-head a:hover{border-color:var(--text)}

/* Novel grids */
.novel-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
@media(max-width:1024px){.novel-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.novel-grid{grid-template-columns:repeat(2,1fr);gap:14px}}
@media(max-width:420px){.novel-grid{grid-template-columns:1fr}}
.novel-grid--featured{grid-template-columns:1.6fr 1fr 1fr}
@media(max-width:900px){.novel-grid--featured{grid-template-columns:1fr}}
.novel-card{group:novel; background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden;display:flex;flex-direction:column;transition:border-color .15s,transform .15s,box-shadow .15s}
.novel-card:hover{border-color:var(--border-strong);transform:translateY(-2px);box-shadow:var(--shadow)}
.novel-card__cover{aspect-ratio:3/4;position:relative;overflow:hidden;background:var(--surface-2)}
.novel-card__cover img{width:100%;height:100%;object-fit:cover;transition:transform .35s}
.novel-card:hover .novel-card__cover img{transform:scale(1.03)}
.novel-card__badge{position:absolute;top:10px;left:10px;display:flex;gap:6px;flex-wrap:wrap}
.novel-card__body{padding:14px;display:flex;flex-direction:column;flex:1;gap:8px}
.novel-card__title{font-weight:600;font-size:0.9375rem;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.novel-card__author{font-size:0.8125rem;color:var(--text-secondary)}
.novel-card__meta{display:flex;align-items:center;gap:10px;font-size:0.75rem;color:var(--text-tertiary);margin-top:auto;padding-top:8px;border-top:1px solid var(--border);flex-wrap:wrap}
.novel-card__meta span{display:inline-flex;align-items:center;gap:4px}
.novel-card--featured{flex-direction:row;grid-column:span 1}
.novel-card--featured .novel-card__cover{width:44%;aspect-ratio:3/4.2;flex-shrink:0}
.novel-card--featured .novel-card__body{padding:20px}
@media(max-width:900px){.novel-card--featured{flex-direction:column}.novel-card--featured .novel-card__cover{width:100%}}
/* Horizontal scroller */
.h-scroll{display:flex;gap:16px;overflow:auto;padding-bottom:8px;scroll-snap-type:x proximity}
.h-scroll > *{flex:0 0 220px;scroll-snap-align:start}
@media(max-width:640px){.h-scroll > *{flex:0 0 168px}}

/* Category pills */
.cat-row{display:flex;gap:8px;flex-wrap:wrap}
.cat-pill{padding:8px 14px;border-radius:999px;border:1px solid var(--border);background:var(--surface);font-size:0.8125rem;font-weight:500;color:var(--text-secondary);transition:all .15s}
.cat-pill:hover,.cat-pill.active{background:var(--text);color:var(--bg);border-color:var(--text)}

/* Stats row */
.stats-row{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
@media(max-width:720px){.stats-row{grid-template-columns:repeat(2,1fr)}}
.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:18px}
.stat-card__label{font-size:0.75rem;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-tertiary);font-weight:600}
.stat-card__value{font-family:var(--font-serif);font-size:1.75rem;font-weight:600;margin-top:6px;letter-spacing:-0.02em}
.stat-card__delta{font-size:0.8125rem;color:var(--success);margin-top:4px;display:inline-flex;align-items:center;gap:4px}

/* Empty states */
.empty{padding:48px 24px;text-align:center;border:1px dashed var(--border);border-radius:12px;background:var(--surface)}
.empty__icon{width:48px;height:48px;margin:0 auto 16px;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;display:grid;place-items:center;color:var(--text-tertiary)}
.empty h3{font-weight:600;margin-bottom:6px}
.empty p{color:var(--text-secondary);font-size:0.875rem;max-width:420px;margin:0 auto}
