/* ===========================================================================
   ARC Webinar Archive — Interstellar Performance Labs
   Palette + type sampled from iplabs.space
   =========================================================================== */

:root {
  /* Brand palette */
  --cream:      #F4EDE6;
  --cream-deep: #EBE1D6;
  --paper:      #FBF7F3;
  --ink:        #111D21;
  --ink-soft:   #1B2C31;
  --brown:      #603D30;
  --rust:       #A6542E;
  --orange:     #E95C30;
  --sage:       #C8D1CB;
  --khaki:      #AFA78C;
  --teal:       #325A5A;

  /* Roles */
  --bg:         var(--cream);
  --surface:    var(--paper);
  --text:       var(--ink);
  --text-muted: #5A6A6E;
  --line:       rgba(17, 29, 33, 0.12);
  --line-soft:  rgba(17, 29, 33, 0.07);
  --accent:     var(--rust);

  /* Type */
  --font-display: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --font-label:   "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --font-script:  "Sacramento", "Brush Script MT", cursive;

  --shell: 1180px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  color-scheme: light;
}

/* --- Reset ------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* --- Shared bits -------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 0;
}

.script { font-family: var(--font-script); font-weight: 400; }

.btn {
  display: inline-block;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 30px;
  border: 1px solid currentColor;
  background: none;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.btn--light { color: var(--cream); }
.btn--light:hover { background: var(--cream); color: var(--ink); }
.btn--dark { color: var(--ink); }
.btn--dark:hover { background: var(--ink); color: var(--cream); }
.btn--solid {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--cream);
}
.btn--solid:hover { background: var(--ink); border-color: var(--ink); }

/* --- Top bar ------------------------------------------------------------ */

.topbar {
  background: var(--ink);
  color: var(--cream);
  position: relative;
  z-index: 20;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding-block: 14px;
}
.brand {
  text-decoration: none;
  display: block;
  line-height: 1.1;
}
.brand img { max-height: 40px; width: auto; }
.brand__mark {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.brand__sub {
  display: block;
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--khaki);
  margin-top: 3px;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.topnav a {
  text-decoration: none;
  opacity: 0.82;
  transition: opacity 0.25s var(--ease);
}
.topnav a:hover { opacity: 1; }
.topnav a[aria-current="page"] {
  opacity: 1;
  border-bottom: 1px solid var(--rust);
  padding-bottom: 4px;
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(64px, 11vw, 124px) clamp(72px, 12vw, 136px);
  position: relative;
  overflow: hidden;
}
/* soft orbital arc, drawn in CSS — no image assets required */
.hero::after {
  content: "";
  position: absolute;
  width: 640px;
  height: 640px;
  right: -190px;
  top: -190px;
  border: 1px solid rgba(244, 237, 230, 0.13);
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -60px;
  top: 40px;
  border: 1px solid rgba(166, 84, 46, 0.35);
  border-radius: 50%;
  pointer-events: none;
}
.hero .shell { position: relative; z-index: 1; }
.hero__eyebrow { color: var(--khaki); }
.hero h1 {
  font-size: clamp(42px, 7.2vw, 74px);
  margin: 22px 0 0;
  max-width: 15ch;
}
.hero h1 .script {
  font-size: 1.22em;
  color: var(--orange);
  line-height: 0.9;
}
.hero__lede {
  max-width: 54ch;
  margin-top: 26px;
  color: rgba(244, 237, 230, 0.78);
  font-size: 17px;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 46px;
  margin: 44px 0 0;
  padding-top: 28px;
  border-top: 1px solid rgba(244, 237, 230, 0.16);
}
.hero__meta div { min-width: 0; }
.hero__meta dt {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--khaki);
}
.hero__meta dd {
  margin: 7px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
}

/* --- Toolbar ------------------------------------------------------------ */

.library { padding-block: clamp(52px, 7vw, 84px) clamp(64px, 9vw, 104px); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 44px;
}
.search {
  position: relative;
  flex: 1 1 260px;
  max-width: 340px;
}
.search input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 14px 12px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.search input::placeholder { color: var(--text-muted); }
.search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  opacity: 0.5;
  pointer-events: none;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.section-label {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* --- Thumbnail (shared by featured + cards) ----------------------------- */

.thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  aspect-ratio: 16 / 9;
  background: var(--ink-soft);
  overflow: hidden;
  cursor: pointer;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease);
  opacity: 0;
}
.thumb img.is-loaded { opacity: 1; }
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,29,33,0) 45%, rgba(17,29,33,0.55) 100%);
  transition: background 0.4s var(--ease);
}
.thumb:hover img { transform: scale(1.04); }

