:root {
  --color-orange: #ff6a20;
  --color-brown: #2e1103;
  --color-black: #2c2826;
  --color-gray: #5a5451;
  --color-cream: #ffeadd;
  --color-white: #ffffff;

  --font-display: "Dela Gothic One", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;

  --container-max: 1440px;
  --container-pad: 120px;
  --section-pad-y: 64px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-gray);
  background: var(--color-white);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 3px;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
p,
blockquote {
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.text-orange {
  color: var(--color-orange);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  color: var(--color-orange);
}

.section-title--center {
  text-align: center;
}

/* Buttons */

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.button-row--center {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 18px;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-orange);
  color: var(--color-orange);
}

.btn-outline--light {
  border-color: var(--color-white);
  color: var(--color-white);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 96px;
  background: var(--color-white);
  overflow: visible;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
}

.logo {
  flex: 0 0 auto;
  overflow: visible;
  line-height: 0;
}

.logo img {
  height: 64px;
  width: auto;
  max-width: none;
  margin-top: -6px;
}

.logo-mobile {
  display: none;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px;
  color: var(--color-gray);
  font-size: 18px;
  white-space: nowrap;
}

/* Hovered link and current page: text and icon both orange */
.main-nav a:hover,
.main-nav a.is-current {
  color: var(--color-orange);
}

.main-nav a.is-current {
  font-weight: 700;
}

.main-nav a:hover img,
.main-nav a.is-current img {
  filter: invert(48%) sepia(86%) saturate(2476%) hue-rotate(346deg) brightness(102%) contrast(101%);
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }

  .logo-desktop {
    display: none;
  }

  .logo-mobile {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 8px 16px rgba(46, 17, 3, 0.1);
    padding: 16px var(--container-pad) 24px;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .main-nav a {
    padding: 8px 0;
    width: 100%;
  }
}

/* Between the hamburger breakpoint and full desktop width, the nav items
   (esp. "Recursos para adolescentes") no longer fit in one row at the
   default size, so tighten spacing/font just enough to keep it inline. */
@media (min-width: 901px) and (max-width: 1200px) {
  .header-inner {
    justify-content: flex-start;
    gap: 24px;
  }

  .logo img {
    height: 50px;
  }

  .main-nav ul {
    gap: 48px;
  }

  .main-nav a {
    gap: 3px;
    padding: 4px 6px;
    font-size: 12px;
  }

  .home .hero-inner {
    flex-wrap: nowrap;
    gap: 16px;
    padding-right: calc(var(--container-pad) + 36px);
  }

  .home .hero-description {
    font-size: 15px;
  }

  .home .hero-media {
    flex: 0 1 380px;
    width: min(380px, 42%);
  }

  .home .hero .button-row {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .home .hero .btn {
    font-size: 14px;
    padding: 10px 14px;
  }
}

/* Hero */

.hero {
  position: relative;
  background: var(--color-cream);
}

.hero-social-float {
  position: absolute;
  top: 50%;
  right: 20px;
  z-index: 2;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.15));
}

@media (min-width: 1025px) {
  .hero-social-float,
  .qs-social-float {
    right: max(
      16px,
      calc((100% - min(100%, var(--container-max))) / 2 + var(--container-pad) - 25px)
    );
  }
}

@media (min-width: 901px) {
  .home .hero-inner {
    padding-right: calc(var(--container-pad) + 36px);
  }
}

.hero-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
  padding-block: var(--section-pad-y);
}

@media (min-width: 1201px) {
  .home .hero-inner {
    gap: 80px;
  }
}

.hero-copy {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}

.hero .button-row {
  flex-wrap: nowrap;
  width: 100%;
}

.hero-logo {
  width: 280px;
  max-width: 100%;
  height: auto;
}

.hero-logo--mobile {
  display: none;
}

.hero-description {
  font-size: 16px;
}

.hero-media {
  position: relative;
  flex: 0 0 auto;
  width: 590px;
  max-width: 100%;
  aspect-ratio: 590 / 317;
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-orange);
}

.hero-media-bg {
  position: absolute;
  top: -14.31%;
  left: -30.52%;
  width: 115.1%;
  height: 120.5%;
  max-width: none;
  object-fit: cover;
}

.hero-media-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.hero-media-play,
.hero-media-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media-video {
  background: var(--color-black);
}

/* Challenges */

.challenges {
  background: var(--color-brown);
  padding-block: var(--section-pad-y);
}

.challenges .section-title {
  margin-bottom: 32px;
}

