/*
Theme Name: Writer Ken
Description: Custom theme for writerken.com, built from the "Ken Goetz Author Website" design.
Version: 0.1.0
Text Domain: writerken
*/

:root {
  --paper: #FBF6EA;
  --paper-warm: #F3EAD6;
  --paper-card: #FFFDF7;
  --navy: #1C2B4A;
  --navy-hover: #2E426B;
  --navy-deep: #16233D;
  --gold: #E2C06E;
  --gold-dark: #A8822F;
  --gold-hover: #D6B055;
  --brown: #6B4A2B;
  --brown-deep: #4F3720;
  --ink: #2A2420;
  --ink-soft: #4A3F36;
  --line: #DCCDAA;
  --font-display: 'EB Garamond', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); font-family: var(--font-body); font-size: 20px; line-height: 1.65; color: var(--ink); }
h1, h2, h3 { font-family: var(--font-display); color: var(--navy); font-weight: 500; line-height: 1.15; margin: 0; }
p { margin: 0; }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 4px; }
a:hover { color: var(--brown); }
a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.wrap--md { max-width: 1100px; }
.wrap--sm { max-width: 1000px; }
.col { width: 100%; max-width: 760px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { padding-top: 96px; padding-bottom: 96px; }
.bg-warm { background: var(--paper-warm); }
.bg-navy { background: var(--navy); }
.stack { display: flex; flex-direction: column; }
.center { text-align: center; align-items: center; }
.gap-14 { gap: 14px; } .gap-22 { gap: 22px; } .gap-28 { gap: 28px; } .gap-40 { gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }

/* ---------- Type helpers ---------- */
.lbl { font-size: 15px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--brown); margin: 0; line-height: 1.4; }
.lbl--gold { color: var(--gold); }
.lbl--dark { color: var(--brown-deep); }
.textlink { font-weight: 600; font-size: 20px; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--gold-dark); }
.rule { width: 64px; height: 2px; background: var(--gold-dark); border: 0; margin: 0; }
.h-xl { font-size: 64px; } .h-lg { font-size: 44px; } .h-md { font-size: 36px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 14px 30px; border-radius: 6px; border: 2px solid var(--navy); font-family: var(--font-body); font-size: 20px; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center; cursor: pointer; }
.btn-primary { background: var(--navy); color: #FFFDF7; }
.btn-primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); color: #FFFDF7; }
.btn-secondary { background: var(--paper-card); color: var(--navy); }
.btn-secondary:hover { background: #F1E6CD; color: var(--navy); }
.btn-gold { background: var(--gold); border-color: var(--gold-dark); color: var(--navy); }
.btn-gold:hover { background: var(--gold-hover); color: var(--navy); }
.btn-lg { min-height: 68px; font-size: 22px; padding: 16px 36px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.hdr { display: flex; align-items: center; gap: 24px; min-height: 88px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--navy); margin-right: auto; }
.brand:hover { color: var(--navy); }
.brand-name { font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1.1; }
.brand-sub { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--brown); font-weight: 600; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; font-size: 19px; text-decoration: none; color: var(--navy); border-radius: 4px; }
.nav a:hover { background: #F1E6CD; color: var(--navy); }
.nav .current-menu-item > a, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--gold-dark); }
.hdr .btn { min-height: 52px; font-size: 19px; padding: 10px 22px; }
.nav-panel { display: contents; }
.nav-toggle { display: none; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border: 2px solid var(--navy); border-radius: 6px; background: var(--paper-card); color: var(--navy); font-family: var(--font-body); font-size: 18px; font-weight: 600; cursor: pointer; }
.nav-toggle-icon { display: flex; flex-direction: column; gap: 5px; }
.nav-toggle-icon span { display: block; width: 24px; height: 3px; background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle-icon span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle-icon span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-icon span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.novel-card { gap: 40px; border: 2px solid var(--line); border-radius: 10px; padding: 36px; background: var(--paper-card); }
.novel-cover { flex: 0 0 150px; width: 150px; align-self: center; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: #F3EAD6; padding: 64px 0 48px; }
.footer a { color: #F3EAD6; }
.footer a:hover { color: #FFFFFF; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; }
.footer-name { font-family: var(--font-display); font-size: 30px; color: #FFFDF7; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 19px; list-style: none; margin: 0; padding: 0; }
.footer-legal { padding-top: 40px; font-size: 16px; color: #D9CDB3; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.footer-credit { margin-left: auto; text-align: right; }

/* ---------- Page banner (interior pages) ---------- */
.banner { background: linear-gradient(180deg, #CFE0EA 0%, #E7EEEA 100%); border-bottom: 6px solid #D7B567; }
.banner .wrap, .banner .col { padding-top: 80px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 16px; }
.banner--center .wrap { text-align: center; align-items: center; }
.banner p.sub { font-size: 22px; max-width: 640px; }
.banner h1 { font-size: 64px; }

/* ---------- Home hero ---------- */
.hero { position: relative; overflow: hidden; background-color: #CFE0EA; background-image: url('assets/img/hero-prairie.jpg'); background-position: center bottom; background-size: cover; background-repeat: no-repeat; }
.hero-grid { position: relative; display: flex; align-items: center; gap: 56px; padding-top: 88px; padding-bottom: 64px; min-height: 680px; }
.hero-copy { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-h1 { font-size: 42px; line-height: 1.12; letter-spacing: -.005em; }
.hero-copy .lead { font-size: 20px; color: var(--ink); max-width: 600px; }
.book-col { position: relative; flex: 0 0 auto; align-self: flex-end; display: flex; flex-direction: column; align-items: center; }
.book3d { position: relative; z-index: 1; display: block; width: 520px; height: auto; }
.ground-shadow { position: relative; z-index: 0; width: 120%; height: 46px; margin-top: -30px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(58,40,20,.45) 0%, rgba(58,40,20,.22) 40%, rgba(58,40,20,0) 70%); filter: blur(6px); }
.contact-shadow { position: absolute; z-index: 0; left: 6%; right: 10%; bottom: 20px; height: 16px; border-radius: 50%; background: rgba(40,28,14,.5); filter: blur(7px); }

/* ---------- Cards ---------- */
.qcard { margin: 0; background: var(--paper-card); border: 1px solid var(--line); border-radius: 10px; padding: 48px 44px; display: flex; flex-direction: column; gap: 28px; }
.qcard--sm { border-radius: 8px; padding: 36px 32px; gap: 20px; }
.qmark { font-family: var(--font-display); font-size: 96px; line-height: .55; color: var(--gold-dark); }
.qcard--sm .qmark { font-size: 72px; }
.qtext { margin: 0; font-family: var(--font-display); font-size: 32px; line-height: 1.4; color: var(--navy); }
.qcard--sm .qtext { font-size: 26px; }
.who { display: flex; align-items: center; gap: 16px; margin-top: auto; }
.reader-init { flex: 0 0 60px; width: 60px; height: 60px; border-radius: 50%; background: var(--navy); color: var(--paper); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: .04em; }
.review { background: var(--paper-card); border: 2px solid var(--line); border-radius: 8px; padding: 28px 32px; display: flex; flex-direction: column; gap: 10px; }
.tile { border: 2px solid var(--line); border-radius: 8px; padding: 28px 24px; background: var(--paper-card); display: flex; flex-direction: column; gap: 6px; }
.tile h3 { font-size: 30px; }
.tile p { font-size: 18px; color: var(--ink-soft); }
.fmt { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border: 2px solid var(--line); border-radius: 8px; background: var(--paper-card); }
.fmt strong { color: var(--navy); }
.fmt span { white-space: nowrap; font-size: 16px; color: var(--ink-soft); }
.fact { display: flex; flex-direction: column; gap: 4px; padding: 20px 0; border-top: 1px solid var(--line); }
.fact span:last-child { font-size: 22px; color: var(--navy); }
.post-card { border-top: 3px solid var(--gold-dark); padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.post-card h3 { font-size: 30px; }
.post-card h3 a { text-decoration: none; }
.post-card .date { font-size: 17px; color: var(--brown); font-weight: 600; }
.post-card p { font-size: 19px; }

/* ---------- Book ---------- */
.cover { display: block; width: 340px; max-width: 100%; height: auto; border-radius: 2px 4px 4px 2px; box-shadow: 8px 12px 28px rgba(42,36,32,.28); }
.photo { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: 0 10px 28px rgba(42,36,32,.18); }
.split { display: flex; gap: 72px; align-items: flex-start; }
.split--center { align-items: center; gap: 64px; }
.split > .media { flex: 0 0 380px; max-width: 100%; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.split > .body { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.caption { font-size: 15px; color: var(--ink-soft); }
.cover-ph { background: #2F4A5C; color: var(--paper); border-radius: 3px 6px 6px 3px; box-shadow: 8px 12px 28px rgba(42,36,32,.28); aspect-ratio: 2 / 3; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 48px 28px 28px; text-align: center; width: 340px; max-width: 100%; }
.cover-ph b { font-family: var(--font-display); font-size: 46px; line-height: 1.05; font-weight: 500; }
.cover-ph span { font-size: 14px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ---------- Forms ---------- */
.field { width: 100%; min-height: 64px; padding: 12px 18px; font-family: var(--font-body); font-size: 20px; color: var(--ink); background: var(--paper-card); border: 2px solid var(--brown); border-radius: 6px; }
.flabel { font-size: 19px; font-weight: 600; color: var(--navy); }
.subscribe { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding-top: 8px; width: 100%; max-width: 640px; text-align: left; }
.subscribe .grow { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* ---------- Blog ---------- */
.post { display: flex; flex-direction: column; gap: 12px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.post .date { font-size: 17px; font-weight: 600; color: var(--brown); }
.post h2 { font-size: 36px; }
.post h2 a { text-decoration: none; }
.post h2 a:hover { text-decoration: underline; text-decoration-color: var(--gold-dark); }
.tag { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid #CDBB90; border-radius: 999px; font-size: 16px; font-weight: 600; color: var(--brown-deep); text-decoration: none; background: var(--paper-card); }
.tag:hover { background: #F1E6CD; color: var(--navy); }
.prose { display: flex; flex-direction: column; gap: 26px; font-size: 21px; line-height: 1.75; }
.prose h2 { font-size: 36px; padding-top: 18px; }
.prose > p:first-child { font-family: var(--font-display); font-size: 27px; line-height: 1.5; color: var(--navy); }
.prose a { text-decoration-thickness: 2px; text-decoration-color: var(--gold-dark); }
.prose blockquote { margin: 8px 0; padding: 8px 0 8px 32px; border-left: 4px solid var(--gold-dark); font-family: var(--font-display); font-style: italic; font-size: 28px; line-height: 1.45; color: var(--navy); }
.prose img { height: auto; }
.share { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px; border: 2px solid var(--navy); border-radius: 6px; background: var(--paper-card); font-family: var(--font-body); font-size: 19px; font-weight: 600; color: var(--navy); text-decoration: none; cursor: pointer; }
.share:hover { background: #F1E6CD; color: var(--navy); }
.pn { display: flex; flex-direction: column; gap: 6px; padding: 24px 26px; border: 2px solid var(--line); border-radius: 8px; background: var(--paper-card); text-decoration: none; min-height: 120px; }
.pn:hover { border-color: var(--gold-dark); background: #fff; }
.pn .t { font-family: var(--font-display); font-size: 25px; line-height: 1.25; color: var(--navy); }
.author-box { display: flex; gap: 28px; align-items: center; padding: 32px; background: var(--paper-warm); border-radius: 10px; }
.author-box img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; flex: 0 0 120px; }
.post-h1 { font-size: 58px; line-height: 1.1; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 48px 0 96px; }
.comment-form { display: flex; flex-direction: column; gap: 24px; }
.comment-form .form-submit { padding-top: 8px; }
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.comment-list .comment-body { background: var(--paper-card); border: 2px solid var(--line); border-radius: 8px; padding: 20px 24px; }

/* ---------- Responsive ---------- */
/* Tablet and below: collapsible menu */
@media (max-width: 1024px) {
  .wrap { padding-left: 28px; padding-right: 28px; }
  .hdr { flex-wrap: wrap; min-height: 0; gap: 8px 12px; }
  .hdr-buy { order: 1; }
  .nav-toggle { display: inline-flex; order: 2; }
  .nav-panel { display: none; order: 4; flex: 0 0 100%; border-top: 1px solid var(--line); padding-top: 8px; }
  .nav-open .nav-panel { display: block; }
  .nav { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .nav a { width: 100%; min-height: 56px; font-size: 20px; padding: 0 8px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav li:last-child a { border-bottom: 0; }
  .hero-grid { gap: 32px; }
  .book3d { width: 400px; }
  .hero-h1 { font-size: 38px; }
  .banner h1 { font-size: 52px; }
  .split { gap: 44px; } .split--center { gap: 40px; }
  .split > .media { flex-basis: 320px; }
  .h-lg { font-size: 38px; }
  .grid-3 { gap: 20px; } .grid-2 { gap: 24px; }
  .qcard--sm { padding: 28px 24px; } .qcard--sm .qtext { font-size: 23px; }
  .post-h1 { font-size: 48px; }
}

/* Tablet portrait and mobile: single column */
@media (max-width: 860px) {
  body { font-size: 19px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .col { padding-left: 20px; padding-right: 20px; }
  .brand-name { font-size: 24px; } .brand-sub { font-size: 12px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .stack-sm, .footer-top, .split, .author-box, .subscribe, .hero-grid { flex-direction: column; align-items: stretch; }
  .stack-sm { align-items: flex-start !important; }
  .hero-grid { padding-top: 48px; padding-bottom: 40px; min-height: 0; }
  .hero-h1 { font-size: 36px; }
  .book3d { width: 300px; }
  .book-col { align-self: center; order: -1; }
  .banner .wrap, .banner .col { padding-top: 56px; padding-bottom: 48px; }
  .banner h1, .h-xl { font-size: 44px; }
  .banner p.sub { font-size: 20px; }
  .post h2 { font-size: 30px; }
  .post-h1 { font-size: 42px; }
  .prose { font-size: 20px; } .prose h2 { font-size: 30px; }
  .prose blockquote { font-size: 24px; padding-left: 20px; }
  .split > .media { flex: 0 0 auto; width: 100%; }
  .split > .cover, .split > .body, .split > .media { flex: 0 0 auto !important; }
  .split > .body { width: 100%; }
  .cover, .cover-ph { align-self: center; width: 280px; }
  .split--center .photo { max-width: 420px; margin: 0 auto; }
  .qcard { padding: 32px 26px; } .qtext { font-size: 26px; }
  .review { padding: 22px 22px; }
  .author-box { padding: 24px; }
  .author-box img { align-self: center; }
  .novel-card { padding: 28px 22px; gap: 24px; text-align: center; }
  .novel-card .btn-row { justify-content: center; }
  .novel-cover { width: 150px; }
  .tile { padding: 22px 20px; }
  .footer { padding: 48px 0 36px; }
  .footer-nav { gap: 4px 24px; }
  .footer-legal { padding-top: 32px; flex-direction: column; }
  .footer-credit { margin-left: 0; text-align: left; }
  .pagination { padding: 32px 0 64px; }
}

/* Small phones */
@media (max-width: 560px) {
  body { font-size: 18px; }
  .hdr-buy { display: none; }
  .btn-row .btn { width: 100%; }
  .nav-toggle { margin-left: 0; }
  .brand-name { font-size: 22px; }
  .hero-h1 { font-size: 30px; }
  .hero-copy .lead { font-size: 19px; }
  .book3d { width: 240px; }
  .banner h1, .h-xl, .post-h1 { font-size: 34px; }
  .h-lg { font-size: 30px; } .h-md { font-size: 28px; }
  .post h2, .prose h2 { font-size: 26px; }
  .post-card h3 { font-size: 26px; }
  .qtext, .qcard--sm .qtext { font-size: 22px; }
  .wrap .split h2[style] { font-size: 34px !important; }
  .cover, .cover-ph { width: 220px; }
  .btn, .btn-lg { padding-left: 20px; padding-right: 20px; font-size: 19px; }
  .pn { padding: 20px; }
  .comment-list .comment-body { padding: 16px 18px; }
}

/* Free-chapter and subscribe forms: field and button share one fixed height so they line up */
.subscribe .field, .subscribe .btn { height: 64px; min-height: 64px; margin: 0; }
.subscribe .btn { flex: 0 0 auto; white-space: nowrap; }

.subscribe .btn { white-space: normal; }
@media (min-width: 861px) { .subscribe .btn { white-space: nowrap; } }

/* Contact Form 7 inside the free-chapter signup: undo its extra wrappers so the field and button line up */
.subscribe .wpcf7-form-control-wrap { display: block; width: 100%; }
.subscribe .wpcf7-spinner { display: none; }
.subscribe p { margin: 0; }
.subscribe br { display: none; }
.subscribe input.btn { width: auto; }
.wpcf7 form .wpcf7-response-output { margin: 16px 0 0; padding: 12px 18px; font-size: 19px; border-width: 2px; border-radius: 6px; }
/* When the signup stacks vertically (mobile), the field's 260px minimum must not become a height */
@media (max-width: 860px) { .subscribe .grow { flex: 0 0 auto; } }
/* Contact Form 7 messages on the navy signup band: light text (the page text color is dark) */
.bg-navy .wpcf7-response-output { color: #FFFDF7; }
.bg-navy .wpcf7-not-valid-tip { color: #FFC9C9; }
