/* Root homepage: one welcome screen followed by one contact screen. */
html {
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
}

.two-screen {
  --header-height: 93px;
}

.two-screen .site-header {
  position: absolute;
  inset: 0 0 auto;
  height: var(--header-height);
}

.two-screen main {
  position: relative;
  height: 100svh;
  min-height: 540px;
  padding-top: var(--header-height);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.two-screen .hero {
  height: 100%;
  min-height: 0;
}

/* Cover crops the original image proportionally to fill the welcome screen. */
.two-screen .hero-slide {
  object-fit: cover;
  object-position: center;
}

.two-screen .hero::before {
  background: linear-gradient(180deg, transparent 45%, #30365d45 100%);
}

.two-screen .services {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(48px, 7svh, 76px);
  margin: 0 auto;
  padding: 18px 22px;
}

.two-screen .hero-controls {
  bottom: calc(clamp(48px, 7svh, 76px) + 140px);
}

.two-screen .site-footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding-top: clamp(52px, 12svh, 130px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: clip;
}

.two-screen .site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../images/bg-pattern.png') center / 850px;
  opacity: .1;
  pointer-events: none;
}

.two-screen .site-footer > * {
  position: relative;
}

.two-screen .footer-top {
  padding: 0 0 32px;
}

.two-screen .footer-logo {
  width: 340px;
  margin: 0;
}

.two-screen .footer-campuses {
  grid-template-columns: repeat(3, minmax(0, 1fr)) 1.05fr;
  gap: 12px;
  padding: 58px 0 36px;
}

.two-screen .footer-campuses > div {
  min-height: 190px;
  padding: 25px 22px;
  background: #ffffff0c;
  border: 1px solid #ffffff26;
}

.two-screen .footer-campuses h3 {
  margin-bottom: 22px;
  font-size: 18px;
}

.two-screen .footer-campuses p {
  font-size: 13px;
  line-height: 2;
}

.two-screen .footer-consult > p {
  margin-bottom: 12px;
  font-size: clamp(21px, 1.9vw, 29px);
  font-weight: 700;
  white-space: nowrap;
}

.two-screen .footer-link-row {
  padding-bottom: 38px;
}

.two-screen .footer-bottom {
  width: 100%;
  margin-top: auto;
  padding: 23px 0;
}

.two-screen .maternal-float {
  transition: opacity .35s ease, visibility .35s ease;
}

.two-screen.is-footer-screen .maternal-float {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .two-screen .footer-campuses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 28px 0 24px;
  }

  .two-screen .footer-campuses > div {
    min-height: 145px;
    padding: 18px;
  }

  .two-screen .footer-consult {
    display: block;
    grid-column: auto;
  }

  .two-screen .footer-campuses h3 {
    margin-bottom: 10px;
  }
}

@media (max-width: 900px) {
  .two-screen {
    --header-height: 81px;
  }

  .two-screen .services {
    padding: 10px;
  }

  .two-screen .hero-controls {
    bottom: calc(clamp(48px, 7svh, 76px) + 210px);
  }
}

@media (max-width: 600px) {
  .two-screen main {
    min-height: 600px;
  }

  .two-screen .services {
    width: calc(100% - 26px);
    bottom: 142px;
    border-radius: 6px;
    padding: 8px 4px;
  }

  .two-screen .service-item {
    min-height: 72px;
    gap: 8px;
  }

  .two-screen .service-item strong {
    font-size: 13px;
  }

  .two-screen .hero-controls {
    right: 0;
    bottom: 328px;
    gap: 10px;
  }

  .two-screen .maternal-float {
    padding: 8px 12px;
  }

  .two-screen .float-label {
    display: block;
    width: 100%;
    padding: 5px 8px;
    font-size: 15px;
  }

  .two-screen .maternal-links {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-screen .maternal-links a {
    gap: 8px;
  }

  .two-screen .site-footer {
    padding: 28px 0 0;
  }

  .two-screen .footer-top {
    flex-wrap: nowrap;
    gap: 14px;
    padding-bottom: 20px;
  }

  .two-screen .footer-logo {
    width: 220px;
    max-width: 68%;
  }

  .two-screen .footer-social {
    gap: 8px;
  }

  .two-screen .social-button {
    width: 34px;
    height: 34px;
  }

  .two-screen .social-button img {
    width: 28px;
    height: 28px;
  }

  .two-screen .social-qr {
    top: calc(100% + 12px);
    bottom: auto;
  }

  .two-screen .footer-campuses {
    gap: 10px;
    padding: 18px 0;
  }

  .two-screen .footer-campuses > div {
    min-height: 140px;
    padding: 15px 12px;
  }

  .two-screen .footer-campuses h3 {
    font-size: 16px;
  }

  .two-screen .footer-campuses p {
    font-size: 12px;
    line-height: 1.85;
  }

  .two-screen .footer-consult > p {
    font-size: 20px;
  }

  .two-screen .footer-link-row {
    padding-bottom: 16px;
  }

  .two-screen .footer-bottom {
    padding: 18px 0;
  }
}

@media (max-width: 600px) and (max-height: 720px) {
  .two-screen .site-footer {
    padding-top: 16px;
  }

  .two-screen .footer-top {
    padding-bottom: 14px;
  }

  .two-screen .footer-campuses > div {
    min-height: 128px;
    padding: 12px 10px;
  }

  .two-screen .footer-campuses h3 {
    margin-bottom: 8px;
    font-size: 15px;
  }

  .two-screen .footer-campuses p {
    line-height: 1.7;
  }
}

/* Reveal the whole screen, then let its foreground settle into place.
   No fill forwards: clipping ends after entry so QR popovers remain unrestricted. */
@media (prefers-reduced-motion: no-preference) {
  .two-screen main.is-screen-active .hero,
  .two-screen .site-footer.is-screen-active {
    animation: screen-unfold 1s cubic-bezier(.25, .8, .25, 1) backwards;
  }

  .two-screen main.is-screen-active .hero-slides {
    animation: screen-image-settle 2.8s cubic-bezier(.25, .8, .25, 1) backwards;
  }

  .two-screen main.is-screen-active .services {
    animation: screen-content-enter 1.7s .35s cubic-bezier(.25, .8, .25, 1) backwards;
  }

  .two-screen main.is-screen-active .hero-controls {
    animation: screen-content-enter 1.6s .5s cubic-bezier(.25, .8, .25, 1) backwards;
  }

  .two-screen .site-footer.is-screen-active > * {
    animation: screen-content-enter 1.8s .3s cubic-bezier(.25, .8, .25, 1) backwards;
  }

  .two-screen .site-footer.is-screen-active > .footer-campuses {
    animation-delay: .45s;
  }

  .two-screen .site-footer.is-screen-active > .footer-link-row {
    animation-delay: .6s;
  }

  .two-screen .site-footer.is-screen-active > .footer-bottom {
    animation-delay: .75s;
  }
}

@keyframes screen-unfold {
  from {
    clip-path: inset(24% 12% 4% round 40px);
    opacity: .2;
  }
  to {
    clip-path: inset(0 0 0 round 0);
    opacity: 1;
  }
}

@keyframes screen-image-settle {
  from {
    transform: scale(1.16);
  }
  to {
    transform: scale(1);
  }
}

@keyframes screen-content-enter {
  from {
    opacity: 0;
    transform: translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
