:root {
  color-scheme: light;
  --text: oklch(0.2 0.02 250);
  --muted: oklch(0.42 0.018 250);
  --surface: oklch(1 0 0 / 0.22);
  --surface-strong: oklch(0.99 0.008 250 / 0.3);
  --line: oklch(0.98 0.006 250 / 0.42);
  --shadow: 0 24px 70px color-mix(in oklab, black 22%, transparent);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, color-mix(in oklab, white 10%, transparent), color-mix(in oklab, white 28%, transparent)),
    url("./utama.png") center 38% / cover no-repeat fixed;
}

body.has-fine-pointer {
  cursor: none;
}

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

.portal__cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  z-index: 50;
  background:
    radial-gradient(circle, rgb(105 147 255 / 0.3) 0 34%, transparent 35%),
    radial-gradient(circle, rgb(255 255 255 / 0.96) 0 10%, rgb(110 146 236 / 0.2) 11% 54%, transparent 55%);
  border: 1px solid rgb(57 89 170 / 0.42);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.55) inset,
    0 0 18px rgb(81 114 214 / 0.24);
  transform: translate3d(-50%, -50%, 0) scale(0.82);
  transition:
    opacity 180ms var(--ease-out-quart),
    transform 180ms var(--ease-out-quart),
    width 180ms var(--ease-out-quart),
    height 180ms var(--ease-out-quart);
}

.portal__cursor.is-visible {
  opacity: 1;
}

.portal__cursor.is-active {
  width: 42px;
  height: 42px;
  transform: translate3d(-50%, -50%, 0) scale(1);
}

.portal__sakura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.portal__petal {
  position: fixed;
  top: 12%;
  width: 34px;
  height: 34px;
  pointer-events: none;
  opacity: 0.66;
  animation:
    dandelion-drift var(--fall-duration, 17s) linear infinite,
    dandelion-sway var(--sway-duration, 4.8s) ease-in-out infinite alternate;
}

.portal__petal::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 22px;
  height: 1.5px;
  background: linear-gradient(90deg, rgb(153 169 211 / 0.55), rgb(255 255 255 / 0.12));
  transform: rotate(-30deg);
  transform-origin: left center;
}

.portal__petal::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgb(255 255 255 / 0.96) 0 18%, transparent 19%),
    repeating-conic-gradient(
      from 0deg,
      rgb(255 255 255 / 0.9) 0deg 6deg,
      transparent 6deg 18deg
    );
  filter: drop-shadow(0 0 10px rgb(255 255 255 / 0.18));
}

.portal__petal:nth-child(1) {
  left: 6%;
  --fall-duration: 18s;
  --sway-duration: 4.6s;
  animation-delay: -2s;
}

.portal__petal:nth-child(2) {
  left: 18%;
  top: 22%;
  --fall-duration: 15.5s;
  --sway-duration: 5.3s;
  animation-delay: -6s;
}

.portal__petal:nth-child(3) {
  left: 29%;
  top: 8%;
  width: 28px;
  height: 28px;
  --fall-duration: 16.8s;
  --sway-duration: 4.1s;
  animation-delay: -3.5s;
}

.portal__petal:nth-child(4) {
  left: 43%;
  top: 18%;
  --fall-duration: 19.2s;
  --sway-duration: 5.1s;
  animation-delay: -8s;
}

.portal__petal:nth-child(5) {
  left: 58%;
  top: 28%;
  width: 30px;
  height: 30px;
  --fall-duration: 14.8s;
  --sway-duration: 3.7s;
  animation-delay: -1.8s;
}

.portal__petal:nth-child(6) {
  left: 71%;
  top: 10%;
  --fall-duration: 17.4s;
  --sway-duration: 4.8s;
  animation-delay: -9s;
}

.portal__petal:nth-child(7) {
  left: 83%;
  top: 24%;
  width: 26px;
  height: 26px;
  --fall-duration: 15.9s;
  --sway-duration: 4.2s;
  animation-delay: -5s;
}

