/*
Theme Name: DefyAllLogic
Description: Author site for T.C. Middlesex: universe hubs, books, newsletter.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: dal
*/

:root {
	--paper: #f5efe4;
	--paper-2: #ebe2d2;
	--ink: #1f1a24;
	--ink-2: #2d2634;
	--muted: #6b6270;
	--line: #d9cdb8;
	--wine: #8a2e3b;
	--wine-hi: #a83a4a;
	--gold: #c99a3e;
	--head: "Fraunces", Georgia, serif;
	--body: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
	--r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wine); text-underline-offset: 3px; }
a:hover { color: var(--wine-hi); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 12px; }

.eyebrow { font-family: var(--body); font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--wine); margin-bottom: .6em; }

.btn { display: inline-block; background: var(--wine); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--wine); transition: background .2s, color .2s, transform .2s; }
.btn:hover { background: var(--wine-hi); border-color: var(--wine-hi); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #ddb158; border-color: #ddb158; color: var(--ink); }
.btn--small { padding: 7px 14px; font-size: .85rem; }
.text-link { font-weight: 600; }

/* Header */
.site-header { background: var(--ink); color: var(--paper); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { text-decoration: none; color: var(--paper); display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--head); font-size: 1.5rem; font-weight: 600; }
.brand-sub { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }
.brand:hover { color: #fff; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-list a { color: var(--paper); text-decoration: none; font-size: .92rem; font-weight: 500; padding: 8px 10px; border-radius: var(--r); }
.nav-list a:hover { color: var(--gold); }
.nav-cta a { border: 1.5px solid var(--gold); color: var(--gold); border-radius: 999px; padding: 6px 14px; margin-left: 6px; }
.nav-cta a:hover { background: var(--gold); color: var(--ink); }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--paper); color: var(--paper); border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% 0%, #3a2f45 0%, var(--ink) 60%); color: var(--paper); padding: 72px 0 84px; overflow: hidden; }
.hero .eyebrow { color: var(--gold); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-title { color: #fff; }
.hero-title em { font-style: italic; color: var(--gold); }
.hero-lead { font-size: 1.12rem; color: #ddd3c5; max-width: 34em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }
.hero .btn--ghost { color: var(--paper); border-color: var(--paper); }
.hero .btn--ghost:hover { background: var(--paper); color: var(--ink); }
.hero-books { position: relative; height: 380px; }
.hero-book { position: absolute; width: 46%; border-radius: 4px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.55); }
.hero-book--0 { left: 0; top: 30px; transform: rotate(-6deg); }
.hero-book--1 { left: 27%; top: 0; z-index: 2; }
.hero-book--2 { right: 0; top: 40px; transform: rotate(6deg); }

/* Bands */
.band { padding: 72px 0; }
.band--tight { padding: 48px 0; }
.band--paper { background: var(--paper-2); }
.band--ink { background: var(--ink); color: var(--paper); }
.band-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 32px; }
.band-head p { color: var(--muted); margin: 0; flex-basis: 100%; }
.band-link { font-weight: 600; text-decoration: none; }

/* Worlds */
.worlds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.world { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 22px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.world:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(31,26,36,.12); color: var(--ink); }
.world-art { border-radius: 4px; overflow: hidden; box-shadow: 0 8px 18px rgba(0,0,0,.2); }
.world-name { font-size: 1.35rem; margin-bottom: .3em; }
.world-tag { color: var(--muted); font-size: .95rem; margin-bottom: .8em; }
.world-go { font-weight: 600; color: var(--wine); }
.world-go::after { content: " \2192"; }
.worlds--small .world { grid-template-columns: 90px minmax(0, 1fr); padding: 14px; }
.worlds--small .world-name { font-size: 1.1rem; }

/* Books */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 32px 24px; }
.book-cover { border-radius: 4px; overflow: hidden; box-shadow: 0 10px 22px rgba(31,26,36,.22); margin-bottom: 14px; transition: transform .2s; }
.book-cover:hover { transform: translateY(-3px); }
.cover-img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.cover-blank { aspect-ratio: 2 / 3; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 10px; padding: 18px; background: linear-gradient(160deg, var(--ink-2), var(--ink)); color: var(--paper); border: 1px solid #3c3344; }
.cover-title { font-family: var(--head); font-size: 1.25rem; line-height: 1.15; }
.cover-sub { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.cover-author { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: #bfb4a6; margin-top: 8px; }
.book-title { font-size: 1.08rem; margin-bottom: .2em; }
.book-sub { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .4em; }
.book-hook { font-size: .93rem; color: #4a4250; }
.book-buy { display: flex; gap: 8px; flex-wrap: wrap; }
.book--soon .book-cover { opacity: .7; }

/* Hubs */
.hub-hero { background: var(--ink); color: var(--paper); padding: 64px 0; }
.hub-hero .eyebrow { color: var(--gold); }
.hub-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: center; }
.hub-title { color: #fff; }
.hub-tagline { font-family: var(--head); font-style: italic; font-size: 1.25rem; color: var(--gold); }
.hub-intro { color: #ddd3c5; max-width: 38em; }
.hub-hero .btn--ghost { color: var(--paper); border-color: var(--paper); }
.hub-hero .btn--ghost:hover { background: var(--paper); color: var(--ink); }
.hub-cover { border-radius: 4px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.55); transform: rotate(3deg); }
.hub-hero--willowborough { background: linear-gradient(135deg, #8a4a22 0%, #b8692e 55%, #c98b3a 100%); }
.hub-hero--willowborough .eyebrow, .hub-hero--willowborough .hub-tagline { color: #fbe7c4; }
.hub-hero--willowborough .hub-intro { color: #fff4e3; }
.hub-hero--willowborough .btn { background: #1f1a24; border-color: #1f1a24; }
.hub-hero--willowborough .btn:hover { background: #2d2634; border-color: #2d2634; }
.hub-hero--that-island { background: linear-gradient(135deg, #10202d 0%, #2a1520 100%); }
.hub-hero--unkillable { background: linear-gradient(135deg, #2a1212 0%, #1a1a1a 100%); }
.hub-group { margin-bottom: 48px; }
.hub-group-title { font-size: 1.3rem; padding-bottom: 10px; border-bottom: 2px solid var(--line); margin-bottom: 24px; }
.hub-series { margin-top: -12px; }

/* Pages */
.page-head { background: var(--ink); color: var(--paper); padding: 56px 0 40px; }
.page-head h1 { color: #fff; }
.page-head .eyebrow { color: var(--gold); }
.page-head--quiet { background: var(--ink-2); }
.age-note { color: #ddd3c5; }
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 1.6em; }
.prose img { border-radius: var(--r); margin: 1em 0; }
.plain-list { padding-left: 1.2em; }
.plain-list li { margin-bottom: .4em; }

/* About strip */
.about-strip { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.free-reads { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; }

/* Newsletter */
.newsletter { text-align: center; }
.newsletter h2 { color: #fff; }
.newsletter p { color: #ddd3c5; }

/* Social */
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.social a { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1.5px solid currentColor; text-decoration: none; font-size: .88rem; font-weight: 500; }
.social--footer a { color: var(--paper); }
.social--footer a:hover { color: var(--gold); }

/* Posts */
.post-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.post-row:not(:has(.post-row-img)) { grid-template-columns: minmax(0, 1fr); }
.post-row-title { font-size: 1.3rem; }
.post-row-title a { color: var(--ink); text-decoration: none; }
.post-row-meta { color: var(--muted); font-size: .85rem; }

/* Footer */
.site-footer { background: #17131b; color: #cfc5b7; padding: 56px 0 24px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-brand { font-family: var(--head); font-size: 1.4rem; color: #fff; margin-bottom: .3em; }
.footer-note { color: #a99f93; }
.footer-head { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: #e4dbcf; text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid #2c2532; margin-top: 36px; padding-top: 18px; font-size: .82rem; color: #8f857a; }
.footer-quiet a { color: #8f857a; text-decoration: none; }
.footer-quiet a:hover { color: #cfc5b7; }

/* Responsive */
@media (max-width: 960px) {
	.hero-grid, .hub-hero-grid, .about-strip { grid-template-columns: minmax(0, 1fr); }
	.hero-books { height: 300px; max-width: 420px; }
	.hub-cover { max-width: 220px; }
	.worlds { grid-template-columns: minmax(0, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
	body { font-size: 16px; }
	.wrap { padding: 0 16px; }
	.nav-toggle { display: inline-block; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--ink); padding: 8px 16px 16px; }
	.site-nav.is-open { display: block; }
	.nav-list { flex-direction: column; align-items: flex-start; }
	.nav-cta a { margin-left: 0; }
	.hero { padding: 48px 0 56px; }
	.hero-books { height: 240px; }
	.band { padding: 48px 0; }
	.world { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 14px; }
	.shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
	.footer-grid { grid-template-columns: minmax(0, 1fr); }
	.post-row { grid-template-columns: 90px minmax(0, 1fr); }
}