.thumb__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(244, 237, 230, 0.92);
  display: grid;
  place-items: center;
  z-index: 2;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease);
}
.thumb__play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 15px solid var(--ink);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  transition: border-left-color 0.35s var(--ease);
}
.thumb:hover .thumb__play {
  transform: translate(-50%, -50%) scale(1.09);
  background: var(--orange);
}
.thumb:hover .thumb__play::before { border-left-color: var(--cream); }

.thumb__duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(17, 29, 33, 0.72);
  padding: 5px 9px;
  border-radius: 2px;
}

/* --- Featured ----------------------------------------------------------- */

.featured {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  margin-bottom: 64px;
}
.featured__body {
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured__badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--rust);
  padding: 6px 12px;
  margin-bottom: 20px;
}
.featured__date {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.featured h3 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 12px 0 16px;
}
.featured p { color: var(--text-muted); font-size: 15.5px; }
.featured .btn { align-self: flex-start; margin-top: 28px; }

/* --- Grid --------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 44px 34px;
}

.card { display: flex; flex-direction: column; }
.card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 9px;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.card__meta span:not(:first-child)::before {
  content: "·";
  margin-right: 10px;
}
.card h3 {
  font-size: 21px;
  line-height: 1.25;
}
.card h3 button {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: color 0.25s var(--ease);
}
.card h3 button:hover { color: var(--rust); }
.card p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
}
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}
.tag {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(50, 90, 90, 0.3);
  border-radius: 999px;
  padding: 4px 11px;
}

.empty {
  text-align: center;
  padding: 72px 20px;
  color: var(--text-muted);
  border: 1px dashed var(--line);
}
.empty strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 8px;
}

/* --- CTA + footer ------------------------------------------------------- */

.cta {
  background: var(--sage);
  padding-block: clamp(56px, 8vw, 88px);
  text-align: center;
}
.cta h2 {
  font-size: clamp(28px, 4.2vw, 42px);
  max-width: 20ch;
  margin-inline: auto;
}
.cta h2 .script { color: var(--rust); font-size: 1.22em; }
.cta p {
  max-width: 50ch;
  margin: 18px auto 0;
  color: var(--brown);
}
.cta .btn { margin-top: 32px; }

.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding-block: 48px;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244, 237, 230, 0.65);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--cream); }
.site-footer nav { display: flex; gap: 26px; flex-wrap: wrap; }

/* --- Modal player ------------------------------------------------------- */

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 29, 33, 0.93);
  animation: fade 0.25s var(--ease);
}
@keyframes fade { from { opacity: 0; } }

.modal__box {
  width: min(1040px, 100%);
  max-height: 100%;
  overflow-y: auto;
}
.modal__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.modal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.modal__info { padding: 22px 2px 0; color: var(--cream); }
.modal__info .card__meta { color: var(--khaki); margin-top: 0; }
.modal__info h2 { font-size: clamp(22px, 3vw, 30px); }
.modal__info p {
  margin-top: 10px;
  color: rgba(244, 237, 230, 0.72);
  font-size: 15px;
  max-width: 78ch;
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 210;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(244, 237, 230, 0.4);
  border-radius: 50%;
  background: none;
  color: var(--cream);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.25s var(--ease);
}
.modal__close:hover { background: var(--rust); border-color: var(--rust); }

body.is-locked { overflow: hidden; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
  .brand__sub { letter-spacing: 0.24em; }
}

@media (max-width: 680px) {
  .topbar__inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .topnav { gap: 18px; font-size: 10px; letter-spacing: 0.18em; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .search { max-width: none; }
  .hero__meta { gap: 22px 32px; }
  .featured__date { letter-spacing: 0.16em; font-size: 10px; }
  .card__meta { letter-spacing: 0.16em; }
  .modal { padding: 12px; }
  .modal__close { top: 8px; right: 8px; }
}

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