/* =========================================
   Responsive component tweaks only
   Layout/nav/grid/hero structure now lives
   in layout.css and styles.css
========================================= */

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hero-stage {
    aspect-ratio: 16 / 10;
  }

  .hero-title {
    font-size: clamp(1.7rem, 4.3vw, 2rem);
  }
}

@media (max-width: 900px) {
  .brand-logo {
    width: clamp(220px, 42vw, 320px);
    max-width: 100%;
    height: auto;
    max-height: 72px;
    object-fit: contain;
  }

  .track {
    padding: 1rem 1.25rem;
  }

  .grid.team .card {
    max-width: 300px;
  }

  .avatar {
    width: 220px;
    height: 220px;
  }

  .person-name {
    font-size: 1.55rem;
  }

  .person-role {
    font-size: 1.2rem;
  }

  .cta {
    padding: 1.25rem;
  }
}

@media (max-width: 880px) {
  .hero {
    gap: 1.5rem;
    padding-top: 1.25rem;
  }

  .hero-stage {
    aspect-ratio: 16 / 9;
  }

  .hero-copy {
    width: min(100%, calc(100% - 1.5rem));
    margin: 1.25rem auto 0;
    padding: 1.1rem 1rem 0;
    gap: 1.8rem;
    text-align: center;
  }

  .hero-title {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 0;
    font-size: clamp(2rem, 7vw, 2.2rem);
    line-height: 1.02;
    letter-spacing: 0.02em;
  }

  .hero-title span {
    display: block;
    padding: 0;
    text-wrap: balance;
  }

  .hero-title span + span {
    border-left: 0;
  }

  .hero-title span:not(:last-child)::after {
    content: "";
    display: block;
    width: 56px;
    height: 1px;
    margin: 0.5rem auto 0;
    background: linear-gradient(
      90deg,
      rgba(244, 231, 186, 0),
      rgba(244, 231, 186, 0.85),
      rgba(244, 231, 186, 0)
    );
  }

  .hero-title span:nth-child(1),
  .hero-title span:nth-child(2) {
    color: var(--text);
  }

  .hero-title span:nth-child(3) {
    /* color: #f4e7ba; */
    color: #e5eaf5;
    font-size: 0.92em;
    letter-spacing: 0.03em;
  }

  .hero-subtitle {
    width: min(34rem, 100%);
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.65;
    color: #e5eaf5;
    font-family: "Raleway", sans-serif;
    text-wrap: pretty;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 680px) {
  .brand-logo {
    width: clamp(180px, 52vw, 260px);
    max-height: 76px;
  }

  .grid.team .card {
    max-width: 100%;
  }

  .avatar {
    width: min(100%, 240px);
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .person-name {
    font-size: 1.45rem;
  }

  .person-role {
    font-size: 1.1rem;
  }

  .track {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
  }

  .track button {
    width: 100%;
    justify-content: center;
  }

  .track .title {
    font-size: 1.02rem;
  }

  .track-meta {
    grid-template-columns: 1fr;
  }

  .event {
    grid-template-columns: 70px 1fr;
    align-items: start;
  }

  .event-actions {
    grid-column: 1 / -1;
  }

  .event-actions .btn {
    flex: 1 1 auto;
  }

  .card {
    padding: 1rem;
  }

  .cta {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-actions .btn,
  .cta-actions .btn-ghost {
    width: 100%;
  }

  .hero-slide img {
    object-position: var(--fx-mobile, var(--fx, 50%)) var(--fy-mobile, var(--fy, 50%));
  }

  .hero-slide.is-active img {
    transform: scale(1.01);
  }
}

@media (max-width: 560px) {
  .hero-copy {
    padding: 0.85rem 0.35rem 0;
    gap: 1.8rem;
  }

  .hero-title {
    font-size: clamp(1.7rem, 8.4vw, 1.8rem);
    gap: 0.6rem;
  }

  .hero-title span:not(:last-child)::after {
    width: 44px;
    margin-top: 0.42rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.58;
  }
}

/* ---------- Small phones ---------- */
@media (max-width: 420px) {
  .brand-logo {
    width: clamp(150px, 56vw, 220px);
    max-height: 64px;
  }

  .person-name {
    font-size: 1.3rem;
  }

  .person-role {
    font-size: 1rem;
  }

  .btn,
  .btn-ghost,
  .btn-small,
  .person-bio-btn {
    font-size: 0.9rem;
  }

  .card {
    padding: 0.9rem;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: clamp(1.5rem, 8.8vw, 1.6rem);
  }

  .hero-subtitle {
    font-size: 0.92rem;
    line-height: 1.52;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title span,
  .hero-subtitle {
    opacity: 1;
    animation: none;
    filter: none;
    transform: none;
  }
}

/* Scroll to the top button */

.scroll-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 110;
  width: 54px;
  height: 54px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(97 123 235 / 92%);
  color: var(--text);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(46, 229, 157, 0.45);
}

.scroll-top:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

@media (max-width: 680px) {
  .scroll-top {
    right: 0.75rem;
    bottom: 0.75rem;
    width: 44px;
    height: 44px;
  }
}