:root {
  --teal: #25b7ab;
  --teal-light: #8bf1e8;
  --teal-dark: #087d77;
  --navy: #0b2a46;
  --navy-deep: #051827;
  --white: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.76);
  --parallax-x: 0px;
  --parallax-y: 0px;
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 20rem;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a { font: inherit; }

.experience {
  isolation: isolate;
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--navy-deep);
}

.site-header {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 50%;
  width: min(100% - 3.5rem, 94rem);
  height: 6.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.78rem;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 48% 52% 44% 56% / 55% 42% 58% 45%;
  background: rgba(37, 183, 171, 0.88);
  box-shadow: 0 0.65rem 2rem rgba(0, 0, 0, 0.24);
  transform: rotate(-7deg);
  -webkit-backdrop-filter: blur(0.75rem);
  backdrop-filter: blur(0.75rem);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  background: var(--white);
}

.brand-mark::before {
  width: 1.42rem;
  height: 0.36rem;
  left: 0.69rem;
  top: 1.22rem;
}

.brand-mark::after {
  width: 0.36rem;
  height: 1.42rem;
  left: 1.22rem;
  top: 0.69rem;
}

.brand-copy {
  display: grid;
  line-height: 0.93;
  letter-spacing: -0.025em;
  text-shadow: 0 0.18rem 1.2rem rgba(0, 0, 0, 0.28);
}

.brand-copy strong {
  font-size: 1.12rem;
  font-weight: 800;
}

.brand-copy span {
  margin-top: 0.3rem;
  color: var(--teal-light);
  font-size: 0.87rem;
  font-weight: 690;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.68rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(5, 24, 39, 0.28);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.7rem;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(0.8rem);
  backdrop-filter: blur(0.8rem);
}

.header-note span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--teal-light);
  box-shadow: 0 0 0 0.3rem rgba(139, 241, 232, 0.13);
}

.portal-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.portal-stage::before {
  content: "";
  position: absolute;
  z-index: 12;
  inset: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2.25rem;
  pointer-events: none;
}

.portal-slide {
  --reveal-x: 23%;
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  clip-path: circle(0% at var(--reveal-x) 78%);
  pointer-events: none;
  transition:
    clip-path 950ms cubic-bezier(0.76, 0, 0.24, 1),
    opacity 250ms ease;
}

.portal-slide--pets { --reveal-x: 77%; }

.portal-slide.is-active {
  z-index: 2;
  opacity: 1;
  clip-path: circle(150% at var(--reveal-x) 78%);
  pointer-events: auto;
}

.portal-image {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.015);
  transition: transform 450ms ease-out;
}

.portal-slide.is-active .portal-image {
  animation: cinematic-drift 12s ease-out both;
}

.portal-slide--vets .portal-image { object-position: center center; }
.portal-slide--pets .portal-image { object-position: center center; }

.portal-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 20, 34, 0.94) 0%, rgba(3, 20, 34, 0.78) 26%, rgba(3, 20, 34, 0.16) 58%, rgba(3, 20, 34, 0.03) 100%),
    linear-gradient(180deg, rgba(2, 14, 24, 0.36) 0%, transparent 30%, rgba(2, 15, 25, 0.24) 76%, rgba(2, 15, 25, 0.82) 100%);
}

.portal-slide--pets .portal-overlay {
  background:
    linear-gradient(270deg, rgba(4, 29, 40, 0.94) 0%, rgba(4, 29, 40, 0.76) 27%, rgba(4, 29, 40, 0.1) 60%, rgba(4, 29, 40, 0.01) 100%),
    linear-gradient(180deg, rgba(32, 20, 5, 0.18) 0%, transparent 30%, rgba(4, 25, 29, 0.24) 76%, rgba(4, 25, 29, 0.84) 100%);
}

.portal-content {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: max(8vw, calc((100vw - 94rem) / 2 + 2rem));
  width: min(40rem, 43vw);
  transform: translateY(-48%);
}

.portal-slide--pets .portal-content {
  right: max(8vw, calc((100vw - 94rem) / 2 + 2rem));
  left: auto;
  text-align: right;
}

.audience-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  color: var(--teal-light);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.portal-slide--pets .audience-label { justify-content: flex-end; }

.audience-label span {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid rgba(139, 241, 232, 0.55);
  border-radius: 50%;
  background: rgba(37, 183, 171, 0.17);
  letter-spacing: 0;
}