.portal__petal:nth-child(8) {
  left: 92%;
  top: 14%;
  width: 24px;
  height: 24px;
  --fall-duration: 18.7s;
  --sway-duration: 5.4s;
  animation-delay: -11s;
}

.portal {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 24px 24px 48px;
}

@keyframes dandelion-drift {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  to {
    transform: translate3d(14vw, 92vh, 0) rotate(220deg);
  }
}

@keyframes dandelion-sway {
  from {
    margin-left: -18px;
  }

  to {
    margin-left: 18px;
  }
}

.portal__overlay {
  width: min(100%, 760px);
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(180deg, var(--surface), var(--surface-strong));
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  box-shadow: var(--shadow);
  text-align: center;
  animation: overlay-rise 700ms var(--ease-out-expo) both;
}

.portal__mark {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.portal h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.portal__actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.portal__button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transform-style: preserve-3d;
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in oklab, white 28%, transparent);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.42),
    0 12px 30px color-mix(in oklab, black 12%, transparent);
  transform:
    perspective(900px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    translateY(0)
    scale(1);
  transition:
    transform 220ms var(--ease-out-quart),
    box-shadow 220ms var(--ease-out-quart),
    background-color 220ms var(--ease-out-quart),
    border-color 220ms var(--ease-out-quart),
    filter 220ms var(--ease-out-quart);
  animation: button-rise 560ms var(--ease-out-expo) both;
}

.portal__button::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(
    115deg,
    transparent 18%,
    rgb(255 255 255 / 0.34) 48%,
    transparent 76%
  );
  transform: translateX(-135%);
  transition: transform 420ms var(--ease-out-quart);
  z-index: -1;
}

.portal__button::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      180px circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
      rgb(255 255 255 / 0.28),
      transparent 62%
    );
  opacity: 0;
  transition: opacity 220ms var(--ease-out-quart);
  z-index: -1;
}

.portal__button:nth-child(2) {
  animation-delay: 90ms;
}

.portal__button:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--text) 28%, white);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .portal__button:hover {
    transform:
      perspective(900px)
      rotateX(var(--tilt-x, 0deg))
      rotateY(var(--tilt-y, 0deg))
      translateY(-4px)
      scale(1.015);
    background: color-mix(in oklab, white 34%, transparent);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.58),
      0 20px 44px color-mix(in oklab, black 16%, transparent);
    filter: saturate(1.03);
  }

  .portal__button:hover::before {
    transform: translateX(135%);
  }

  .portal__button:hover::after {
    opacity: 1;
  }
}

.portal__button:active {
  transform:
    perspective(900px)
    rotateX(calc(var(--tilt-x, 0deg) * 0.45))
    rotateY(calc(var(--tilt-y, 0deg) * 0.45))
    translateY(-1px)
    scale(0.985);
}

.portal__button.is-pressed {
  transform:
    perspective(900px)
    rotateX(calc(var(--tilt-x, 0deg) * 0.45))
    rotateY(calc(var(--tilt-y, 0deg) * 0.45))
    translateY(-1px)
    scale(0.982);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.5),
    0 10px 22px color-mix(in oklab, black 14%, transparent);
}

.portal__ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  pointer-events: none;
  background: rgb(255 255 255 / 0.42);
  transform: translate(-50%, -50%) scale(0);
  animation: button-ripple 560ms var(--ease-out-expo) forwards;
}

@keyframes overlay-rise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes button-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes button-ripple {
  from {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0);
  }

  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(18);
  }
}

@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }

  .portal {
    align-items: end;
    padding: 20px 20px 208px;
  }

  .portal__overlay {
    border-radius: 26px;
  }

  .portal__button {
    min-height: 82px;
    font-size: 1rem;
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal__cursor,
  .portal__sakura {
    display: none;
  }

  .portal__overlay,
  .portal__button,
  .portal__button::before {
    animation: none;
    transition: none;
  }

  .portal__button::after,
  .portal__ripple {
    display: none;
  }

  .portal__button:hover,
  .portal__button:active {
    transform: none;
  }
}
