@font-face { font-family: 'Nunito Sans'; src: url('/assets/fonts/nunito-sans-latin-wght-normal.woff2') format('woff2-variations'); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: 'Kalam'; src: url('/assets/fonts/kalam-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* Brand palette (Hat in the Loop brand guide) */
  --black: #000000;
  --white: #ffffff;
  --red: #D11F1F;
  --blue: #3B82F6;
  /* Working tones */
  --ink: #111111;
  --ink-2: #3d3d3d;
  --muted: #5f6368;
  --paper: #ffffff;
  --paper-2: #f5f5f3;
  --tab: #eceef1;
  --line: #d8d8d8;
  --red-dark: #b01818;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px -12px rgba(0,0,0,.18);
  --font: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Kalam', 'Comic Neue', 'Marker Felt', cursive;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--font); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .4em; font-weight: 900; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }
.wrap.mid { width: min(980px, 100% - 32px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); color: var(--black); padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }

/* Hand-drawn accents */
.hand { font-family: var(--hand); font-weight: 700; letter-spacing: .02em; }
.tab-label { display: inline-block; font-family: var(--hand); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; color: var(--ink); background: var(--tab); padding: .2em .75em .1em; border-radius: 9px; margin: 0 0 .9rem; line-height: 1.5; }
.tab-label.on-dark { background: #232323; color: var(--white); }
.brush { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 24' preserveAspectRatio='none'%3E%3Cpath d='M4 16 C 70 9, 170 6, 296 10' stroke='%23D11F1F' stroke-width='8' stroke-linecap='round' fill='none'/%3E%3Cpath d='M30 21 C 110 16, 200 15, 270 17' stroke='%23D11F1F' stroke-width='3' stroke-linecap='round' fill='none' opacity='.7'/%3E%3C/svg%3E") no-repeat left bottom / 100% .42em; padding-bottom: .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .45em; padding: .72em 1.25em; border-radius: 999px; font-weight: 800; text-decoration: none; border: 2px solid transparent; transition: transform .15s ease, background .15s ease, color .15s ease; cursor: pointer; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.pill { display: inline-flex; align-items: center; gap: .5em; padding: .5em 1em; border-radius: 999px; border: 1.5px solid currentColor; text-decoration: none; font-weight: 700; font-size: .92rem; }
.pill:hover { background: var(--red); border-color: var(--red); color: var(--white); }

/* Header */
.masthead { background: var(--black); color: var(--white); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0 10px; }
.brand img { height: 78px; width: auto; }
.pillars { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.pillars li + li { border-left: 1.5px solid #3a3a3a; }
.pillars a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; padding: 2px 18px; font-family: var(--hand); font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; color: var(--white); }
.pillars a:hover { color: #ffb3b3; }
.ico { width: 44px; height: 44px; }
.navbar { background: var(--white); border-bottom: 1.5px solid var(--line); position: sticky; top: 0; z-index: 20; }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 58px; }
.mainnav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.mainnav a { text-decoration: none; font-weight: 700; padding: 16px 14px 14px; color: var(--ink-2); border-bottom: 3px solid transparent; white-space: nowrap; }
.mainnav a:hover { color: var(--red); }
.mainnav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }
.searchbox { display: flex; align-items: center; background: var(--paper-2); border: 1.5px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 16px; width: min(320px, 40vw); }
.searchbox input { border: 0; background: transparent; font: inherit; font-size: .95rem; padding: 8px 0; width: 100%; outline: none; color: var(--ink); }
.searchbox button { border: 0; background: transparent; color: var(--ink); padding: 8px 10px; cursor: pointer; border-radius: 999px; }
.searchbox:focus-within { border-color: var(--blue); }

/* Hero */
.hero { background: var(--paper); border-bottom: 1.5px solid var(--line); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; padding: 56px 0 40px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); }
.hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-art { position: relative; }
.hero-art::before { content: ''; position: absolute; inset: 8% 6% 4%; background: var(--red); border-radius: 50%; border: 5px solid var(--black); transform: rotate(-4deg); }
.hero-art::after { content: ''; position: absolute; inset: 8% 6% 4%; border-radius: 50%; background: repeating-linear-gradient(135deg, rgba(255,255,255,.14) 0 2px, transparent 2px 9px); }
.hero-art img { position: relative; z-index: 1; width: 100%; filter: drop-shadow(0 12px 18px rgba(0,0,0,.25)); }

/* Pillars strip */
.pillar-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.pillar { display: flex; gap: 14px; align-items: center; text-decoration: none; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--white); transition: border-color .15s, transform .15s; }
.pillar:hover { border-color: var(--ink); transform: translateY(-2px); }
.pillar .ico { flex: none; width: 52px; height: 52px; }
.pillar strong { display: block; font-size: 1.08rem; }
.pillar small { display: block; color: var(--muted); font-size: .92rem; line-height: 1.4; }

/* Sections */
.block { padding: 56px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head .tab-label { margin: 0; font-size: 1.05rem; }
.more { font-weight: 800; text-decoration: none; color: var(--red); white-space: nowrap; }
.more::after { content: ' →'; }
.more:hover { text-decoration: underline; }
.band-dark { background: var(--black); color: var(--white); margin-top: 56px; padding-bottom: 56px; }
.band-dark .more { color: #ff7a7a; }
.band-dark .lede { color: #d6d6d6; max-width: 40em; margin: 0; }
.pod-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-bottom: 26px; }
.listen { display: flex; flex-wrap: wrap; gap: 10px; }
.page-head .listen { margin-top: 14px; }

/* Featured */
.featured { margin-top: 48px; }
.feature-card { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.feature-media { background: var(--black); display: flex; align-items: center; }
.feature-media .embed { width: 100%; border-radius: 0; }
.feature-media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.feature-copy { padding: 28px 30px; align-self: center; }
.feature-copy h2 a { text-decoration: none; }
.feature-copy h2 a:hover { color: var(--red); }
.feature-copy .meta { color: var(--muted); font-weight: 700; font-size: .92rem; }

/* Grid + cards */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; color: var(--ink); }
.card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: var(--shadow); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.thumb { position: relative; aspect-ratio: 16/9; background: var(--paper-2); overflow: hidden; }
.thumb > img { width: 100%; height: 100%; object-fit: cover; }
.thumb-fallback { height: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--black); color: var(--white); font-family: var(--hand); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 1.2rem; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 10px); }
.thumb-fallback img { width: 96px; height: 96px; }
.thumb-post { background-color: #161616; }
.play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 56px; height: 56px; border-radius: 50%; background: var(--red); color: var(--white); display: grid; place-items: center; border: 3px solid var(--white); box-shadow: 0 6px 18px rgba(0,0,0,.35); transition: scale .15s; }
.play svg { margin-left: 3px; }
.card:hover .play { scale: 1.08; }
.badge { position: absolute; top: 10px; left: 10px; font-family: var(--hand); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; padding: .15em .6em .05em; border-radius: 7px; background: var(--white); color: var(--ink); border: 1.5px solid var(--black); }
.badge.static { position: static; }
.badge-video { background: var(--blue); color: var(--white); border-color: var(--white); }
.badge.static.badge-video { border-color: var(--blue); }
.badge-podcast { background: var(--red); color: var(--white); border-color: var(--white); }
.badge.static.badge-podcast { border-color: var(--red); }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.card-body h3 { margin: 0; }
.card:hover h3 { color: var(--red); }
.meta { color: var(--muted); font-size: .85rem; font-weight: 700; margin: 0; }
.summary { color: var(--ink-2); font-size: .95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.band-dark .card { border-color: #2c2c2c; background: #111; color: var(--white); }
.band-dark .card:hover { border-color: var(--white); }
.band-dark .card .summary { color: #cfcfcf; }
.band-dark .card .meta { color: #a8a8a8; }
.band-dark .thumb-fallback { background-color: #1c1c1c; }
.band-dark .empty { border-color: #333; color: #cfcfcf; }
.loading { color: var(--muted); padding: 30px 0; grid-column: 1 / -1; }
.empty { grid-column: 1 / -1; border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 34px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty p { margin: 0; font-weight: 700; }

/* About teaser */
.about-teaser { display: flex; gap: 28px; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 28px; margin-top: 56px; margin-bottom: 64px; background: var(--paper-2); }
.about-teaser img { border-radius: 50%; border: 4px solid var(--black); flex: none; }
.about-teaser h2 { margin-bottom: .3em; }

/* List pages */
.page-head { padding: 48px 0 12px; }
.page-head .lede { font-size: 1.15rem; color: var(--ink-2); max-width: 40em; }
.listing { padding-bottom: 72px; }
.filters { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); border-radius: 999px; padding: .32em .9em; font-weight: 700; font-size: .88rem; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Entry page */
.entry-head { padding: 40px 0 10px; }
.crumbs { margin: 0 0 10px; font-weight: 800; }
.crumbs a { text-decoration: none; color: var(--red); }
.crumbs a::before { content: '← '; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-weight: 700; font-size: .92rem; }
.entry-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.lede { font-size: 1.2rem; color: var(--ink-2); }
.draft-flag { background: #fff3cd; color: #7a5a00; border-radius: 6px; padding: 0 8px; }
.entry-media { margin-block: 18px 30px; }
.hero-img { border-radius: var(--radius); width: 100%; }
.embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--black); }
.embed iframe, .embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-vertical { aspect-ratio: 9/16; max-width: 400px; margin-inline: auto; }
.embed-social { aspect-ratio: auto; height: 640px; background: var(--white); border: 1.5px solid var(--line); }
.embed-audio { aspect-ratio: auto; height: 170px; background: transparent; }
.entry-audio { margin-bottom: 28px; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 18px 18px; background: var(--paper-2); }
.entry-audio .hand { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; text-transform: uppercase; }
.audio { width: 100%; }
.prose { font-size: 1.1rem; line-height: 1.72; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.4em; }
.prose a { color: var(--red); text-underline-offset: 3px; }
.prose blockquote { margin: 1.4em 0; padding: .2em 0 .2em 1.1em; border-left: 5px solid var(--red); font-size: 1.2rem; font-weight: 700; }
.prose img { border-radius: 10px; margin: 1.4em 0; }
.prose code { background: var(--paper-2); padding: .1em .35em; border-radius: 5px; font-size: .92em; }
.prose pre { background: #111; color: #eee; padding: 16px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.source-note { margin: 28px 0 0; padding: 14px 16px; border-radius: 10px; background: #eef4ff; border: 1.5px solid #cfe0ff; font-weight: 600; }
.source-note a { color: #1d5fd1; }
.entry-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; border-top: 1.5px solid var(--line); margin-top: 36px; padding: 20px 0 8px; }
.share { display: flex; align-items: center; gap: 12px; }
.share .hand { text-transform: uppercase; color: var(--muted); }
.share a { color: var(--ink); }
.share a:hover { color: var(--red); }
.copy { border: 1.5px solid var(--line); background: var(--white); border-radius: 999px; padding: .3em .9em; font-weight: 700; cursor: pointer; font-size: .88rem; }
.copy:hover { border-color: var(--ink); }
.related { padding: 48px 0 72px; }

/* About */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; padding: 56px 0 80px; }
.about-art { position: sticky; top: 90px; }
.socials { display: flex; gap: 10px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid currentColor; text-decoration: none; }
.socials a:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.socials.big { margin-top: 24px; }
.empty-page { text-align: center; padding: 60px 0 90px; }
.empty-page img { margin: 0 auto 16px; }

/* Footer */
.site-footer { background: var(--black); color: var(--white); padding-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid #2a2a2a; }
.footer-brand img { height: 64px; width: auto; }
.footer-brand p { margin: 6px 0 0; color: #cfcfcf; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-nav a { text-decoration: none; font-weight: 700; color: #e6e6e6; }
.footer-nav a:hover { color: #ff7a7a; }
.footer-base { padding: 18px 0 28px; color: #9a9a9a; font-size: .88rem; }

/* Responsive */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .feature-card { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .pillars { display: none; }
  .brand img { height: 60px; }
  .masthead-inner { justify-content: center; padding: 10px 0 8px; }
  .navbar-inner { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 10px; }
  .mainnav { justify-content: space-between; }
  .mainnav a { padding: 13px 8px 11px; }
  .searchbox { width: 100%; }
  .navbar { position: static; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 32px; gap: 20px; }
  .hero-art { max-width: 250px; margin: 0 auto; order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .pillar-strip { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 20px; }
  .about-art { position: static; max-width: 300px; margin: 0 auto; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .about-teaser { flex-direction: column; align-items: flex-start; }
  .feature-copy { padding: 20px; }
  .embed-social { height: 560px; }
  .mainnav { justify-content: space-between; gap: 0; }
  .mainnav a[href="/"] { display: none; }
  .mainnav a { font-size: .9rem; padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Coming soon + empty states */
.empty .tab-label { margin: 0; }
.empty p:not(.tab-label) { font-weight: 600; }
.band-dark .empty .tab-label { background: #232323; color: var(--white); }
.coming-soon { margin-top: 44px; margin-bottom: 8px; }
.cs-card { display: flex; align-items: center; gap: 36px; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 36px 40px; background: var(--paper-2); }
.cs-card img { flex: none; width: 180px; height: 180px; }
.cs-card h2 { margin-bottom: .35em; }
.cs-card p:not(.tab-label) { color: var(--ink-2); font-size: 1.08rem; max-width: 38em; }
.cs-card .listen .pill { color: var(--ink); }
.cs-card .listen .pill:hover { color: var(--white); }

/* Events */
.events-block { padding-top: 44px; }
.events { display: grid; gap: 14px; }
.event { border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--white); transition: border-color .15s, transform .15s, box-shadow .15s; }
.event:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.event-link { display: flex; gap: 20px; align-items: flex-start; padding: 18px 20px; text-decoration: none; color: var(--ink); }
.event-date { flex: none; width: 68px; border: 2px solid var(--black); border-radius: 12px; overflow: hidden; text-align: center; background: var(--white); }
.event-date span { display: block; background: var(--red); color: var(--white); font-family: var(--hand); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; padding: 3px 0 1px; }
.event-date strong { display: block; font-size: 1.75rem; font-weight: 900; line-height: 1.3; padding: 2px 0 4px; }
.event-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.event-body h3 { margin: 0; font-size: 1.18rem; }
.event:hover h3 { color: var(--red); }
.event-role { margin: 0; font-weight: 800; color: var(--blue); font-size: .92rem; }
.event-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 14px 0 0; padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper-2); }
.event-facts dt { font-family: var(--hand); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: var(--muted); }
.event-facts dd { margin: 0; font-weight: 800; }
.about-events { margin-top: 32px; }
.past-label { margin-top: 36px; }
.listing > .tab-label { margin-bottom: 16px; }

@media (max-width: 560px) {
  .cs-card { flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px 20px; }
  .cs-card img { width: 120px; height: 120px; }
  .event-link { gap: 14px; padding: 14px; }
  .event-date { width: 58px; }
}
.speaking-tag, .attending-tag { display: inline-block; font-family: var(--hand); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; border-radius: 6px; padding: .05em .5em 0; margin-right: 8px; vertical-align: 1px; }
.speaking-tag { background: var(--red); color: var(--white); }
.attending-tag { background: var(--tab); color: var(--ink); }
