/* Refreshingly Human IT — theme styles.
   Tokens mirror the brand guide (content/brand.md). Change them here, not inline. */

:root {
  /* Color — §4 */
  --orange: #ED7A1C;   /* Signal Orange: fills, symbol, swooshes. Never text on light. */
  --ember: #A84F0A;    /* Orange for text/links on light */
  --ink: #111111;
  --charcoal: #1C1A17;
  --white: #FFFFFF;
  --paper: #FAF6F0;
  --stone: #5A544C;
  --ash: #B8B2A8;
  --sand: #E7E0D5;

  /* Type — §5 */
  --font-display: "Archivo", Arial, Helvetica, sans-serif;
  --font-body: "Inter", Arial, Helvetica, sans-serif;

  /* Shape — §6 */
  --radius: 12px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgb(17 17 17 / 6%), 0 8px 24px rgb(17 17 17 / 8%);

  --wrap: 1180px;
  --wrap-narrow: 760px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(48px, 8vw, 96px);

  /* The double underline, §6. Same artwork as /brand/rhit-double-underline.svg */
  --swoosh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23E87722' stroke-linecap='round'%3E%3Cpath d='M5,7.5 C72,2.6 160,2.8 232,5.8 C263,7.2 283,9.4 295,7.6' stroke-width='4.6'/%3E%3Cpath d='M14,16 C78,11.4 168,10.9 236,13 C262,13.8 278,15.6 288,14.5' stroke-width='3' stroke-opacity='.72'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) { body { font-size: 1.125rem; } }
img, svg { max-width: 100%; height: auto; }
a { color: var(--ember); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
}
h1 { font-weight: 800; font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.05; }
h2 { font-weight: 800; font-size: clamp(1.875rem, 4vw, 2.5rem); }
h3 { font-weight: 700; font-size: clamp(1.3rem, 2.2vw, 1.5rem); }
h2 a, h3 a { color: inherit; text-decoration: none; }
h2 a:hover, h3 a:hover { color: var(--ember); }
p { margin: 0 0 1em; }

.eyebrow {
  font: 700 .8125rem/1.3 var(--font-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 .75rem;
}
.eyebrow-accent { color: var(--ember); }
.band-ink .eyebrow { color: var(--ash); }
.band-ink .eyebrow-accent { color: var(--orange); }

.swoosh {
  background: var(--swoosh) no-repeat left 100% / 100% .3em;
  padding-bottom: .24em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.bolt { width: .7em; height: 1em; vertical-align: -.12em; flex: none; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--orange); color: var(--ink); padding: .6rem 1rem; border-radius: var(--radius-pill); font-weight: 600; }
.skip-link:focus { top: 1rem; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: var(--wrap-narrow); }
.band-ink, .band-paper, .band-white, .band-orange { padding: var(--section) 0; }
.band-ink { background: var(--ink); color: var(--ash); }
.band-ink h1, .band-ink h2, .band-ink h3 { color: var(--white); }
.band-ink a:not(.btn) { color: var(--orange); }
.band-ink a:not(.btn):hover { color: var(--white); }
.band-paper { background: var(--paper); }
.band-white { background: var(--white); }
.band-orange { background: var(--orange); color: var(--ink); }
.band-orange h2 { color: var(--ink); }
.section-pad-top-0 { padding-top: 0; }

.grid { display: grid; gap: 24px; }
@media (min-width: 700px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }

/* ---------- Header ---------- */
.site-header { background: var(--ink); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.brand img { display: block; width: 170px; }
@media (min-width: 768px) { .brand img { width: 200px; } }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { color: var(--white); text-decoration: none; font-weight: 600; font-size: 1rem; padding: 6px 0; }
.site-nav ul a:hover, .site-nav ul a[aria-current] { color: var(--orange); box-shadow: inset 0 -2px 0 var(--orange); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: var(--white); margin: 6px 0; border-radius: 2px; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] .bar:first-of-type { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:last-of-type { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; inset: 76px 0 auto; background: var(--ink); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 24px; gap: 16px; border-bottom: 1px solid rgb(255 255 255 / 10%); }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid rgb(255 255 255 / 8%); box-shadow: none !important; }
}

/* ---------- Buttons — §8 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: 600 1rem/1 var(--font-body);
  padding: .9em 1.4em;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { font-size: .9375rem; padding: .7em 1.2em; }
.btn-primary { background: var(--orange); color: var(--ink); }          /* Ink on orange: 6.7:1 */
.btn-primary:hover { background: #F39A4D; color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark .bolt { color: var(--orange); }
.btn-dark:hover { background: var(--charcoal); color: var(--orange); }
.btn-ghost { border-color: rgb(255 255 255 / 40%); color: var(--white); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn-ghost-dark { border-color: var(--ink); color: var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: var(--white); }

/* Platform buttons: on ink bands, the dark button needs to stand off the background */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.band-ink .buttons .btn-dark { background: var(--orange); color: var(--ink); }
.band-ink .buttons .btn-dark .bolt { color: var(--ink); }
.band-ink .buttons .btn-dark:hover { background: #F39A4D; }
.band-ink .buttons .btn-ghost { border-color: rgb(255 255 255 / 40%); color: var(--white); }
.band-orange .buttons .btn-ghost { border-color: var(--ink); color: var(--ink); }
.band-orange .buttons .btn-ghost:hover { background: var(--ink); color: var(--white); }
.buttons-sm .btn { font-size: .9375rem; padding: .65em 1.1em; }

.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- Cards ---------- */
.card { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius); padding: 28px; }
.card-raised { box-shadow: var(--shadow); border: 0; }
.episode-card { display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; position: relative; }
.episode-card:hover { border-color: var(--orange); box-shadow: var(--shadow); }
.episode-card h3 { margin-bottom: .35em; }
.episode-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.episode-card .ep-num { color: var(--ember); }
.episode-card .excerpt { color: var(--stone); font-size: 1rem; flex: 1; }
.guests { font-weight: 600; color: var(--charcoal); margin-bottom: .6em; }
.band-ink .guests { color: var(--white); }
.meta { font-size: .875rem; font-weight: 500; color: var(--stone); margin: 0; }
.band-ink .meta { color: var(--ash); }

/* ---------- Home ---------- */
.hero { padding: clamp(56px, 9vw, 112px) 0; overflow: hidden; }
.hero-inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.4fr 1fr; } }
.hero .lead, .page-head .lead { font-size: clamp(1.125rem, 2vw, 1.3rem); color: var(--ash); max-width: 36em; margin-bottom: 32px; }
.hero .lead p:last-child, .page-head .lead p:last-child { margin: 0; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: min(380px, 70vw); filter: drop-shadow(0 20px 60px rgb(237 122 28 / 18%)); }
@media (max-width: 899px) { .hero-art { display: none; } }

.latest { margin-top: calc(var(--section) * -0.5); position: relative; padding: clamp(28px, 5vw, 48px); border-top: 6px solid var(--orange); }
.latest h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); }
.latest p { max-width: 62ch; }