.challenge-cards {
  margin-bottom: 16px;
}

.challenge-slide {
  display: none;
  flex-wrap: wrap;
  gap: 20px;
}

.challenge-slide.is-active {
  display: flex;
}

.challenge-card {
  flex: 1 1 320px;
  background: var(--color-white);
  border-top: 4px solid var(--color-orange);
  border-radius: 16px;
  padding: 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.challenge-label {
  font-size: 14px;
  text-transform: uppercase;
  color: var(--color-gray);
}

.challenge-highlight {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.2;
  color: var(--color-orange);
}

.challenge-text {
  font-size: 16px;
  color: var(--color-gray);
}

.challenge-text strong {
  font-weight: 700;
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-bottom: 32px;
}

.slider-controls--resources {
  display: none;
  justify-content: center;
  width: 100%;
}

.slider-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-dot {
  width: 40px;
  height: 4px;
  border-radius: 100px;
  background: var(--color-orange);
  opacity: 0.3;
}

.slider-dot.is-active {
  opacity: 1;
}

.slider-arrows {
  display: flex;
  gap: 12px;
}

.slider-arrow {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50px;
  background: var(--color-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Highlights (Avances / Herramientas) */

.highlights {
  position: relative;
  padding: 32px 0 64px;
  background-color: var(--color-cream);
  overflow: hidden;
}

.highlights::before,
.highlights::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.highlights::before {
  background: url("../assets/images/section-bg-texture.png") center / 100% 100% no-repeat;
  mix-blend-mode: multiply;
}

.highlights::after {
  background: url("../assets/images/section-bg-texture-overlay.png") top center / 100% 100% no-repeat;
  mix-blend-mode: multiply;
}

.highlights .container {
  position: relative;
  z-index: 1;
}

.highlight-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 900px) {
  .highlight-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

.highlight-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.highlight-photo {
  position: relative;
  z-index: 2;
  height: 250px;
  margin-bottom: -150px;
  border-radius: 12px;
  overflow: hidden;
}

.highlight-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.highlight-body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  border-radius: 16px;
  background: var(--color-white);
  padding: 174px 48px 48px;
  overflow: hidden;
  box-shadow: 5px 5px 7.5px rgba(73, 22, 0, 0.1);
}

.highlight-card--orange .highlight-body {
  background: var(--color-orange);
}

.highlight-body-texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.highlight-body-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.highlight-body-content h3 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  color: var(--color-black);
}

.highlight-body-content p {
  font-size: 16px;
  color: var(--color-gray);
}

.highlight-card--orange .highlight-body-content h3,
.highlight-card--orange .highlight-body-content p {
  color: var(--color-white);
}

/* Goals */

.goals {
  position: relative;
  padding-block: var(--section-pad-y);
  background: var(--color-cream);
  overflow: hidden;
}

.goals::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/images/objetivos-bg-texture.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  pointer-events: none;
}

.goals::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/images/section-bg-texture.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.goals .container {
  position: relative;
}

.goals-intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto 32px;
}

.goals-intro p {
  font-size: 16px;
}

.goal-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .goal-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

.goal-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  isolation: isolate;
}

.goal-number-wrap {
  display: flex;
  align-items: center;
  padding-inline: 20px;
  margin-bottom: -24px;
  position: relative;
  z-index: 2;
}

.goal-number {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 12px;
  background: var(--color-cream);
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1.2;
  color: var(--color-orange);
}

.goal-card-inner {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  border: 2px solid var(--color-orange);
  border-radius: 16px;
  padding: 48px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.goal-card-inner h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-orange);
  text-transform: uppercase;
}

.goal-card-inner p {
  font-size: 16px;
  color: var(--color-black);
}

/* Resources for teens */

.resources-teens {
  background: var(--color-brown);
  padding-block: var(--section-pad-y);
}

.resources-teens .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.resources-teens .section-title {
  color: var(--color-white);
  text-align: center;
}

.resource-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
}

.resource-card {
  flex: 1 1 240px;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 901px) {
  .resources-teens .resource-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .resources-teens .resource-card {
    flex: none;
  }
}

.resource-card-body {
  background: var(--color-white);
  padding: 24px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 0 auto;
}

.resource-card-body h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-black);
}

.resource-card-body p {
  font-size: 14px;
  color: var(--color-gray);
  flex: 1;
}

