/* Home page (lib/home.js): a talks platform. Sapyense's own brand: orange #ff5f2d, Manrope, 12px corners.
   The stage and "In their words" are dark in both themes; the rest follows the theme's light/dark scheme. */
.sp-home {
  /* the site's dark grey: Slate (design/grey-options.html, option 4) */
  --sp-dark: #2f3640;
  --sp-dark-rgb: 47, 54, 64;
  --sp-orange: #ff5f2d;
  --sp-orange-deep: #e84a19;
  --sp-ink: #16181d;
  --sp-muted: #67717a;
  --sp-card: var(--cs-color-layout-elements-background, #fff);
  --sp-line: rgba(22, 24, 29, 0.08);
  --sp-radius: var(--cs-layout-elements-border-radius, 12px);
  --sp-font: var(--cs-font-headings-family, 'Manrope'), system-ui, sans-serif;
  font-family: var(--sp-font);
  color: var(--sp-ink);
}
[data-scheme="dark"] .sp-home { --sp-ink: #f3f4f6; --sp-muted: #a3a9b0; --sp-card: #191919; --sp-line: rgba(255, 255, 255, 0.09); }
.sp-home a { color: inherit; text-decoration: none; }
.sp-home svg { width: 1em; height: 1em; flex: none; }
.sp-home button { font-family: var(--sp-font); }
.sp-home .cs-container { box-sizing: border-box; }

.sp-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sp-orange); }
.sp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sp-orange); animation: sp-pulse 2s infinite; }
@keyframes sp-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 95, 45, 0.6); } 70% { box-shadow: 0 0 0 10px rgba(255, 95, 45, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 95, 45, 0); } }

/* ---------- buttons ---------- */
.sp-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 24px; border: 0; border-radius: 999px; font: 700 15px/1 var(--sp-font); cursor: pointer; transition: background-color .2s, transform .2s; }
.sp-btn:hover { transform: translateY(-1px); }
.sp-home :focus-visible { outline: 3px solid var(--sp-orange); outline-offset: 3px; }
.sp-home .sp-btn-primary { background: var(--sp-orange); color: #fff; }
.sp-btn-primary:hover { background: var(--sp-orange-deep); }
.sp-home .sp-btn-ghost { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.sp-btn-ghost:hover { background: rgba(255, 255, 255, 0.2); }
.sp-home .sp-btn-light { background: var(--sp-orange); color: #fff; }
.sp-home .sp-btn-light:hover { background: var(--sp-orange-deep); }

/* ---------- stage: the featured talk fills it; a short headline and two buttons sit low on the left ---------- */
.sp-home-stage { position: relative; isolation: isolate; overflow: hidden; min-height: min(86vh, 760px); display: flex; align-items: flex-end; background: var(--sp-dark); color: #fff; }
.sp-stage-media, .sp-stage-shade { position: absolute; inset: 0; }
.sp-stage-media { z-index: -2; }
.sp-stage-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; }
.sp-stage-clip { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity .6s; }
.sp-clip-layer { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity .4s; }
.sp-clip-layer.is-active { opacity: 1; }
/* once the clip plays, the thumbnail is gone for good (no flash of it when the loop seeks back) */
.sp-home-stage.is-playing .sp-stage-media img { visibility: hidden; }
.sp-stage-clip.is-on { opacity: 1; }
/* enlarged and nudged down so YouTube's bars and the clip's burned-in subtitles fall outside the stage */
.sp-stage-clip iframe { position: absolute; top: 50%; left: 50%; width: 177.78vh; min-width: 100%; height: 56.25vw; min-height: 100%; transform: translate(-50%, -42%) scale(1.4); border: 0; pointer-events: none; }
/* a fade from left to right: dark behind the words on the left, clear on the speaker towards the
   right, with an orange glow in the bottom-left corner */
.sp-stage-shade { z-index: -1; background:
  radial-gradient(ellipse 50% 60% at 0% 100%, rgba(255, 95, 45, 0.35), transparent 75%),
  linear-gradient(90deg, rgba(var(--sp-dark-rgb), 0.85) 0%, rgba(var(--sp-dark-rgb), 0.6) 30%, rgba(var(--sp-dark-rgb), 0.2) 60%, transparent 85%); }
.sp-stage-inner { width: 100%; padding-top: 120px; padding-bottom: clamp(40px, 6vw, 72px); }
.sp-stage-title { max-width: 640px; margin: 0 0 26px; font: 800 clamp(32px, 4vw, 56px)/1.05 var(--sp-font); letter-spacing: -0.03em; color: #fff; text-shadow: 0 2px 28px rgba(0, 0, 0, 0.5); }
.sp-stage-title em { font-style: normal; color: #fff; text-decoration: underline; text-decoration-color: var(--sp-orange); text-decoration-thickness: 0.09em; text-underline-offset: 0.14em; text-decoration-skip-ink: none; }
.sp-stage-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.sp-stage-now { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.82); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6); }
.sp-stage-now strong { font-weight: 800; color: #fff; }

/* ---------- sections ---------- */
.sp-home-section { padding-top: 88px; padding-bottom: 24px; }
.sp-section-head { margin-bottom: 36px; }
.sp-section-title { max-width: 760px; margin: 0; font: 800 clamp(28px, 3.4vw, 44px)/1.08 var(--sp-font); letter-spacing: -0.02em; color: var(--sp-ink); }

/* ---------- speakers ---------- */
.sp-speakers { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 32px; }
.sp-home .sp-speaker { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; height: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; text-align: left; text-transform: none; letter-spacing: normal; cursor: pointer; }
.sp-speaker-media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--sp-radius); background: #1c1e23; }
.sp-speaker-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.sp-speaker:hover .sp-speaker-media img { transform: scale(1.05); }
.sp-speaker-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent 55%); }
.sp-speaker-play { position: absolute; z-index: 1; left: 50%; top: 50%; display: grid; place-items: center; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: var(--sp-orange); color: #fff; font-size: 28px; box-shadow: 0 10px 30px rgba(255, 95, 45, 0.45); transition: transform .25s; }
.sp-speaker:hover .sp-speaker-play { transform: scale(1.12); }
.sp-speaker-body { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; }
.sp-speaker-name { font: 800 clamp(22px, 2vw, 26px)/1.15 var(--sp-font); letter-spacing: -0.01em; color: var(--sp-ink); }
.sp-speaker-talk { font-size: 16px; line-height: 1.45; color: var(--sp-muted); }
.sp-speaker-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--sp-orange); }
.sp-speaker:hover .sp-speaker-name { color: var(--sp-orange); }