.portal-content h1 {
  margin: 0;
  font-size: clamp(3.5rem, 6.4vw, 7.2rem);
  font-weight: 760;
  letter-spacing: -0.068em;
  line-height: 0.83;
  text-wrap: balance;
  text-shadow: 0 0.4rem 2.8rem rgba(0, 0, 0, 0.24);
}

.portal-content h1 em {
  color: var(--teal-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.88em;
  font-weight: 400;
  letter-spacing: -0.045em;
}

.portal-description {
  max-width: 32rem;
  margin: 1.5rem 0 1.65rem;
  color: var(--ink-soft);
  font-size: clamp(0.96rem, 1.2vw, 1.12rem);
  line-height: 1.6;
}

.portal-slide--pets .portal-description { margin-left: auto; }

.portal-link {
  display: inline-flex;
  min-height: 3.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.62rem 0.68rem 0.62rem 1.45rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 1rem 2.8rem rgba(0, 0, 0, 0.25);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.link-icon {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-size: 1.18rem;
  transition: transform 220ms ease, background 220ms ease;
}

.portal-link:hover,
.portal-link:focus-visible {
  outline: none;
  transform: translateY(-0.2rem);
  background: var(--white);
  box-shadow: 0 1.25rem 3.2rem rgba(0, 0, 0, 0.34);
}

.portal-link:hover .link-icon,
.portal-link:focus-visible .link-icon {
  background: var(--teal-dark);
  transform: rotate(45deg) scale(1.05);
}

.portal-slide.is-active .audience-label,
.portal-slide.is-active h1,
.portal-slide.is-active .portal-description,
.portal-slide.is-active .portal-link {
  animation: content-rise 700ms both;
}

.portal-slide.is-active h1 { animation-delay: 80ms; }
.portal-slide.is-active .portal-description { animation-delay: 150ms; }
.portal-slide.is-active .portal-link { animation-delay: 220ms; }

.portal-switcher {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 4.25rem;
  width: min(42rem, calc(100% - 3rem));
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.38rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 1.35rem;
  background: rgba(5, 24, 39, 0.56);
  box-shadow: 0 1.2rem 3.5rem rgba(0, 0, 0, 0.24);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(1.2rem);
  backdrop-filter: blur(1.2rem);
}

.switch-button {
  position: relative;
  min-width: 0;
  min-height: 4.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.8rem;
  padding: 0.72rem 0.9rem;
  overflow: hidden;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  text-align: left;
  cursor: pointer;
  transition: background 250ms ease, color 250ms ease;
}

.switch-button.is-active {
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
}

.switch-number {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.64rem;
  font-weight: 820;
  opacity: 0.74;
}

.switch-copy {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.switch-copy strong {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switch-copy small {
  overflow: hidden;
  font-size: 0.68rem;
  opacity: 0.68;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switch-progress {
  position: absolute;
  right: 0.9rem;
  bottom: 0.35rem;
  left: 0.9rem;
  height: 0.13rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(11, 42, 70, 0.12);
  opacity: 0;
}

.switch-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
}

.switch-button.is-active .switch-progress { opacity: 1; }
.switch-button.is-active .switch-progress::after { animation: progress 8s linear both; }

.stage-hint {
  position: absolute;
  z-index: 15;
  right: 2.2rem;
  bottom: 5.55rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.65rem;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

footer {
  position: absolute;
  z-index: 20;
  right: 2rem;
  bottom: 1.2rem;
  left: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.63rem;
  line-height: 1.35;
}

footer p { margin: 0; }

.notice {
  position: fixed;
  z-index: 50;
  right: 1.25rem;
  bottom: 1.25rem;
  width: min(27rem, calc(100% - 2.5rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1rem 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.15rem;
  background: rgba(5, 24, 39, 0.96);
  color: var(--white);
  box-shadow: 0 1.25rem 3.5rem rgba(2, 18, 30, 0.32);
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  -webkit-backdrop-filter: blur(0.9rem);
  backdrop-filter: blur(0.9rem);
}

.notice.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.notice div { display: grid; gap: 0.2rem; }
.notice strong { font-size: 0.94rem; }
.notice span { color: rgba(255, 255, 255, 0.7); font-size: 0.82rem; }

.notice button {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  cursor: pointer;
  font-size: 1.25rem;
}

@keyframes cinematic-drift {
  from { transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.06); }
  to { transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.015); }
}

@keyframes content-rise {
  from { opacity: 0; transform: translateY(1.2rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 64rem) {
  .portal-content { width: min(35rem, 51vw); }
  .portal-content h1 { font-size: clamp(3.2rem, 6.8vw, 5.5rem); }
  .stage-hint { display: none; }
}

@media (max-width: 48rem) {
  .site-header {
    width: calc(100% - 2rem);
    height: 4.7rem;
  }

  .header-note { display: none; }
  .brand-mark { width: 2.35rem; height: 2.35rem; }
  .brand-mark::before { width: 1.2rem; left: 0.57rem; top: 1rem; }
  .brand-mark::after { height: 1.2rem; left: 1rem; top: 0.57rem; }
  .brand-copy strong { font-size: 1rem; }
  .brand-copy span { font-size: 0.78rem; }

  .portal-stage::before {
    inset: 0.45rem;
    border-radius: 1.55rem;
  }

  .portal-slide {
    --reveal-x: 50%;
    clip-path: circle(0% at var(--reveal-x) 82%);
  }

  .portal-slide.is-active { clip-path: circle(155% at var(--reveal-x) 82%); }

  .portal-image {
    inset: 0;
    width: 100%;
    height: 62%;
    object-fit: cover;
    transform: scale(1.02);
  }

  .portal-slide--vets .portal-image { object-position: 64% center; }
  .portal-slide--pets .portal-image { object-position: 35% center; }

  .portal-overlay,
  .portal-slide--pets .portal-overlay {
    background:
      linear-gradient(180deg, rgba(3, 18, 30, 0.22) 0%, rgba(3, 18, 30, 0.02) 28%, rgba(4, 24, 38, 0.36) 51%, rgba(4, 24, 38, 0.96) 65%, var(--navy-deep) 100%),
      linear-gradient(90deg, rgba(3, 18, 30, 0.32), transparent 80%);
  }

  .portal-content,
  .portal-slide--pets .portal-content {
    top: auto;
    right: 1.25rem;
    bottom: 10.7rem;
    left: 1.25rem;
    width: auto;
    text-align: left;
    transform: none;
  }

  .audience-label,
  .portal-slide--pets .audience-label {
    justify-content: flex-start;
    margin-bottom: 0.62rem;
    font-size: 0.61rem;
  }

  .audience-label span { width: 1.9rem; height: 1.9rem; }

  .portal-content h1 {
    max-width: 24rem;
    font-size: clamp(2.4rem, 12vw, 3.7rem);
    line-height: 0.87;
  }

  .portal-description,
  .portal-slide--pets .portal-description {
    max-width: 29rem;
    margin: 0.75rem 0 0.85rem;
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .portal-link {
    min-height: 3.05rem;
    padding: 0.45rem 0.5rem 0.45rem 1.05rem;
    font-size: 0.77rem;
  }

  .link-icon { width: 2.08rem; height: 2.08rem; }

  .portal-switcher {
    bottom: 3.25rem;
    width: calc(100% - 1.6rem);
    padding: 0.28rem;
    border-radius: 1.05rem;
  }

  .switch-button {
    min-height: 3.75rem;
    gap: 0.5rem;
    padding: 0.55rem 0.58rem;
    border-radius: 0.82rem;
  }

  .switch-number { width: 1.85rem; height: 1.85rem; font-size: 0.57rem; }
  .switch-copy strong { font-size: 0.69rem; }
  .switch-copy small { display: none; }
  .switch-progress { right: 0.55rem; left: 0.55rem; }

  footer {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    font-size: 0.54rem;
  }

  footer p:first-child { max-width: 68%; }
}

@media (max-width: 24rem), (max-height: 43rem) and (max-width: 48rem) {
  .site-header { height: 4rem; }
  .portal-image { height: 58%; }

  .portal-content,
  .portal-slide--pets .portal-content { bottom: 9.3rem; }

  .portal-content h1 { font-size: clamp(2rem, 10.5vw, 2.8rem); }
  .portal-description { display: none; }
  .portal-link { margin-top: 0.7rem; }
  .portal-switcher { bottom: 2.8rem; }
  footer { bottom: 0.75rem; }
  footer p:first-child { display: none; }
}

@media (orientation: landscape) and (max-height: 36rem) {
  .site-header { height: 4rem; }
  .portal-content { top: 48%; width: 48vw; }
  .portal-content h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
  .portal-description { display: none; }
  .portal-link { margin-top: 1rem; }
  .portal-switcher { bottom: 2.5rem; width: min(36rem, 45vw); }
  footer { bottom: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
