*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #0f172a;
  background: #cfe5ff;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

@media (max-width: 720px) {
  .hero {
    margin: 1.5rem 1rem 0;
    padding: 2.25rem 1.5rem 2.75rem;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1.75rem;
  }

  .hero__content {
    align-items: center;
    gap: 1.2rem;
  }

  .hero__subtitle {
    text-align: left;
    max-width: 46ch;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__media {
    max-width: min(360px, 85%);
    margin-inline: auto;
  }
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
  padding: min(8vw, 5rem) min(7vw, 4rem);
  color: #ffffff;
  border-radius: 32px;
  margin: min(4vw, 2.5rem) min(8vw, 5rem) 0;
  box-shadow: 0 45px 90px rgba(15, 23, 42, 0.28);
  scroll-margin-top: 100px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(160deg, #020617 0%, #0b1120 45%, #12263f 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.28), transparent 60%),
    radial-gradient(circle at 82% 30%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(circle at 45% 85%, rgba(45, 212, 191, 0.18), transparent 60%),
    url("https://www.transparenttextures.com/patterns/axiom-pattern.png");
  opacity: 0.45;
  mix-blend-mode: lighten;
  z-index: -1;
  animation: floatTexture 16s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(circle at 25% 30%, rgba(248, 250, 252, 0.12), transparent 55%),
    conic-gradient(from 120deg at 70% 20%, rgba(30, 64, 175, 0.28), transparent 65%),
    url("https://www.transparenttextures.com/patterns/fancy-deboss.png");
  opacity: 0.5;
  mix-blend-mode: screen;
  z-index: -1;
  animation: swayTexture 18s ease-in-out infinite alternate;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero__eyebrow {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.36em;
  color: rgba(255, 255, 255, 0.6);
}

.hero__title {
  font-size: clamp(2.75rem, 4vw, 3.75rem);
  line-height: 1.1;
  margin: 0;
}

.hero__title span {
  display: inline-block;
  font-size: 0.9em;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #fbbf24;
}

.hero__subtitle {
  font-size: 1rem;
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #34d399, #38bdf8);
  color: #0f172a;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero__cta:hover,
.hero__cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.35);
}

.hero__media {
  position: relative;
  border-radius: 26px;
  padding: 8px;
  background: #ffffff;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: conic-gradient(from 0deg, rgba(91, 148, 240, 0.75), rgba(139, 92, 246, 0.6), rgba(56, 189, 248, 0.75));
  animation: heroBorderSweep 7s linear infinite;
  z-index: 0;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  z-index: 0;
}

.hero__media img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
}

.highlights {
  padding: min(10vw, 6.5rem) min(8vw, 5rem) min(10vw, 6rem);
  scroll-margin-top: 120px;
}

.highlights__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
  color: #0f172a;
}

.highlights__header h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.5rem);
}

.card-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 560px) {
  .hero__eyebrow {
    letter-spacing: 0.24em;
  }

  .hero__media {
    padding: 6px;
  }

  .hero__media img {
    aspect-ratio: 3 / 2;
  }

  .card__inner {
    min-height: 220px;
  }

  .card__media {
    min-height: 150px;
  }

  .card__footer {
    padding: 0.85rem 1rem;
  }

  .card__label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 480px) {
  .hero {
    margin: 1.25rem 0.85rem 0;
    padding: 2rem 1.25rem 2.5rem;
  }

  .hero__subtitle {
    text-align: left;
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .hero {
    margin: 1rem 0.65rem 0;
    padding: 1.75rem 1rem 2.25rem;
  }

  .hero__title {
    font-size: clamp(2.3rem, 9vw, 2.6rem);
  }

  .hero__subtitle {
    font-size: 0.95rem;
  }

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

  .hero__media {
    padding: 5px;
  }

  .card-grid {
    gap: 1.5rem;
  }

  .card__inner {
    min-height: 210px;
  }

  .card__media {
    min-height: 140px;
  }
}

.card {
  border-radius: 20px;
  background: transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  width: 100%;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-12px);
}

