.back-to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 14px 30px -14px rgba(11, 28, 56, 0.7);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, background 0.3s;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.back-to-top:hover {
  background: var(--orange);
}

.back-to-top .icon {
  width: 19px;
  height: 19px;
}

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .reveal[data-delay="1"] { transition-delay: 0.1s; }
.js .reveal[data-delay="2"] { transition-delay: 0.2s; }
.js .reveal[data-delay="3"] { transition-delay: 0.3s; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 21, 40, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease;
}

.modal__dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: 90vh;
  overflow: hidden;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.7);
  animation: modalIn 0.4s var(--ease);
}

.modal__scroll {
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.modal__close:hover {
  background: var(--orange);
  color: #fff;
  transform: rotate(90deg);
}

.modal__close .icon {
  width: 18px;
  height: 18px;
}

.modal__media {
  position: relative;
  aspect-ratio: 16 / 8.2;
  background: var(--cream-2);
}

.modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 28, 56, 0.25), transparent 50%);
}

.modal__media .chip {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  background: rgba(255, 253, 248, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal__badge {
  position: absolute;
  top: 1rem;
  right: 4.2rem;
  z-index: 2;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal__badge.is-upcoming {
  background: var(--orange);
}

.modal__body {
  padding: clamp(1.4rem, 3vw, 2.4rem);
}

.modal__kicker {
  margin-bottom: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-deep);
}

.modal__body h2 {
  max-width: 26ch;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin: 1rem 0 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

.modal__meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.modal__meta .icon {
  width: 14px;
  height: 14px;
  color: var(--orange-deep);
}

.modal__story {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.modal__story p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
}

.modal__story strong {
  color: var(--ink);
}

.modal__section {
  margin-top: 1.6rem;
}

.modal__section[hidden] {
  display: none;
}

.modal__section h3 {
  margin-bottom: 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal__highlights {
  display: grid;
  gap: 0.5rem;
}

.modal__highlights li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.modal__highlights .icon {
  width: 15px;
  height: 15px;
  margin-top: 0.2rem;
  color: var(--green-deep);
}

.modal__gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.modal__gallery button {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.modal__gallery button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__gallery button:hover {
  transform: translateY(-2px);
}

.modal__gallery button.is-active {
  border-color: var(--orange);
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.modal__actions .btn {
  padding: 0.8rem 1.15rem;
  font-size: 0.84rem;
}

.modal__actions .link-arrow {
  font-size: 0.82rem;
}

.modal__actions .share-btn {
  margin-left: auto;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

html.is-locked,
body.is-locked {
  overflow: hidden;
}

@media (max-width: 1120px) {
  .brand__meta,
  .brand__rule {
    display: none;
  }

  .nav__list {
    gap: 1.1rem;
  }

  .hero__inner {
    gap: 2.5rem;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-stat__note {
    grid-column: 1 / -1;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
  }

  .clusters {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  :root {
    --header-h: 72px;
  }

  .topbar__item--email {
    display: none;
  }

  .nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    padding: 0 1.5rem;
    overflow: hidden;
    visibility: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 30px 50px -30px rgba(11, 28, 56, 0.4);
    transition: max-height 0.4s var(--ease), padding 0.4s var(--ease), visibility 0.4s;
  }

  .nav.is-open {
    max-height: calc(100vh - var(--header-h));
    padding: 1rem 1.5rem 1.5rem;
    overflow-y: auto;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__list li {
    border-bottom: 1px solid var(--line);
  }

  .nav__link {
    padding: 0.9rem 0;
    font-size: 1rem;
  }

  .nav__dot {
    top: 50%;
    right: 0;
    bottom: auto;
    left: auto;
    transform: translateY(-50%);
  }

  .nav__cta {
    width: 100%;
    margin-top: 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__open {
    display: none;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__close {
    display: block;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero__copy {
    max-width: 640px;
  }

  .hero h1 {
    max-width: 16ch;
  }

  .hero__stage {
    width: 100%;
    max-width: 640px;
  }

  .upcoming-layout {
    grid-template-columns: 1fr;
  }

  .featured-event {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .agenda {
    order: 2;
  }

  .alerts {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .impact__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .impact__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
  }

  .impact-stat:nth-child(2) {
    border-right: 0;
  }

  .myact {
    grid-template-columns: 1fr;
  }

  .myact__media {
    order: -1;
    min-height: 300px;
  }

  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
  }

  .footer__contact {
    grid-column: 1 / -1;
  }

  .cta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cta-card--green {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .container {
    width: calc(100% - 2rem);
  }

  .topbar__tag {
    display: none;
  }

  .topbar__contact {
    gap: 1rem;
    font-size: 0.72rem;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .section-head__aside {
    padding-bottom: 0;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero h1 {
    max-width: 13ch;
    font-size: clamp(2.5rem, 10vw, 3.6rem);
  }

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

  .hero__actions .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.2rem;
  }

  .hero-stat {
    padding-right: 0;
    border-right: 0;
  }

  .hero-stat:nth-child(odd) {
    padding-right: 1rem;
    border-right: 1px solid var(--line);
  }

  .hero-stat__note {
    grid-column: 1 / -1;
  }

  .featured-event {
    grid-template-columns: 1fr;
  }

  .featured-event__media {
    min-height: 260px;
  }

  .featured-event__actions .btn {
    width: 100%;
  }

  .alerts__field {
    flex-direction: column;
    border-radius: 18px;
  }

  .alerts__field input {
    padding: 0.85rem 1rem;
  }

  .alerts__field .btn {
    width: 100%;
  }

  .events-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search input {
    width: 100%;
  }

  .events-grid {
    grid-template-columns: 1fr;
  }

  .events-count {
    margin-top: 0.2rem;
  }

  .impact__stats {
    grid-template-columns: 1fr 1fr;
  }

  .impact-stat {
    padding-right: 1rem;
  }

  .clusters {
    grid-template-columns: 1fr;
  }

  .cta-grid {
    grid-template-columns: 1fr;
  }

  .cta-card--green {
    grid-column: auto;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__contact {
    grid-column: 1 / -1;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 0.35rem;
  }

  .modal {
    padding: 0;
  }

  .modal__dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .modal__scroll {
    max-height: 100dvh;
  }

  .modal__media {
    aspect-ratio: 16 / 10;
  }

  .modal__gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal__actions .share-btn {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .brand img {
    height: 38px;
  }

  .topbar__contact .topbar__item:first-child {
    display: none;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 1.2rem;
  }

  .hero-stat {
    padding: 1rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-stat:nth-child(odd) {
    padding-right: 0;
  }

  .hero-stat:last-of-type {
    border-bottom: 0;
  }

  .hero-stat__note {
    padding: 1rem 0;
  }

  .hero-slide__caption {
    padding: 1rem;
  }

  .hero-slider__controls {
    padding: 0.75rem 0.9rem;
  }

  .hero-slider__count {
    display: none;
  }

  .featured-event__actions {
    flex-direction: column;
  }

  .impact__stats {
    grid-template-columns: 1fr;
  }

  .impact-stat {
    padding-right: 0;
    padding-bottom: 1rem;
    border-right: 0;
    border-bottom: 1px solid rgba(250, 245, 234, 0.12);
  }

  .impact-stat:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .modal__gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .myact__badge {
    bottom: 0.8rem;
    left: 0.8rem;
    max-width: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-slide {
    transition: none;
  }

  .marquee__track {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    animation: none;
    gap: 0.5rem;
  }

  .marquee__item {
    padding: 0 1rem;
  }

  .marquee__item::after,
  .marquee__item[aria-hidden="true"] {
    display: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-progress {
    display: none;
  }
}
