/*
Theme Name: Dionisiy Poetry
Theme URI: https://example.com/
Author: OpenAI
Description: Lightweight editorial WordPress theme for an SEO-structured poetry archive with curated collections, author entity markup, social subscription funnels and future book promotion.
Version: 1.3.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: dionisiy-poetry
*/

:root {
  --ink: #18222c;
  --ink-soft: #40505c;
  --night: #0d1a24;
  --night-2: #132532;
  --paper: #f7f1e6;
  --paper-2: #efe6d7;
  --line: #d9cebd;
  --accent: #b4864b;
  --accent-dark: #7d5e36;
  --white: #fffdf8;
  --max: 1180px;
  --radius: 14px;
  --shadow: 0 18px 55px rgba(25, 29, 35, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 24, 34, .96);
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(14px);
}
.header-row { min-height: 76px; display: flex; align-items: center; gap: 34px; }
.brand { margin-right: auto; text-decoration: none; line-height: 1.05; }
.brand-name { display: block; font-size: 1.42rem; letter-spacing: .015em; }
.brand-sub { display: block; margin-top: 5px; color: #d9cfbf; font-size: .77rem; letter-spacing: .12em; text-transform: uppercase; }
.main-nav ul { margin: 0; padding: 0; display: flex; gap: 28px; list-style: none; }
.main-nav a { position: relative; text-decoration: none; font-size: .95rem; color: #e9e2d8; }
.main-nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -10px; height: 1px; background: var(--accent); transition: right .2s ease; }
.main-nav a:hover::after, .main-nav .current-menu-item > a::after { right: 0; }
.nav-toggle { display: none; border: 0; background: transparent; color: white; font-size: 1.4rem; cursor: pointer; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 560px;
  display: grid;
  align-items: center;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 18%, rgba(233,203,151,.40), transparent 18%),
    radial-gradient(circle at 72% 36%, rgba(91,111,124,.45), transparent 27%),
    linear-gradient(130deg, #0a1720 2%, #132838 48%, #5c4b3f 110%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .8;
  background:
    linear-gradient(to top, rgba(5,13,18,.85), transparent 56%),
    repeating-linear-gradient(115deg, transparent 0 42px, rgba(255,255,255,.015) 43px 44px);
}
.hero::after {
  content: '◐';
  position: absolute;
  right: 9%;
  top: 8%;
  z-index: -1;
  font-size: clamp(130px, 18vw, 245px);
  line-height: 1;
  color: rgba(240,220,177,.26);
  text-shadow: 0 0 60px rgba(243,215,167,.12);
}
.hero-inner { padding: 90px 0; max-width: 720px; }
.eyebrow { color: #d9c8ae; text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; }
.hero h1 { margin: 12px 0 20px; max-width: 760px; font-weight: 400; font-size: clamp(3rem, 6vw, 5.25rem); line-height: .98; letter-spacing: -.035em; }
.hero p { max-width: 650px; margin: 0 0 30px; color: #e7e0d6; font-size: 1.16rem; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #17120d;
  text-decoration: none;
  font-size: .95rem;
}
.button:hover { background: #c79a5b; color: #17120d; }
.button--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.42); }

.section { padding: 72px 0; }
.section--paper-2 { background: var(--paper-2); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-weight: 400; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05; }
.section-head a { font-size: .92rem; }

.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.poem-card { overflow: hidden; border-radius: var(--radius); background: rgba(255,255,255,.35); border: 1px solid rgba(96,77,53,.14); box-shadow: 0 10px 30px rgba(40,30,20,.04); }
.poem-card-thumb { aspect-ratio: 16/9; display: block; overflow: hidden; background:
  radial-gradient(circle at 70% 25%, rgba(238,191,121,.55), transparent 23%),
  linear-gradient(145deg, #152b39, #68533e);
}
.poem-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.poem-card:hover .poem-card-thumb img { transform: scale(1.025); }
.poem-card-body { padding: 20px; }
.poem-card h3 { margin: 0 0 7px; font-size: 1.35rem; font-weight: 400; line-height: 1.16; }
.poem-card p { margin: 0 0 13px; color: var(--ink-soft); font-size: .94rem; }
.read-link { font-size: .9rem; }

.poem-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; }
.poem-list-item { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.poem-list-item:hover { color: var(--ink); }
.poem-list-item .mini-thumb { width: 76px; aspect-ratio: 1/1; border-radius: 8px; background: linear-gradient(145deg,#1d3544,#74614e); overflow: hidden; }
.poem-list-item .mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.poem-list-item strong { display: block; font-weight: 400; font-size: 1.08rem; line-height: 1.15; }
.poem-list-item small { color: #6f6b64; font-size: .78rem; }

.page-hero { padding: 64px 0 35px; }
.breadcrumbs { margin-bottom: 22px; color: #787169; font-size: .82rem; }
.breadcrumbs a { text-decoration: none; }
.page-title { margin: 0; font-weight: 400; font-size: clamp(2.65rem, 6vw, 4.8rem); line-height: 1; letter-spacing: -.03em; }
.page-subtitle { margin-top: 16px; color: #5d5a55; }

.poem-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 68px; padding-bottom: 80px; }
.poem-content { max-width: 760px; }
.poem-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 30px; color: #646058; font-size: .86rem; }
.poem-text { font-size: clamp(1.2rem, 2.25vw, 1.55rem); line-height: 1.72; }
.poem-text p { margin: 0 0 1.3em; }
.poem-text br { line-height: 1.9; }
.poem-aside { padding-top: 4px; }
.aside-card { position: sticky; top: 104px; border-radius: var(--radius); padding: 22px; background: rgba(255,255,255,.42); border: 1px solid var(--line); }
.aside-art { aspect-ratio: 4/5; border-radius: 10px; margin-bottom: 17px; overflow: hidden; background: linear-gradient(160deg,#203949,#8d6d4e); }
.aside-art img { width: 100%; height: 100%; object-fit: cover; }
.aside-quote { color: #665e55; font-style: italic; font-size: .92rem; }

.annotation { margin: 42px 0; padding: 24px; border-radius: 12px; background: #efe6d8; border: 1px solid #ded0bc; }
.annotation h2 { margin: 0 0 10px; font-size: 1.4rem; font-weight: 400; }
.annotation p:last-child { margin-bottom: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.tag { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: #e5d9c6; color: #5f574e; font-size: .75rem; text-decoration: none; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-nav a { text-decoration: none; }
.post-nav .next { text-align: right; }
.post-nav small { display: block; color: #777168; }

.archive-layout { display: grid; grid-template-columns: 230px 1fr; gap: 52px; padding: 15px 0 80px; }
.archive-sidebar { border-right: 1px solid var(--line); padding-right: 28px; }
.archive-sidebar h3 { margin: 0 0 16px; font-size: 1rem; font-weight: 400; }
.archive-sidebar ul { padding: 0; margin: 0 0 28px; list-style: none; }
.archive-sidebar li { margin: 7px 0; }
.archive-sidebar a { text-decoration: none; color: #5c5852; font-size: .92rem; }
.archive-toolbar { display: flex; gap: 12px; justify-content: space-between; margin-bottom: 22px; }
.archive-toolbar select, .archive-toolbar input { border: 1px solid #d0c5b4; background: rgba(255,255,255,.45); border-radius: 7px; padding: 10px 12px; color: var(--ink); }
.archive-items { border-top: 1px solid var(--line); }
.archive-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.archive-item-thumb { aspect-ratio: 4/3; border-radius: 8px; background: linear-gradient(145deg,#193140,#82664b); overflow: hidden; }
.archive-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.archive-item h2 { margin: 0 0 4px; font-weight: 400; font-size: 1.3rem; line-height: 1.15; }
.archive-item p { margin: 4px 0 0; color: #6e685f; font-size: .88rem; }

.author-layout { display: grid; grid-template-columns: 340px 1fr; gap: 58px; padding: 10px 0 80px; }
.author-portrait { aspect-ratio: 4/5; border-radius: 12px; overflow: hidden; background: linear-gradient(145deg,#1a2f3d,#7b6855); }
.author-portrait img { width: 100%; height: 100%; object-fit: cover; }
.author-copy { font-size: 1.05rem; }
.author-copy .lead { font-size: 1.25rem; }
.project-card { margin-top: 30px; padding: 20px; border-radius: 10px; background: var(--night); color: #f6efe6; }
.project-card a { color: inherit; }

.content-page { max-width: 820px; padding: 70px 0; }
.content-page h1 { font-weight: 400; font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1; }

.site-footer { background: #0b1821; color: #cfc6ba; padding: 38px 0; font-size: .86rem; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.footer-row a { color: #e4dacb; }

.pagination { display: flex; gap: 8px; margin-top: 30px; }
.pagination .page-numbers { display: inline-flex; min-width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.pagination .current { background: var(--night); color: white; border-color: var(--night); }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; inset: 76px 0 auto 0; padding: 18px 20px 24px; background: #0d1a24; border-top: 1px solid rgba(255,255,255,.08); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 14px; }
  .featured-grid { grid-template-columns: 1fr; }
  .poem-list { grid-template-columns: 1fr; }
  .poem-layout, .archive-layout, .author-layout { grid-template-columns: 1fr; gap: 34px; }
  .archive-sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; padding-bottom: 18px; }
  .aside-card { position: static; }
  .author-portrait { max-width: 420px; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .container { width: min(calc(100% - 28px), var(--max)); }
  .hero { min-height: 500px; }
  .hero-inner { padding: 70px 0; }
  .section { padding: 52px 0; }
  .archive-item { grid-template-columns: 82px 1fr; }
  .archive-item > span:last-child { display: none; }
  .archive-toolbar { flex-direction: column; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}

/* V1.1 poetry archive enhancements */
.hero[style]::before {
  background:
    linear-gradient(90deg, rgba(5,13,18,.86) 0%, rgba(5,13,18,.58) 52%, rgba(5,13,18,.30) 100%),
    linear-gradient(to top, rgba(5,13,18,.84), transparent 58%),
    var(--hero-image) center/cover no-repeat;
  opacity: 1;
}
.card-meta { margin: -3px 0 10px; color: #777168; font-size: .76rem; }
.section--compact { padding-top: 10px; padding-bottom: 62px; }
.collection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.collection-card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.30);
  text-decoration: none;
}
.collection-card strong { font-size: 1.18rem; font-weight: 400; }
.collection-card span { margin-top: 12px; color: #746d64; font-size: .82rem; }
.collection-card:hover { background: rgba(255,255,255,.50); color: var(--ink); }
.collection-grid--large { grid-template-columns: repeat(2,1fr); }
.content-page--wide { max-width: var(--max); }
.collection-intro { max-width: 820px; margin-bottom: 34px; }
.collection-links { margin-top: 14px; color: #676159; font-size: .88rem; }
.collection-links a { color: var(--accent-dark); }
.source-link { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.source-link span { display: block; color: #7b746c; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.source-link a { display: inline-block; margin-top: 4px; text-decoration: none; font-size: .9rem; }
.related-poems { margin-top: 48px; }
.related-poems h2 { font-weight: 400; font-size: 1.7rem; }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.related-card { display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; }
.related-card strong { font-weight: 400; line-height: 1.2; }
.related-card span { margin-top: 7px; color: #756f67; font-size: .78rem; }
.profile-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.profile-links strong { margin-right: 4px; font-weight: 400; }
.profile-links a { display: inline-flex; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .82rem; }

@media (max-width: 900px) {
  .collection-grid, .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .collection-grid, .collection-grid--large, .related-grid { grid-template-columns: 1fr; }
}


/* V1.2 semantic SEO architecture */
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.archive-intro, .collection-lead { max-width: 850px; }
.archive-intro p, .collection-lead p { margin: .45em 0; }
.poem-meta--hero { margin: 18px 0 0; }
.poem-page-hero { padding-bottom: 28px; }
.tag--muted { opacity:.72; cursor:default; }
.author-commentary p:first-child { margin-top:0; }
.author-commentary p:last-child { margin-bottom:0; }
.empty-state { padding:22px; border:1px dashed var(--line); border-radius:10px; color:#6d675f; background:rgba(255,255,255,.22); }
.collection-card--seo { position:relative; }
.collection-card-kicker { margin:0 0 9px !important; font-size:.68rem !important; letter-spacing:.08em; text-transform:uppercase; color:#8a7b69 !important; }
.collection-card small { margin-top:14px; color:#81776a; }
.start-path { border-top:1px solid var(--line); }
.start-item { display:grid; grid-template-columns:70px minmax(0,1fr); gap:24px; padding:30px 0; border-bottom:1px solid var(--line); }
.start-number { font-size:2rem; line-height:1; color:#b3a48f; font-variant-numeric:tabular-nums; }
.start-item h2 { margin:0 0 8px; font-weight:400; font-size:1.7rem; }
.start-item h2 a { text-decoration:none; }
.start-item p { max-width:760px; margin:0; color:#68625b; }
.author-actions { display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin-top:26px; }
.text-link { font-size:.95rem; }
.archive-item-wrap { margin:0; }
.seo-note { margin-top:20px; padding:14px 16px; border-left:3px solid var(--accent); background:rgba(255,255,255,.30); color:#625c55; font-size:.9rem; }

@media (max-width: 620px) {
  .hero-actions { align-items:stretch; }
  .hero-actions .button { justify-content:center; }
  .start-item { grid-template-columns:44px minmax(0,1fr); gap:14px; }
  .start-number { font-size:1.35rem; }
}

/* V1.3 conversion: subscriptions and future book sales */
.conversion-section { background: #eadfce; }
.social-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 34px;
  align-items: center;
  margin: 46px 0;
  padding: 28px 30px;
  border: 1px solid #d8c7af;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.62), rgba(239,230,215,.84));
  box-shadow: 0 14px 42px rgba(25,29,35,.06);
}
.social-cta h2 { margin: 0 0 7px; font-size: 1.65rem; font-weight: 400; }
.social-cta p { margin: 0; color: #696158; max-width: 680px; }
.social-cta-links { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }
.social-cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid #cdbda6;
  border-radius: 999px;
  background: rgba(255,255,255,.48);
  text-decoration: none;
  font-size: .88rem;
}
.social-cta-link:hover { color: var(--ink); background: #fffaf2; }
.social-cta-link--primary { background: var(--night); border-color: var(--night); color: var(--white); }
.social-cta-link--primary:hover { background: var(--night-2); color: var(--white); }
.social-cta--compact { grid-template-columns: 1fr; gap: 15px; margin: 28px 0; }
.social-cta--compact .social-cta-links { justify-content: flex-start; }
.social-links-compact { display: flex; flex-wrap: wrap; gap: 9px 14px; align-items: center; }
.social-links-compact a { text-decoration: none; font-size: .86rem; }
.author-social { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.author-social h2 { margin: 0 0 12px; font-size: 1.25rem; font-weight: 400; }
.footer-stack { display: grid; gap: 16px; }
.site-footer .social-links-compact a { color: #ddd3c5; }

.book-promo {
  display: grid;
  grid-template-columns: 170px minmax(0,1fr);
  gap: 28px;
  align-items: center;
  margin: 42px 0;
  padding: 28px;
  border-radius: 14px;
  color: #f6efe6;
  background: linear-gradient(135deg, #0c1b25, #1b3140);
  box-shadow: 0 18px 50px rgba(11,24,33,.16);
}
.book-promo-cover { display: block; border-radius: 8px; overflow: hidden; text-decoration: none; background: #203441; }
.book-promo-cover img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.book-kicker { margin-bottom: 7px; color: #d5b789; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.book-promo h2 { margin: 0 0 9px; font-size: 1.85rem; font-weight: 400; }
.book-promo p { margin: 0 0 18px; color: #d8d0c6; }
.book-promo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; }
.book-price { font-size: 1rem; color: #f0e2ce; }
.book-promo .button { background: #d1a265; border-color: #d1a265; color: #17120d; }
.book-promo .button:hover { background: #e1b77d; }

.book-page { display: grid; grid-template-columns: minmax(260px, .65fr) minmax(0, 1.35fr); gap: 58px; padding: 10px 0 80px; align-items: start; }
.book-page-cover { max-width: 430px; width: 100%; }
.book-page-cover img, .book-cover-placeholder { width: 100%; border-radius: 12px; box-shadow: var(--shadow); }
.book-cover-placeholder { aspect-ratio: 2/3; display: grid; place-items: center; color: #d9cfbf; background: linear-gradient(145deg,#152b38,#765f49); }
.book-page-copy .lead { font-size: 1.25rem; color: #514c46; }
.book-page-price { margin: 28px 0 12px; font-size: 1.4rem; }
.book-follow { margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line); }
.book-follow p { color: #6a645d; }

@media (max-width: 900px) {
  .social-cta { grid-template-columns: 1fr; gap: 18px; }
  .social-cta-links { justify-content: flex-start; }
  .book-page { grid-template-columns: 1fr; gap: 34px; }
  .book-page-cover { max-width: 360px; }
}
@media (max-width: 620px) {
  .social-cta { margin: 34px 0; padding: 22px 20px; }
  .social-cta-links { display: grid; grid-template-columns: 1fr 1fr; }
  .social-cta-link { border-radius: 8px; }
  .book-promo { grid-template-columns: 90px minmax(0,1fr); gap: 17px; padding: 20px; }
  .book-promo h2 { font-size: 1.4rem; }
  .book-promo p { font-size: .9rem; }
  .book-promo-actions { grid-column: 1 / -1; }
}
.book-promo--no-cover { grid-template-columns: 1fr; }
