/* Chronicles of Kykeon — site styles
   Brand: Ink navy #1F2340 · Barley gold #C9A45C · Parchment #F3ECDD
          Byline bronze #8A6E32 · Terracotta #B5563A
   Type:  Cormorant Garamond (headings) · Inter (body, labels) */

:root {
  --ink: #1F2340;
  --ink-2: #2A2F52;
  --gold: #C9A45C;
  --bronze: #8A6E32;
  --terracotta: #B5563A;
  --parchment: #F3ECDD;
  --paper: #FBF7EE;
  --rule: #DCD0B6;
  --muted: #5E5A52;
  --on-dark: #EDE6D6;
  --on-dark-muted: #B9B3A3;
  --rule-dark: #3A3F63;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
em { font-style: italic; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--parchment); padding: 8px 14px; z-index: 100; border-radius: var(--radius); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- labels & buttons ---------- */
.eyebrow {
  font: 600 12px/1.4 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 12px;
}
.eyebrow-gold { color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 15px/1 var(--sans);
  letter-spacing: .02em;
  padding: 14px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
  cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #D8B672; }
.btn-ink { background: var(--ink); color: var(--parchment); }
.btn-ink:hover { background: var(--ink-2); }
.btn-outline-light { border-color: rgba(237,230,214,.45); color: var(--on-dark); }
.btn-outline-light:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost { border-color: var(--rule-dark); color: var(--on-dark); padding: 11px 16px; font-size: 14px; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.text-link { font: 500 15px var(--sans); color: var(--bronze); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.text-link:hover { color: var(--ink); }
.text-link-gold { color: var(--gold); }
.text-link-gold:hover { color: var(--parchment); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243,236,221,.94);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 100px; }
.brand { display: block; flex: 0 0 auto; }
.brand img { height: 80px; width: auto; }
.nav { display: flex; gap: 30px; }
.nav a {
  font: 500 15px var(--sans);
  text-decoration: none;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover, .nav a.active { color: var(--bronze); border-bottom-color: var(--gold); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; position: relative; cursor: pointer; color: var(--ink); }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 11px; width: 22px; height: 2px; background: currentColor; content: ""; transition: transform .2s, opacity .2s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { left: 0; top: -7px; }
.nav-toggle-bar::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(ellipse 70% 60% at 80% 40%, rgba(201,164,92,.13), transparent 70%),
    var(--ink);
  color: var(--on-dark);
  padding-block: clamp(56px, 9vw, 112px);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(40px, 6.2vw, 72px); font-weight: 600; color: var(--parchment); letter-spacing: -.005em; }
.hero .lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--on-dark-muted); margin-top: 22px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-mark { margin: 0; text-align: center; }
.hero-mark img { width: 100%; max-width: 360px; margin: 0 auto; }
.hero-mark figcaption {
  font: italic 500 18px/1.4 var(--serif);
  color: var(--on-dark-muted);
  max-width: 22em; margin: 28px auto 0;
  padding-top: 14px; border-top: 1px solid var(--rule-dark);
}

/* ---------- sections ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-panel { background: var(--paper); border-block: 1px solid var(--rule); }
.section-dark { background: var(--ink); color: var(--on-dark); }
.section-dark h2, .section-dark h3 { color: var(--parchment); }

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(36px, 4.6vw, 52px); }
.section-lede { color: var(--muted); font-size: 18px; margin-top: 14px; }
.section-dark .section-lede { color: var(--on-dark-muted); }
.section-head .text-link { display: inline-block; margin-top: 18px; }

.loading { color: var(--muted); font-size: 15px; font-style: italic; }
.section-dark .loading { color: var(--on-dark-muted); }

/* ---------- essay feed ---------- */
.feed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.feed-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.feed-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.feed-card .thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--rule); }
.feed-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.feed-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.feed-body .date { font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--bronze); }
.feed-body h3 { font-size: 24px; }
.feed-body h3 a { text-decoration: none; }
.feed-body h3 a:hover { color: var(--bronze); }
.feed-body .excerpt { font-size: 15px; color: var(--muted); }
.feed-body .more { margin-top: auto; padding-top: 8px; font: 500 14px var(--sans); color: var(--bronze); text-decoration: none; }
.feed-body .more:hover { color: var(--ink); }

.subscribe {
  margin-top: 48px;
  display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: 32px; align-items: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 36px);
}
.subscribe h3 { font-size: 30px; }
.subscribe p { color: var(--muted); margin-top: 8px; }
.subscribe-frame { width: 100%; height: 150px; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; }

