/* Capital Stories. Tokens from the live YOOtheme theme.1.css (PLAN.md section 12). */

@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/work-sans-400.woff2) format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/work-sans-500.woff2) format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/work-sans-600.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/open-sans-400.woff2) format("woff2"); }

:root {
  --text: #1a2b3f;
  --heading: #032b51;
  --link: #00626e;
  --link-hover: #032b51;
  --green: #849755;          /* large headings on white only (3.2:1) */
  --green-on-dark: #b5c394;  /* 4.6:1 on --dark */
  --dark: #4c4c4c;
  --muted: #f8f8f8;
  --rule: #e3e3e3;
  --on-dark: #ffffff;
  --on-dark-soft: #bfbfbf;
  --overlay: rgba(20, 24, 28, 0.6);
  --max: 1200px;
  --gutter: 16px;
  --font-head: "Work Sans", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); color: var(--heading); line-height: 1.2; margin: 0 0 16px; }

.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 16px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 640px) { :root { --gutter: 30px; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--rule); transition: transform .5s ease-out; }
.site-header.is-hidden:not(:focus-within) { transform: translateY(-100%); transition-duration: .2s; transition-timing-function: ease-in; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 80px; gap: 24px; }
.logo img { width: 200px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.nav a { font: 500 14px/1 var(--font-head); text-transform: uppercase; color: var(--heading); text-decoration: none; }
.nav a:hover { color: var(--link); }
.menu { display: none; }
@media (max-width: 959px) {
  .logo img { width: 160px; }
  .nav--desktop { display: none; }
  .menu { display: block; }
  .menu > summary { cursor: pointer; list-style: none; font: 500 14px/1 var(--font-head); text-transform: uppercase; color: var(--heading); padding: 12px 0; }
  .menu > summary::-webkit-details-marker { display: none; }
  .menu[open] .nav { position: absolute; left: 0; right: 0; top: 80px; background: #fff; border-bottom: 1px solid var(--rule); z-index: 5; }
  .menu[open] .nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .menu[open] .nav a { display: block; padding: 12px 0; }
}

/* Sections */
.section { padding: 70px 0; }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--muted { background: var(--muted); padding: 40px 0; }
.section--image { position: relative; overflow: hidden; color: var(--on-dark); background: var(--dark); }
.section-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.section-bg.is-parallax { bottom: auto; will-change: transform; }
.section--image::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--overlay); }
.section--image > .wrap { position: relative; z-index: 2; }
.section--dark h1, .section--dark h2, .section--dark h3,
.section--image h1, .section--image h2, .section--image h3 { color: var(--on-dark); }
.section--dark a, .section--image a { color: var(--on-dark); }
.center { text-align: center; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

.label {
  font: 700 22px/1.4 var(--font-head);
  letter-spacing: -0.4px;
  color: var(--green);
  text-transform: uppercase;
  max-width: 450px;
  margin: 0 auto 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.section--dark .label, .section--image .label { color: var(--green-on-dark); border-color: rgba(255, 255, 255, 0.2); }
.label--left { margin-left: 0; text-align: left; }

/* Buttons */
.btn {
  display: inline-block;
  font: 500 14px/38px var(--font-head);
  padding: 0 24px;
  border: 2px solid currentColor;
  color: var(--heading);
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: var(--heading); color: #fff; border-color: var(--heading); }
.section--dark .btn:hover, .section--image .btn:hover { background: #fff; color: var(--text); border-color: #fff; }
.btn--small { border-width: 1px; line-height: 38px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 24px; }
.actions--left { justify-content: flex-start; }

/* Heroes */
.hero { padding: 140px 0; }
.hero img.hero-art { width: min(420px, 80%); margin: 0 auto; }
.page-hero { padding: 80px 0; }
.page-hero h1 { font-size: clamp(28px, 5vw, 35.7px); font-weight: 500; }
.eyebrow { font: 500 14px/1.4 var(--font-head); text-transform: uppercase; color: var(--on-dark-soft); margin: 0 0 8px; }
.episode-hero .wrap { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .episode-hero .wrap { grid-template-columns: 320px 1fr; } }
.episode-hero .number { font: 500 20px/1.2 var(--font-head); margin-bottom: 8px; }

/* Cards */
.grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }
/* Live: the artwork alone; on hover or focus a grey, blurred overlay and the text fade in (.3s ease-out). */
.card, .card:hover { position: relative; display: block; color: var(--on-dark); text-decoration: none; overflow: hidden; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s ease-out; }
.card-body { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 30px; background: rgba(76, 76, 76, 0.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s ease-out; }
.card:hover .card-body, .card:focus-visible .card-body { opacity: 1; }
.card-title { font: 500 22px/1.3 var(--font-head); color: var(--on-dark); margin: 0; }
.card-date { font: 500 14px/1.4 var(--font-head); color: var(--on-dark-soft); margin: 0 0 10px; }
.card-text { font-size: 14px; margin: 0 0 20px; }
.card .btn { color: var(--on-dark); }
.card .btn:hover { background: #fff; color: var(--dark); }
.up-next .card:hover img, .up-next .card:focus-visible img { transform: scale(1.03); }
@media (max-width: 400px) { .card-text { display: none; } }

/* Storytellers */
.people { display: grid; gap: 40px; grid-template-columns: 1fr; margin-top: 40px; }
@media (min-width: 640px) { .people { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; } }
.person img { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; margin: 0 auto 24px; }
.person h3 { font: 700 18px/1.4 var(--font-head); color: var(--green-on-dark); border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding-bottom: 6px; }

/* Episode */
.player audio { width: 100%; }
.player p { margin: 8px 0 0; font-size: 14px; }
.episode-body { display: grid; gap: 48px; }
@media (min-width: 960px) { .episode-body { grid-template-columns: 2fr 1fr; } }
.episode-body h2 { font: 700 20px/1.4 var(--font-head); color: var(--green); text-transform: uppercase; }
.credits dt { font: 600 15px/1.4 var(--font-head); color: var(--heading); margin-top: 16px; }
.credits dd { margin: 0; }
.hosts { display: flex; gap: 12px; margin-top: 16px; }
.hosts img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.resources { line-height: 1.7; }
.up-next .card { max-width: 360px; margin-bottom: 24px; }

/* Topics list */
.topics { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; }
.topics a { font: 500 14px/1.6 var(--font-head); }

/* Prose pages */
.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin-top: 32px; }

/* Footer */
.site-footer { background: var(--dark); color: var(--on-dark); }
.site-footer a { color: var(--on-dark); }
.footer-main { display: grid; gap: 32px; align-items: center; padding: 60px 0 40px; }
@media (min-width: 960px) { .footer-main { grid-template-columns: 2fr 1fr; } }
.footer-main h2 { font: 500 18px/1.4 var(--font-head); color: var(--green-on-dark); text-transform: uppercase; }
.footer-main img { width: 220px; justify-self: center; }
.footer-links { border-top: 1px solid rgba(255, 255, 255, 0.2); padding: 20px 0; display: flex; flex-wrap: wrap; gap: 8px 40px; font-size: 14px; }
.footer-links strong { font-family: var(--font-head); font-weight: 600; }
.footer-legal { padding: 0 0 24px; font-size: 13px; color: var(--on-dark-soft); }
.footer-legal p { margin: 4px 0; }
.footer-legal a { color: var(--on-dark-soft); }

/* Scroll-in reveal (site.js adds these): live uk-animation-scale-up / scale-down, .5s ease-out. */
.reveal { opacity: 0; }
.reveal--up, .reveal--down { animation: .5s ease-out both; }
.reveal--up { animation-name: fade-in, scale-up; }
.reveal--down { animation-name: fade-in, scale-down; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scale-up { from { transform: scale(.9); } to { transform: scale(1); } }
@keyframes scale-down { from { transform: scale(1.1); } to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .reveal, .card-body { opacity: 1 !important; animation: none !important; }
  .site-header { position: static; transform: none; }
}