.pillars { margin-top: 40px; }
.pillar { text-align: center; padding: 8px 16px; }
.pillar p { color: var(--stone); }
.pillar-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--orange); font-size: 1.5rem; margin-bottom: 16px; }

.host { display: flex; gap: 20px; align-items: flex-start; }
.host h3 { margin-bottom: .2em; }
.host .eyebrow { color: var(--ember); margin-bottom: .75em; }
.host p:last-child { color: var(--stone); font-size: 1rem; margin: 0; }
.avatar { width: 80px; height: 80px; border-radius: 50%; flex: none; object-fit: cover; }
.avatar-initials { display: grid; place-items: center; background: var(--ink); color: var(--orange); font: 800 1.6rem var(--font-display); border: 3px solid var(--orange); }

.cta { text-align: center; }
.cta h2 { font-size: clamp(2rem, 5vw, 3rem); }
.cta p { font-size: 1.15rem; margin-bottom: 28px; }
.cta .buttons { justify-content: center; }

/* ---------- Page heads & prose ---------- */
.page-head { padding: clamp(48px, 7vw, 88px) 0; }
.page-head h1 { margin-bottom: .35em; }
.episode-head .meta { margin-bottom: 24px; }
.episode-head .buttons { margin-top: 20px; }

.prose { max-width: 68ch; }
.prose-wide { max-width: 860px; min-width: 0; }
.prose h2 { margin-top: 2em; padding-top: .25em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 1.4em; margin-bottom: .4em; }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: .6em; height: .85em; background: var(--orange);
  clip-path: polygon(40% 0, 0 48%, 42% 48%, 15% 100%, 100% 32%, 55% 32%, 83% 0);   /* the bolt */
}
.prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--orange); font-size: 1.2em; color: var(--ink); }
.prose code { background: var(--sand); padding: .1em .35em; border-radius: 4px; font-size: .88em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--sand); vertical-align: top; }
.prose th { font-family: var(--font-display); font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.prose thead:has(th:empty) { display: none; }
.prose hr { border: 0; height: 1px; background: var(--sand); margin: 2.5em 0; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; margin: 2em 0 0; }
.tags li { padding: 0 !important; margin: 0 !important; }
.tags li::before { display: none; }
.tags a { display: inline-block; padding: .3em .9em; border-radius: var(--radius-pill); background: var(--white); border: 1px solid var(--sand); color: var(--stone); font-size: .875rem; font-weight: 500; text-decoration: none; }
.tags a:hover { border-color: var(--orange); color: var(--ink); }

.video { position: relative; aspect-ratio: 16 / 9; margin-bottom: 2em; border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Player ---------- */
.player { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 20px 0; }
.player audio { width: 100%; max-width: 560px; height: 48px; accent-color: var(--orange); }
.player-dl { font-size: .875rem; font-weight: 600; }

/* ---------- Episode prev/next ---------- */
.ep-nav { display: grid; gap: 16px; }
@media (min-width: 700px) { .ep-nav { grid-template-columns: 1fr 1fr; } }
.ep-nav-link { text-decoration: none; color: var(--ink); display: block; }
.ep-nav-link:hover { border-color: var(--orange); }
.ep-nav-link strong { font-family: var(--font-display); font-size: 1.2rem; display: block; }
.ep-nav-next { text-align: right; }
.pager { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 40px; color: var(--stone); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--ash); padding: 64px 0 24px; }
.footer-inner { display: grid; gap: 40px; }
@media (min-width: 800px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand img { width: 200px; margin-bottom: 12px; }
.site-footer .eyebrow { color: var(--white); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a, .footer-legal a { color: var(--ash); text-decoration: none; }
.footer-links a:hover, .footer-legal a:hover { color: var(--orange); }
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / 10%); font-size: .875rem; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-legal p { margin: 0; }

/* ---------- Brand guide page ---------- */
.brand-layout { display: grid; gap: 40px; }
@media (min-width: 1000px) { .brand-layout { grid-template-columns: 220px 1fr; } }
.brand-toc { font-size: .95rem; }
@media (min-width: 1000px) { .brand-toc { position: sticky; top: 100px; align-self: start; } }
.brand-toc ul { list-style: none; padding: 0; margin: 0; }
.brand-toc ul ul { display: none; }
.brand-toc a { display: block; padding: 6px 0 6px 12px; color: var(--stone); text-decoration: none; border-left: 2px solid var(--sand); }
.brand-toc a:hover { color: var(--ink); border-left-color: var(--orange); }
@media (max-width: 999px) { .brand-toc ul { display: flex; flex-wrap: wrap; gap: 4px 16px; } .brand-toc a { border: 0; padding: 4px 0; } }
.prose-wide > h2:first-child { margin-top: 0; }

.dodont { display: grid; gap: 16px; margin: 1.5em 0; }
@media (min-width: 700px) { .dodont { grid-template-columns: 1fr 1fr; } }
.dd { background: var(--white); border-radius: var(--radius); padding: 20px 24px; border-top: 5px solid; }
.dd-do { border-color: #2E7D4F; }
.dd-do .eyebrow { color: #2E7D4F; }
.dd-dont { border-color: #B3261E; }
.dd-dont .eyebrow { color: #B3261E; }
.dd-dont ul li::before { background: #B3261E; clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); width: .6em; height: .6em; top: .55em; }
.dd ul { margin: 0; }

.logo-grid { display: grid; gap: 20px; margin: 1.5em 0; }
@media (min-width: 700px) { .logo-grid { grid-template-columns: 1fr 1fr; } }
.logo-tile { margin: 0; background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius); overflow: hidden; }
.logo-stage { aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 24px; }
.logo-stage img { max-height: 100%; width: auto; max-width: 85%; }
.logo-stage-light { background: var(--white); border-bottom: 1px solid var(--sand); }
.logo-stage-dark { background: var(--ink); }
.logo-tile figcaption { padding: 16px 20px; font-size: .95rem; display: grid; gap: 4px; }
.logo-tile figcaption span { color: var(--stone); }
.logo-tile .files { font-size: .85rem; font-weight: 600; }

.swatches { display: grid; gap: 16px; margin: 1.5em 0; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.swatch { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius); overflow: hidden; }
.swatch-chip { height: 110px; display: flex; align-items: flex-end; padding: 12px 16px; font: 800 1.6rem var(--font-display); border-bottom: 1px solid var(--sand); }
.swatch-info { padding: 14px 16px; font-size: .9rem; }
.swatch-info strong { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }
.swatch-info .rgb { color: var(--stone); font-size: .8rem; }
.swatch-info p { margin: 6px 0 0; color: var(--stone); }

.type-specimen { display: grid; gap: 16px; margin: 1.5em 0; }
.specimen-display { font: 800 clamp(2rem, 5vw, 3.25rem)/1.05 var(--font-display); letter-spacing: -0.02em; color: var(--ink); margin: 0; }
.specimen-body { margin: 0; max-width: 60ch; }

.components { display: grid; gap: 16px; margin: 1.5em 0; }
.component-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 24px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--sand); }
.component-row .eyebrow { flex-basis: 100%; margin: 0; }
.component-row.band-ink { border: 0; }
.component-card { width: 100%; max-width: 380px; }
.components .tags { margin: 0; }

.prose .bad { text-decoration: line-through; text-decoration-color: #B3261E; }
.note { font-size: .9rem; color: var(--stone); background: var(--white); border-left: 4px solid var(--orange); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Transcript ---------- */
.transcript { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius); padding: 16px 20px; }
.transcript summary { cursor: pointer; font-weight: 600; color: var(--ember); }
.transcript[open] summary { margin-bottom: 1em; }
.episode-head .video { margin: 8px 0 20px; }
.latest .video { margin: 20px 0; }
.prose .hosts { grid-template-columns: 1fr; gap: 12px; }
.prose .host { padding: 20px; }
.prose .host .avatar { width: 64px; height: 64px; font-size: 1.3rem; }
.prose .host h3 { margin-top: 0; }

/* Pre-release preview banner */
.preview-banner { background: var(--orange); color: var(--ink); font-size: 0.9375rem; padding: 0.75rem 0; text-align: center; }
.preview-banner strong { font-family: var(--font-display); letter-spacing: 0.02em; }
