/* PORTAILS : la rangée de quatre arches « Faites un tour ». */

.realm {
  position: relative;
  padding-block: var(--s4) var(--s20);
  background: var(--canvas);
}
.realm::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -60px;
  height: 60px;
  background: linear-gradient(transparent, var(--canvas));
  pointer-events: none;
}
.portals {
  --n: 4;
  display: flex;
  justify-content: space-between;
  gap: var(--s6);
  margin-top: var(--s10);
  max-width: 960px;
  margin-inline: auto;
}
.portal {
  position: relative;
  flex: 0 0 136px;
}
.portal + .portal::before {
  content: "";
  position: absolute;
  top: 80px;
  right: calc(100% + 6px);
  width: calc((min(100vw - 2 * var(--gutter), 960px) - var(--n) * 136px) / (var(--n) - 1) - 12px);
  height: 1px;
  background: var(--border-accent);
}
.portal a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.arch {
  width: 136px;
  height: 160px;
  border: 1px solid var(--border-accent);
  border-radius: 50% 50% 0 0 / 40% 40% 0 0;
  overflow: hidden;
  box-shadow: 0 0 32px var(--glow-cool);
  background: var(--sky-1);
  transition: border-color var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease-enter);
}
.portal .dia {
  color: var(--accent);
  margin-top: var(--s1);
}
.portal-title {
  color: var(--text-1);
}
.portal-sub {
  font-size: var(--fs-sm);
  color: var(--text-3);
}
.portal a:hover .arch {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--glow);
  transform: translateY(-4px);
}
.portal a:focus-visible {
  outline: none;
}
.portal a:focus-visible .arch {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-color: var(--accent);
}
.portal.featured .arch {
  border-color: var(--accent-hover);
  box-shadow: 0 0 48px 4px var(--glow);
}
@media (prefers-reduced-motion: no-preference) {
  .portal.featured .arch {
    animation: breathe 2400ms cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
  }
}
@keyframes breathe { from { box-shadow: 0 0 32px 2px var(--glow); } to { box-shadow: 0 0 56px 8px var(--glow); } }
@media (max-width: 767px) {
  .portals {
    display: flex;
    justify-content: flex-start;
    gap: var(--s5);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: var(--s4) var(--s1) var(--s6);
    scrollbar-width: none;
  }
  .portal {
    scroll-snap-align: center;
  }
  .portal + .portal::before {
    display: none;
  }
}
