/* ==========================================================================
   Home Page — Countdown, features grid, speaker preview, venue highlight
   ========================================================================== */

/* ── Deadline extension banner ── */
/* Note: .page-wrapper already has padding-top:70px to clear the fixed header,
   so the banner needs no extra top offset — it sits flush under the nav. */
.deadline-banner {
  background: linear-gradient(135deg, #E7C063 0%, var(--color-accent-gold) 55%, var(--color-accent-warm) 100%);
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(11, 61, 107, 0.12);
}

.deadline-banner-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  text-align: center;
}

.deadline-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-white);
  background: var(--color-primary);
  border-radius: var(--radius-full);
  white-space: nowrap;
  animation: deadline-pulse 2.4s ease-in-out infinite;
}

.deadline-banner-badge svg {
  flex-shrink: 0;
}

.deadline-banner-text {
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
}

.deadline-banner-text strong {
  font-weight: var(--fw-extrabold);
  white-space: nowrap;
}

.deadline-banner-link {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--color-primary-dark);
  text-decoration: none;
  border-bottom: 2px solid rgba(11, 61, 107, 0.45);
  padding-bottom: 1px;
  white-space: nowrap;
  transition: border-color var(--transition-fast), opacity var(--transition-fast);
}

.deadline-banner-link:hover {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary-dark);
  text-decoration: none;
}

@keyframes deadline-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(11, 61, 107, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(11, 61, 107, 0); }
}

@media (max-width: 640px) {
  .deadline-banner-inner {
    padding: var(--space-3) var(--space-4);
  }
  .deadline-banner-text {
    font-size: var(--fs-sm);
  }
  .deadline-banner-badge {
    font-size: var(--fs-xs);
  }
}

@media (prefers-reduced-motion: reduce) {
  .deadline-banner-badge {
    animation: none;
  }
}

/* ── Countdown ── */
.countdown {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.countdown-item {
  text-align: center;
  min-width: 80px;
}

.countdown-value {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extrabold);
  line-height: 1;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  backdrop-filter: blur(4px);
}

.countdown-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: var(--space-2);
  opacity: 0.8;
}

@media (max-width: 480px) {
  .countdown {
    gap: var(--space-2);
  }
  .countdown-value {
    font-size: var(--fs-xl);
    padding: var(--space-2);
  }
  .countdown-item {
    min-width: 0;
    flex: 1;
  }
  .countdown-label {
    font-size: 0.625rem;
    letter-spacing: 0.5px;
  }
}

/* ── Key dates snapshot ── */
.key-dates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.key-date-card {
  text-align: center;
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--color-accent-gold);
  transition: transform var(--transition-base);
}

.key-date-card--abstract {
  border-top-color: var(--color-accent-green);
}

.key-date-card .track {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-accent-gold);
  margin-bottom: var(--space-2);
}

.key-date-card--abstract .track {
  color: var(--color-accent-green);
}

.key-date-card:hover {
  transform: translateY(-3px);
}

.key-date-card .date {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.key-date-card .date-old {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-mid-grey);
  text-decoration: line-through;
  text-decoration-color: var(--color-accent-warm);
  margin-bottom: 2px;
}

.key-date-card .label {
  font-size: var(--fs-sm);
  color: var(--color-dark-grey);
}

.date-extended-tag {
  display: inline-block;
  margin-top: var(--space-3);
  padding: 2px var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-accent-warm);
  background: rgba(196, 104, 60, 0.12);
  border-radius: var(--radius-full);
}

@media (max-width: 768px) {
  .key-dates-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* ── Topics / features grid ── */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
}

/* Force 3-on-top, 2-centered-below layout at wide widths */
@media (min-width: 900px) {
  .topics-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .topics-grid > .card {
    grid-column: span 2;
  }
  .topics-grid > .card:nth-child(4) {
    grid-column: 2 / span 2;
  }
  .topics-grid > .card:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

/* ── Speaker preview ── */
.speaker-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  max-width: 900px;
  margin: 0 auto;
}

.speaker-preview-card {
  text-align: center;
}

.speaker-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-light-grey), var(--color-border));
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-3xl);
  color: var(--color-mid-grey);
  overflow: hidden;
  border: 3px solid var(--color-white);
  box-shadow: var(--shadow-md);
}

.speaker-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.speaker-preview-card h4 {
  margin-bottom: var(--space-1);
  font-size: var(--fs-md);
}

.speaker-preview-card p {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* ── Venue highlight ── */
.venue-highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}

.venue-image-placeholder {
  width: 100%;
  height: 350px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: var(--fs-3xl);
  overflow: hidden;
}

.venue-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .venue-highlight {
    grid-template-columns: 1fr;
  }
  .venue-image-placeholder {
    height: 250px;
  }
}

/* ── Discover Auckland video embed ── */
.video-embed-section {
  text-align: center;
}

.video-source-note {
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.video-source-note a {
  color: var(--color-primary-light);
}

.video-embed {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-dark-grey);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Organisers grid ── */
.organisers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
  max-width: 960px;
  margin: 0 auto;
}

.organiser-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-6) var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.organiser-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.organiser-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 110px;
  margin-bottom: var(--space-6);
  padding: 0 var(--space-3);
}

.organiser-logo img {
  max-width: 240px;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.organiser-name strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.organiser-name p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: var(--lh-snug);
}

@media (max-width: 768px) {
  .organisers-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
}