/* ---------- in their words ---------- */
.sp-home-words { margin-top: 88px; padding: 80px 0 88px; background: var(--sp-dark); color: #fff; }
.sp-home-words .sp-section-title { color: #fff; }
.sp-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; }
.sp-quote { position: relative; margin: 0; padding-top: 52px; }
.sp-quote::before { content: "\201C"; position: absolute; top: -20px; left: -6px; font: 800 110px/1 var(--sp-font); color: var(--sp-orange); }
.sp-quote blockquote { margin: 0 0 24px; padding: 0; border: 0; }
.sp-quote blockquote p { margin: 0; font: 700 clamp(21px, 2vw, 27px)/1.4 var(--sp-font); color: #fff; }
.sp-quote figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.sp-quote-who { font-size: 15px; font-weight: 800; color: rgba(255, 255, 255, 0.85); }
.sp-quote-watch { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 999px; background: rgba(255, 95, 45, 0.16); color: var(--sp-orange); font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color .2s; }
.sp-quote-watch:hover { background: rgba(255, 95, 45, 0.28); }

/* ---------- format ---------- */
.sp-format { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-bottom: 96px; }
.sp-format-item { padding-top: 22px; border-top: 2px solid var(--sp-ink); }
.sp-format-num { display: block; margin-bottom: 18px; font: 800 14px/1 var(--sp-font); color: var(--sp-orange); }
.sp-format-item h3 { margin: 0 0 10px; font: 800 22px/1.2 var(--sp-font); color: var(--sp-ink); }
.sp-format-item p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--sp-muted); }

/* ---------- YouTube band ---------- */
.sp-channel-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 48px; padding-bottom: 48px; }
.sp-channel-title { margin: 0 0 6px; font: 800 clamp(26px, 3vw, 38px)/1.1 var(--sp-font); color: #fff; }
.sp-channel-text { margin: 0; font-size: 16px; color: rgba(255, 255, 255, 0.72); }

@media (max-width: 767px) {
  .sp-home-stage { min-height: 78vh; }
  .sp-stage-shade { background:
    radial-gradient(ellipse 90% 55% at 0% 100%, rgba(255, 95, 45, 0.35), transparent 75%),
    linear-gradient(90deg, rgba(var(--sp-dark-rgb), 0.55) 0%, transparent 100%),
    linear-gradient(0deg, rgba(var(--sp-dark-rgb), 0.75) 0%, transparent 55%); }
  .sp-stage-actions .sp-btn { flex: 1 1 auto; justify-content: center; }
  .sp-home-section { padding-top: 64px; }
  .sp-speakers, .sp-quotes, .sp-format { grid-template-columns: 1fr; }
  .sp-home-words { margin-top: 64px; padding: 56px 0 64px; }
  .sp-channel-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-dot { animation: none; }
  .sp-home * { transition: none !important; }
}