/* ---------- books ---------- */
.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.book { display: grid; grid-template-columns: 170px 1fr; gap: 28px; align-items: start; }
.book-cover { display: block; box-shadow: 0 18px 36px -18px rgba(31,35,64,.55); border-radius: 2px; overflow: hidden; transition: transform .25s; }
.book-cover:hover { transform: translateY(-3px) rotate(-.6deg); }
.book-cover img { width: 100%; }
.book-body h3 { font-size: 30px; }
.book-sub { font: italic 500 19px/1.35 var(--serif); color: var(--bronze); margin: 6px 0 12px; }
.book-body > p:not(.eyebrow):not(.book-sub) { color: var(--muted); font-size: 16px; }
.book-body .btn { margin-top: 20px; }

/* ---------- shows / YouTube ---------- */
.shows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.show {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--rule-dark);
  border-top: 3px solid var(--show);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
  display: flex; flex-direction: column; gap: 22px;
}
.show-head { display: grid; grid-template-columns: 84px 1fr; gap: 18px; align-items: center; }
.show-head img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px solid var(--show); }
.show-head h3 { font-size: 27px; }
.show-head p:not(.eyebrow) { color: var(--on-dark-muted); font-size: 15px; margin-top: 4px; }
.eyebrow-show { color: var(--show); margin-bottom: 6px; }

.youtube-host { display: flex; flex-direction: column; gap: 14px; }
.youtube-feature, .youtube-player {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden; background: #0f1122; border: 0;
}
.youtube-feature img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .3s; opacity: .92; }
.youtube-feature:hover img { transform: scale(1.02); opacity: 1; }
.youtube-play {
  position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center; padding-left: 5px;
  background: rgba(31,35,64,.82); color: var(--gold); font-size: 24px;
  border: 1px solid var(--gold);
}
.youtube-latest .date { font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--show); }
.youtube-latest h4 { font-size: 22px; margin-top: 6px; color: var(--parchment); }
.youtube-latest h4 a { text-decoration: none; }
.youtube-latest h4 a:hover { color: var(--gold); }
.youtube-recent { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.youtube-recent-item { display: flex; flex-direction: column; gap: 8px; text-decoration: none; font-size: 14px; line-height: 1.4; color: var(--on-dark-muted); }
.youtube-recent-item img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.youtube-recent-item:hover { color: var(--gold); }
.youtube-channel-link { align-self: flex-start; margin-top: 4px; }
.youtube-empty { border: 1px dashed var(--rule-dark); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.youtube-empty strong { font: 600 22px var(--serif); color: var(--parchment); }
.youtube-empty p { color: var(--on-dark-muted); font-size: 15px; margin-bottom: 8px; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 220px 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.about-mark img { width: 100%; max-width: 200px; }
.about-copy { max-width: 680px; }
.about-copy h2 { font-size: clamp(36px, 4.6vw, 52px); margin-bottom: 20px; }
.about-copy > p { color: var(--muted); font-size: 18px; margin-bottom: 16px; }
.pullquote { margin: 32px 0 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--gold); }
.pullquote p { font: italic 500 clamp(22px, 2.4vw, 27px)/1.4 var(--serif); color: var(--ink); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.contact-card { background: var(--parchment); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); }
.contact-card h3 { font-size: 28px; margin-bottom: 10px; }
.contact-card > p { color: var(--muted); margin-bottom: 22px; }
.links { list-style: none; margin: 0; padding: 0; }
.links li + li { border-top: 1px solid var(--rule); }
.links a { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; text-decoration: none; font-size: 15px; }
.links a span:first-child { font-weight: 500; }
.links a span:last-child { color: var(--muted); text-align: right; }
.links a:hover span { color: var(--bronze); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding-block: 40px; border-top: 3px solid var(--gold); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.footer-logo { height: 72px; width: auto; }
.footer-inner p { flex: 1 1 320px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .feed-card, .book-cover, .youtube-feature img { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .books, .shows { grid-template-columns: 1fr; }
  .subscribe { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--parchment);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
  .nav a:last-child { border-bottom: 0; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mark { order: -1; }
  .hero-mark img { max-width: 220px; }
  .hero-mark figcaption { display: none; }
  .about { grid-template-columns: 1fr; }
  .about-mark img { max-width: 120px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand img { height: 70px; }
  .header-inner { min-height: 84px; }
  html { scroll-padding-top: 88px; }
  .feed-grid { grid-template-columns: 1fr; }
  .book { grid-template-columns: 110px 1fr; gap: 18px; }
  .book-body h3 { font-size: 25px; }
  .book-sub { font-size: 17px; }
  .show-head { grid-template-columns: 64px 1fr; }
  .show-head img { width: 64px; height: 64px; }
  .show-head h3 { font-size: 23px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .subscribe-frame { height: 170px; }
}