.resource-link {
  align-self: flex-end;
  width: 26px;
  height: 26px;
  border-radius: 50px;
  background: var(--color-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.resource-card-media {
  position: relative;
  height: 162px;
  overflow: hidden;
  background: var(--color-white);
}

.resource-card-media--navy {
  background: #172554;
}

.resource-card-media--gray {
  background: #d6d6d6;
}

.resource-card-media .media-layer-1 {
  position: absolute;
  max-width: none;
  top: -15.34%;
  left: 25.68%;
  width: 71.45%;
  height: 143%;
}

.resource-card-media .media-layer-2 {
  position: absolute;
  max-width: none;
  top: 16.28%;
  left: 8.27%;
  width: 23.02%;
  height: 67.44%;
}

.resource-card-media .media-layer-cover {
  position: absolute;
  max-width: none;
  top: -71.39%;
  left: -8.45%;
  width: 108.45%;
  height: 173.55%;
}

.resource-card-media .media-layer-3 {
  position: absolute;
  max-width: none;
  top: -9.6%;
  left: -21.9%;
  width: 147.94%;
  height: 163.03%;
}

/* Quote */

.quote {
  background: var(--color-black);
  padding-block: 64px;
}

.quote .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.quote-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.quote blockquote {
  margin: 0;
  max-width: 960px;
}

.quote-text {
  display: none;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  color: var(--color-white);
  text-align: center;
}

.quote-text.is-active {
  display: block;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon {
  position: relative;
  width: 45px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-icon--x .social-icon-bg {
  position: absolute;
  inset: 0;
}

.social-icon--x .social-icon-fg {
  position: relative;
  width: 18px;
  height: auto;
}

/* Footer */

.site-footer {
  background: var(--color-gray);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  padding-block: 24px;
}

.footer-logo {
  height: 61px;
  width: auto;
  flex: 0 0 auto;
}

.footer-columns {
  display: flex;
  flex: 1 0 auto;
  min-width: 0;
  flex-wrap: wrap;
  gap: 48px;
}

.footer-columns ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 183px;
  font-size: 16px;
  color: var(--color-white);
}

.footer-columns a:hover {
  text-decoration: underline;
}

.footer-credit {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 0 0 auto;
  font-size: 16px;
  color: var(--color-white);
  white-space: nowrap;
}

.footer-credit img {
  height: 36px;
  width: auto;
}

/* Responsive */

@media (max-width: 1200px) {
  :root {
    --container-pad: 64px;
    --section-pad-y: 48px;
  }
}

@media (max-width: 900px) {
  .slider-controls {
    justify-content: center;
    flex-wrap: wrap;
  }

  .highlight-body {
    padding-top: 174px;
  }

  .hero-social-float {
    display: none;
  }

  .home .hero-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .home .hero-media {
    order: -1;
    width: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --container-pad: 20px;
    --section-pad-y: 40px;
  }

  .hero .button-row,
  .challenges .button-row,
  .goals .button-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero .btn,
  .challenges .button-row .btn,
  .goals .button-row .btn {
    width: 100%;
  }

  .highlight-photo {
    height: 190px;
    margin-bottom: -110px;
  }

  .highlight-body {
    padding: 110px 24px 32px;
  }

  .challenge-card {
    padding: 24px;
  }

  .goal-card-inner {
    padding: 40px 16px 20px;
  }

  .quote-text {
    font-size: 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-columns {
    flex-direction: column;
    gap: 24px;
  }

  .footer-columns ul {
    min-width: 0;
  }

  .challenge-cards,
  .resource-cards {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .challenge-cards::-webkit-scrollbar,
  .resource-cards::-webkit-scrollbar {
    display: none;
  }

  /* Challenge slides stay real boxes laid out in a row (iOS Safari doesn't
     snap to cards inside display: contents). Each card is exactly one track
     width (100cqw) and snapping stops on every card. */
  .challenge-cards {
    container-type: inline-size;
    gap: 20px;
  }

  /* Same 20px space between cards as the home resources carousel */
  .challenge-slide,
  .challenge-slide.is-active {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 20px;
  }

  .challenge-card {
    flex: 0 0 100cqw;
    width: 100cqw;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .resource-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
  }

  .slider-controls--resources {
    display: flex;
  }
}

/* Share toast (Facebook text copied) */

.share-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--color-brown);
  color: var(--color-white);
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.share-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Motion
   Entrance, scroll-reveal and hover animations shared by every page.
   Reveal states only apply once main.js adds .motion-ready to <html>, so the
   content stays visible without JS. Reveals use the standalone `translate`
   property so they never clash with hover `transform`s. */

@keyframes motion-fade-up {
  from {
    opacity: 0;
    translate: 0 24px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes motion-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes motion-zoom-in {
  from {
    opacity: 0;
    scale: 0.96;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes motion-pop-in {
  from {
    opacity: 0;
    translate: 16px 0;
    scale: 0.6;
  }
  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}

@keyframes motion-fade-down {
  from {
    opacity: 0;
    translate: 0 -10px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes header-drop {
  from {
    translate: 0 -100%;
  }
  to {
    translate: 0 0;
  }
}

@keyframes menu-drop {
  from {
    opacity: 0;
    translate: 0 -12px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes motion-from-left {
  from {
    opacity: 0;
    translate: -60px 0;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes motion-from-right {
  from {
    opacity: 0;
    translate: 60px 0;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes card-shine {
  from {
    translate: -110% 0;
  }
  to {
    translate: 110% 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance */
  .hero-copy > *,
  .qs-hero-copy > *,
  .accelerator-back,
  .accelerator-hero h1 {
    animation: motion-fade-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-copy > :nth-child(2),
  .qs-hero-copy > :nth-child(2),
  .accelerator-hero h1 {
    animation-delay: 0.12s;
  }

  .hero-copy > :nth-child(3),
  .qs-hero-copy > :nth-child(3) {
    animation-delay: 0.24s;
  }

  .hero-copy > :nth-child(n + 4),
  .qs-hero-copy > :nth-child(n + 4) {
    animation-delay: 0.36s;
  }

  .hero-media,
  .qs-hero-illustration,
  .accelerator-hero-photo {
    animation: motion-zoom-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
  }

  /* Share icons pop in one after another */
  .hero-social-float .social-icon,
  .qs-social-float .social-icon {
    animation: motion-pop-in 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) both;
    animation-delay: 0.5s;
  }

  .hero-social-float .social-icon:nth-child(2),
  .qs-social-float .social-icon:nth-child(2) {
    animation-delay: 0.6s;
  }

  .hero-social-float .social-icon:nth-child(3),
  .qs-social-float .social-icon:nth-child(3) {
    animation-delay: 0.7s;
  }

  .social-icon {
    transition: transform 0.2s ease, filter 0.2s ease;
  }

  .social-icon:hover,
  .social-icon:focus-visible {
    transform: translateY(-3px) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  }

  /* Cards lift on hover */
  .explore-card,
  .resource-card,
  .challenge-card,
  .compendio-panel,
  .avances-social-card,
  .qs-feature-card,
  .qs-uxcard {
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease;
  }

  .explore-card:hover,
  .resource-card:hover,
  .challenge-card:hover,
  .compendio-panel:hover,
  .qs-feature-card:hover,
  .qs-uxcard:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(46, 17, 3, 0.18);
  }

  /* Social cards have no background, so they lift without a box shadow */
  .avances-social-card:hover {
    transform: translateY(-6px);
  }

  /* Light sweep across the orange/photo cards */
  .resource-card {
    position: relative;
  }

  .explore-card::before,
  .resource-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    translate: -110% 0;
  }

  .explore-card:hover::before,
  .resource-card:hover::before {
    animation: card-shine 0.9s ease;
  }

  /* Icons, textures and photos react inside the card */
  .explore-card-icon,
  .qs-uxcard > img,
  .qs-feature-card > img,
  .qs-uxcard-badge {
    transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
  }

  .explore-card:hover .explore-card-icon,
  .qs-uxcard:hover > img,
  .qs-feature-card:hover > img {
    transform: scale(1.1) rotate(-5deg);
  }

  .qs-uxcard:hover .qs-uxcard-badge {
    transform: scale(1.06);
  }

  .explore-card-texture {
    transition: transform 0.8s ease;
  }

  .explore-card:hover .explore-card-texture {
    transform: scale(1.08) rotate(1.5deg);
  }

  .resource-card-image {
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .resource-card:hover .resource-card-image {
    transform: scale(1.06);
  }

  .resource-card-arrow {
    transition: transform 0.25s ease, opacity 0.15s ease;
  }

  .resource-card:hover .resource-card-arrow {
    transform: translateX(4px);
  }

  .avances-social-photo {
    transition: box-shadow 0.3s ease, filter 0.3s ease;
  }

  .avances-social-card:hover .avances-social-photo {
    box-shadow: 0 12px 24px rgba(46, 17, 3, 0.18);
    filter: saturate(1.1) brightness(1.03);
  }

  /* Carousel groups: cards of the newly shown slide come in one by one */
  .qs-slide.is-active > * {
    animation: motion-fade-up 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .qs-slide.is-active > :nth-child(2) {
    animation-delay: 0.08s;
  }

  .qs-slide.is-active > :nth-child(n + 3) {
    animation-delay: 0.16s;
  }

  /* Home "¿A qué nos enfrentamos?": cards come in from alternating sides,
     controls and buttons rise from below (also replays on slide change). */
  .challenges {
    overflow-x: clip;
  }

  .motion-ready .challenges:not(.is-inview) :is(.challenge-card, .slider-controls, .button-row) {
    opacity: 0;
  }

  .challenges.is-inview .challenge-slide.is-active > .challenge-card:nth-child(odd) {
    animation: motion-from-left 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .challenges.is-inview .challenge-slide.is-active > .challenge-card:nth-child(even) {
    animation: motion-from-right 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
  }

  .challenges.is-inview .slider-controls {
    animation: motion-fade-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s both;
  }

  .challenges.is-inview .button-row {
    animation: motion-fade-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s both;
  }

  /* Header: drops in on load, gains a shadow and a smaller logo on scroll */
  .site-header {
    animation: header-drop 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    transition: box-shadow 0.3s ease;
  }

  .site-header.is-scrolled {
    box-shadow: 0 6px 20px rgba(46, 17, 3, 0.1);
  }

  .logo img {
    transform-origin: left center;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .logo:hover img {
    transform: rotate(-3deg) scale(1.04);
  }

  .site-header.is-scrolled .logo img {
    transform: scale(0.86);
  }

  .site-header.is-scrolled .logo:hover img {
    transform: rotate(-3deg) scale(0.9);
  }

  .main-nav a {
    position: relative;
    transition: color 0.2s ease;
  }

  .main-nav a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-orange);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .main-nav a:hover::after,
  .main-nav a.is-current::after {
    transform: scaleX(1);
  }

  .main-nav a img {
    transition: transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1);
  }

  .main-nav a:hover img {
    transform: translateY(-2px) scale(1.15);
  }

  @media (min-width: 901px) {
    .main-nav li {
      animation: motion-fade-down 0.5s ease both;
      animation-delay: 0.15s;
    }

    .main-nav li:nth-child(2) {
      animation-delay: 0.22s;
    }

    .main-nav li:nth-child(3) {
      animation-delay: 0.29s;
    }

    .main-nav li:nth-child(4) {
      animation-delay: 0.36s;
    }
  }

  @media (min-width: 901px) and (max-width: 1200px) {
    .main-nav a::after {
      left: 6px;
      right: 6px;
    }
  }

  @media (max-width: 900px) {
    .main-nav.is-open {
      animation: menu-drop 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .main-nav.is-open li {
      animation: motion-fade-up 0.35s ease both;
      animation-delay: 0.05s;
    }

    .main-nav.is-open li:nth-child(2) {
      animation-delay: 0.1s;
    }

    .main-nav.is-open li:nth-child(3) {
      animation-delay: 0.15s;
    }

    .main-nav.is-open li:nth-child(4) {
      animation-delay: 0.2s;
    }

    .main-nav a::after {
      left: 0;
      right: auto;
      width: 32px;
      bottom: 4px;
      transform-origin: left center;
    }

    .menu-toggle img {
      transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
    }

    .menu-toggle[aria-expanded="true"] img {
      transform: rotate(90deg);
    }
  }

  /* Tab panels and accordions ease in when they open */
  .avances-tab-panel.is-active {
    animation: motion-fade-up 0.4s ease both;
  }

  .qs-accordion[open] > :not(summary) {
    animation: motion-fade-in 0.35s ease both;
  }

  .qs-accordion-header {
    transition: filter 0.2s ease;
  }

  .qs-accordion-header:hover {
    filter: brightness(0.96);
  }

  /* Scroll reveal (classes added by main.js) */
  .motion-ready .reveal {
    opacity: 0;
    translate: 0 28px;
    transition:
      opacity 0.7s ease var(--reveal-delay, 0s),
      translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0s),
      scale 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0s),
      transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
      box-shadow 0.3s ease;
  }

  .motion-ready .reveal.is-visible {
    opacity: 1;
    translate: 0 0;
  }

  .motion-ready .reveal:is(.explore-card, .resource-card, .avances-social-card, .compendio-panel) {
    scale: 0.96;
  }

  .motion-ready .reveal.is-visible:is(.explore-card, .resource-card, .avances-social-card, .compendio-panel) {
    scale: 1;
  }
}
