/*
 * Speaking page styles
 */

/* Base .page-hero (layout, dark backdrop, header offset) now lives in
 * components.css so every inner page gets it. This file adds only the
 * Speaking-specific gradient + decorative treatment. */

.page-hero--speaking {
  background: linear-gradient(135deg, var(--color-prussian) 0%, var(--color-purple-dark) 100%);
}

.page-hero--speaking::before {
  content: '';
  position: absolute;
  right: -10%;
  top: -20%;
  width: 60%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(29, 173, 173, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* Hero layout (.page-hero__grid / --has-image / __media / __image) now lives in
 * components.css so every inner-page hero can use it. */

/* ── Talks full grid ──────────────────────────────────────────────── */

.talks-full-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

/* Optional intro copy between the Topics heading and the first card. Matches the
   card column width so it reads as part of the same stack. */
.talks-intro {
  max-width: var(--container-narrow);
  margin: 0 auto var(--space-10);
  text-align: center;
}

/* The talks list carries the full section gap up top, but only half below — the
   long single column already leaves the page feeling airy at the foot. Derived
   from --section-gap so it tracks the site's responsive section padding. */
.talks-section {
  padding-bottom: calc(var(--section-gap) / 2);
}

/* 1-up column of full-detail cards, centered and capped at the narrow container
   width for readable line length; collapses to full width on smaller screens. */
.talks-grid {
  display: grid;
  grid-template-columns: min(var(--container-narrow), 100%);
  justify-content: center;
  gap: var(--space-10);
}

.talk-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  /* Accent defaults (overridden by the per-talk modifier classes below). */
  --accent: var(--color-verdigris);
  --accent-text: var(--accent);
  /* Fill the grid track. Without an explicit width the card sizes to its
     title's max-content and overflows tracks narrower than that (e.g. mobile);
     min-width:0 lets it shrink, width:100% makes it fill. */
  width: 100%;
  min-width: 0;
  padding: var(--space-10) var(--space-8) var(--space-8);
  border-radius: var(--radius-xl);
  color: var(--color-white);
  background: linear-gradient(150deg, var(--color-prussian) 0%, var(--color-purple-dark) 100%);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  /* Each panel is a deep-link target (id="talk-<ID>"), e.g. from the homepage
     Featured Talks "View more" links. Offset the fixed header so the native
     fragment jump lands the card below it instead of tucked underneath. */
  scroll-margin-top: calc(var(--header-height) + var(--space-6));
}

.talk-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 48, 73, 0.28);
}

/* Accent color per talk — drives the topic label, divider, and icon.
   --accent styles the divider bar and icon (graphics, WCAG 3:1 threshold).
   --accent-text styles the small tag label (text, needs 4.5:1 on the dark
   card); it defaults to --accent, but poppy is too low-contrast as small
   text on this ground, so the poppy panel uses a lighter tint for the tag. */
.talk-panel--verdigris { --accent: var(--color-verdigris); --accent-text: var(--accent); }
.talk-panel--wisteria  { --accent: var(--color-wisteria);  --accent-text: var(--accent); }
.talk-panel--poppy     { --accent: var(--color-poppy);     --accent-text: var(--color-poppy-light); }

.talk-panel__icon {
  position: absolute;
  top: var(--space-8);
  right: var(--space-8);
  width: 42px;
  height: 42px;
  color: var(--accent);
}

.talk-panel__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Keep the title clear of a corner icon. */
.talk-panel:has(.talk-panel__icon) .talk-panel__title {
  padding-right: 48px;
}

.talk-panel__tag {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.talk-panel__bar {
  width: 46px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.talk-panel__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--text-2xl);
  line-height: 1.15;
  color: var(--color-white);
  margin: 0;
}

.talk-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.talk-chip {
  font-size: var(--text-xs);
  padding: 0.32em 0.85em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.talk-panel__cta {
  margin-top: auto;
  padding-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Solid light button reads best on the dark card. */
.talk-panel__book {
  background-color: var(--color-white);
  border-color: var(--color-white);
  color: var(--color-prussian);
}

.talk-panel__book:hover {
  background-color: var(--color-off-white);
  border-color: var(--color-off-white);
  color: var(--color-prussian);
}

/* The conference-logo marquee reuses the shared .logo-ticker styles
   (animations.css) and .logo-item styles (components.css); no page-specific
   rules are needed here beyond the section-header spacing above. */

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .talk-panel {
    padding: var(--space-8) var(--space-6) var(--space-6);
  }
}

/* ══ Full-detail card content (description, video, resources) ══ */

.talk-panel__full {
  margin: var(--space-1) 0 var(--space-2);
}

/* The body copy sits on the dark card, so lighten the theme's entry-content. */
.talk-panel__full,
.talk-panel__full p,
.talk-panel__full li {
  color: rgba(255, 255, 255, 0.82);
}

.talk-panel__full :is(h2, h3, h4) {
  color: #fff;
}

.talk-panel__full a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.talk-panel__full :is(h2, h3, h4) {
  margin-top: var(--space-5);
}

/* ── Video embed ── */
.talk-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.talk-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Resources list ── */
.talk-resources__title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 var(--space-2);
}

.talk-resources__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.talk-resources__list a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: var(--text-sm);
}