.card:focus-visible {
  outline: none;
}

.card__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  min-height: 260px;
}

.card:hover .card__inner,
.card:focus-visible .card__inner {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  transform: translateY(-4px);
}

.card__media {
  flex: 1 1 70%;
  min-height: 180px;
  overflow: hidden;
  position: relative;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  transition: transform 0.4s ease;
}

.card:hover .card__media img,
.card:focus-visible .card__media img {
  transform: scale(1.08);
}

.card__footer {
  flex: 0 1 30%;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.08) 60%, rgba(15, 23, 42, 0.12) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__label {
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.is-active {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(19, 19, 19, 0.65);
  backdrop-filter: blur(3px);
}

.modal__content {
  position: relative;
  width: min(90vw, 560px);
  border-radius: 22px;
  background: #f8fafc;
  box-shadow: 0 36px 90px rgba(15, 23, 42, 0.32);
  display: flex;
  flex-direction: column;
  z-index: 1;
  transform: translateY(24px) scale(0.92);
  opacity: 0;
  overflow: hidden;
}

.modal.is-active .modal__overlay {
  animation: modalFade 0.35s ease forwards;
}

.modal.is-active .modal__content {
  animation: modalPop 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal__close {
  border: none;
  background: #f97316;
  color: #ffffff;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.3);
}

.modal__title {
  margin: 0;
  font-size: 1.45rem;
  color: #0f172a;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 1.8rem 1.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), transparent);
  border-radius: 22px 22px 0 0;
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem 2rem 2.25rem;
}

.modal__resource {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: #ffffff;
  text-decoration: none;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal__resource:hover,
.modal__resource:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.22);
}

.modal__resource--flat {
  align-self: stretch;
  justify-content: center;
}

.modal__group {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
  overflow: hidden;
}

.modal__group[open] {
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.14);
}

.modal__group-label {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
}

.modal__group-label::marker {
  display: none;
}

.modal__group-label::-webkit-details-marker {
  display: none;
}

.modal__group-label::after {
  content: "⌄";
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.modal__group[open] .modal__group-label::after {
  transform: rotate(180deg);
}

.modal__group-items {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0 1.25rem 1.25rem;
}

.modal__link {
  text-decoration: none;
  color: #2563eb;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.modal__link::before {
  content: "↗";
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.35);
}

.modal__empty {
  margin: 0;
  text-align: center;
  color: #475569;
  font-size: 0.95rem;
}

@media (max-width: 540px) {
  .modal__content {
    width: 94vw;
    border-radius: 18px;
  }

  .modal__header {
    padding: 1.3rem 1.25rem 1rem;
  }

  .modal__body {
    padding: 1.3rem 1.25rem 1.7rem;
    gap: 1rem;
  }

  .modal__resource,
  .modal__group-label {
    font-size: 0.85rem;
    letter-spacing: 0.06em;
  }
}

.site-footer {
  padding: 1.75rem min(8vw, 5rem);
  background: #0f172a;
  color: #ffffff;
}

.footer__content {
  display: flex;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

@keyframes modalPop {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.92);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes heroBorderSweep {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes floatTexture {
  0% {
    transform: translate3d(-2%, -2%, 0) scale(1);
    filter: blur(0px);
  }
  50% {
    transform: translate3d(2%, 1%, 0) scale(1.05);
    filter: blur(1px);
  }
  100% {
    transform: translate3d(4%, 3%, 0) scale(0.98);
    filter: blur(0.5px);
  }
}

@keyframes swayTexture {
  0% {
    transform: translate3d(1%, -1%, 0) rotate(0deg) scale(1);
  }
  50% {
    transform: translate3d(-1%, 2%, 0) rotate(1.5deg) scale(1.04);
  }
  100% {
    transform: translate3d(-3%, -2%, 0) rotate(-1deg) scale(0.99);
  }
}
