/* 海南奶龙大学 — 「椰风开幕」tropical curtain + stamp */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: only light;
  --cream: #fdfaf3;
  --cream-deep: #f7f1e4;
  --ink: #2b271c;
  --muted: #777165;
  --gold: #ffd526;
  --gold-deep: #e6b800;
  --blue: #1353b7;
  --blue-soft: rgba(19, 83, 183, 0.14);
  --gold-soft: rgba(255, 213, 38, 0.35);
  --go-1: #fff07a;
  --go-2: #ffda2b;
  --go-3: #ffc800;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-stamp: cubic-bezier(0.2, 0.9, 0.3, 1.25);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: clip;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 90% 70% at 50% 38%, #fffef9 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 78% 72%, rgba(19, 83, 183, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 45% at 18% 78%, rgba(255, 213, 38, 0.1) 0%, transparent 55%),
    linear-gradient(168deg, var(--cream) 0%, var(--cream-deep) 100%);
  isolation: isolate;
}

/* —— Ambient glows (idle breathe) —— */
.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(48px);
  opacity: 0;
}
.stage[data-ready="true"] .glow {
  opacity: 1;
  animation: glow-breathe 6s ease-in-out infinite alternate;
}

.glow--gold {
  width: min(52vw, 420px);
  height: min(52vw, 420px);
  top: 8%;
  left: 6%;
  background: radial-gradient(circle, var(--gold-soft) 0%, transparent 70%);
  animation-delay: 3s;
}

.glow--blue {
  width: min(48vw, 380px);
  height: min(48vw, 380px);
  right: 4%;
  bottom: 10%;
  background: radial-gradient(circle, var(--blue-soft) 0%, transparent 70%);
  animation-delay: 3.4s;
}

@keyframes glow-breathe {
  from { opacity: 0.55; transform: scale(1); }
  to   { opacity: 1; transform: scale(1.08); }
}

/* —— Film grain —— */
.grain {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}


/* —— Soft coconut / wave ripples —— */
.ripples {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
}

.ripple {
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
}

.ripple--1 {
  stroke: rgba(19, 83, 183, 0.22);
  stroke-width: 1.6;
}
.ripple--2 {
  stroke: rgba(255, 213, 38, 0.35);
  stroke-width: 1.4;
}
.ripple--3 {
  stroke: rgba(19, 83, 183, 0.14);
  stroke-width: 1.2;
}
.ripple--leaf,
.ripple--leaf2 {
  stroke: rgba(19, 83, 183, 0.18);
  stroke-width: 1.3;
  fill: rgba(255, 213, 38, 0.06);
}

.stage[data-ready="true"] .ripple {
  animation: ripple-draw 1s var(--ease-soft) forwards;
}
.stage[data-ready="true"] .ripple--1 { animation-delay: 0.4s; }
.stage[data-ready="true"] .ripple--2 { animation-delay: 0.55s; }
.stage[data-ready="true"] .ripple--3 { animation-delay: 0.7s; }
.stage[data-ready="true"] .ripple--leaf { animation-delay: 0.85s; }
.stage[data-ready="true"] .ripple--leaf2 { animation-delay: 0.95s; }

@keyframes ripple-draw {
  0%   { stroke-dashoffset: 1; opacity: 0; }
  15%  { opacity: 0.9; }
  100% { stroke-dashoffset: 0; opacity: 0.75; }
}

/* —— Cream-gold curtains —— */
.curtains {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  display: flex;
}

.curtain {
  flex: 1;
  height: 100%;
  background:
    linear-gradient(
      180deg,
      #fff8e0 0%,
      #fdf3d0 18%,
      #f7e8b8 45%,
      #f0d99a 70%,
      #e8cc7a 100%
    );
  box-shadow:
    inset 0 0 40px rgba(230, 184, 0, 0.25),
    0 0 28px rgba(43, 39, 28, 0.12);
  will-change: transform;
}

.curtain--left {
  border-right: 1px solid rgba(230, 184, 0, 0.35);
  transform-origin: left center;
  box-shadow:
    inset -12px 0 28px rgba(230, 184, 0, 0.2),
    8px 0 32px rgba(43, 39, 28, 0.14);
}

.curtain--right {
  border-left: 1px solid rgba(230, 184, 0, 0.35);
  transform-origin: right center;
  box-shadow:
    inset 12px 0 28px rgba(230, 184, 0, 0.2),
    -8px 0 32px rgba(43, 39, 28, 0.14);
}

/* Decorative fold lines */
.curtain::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 28px,
    rgba(230, 184, 0, 0.08) 28px,
    rgba(230, 184, 0, 0.08) 30px
  );
  pointer-events: none;
}

.stage[data-ready="true"] .curtain--left {
  animation: curtain-left 0.8s var(--ease) forwards;
}
.stage[data-ready="true"] .curtain--right {
  animation: curtain-right 0.8s var(--ease) forwards;
}

@keyframes curtain-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-102%); }
}
@keyframes curtain-right {
  0%   { transform: translateX(0); }
  100% { transform: translateX(102%); }
}

/* —— Tape sticker (slide + peel from right) —— */
.sticker {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 6;
  pointer-events: none;
  perspective: 400px;
}

.sticker__tape {
  display: inline-block;
  position: relative;
  padding: 0.45rem 0.85rem 0.4rem;
  background: linear-gradient(180deg, #1a66d4 0%, var(--blue) 55%, #0e4294 100%);
  color: #f7fbff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-radius: 3px 4px 3px 4px;
  transform: rotate(8deg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 4px 12px rgba(19, 83, 183, 0.28),
    0 1px 2px rgba(43, 39, 28, 0.12);
  opacity: 0;
}

.sticker__tape::before,
.sticker__tape::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  opacity: 0.22;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 2px,
    rgba(255, 255, 255, 0.7) 2px 3px
  );
}
.sticker__tape::before { left: 2px; }
.sticker__tape::after  { right: 2px; }

.stage[data-ready="true"] .sticker__tape {
  animation: sticker-peel 0.8s var(--ease) 1.8s forwards;
}

@keyframes sticker-peel {
  0% {
    opacity: 0;
    transform: rotate(18deg) translateX(60px) translateY(-8px) scale(0.9);
    filter: brightness(1.1);
  }
  55% {
    opacity: 1;
    transform: rotate(4deg) translateX(-4px) translateY(2px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: rotate(8deg) translateX(0) translateY(0) scale(1);
    filter: brightness(1);
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1.25rem 4.5rem;
  max-width: 640px;
  width: 100%;
}

/* —— Crest / seal — drop + squash/stretch —— */
.seal-wrap {
  margin-bottom: 1.35rem;
  perspective: 800px;
  opacity: 0;
  transform: translateY(-120px) scale(0.7, 1.25);
}

.stage[data-ready="true"] .seal-wrap {
  animation: seal-drop 1.1s var(--ease-bounce) 0.9s forwards;
}

@keyframes seal-drop {
  0% {
    opacity: 0;
    transform: translateY(-120px) scale(0.72, 1.28);
  }
  55% {
    opacity: 1;
    transform: translateY(8px) scale(1.12, 0.88);
  }
  72% {
    transform: translateY(-4px) scale(0.96, 1.06);
  }
  88% {
    transform: translateY(2px) scale(1.03, 0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1, 1);
  }
}

.seal {
  position: relative;
  width: min(248px, 58vw);
  height: min(248px, 58vw);
  display: grid;
  place-items: center;
  will-change: transform;
}

.seal--crest {
  width: min(280px, 64vw);
  height: auto;
  aspect-ratio: 1179 / 1214;
}

.seal__crest {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 14px 22px rgba(43, 39, 28, 0.14));
}

/* Idle bob — starts after entrance */

.bob {
  animation: none;
}
.stage[data-ready="true"] .bob {
  animation: bob 3.6s ease-in-out 3.2s infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* —— Type —— */
.title {
  font-size: clamp(1.85rem, 6.2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
  opacity: 0;
  transform: scale(1.45) translateY(-24px);
  transform-origin: center center;
}

.stage[data-ready="true"] .title {
  animation: title-stamp 0.8s var(--ease-stamp) 1.5s forwards;
}

@keyframes title-stamp {
  0% {
    opacity: 0;
    transform: scale(1.5) translateY(-28px);
    filter: blur(2px);
  }
  45% {
    opacity: 1;
    transform: scale(0.92) translateY(4px);
    filter: blur(0);
  }
  70% {
    transform: scale(1.06) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.title__dot {
  color: var(--gold-deep);
  margin-left: 0.02em;
  display: inline-block;
  opacity: 0;
  transform: scale(0);
}

.stage[data-ready="true"] .title__dot {
  animation: dot-pop 0.45s var(--ease-bounce) 2.05s forwards;
}

@keyframes dot-pop {
  0%   { opacity: 0; transform: scale(0); }
  60%  { opacity: 1; transform: scale(1.45); }
  100% { opacity: 1; transform: scale(1); }
}

.escort {
  font-size: clamp(0.8rem, 2.2vw, 0.92rem);
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 0.55rem;
  opacity: 0;
  transform: translateY(12px);
}

.stage[data-ready="true"] .escort {
  animation: fade-up 0.8s var(--ease) 2.2s forwards;
}

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

.tagline {
  margin-top: 0.2rem;
  font-size: clamp(0.72rem, 2vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--blue);
  opacity: 0.85;
}

.tagline__scribble {
  display: inline-block;
  font-style: italic;
  opacity: 0;
  /* scribble draw via clip */
  clip-path: inset(0 100% 0 0);
}

.stage[data-ready="true"] .tagline__scribble {
  animation: scribble-draw 0.8s var(--ease-soft) 2.4s forwards;
}

@keyframes scribble-draw {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateX(-6px) rotate(-2deg);
  }
  30% { opacity: 1; }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateX(0) rotate(0deg);
  }
}

/* —— GO CTA —— */
.cta-wrap {
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  opacity: 0;
  transform: scale(0.6);
}

.stage[data-ready="true"] .cta-wrap {
  animation: go-spring 0.9s var(--ease-bounce) 2.5s forwards;
}

@keyframes go-spring {
  0% {
    opacity: 0;
    transform: scale(0.55) rotate(-8deg);
  }
  55% {
    opacity: 1;
    transform: scale(1.08) rotate(-2deg);
  }
  78% {
    transform: scale(0.96) rotate(-4deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.go {
  position: relative;
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 148px;
  padding: 0.95rem 1.55rem 0.95rem 1.7rem;
  border-radius: 999px;
  background: linear-gradient(165deg, var(--go-1) 0%, var(--go-2) 48%, var(--go-3) 100%);
  color: #2b271c;
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  transform: rotate(-3.5deg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 -2px 0 rgba(200, 140, 0, 0.25) inset,
    0 8px 0 #e0a800,
    0 12px 28px rgba(255, 200, 0, 0.35),
    0 4px 10px rgba(43, 39, 28, 0.1);
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    filter 0.25s ease;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.go:hover {
  transform: rotate(-3.5deg) translateY(-2px) scale(1.03);
  filter: brightness(1.03);
}
.go:active {
  transform: rotate(-3.5deg) translateY(3px) scale(0.98);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 3px 0 #e0a800,
    0 6px 14px rgba(255, 200, 0, 0.28);
}

.go:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.go__sheen {
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.55) 48%,
    transparent 56%
  );
  opacity: 0;
  pointer-events: none;
}

.stage[data-ready="true"] .go__sheen {
  animation: sheen 3.8s ease-in-out 3.6s infinite;
}

@keyframes sheen {
  0%, 55% { transform: translateX(-30%) rotate(0deg); opacity: 0; }
  60%     { opacity: 1; }
  75%     { transform: translateX(30%) rotate(0deg); opacity: 0; }
  100%    { opacity: 0; }
}

.go__label { position: relative; z-index: 1; }

.go__arrow {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #2b271c;
  transition: transform 0.15s linear;
  transform-origin: center;
}

.cta-hint {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* —— Footer —— */
.foot {
  position: absolute;
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  z-index: 5;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  opacity: 0;
}

.stage[data-ready="true"] .foot {
  animation: fade-up 0.7s var(--ease) 3s forwards;
}

/* —— Gold RADIAL wipe —— */
.wipe {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    #fff7b0 0%,
    var(--gold) 35%,
    #ffc800 60%,
    #ffe566 100%
  );
  opacity: 0;
  transform: scale(0);
  border-radius: 50%;
  /* expand from center to cover full viewport */
  width: 300vmax;
  height: 300vmax;
  left: 50%;
  top: 50%;
  margin-left: -150vmax;
  margin-top: -150vmax;
}

.wipe.is-on {
  pointer-events: all;
  animation: wipe-radial 1s var(--ease-soft) forwards;
}

@keyframes wipe-radial {
  0%   { opacity: 0.85; transform: scale(0); }
  40%  { opacity: 1; transform: scale(0.45); }
  100% { opacity: 1; transform: scale(1); }
}

/* —— Reduced motion —— */
@media (prefers-reduced-motion: reduce) {
  .glow,
  .bob,
  .go__sheen,
  .ripple,
  .curtain--left,
  .curtain--right,
  .seal-wrap,
  .title,
  .title__dot,
  .escort,
  .tagline__scribble,
  .cta-wrap,
  .sticker__tape,
  .foot {
    animation: none !important;
  }

  .curtains { display: none; }

  .stage[data-ready="true"] .glow,
  .stage[data-ready="true"] .seal-wrap,
  .stage[data-ready="true"] .title,
  .stage[data-ready="true"] .title__dot,
  .stage[data-ready="true"] .escort,
  .stage[data-ready="true"] .tagline__scribble,
  .stage[data-ready="true"] .cta-wrap,
  .stage[data-ready="true"] .sticker__tape,
  .stage[data-ready="true"] .foot,
  .stage[data-ready="true"] .ripple {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    stroke-dashoffset: 0 !important;
  }

  .sticker__tape {
    transform: rotate(8deg) !important;
  }

  .wipe.is-on {
    animation: none;
    opacity: 1;
    transform: scale(1);
    border-radius: 0;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    margin: 0;
  }
}

/* —— Narrow —— */
@media (max-height: 640px) {
  .seal--crest { width: min(200px, 52vw); }
  .hero { padding-bottom: 3.2rem; }
  .title { font-size: clamp(1.5rem, 5vw, 2rem); }
  .cta-wrap { margin-top: 1rem; }
}
