:root {
  color-scheme: dark;
  --ink: #eaf0ff;
  --muted: #9db0d4;
  --soft: #7386a8;
  --accent: #9cc0ff;
  --accent-deep: #bcd6ff;
  --glass: rgba(12, 18, 42, .42);
  --glass-line: rgba(150, 180, 255, .16);
  --cycle-duration: 4800ms;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: #04061a;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: #04061a;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, a { font: inherit; }

/* ---------- Pinned scene scaffolding ---------- */
.scene-wrap {
  position: relative;
  height: 280svh; /* scroll runway for the pinned camera move */
}

.scene {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #04061a 0%, #0a0f2e 34%, #141042 62%, #1d1149 100%);
}

.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform, opacity;
  transform-origin: 50% 100%;
}

/* ---------- SKY ---------- */
.sky { z-index: 1; }

.galaxy {
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(ellipse 40% 62% at 62% 30%, rgba(120, 90, 220, .34), transparent 60%),
    radial-gradient(ellipse 26% 44% at 38% 22%, rgba(60, 110, 220, .26), transparent 64%),
    radial-gradient(ellipse 70% 40% at 50% 60%, rgba(90, 60, 170, .18), transparent 70%);
  filter: blur(6px);
}

.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(26px);
  opacity: .55;
  will-change: transform;
}
.nebula--one {
  width: 60vmin; height: 36vmin;
  top: 14%; left: 8%;
  background: radial-gradient(circle at 50% 50%, rgba(150, 110, 255, .5), rgba(80, 60, 200, .12) 60%, transparent 72%);
  animation: nebula-drift 26s ease-in-out infinite alternate;
}
.nebula--two {
  width: 52vmin; height: 32vmin;
  top: 30%; right: 4%;
  background: radial-gradient(circle at 50% 50%, rgba(80, 140, 255, .42), rgba(40, 90, 200, .1) 62%, transparent 74%);
  animation: nebula-drift 34s ease-in-out infinite alternate-reverse;
}

/* Stars are generated as small spans by script.js. */
.stars, .band-stars, .twinkles { position: absolute; inset: 0; }
.star {
  position: absolute;
  width: var(--s, 2px);
  height: var(--s, 2px);
  background: #dce6ff;
  box-shadow: 0 0 4px rgba(190, 210, 255, .8);
}
.band-stars .star { background: #c8d4ff; box-shadow: 0 0 3px rgba(160, 180, 255, .6); }

.twinkles .star { animation: twinkle var(--dur, 4s) ease-in-out var(--delay, 0s) infinite; }

.moon {
  position: absolute;
  top: 16%; right: 16%;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fdfaf0, #e9e3cd 55%, #cfc8b0 100%);
  box-shadow: 0 0 40px 14px rgba(240, 236, 210, .28), 0 0 120px 50px rgba(180, 190, 255, .12);
}
.moon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 40%, rgba(160, 156, 132, .35) 0 9%, transparent 10%),
    radial-gradient(circle at 40% 66%, rgba(160, 156, 132, .3) 0 7%, transparent 8%),
    radial-gradient(circle at 55% 74%, rgba(160, 156, 132, .25) 0 5%, transparent 6%);
}

.shooting {
  position: absolute;
  top: 22%; left: 68%;
  width: 120px; height: 2px;
  background: linear-gradient(90deg, rgba(223, 233, 255, .95), rgba(223, 233, 255, 0));
  opacity: 0;
  /* Bright head sits at the left end; travel is down-left, so the tail must
     trail up-right. That needs a negative angle. */
  transform: rotate(-18deg);
  animation: shooting 9s ease-in 3s infinite;
}

/* ---------- HORIZON ---------- */
.mountains { z-index: 2; top: auto; bottom: 34%; height: 26%; }
.horizon-glow {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(120, 140, 220, .12));
}

/* ---------- OCEAN ---------- */
.ocean { z-index: 3; top: auto; bottom: 0; height: 46%; }

/* Moon reflection on the water: broken dashes under a soft elliptical mask,
   so it reads as glitter on the swell instead of a hard spotlight cone. */
.moon-path {
  position: absolute;
  /* Centred under the moon (right 16% + half of 84px ≈ 79%). */
  left: 64%;
  top: 0;
  width: 30%;
  height: 100%;
  background:
    repeating-linear-gradient(180deg, rgba(240, 240, 218, .55) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(180deg, rgba(206, 220, 255, .3) 0 1px, transparent 1px 13px);
  mask-image: radial-gradient(ellipse 46% 96% at 50% 0%, #000 0 30%, transparent 74%);
  opacity: .6;
  filter: blur(1.5px);
}

/* Scalloped crests: one radial gradient per swell, repeated horizontally.
   Reads as rolling water instead of the old flat stripes. */
.waves {
  position: absolute;
  left: -6%; right: -6%;
  background-repeat: repeat-x;
  background-size: 260px 100%;
}
.waves--back {
  top: 4%;
  height: 26%;
  opacity: .55;
  background-image:
    radial-gradient(ellipse 58px 15px at 50% 100%, rgba(150, 190, 255, .55), transparent 72%),
    radial-gradient(ellipse 44px 11px at 22% 100%, rgba(120, 165, 245, .4), transparent 74%);
  animation: wave-shift 13s linear infinite;
}
.waves--front {
  top: 22%;
  height: 34%;
  opacity: .4;
  background-image:
    radial-gradient(ellipse 74px 20px at 50% 100%, rgba(90, 135, 215, .6), transparent 70%),
    radial-gradient(ellipse 52px 14px at 18% 100%, rgba(70, 115, 200, .45), transparent 72%);
  background-size: 340px 100%;
  animation: wave-shift 9s linear infinite reverse;
}
/* No separate foam layer: an evenly combed dash pattern repeated the same
   regardless of where the crests were, reading as stripes. The crest
   gradients below carry their own highlight instead. */
.sea-glint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(60, 90, 160, .35), rgba(6, 20, 40, .85) 90%);
}
/* Moonlight catching the swell tops. */
.sea-glint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 30% 22% at 68% 12%, rgba(226, 234, 255, .22), transparent 70%);
  animation: glint-drift 7s ease-in-out infinite alternate;
}

/* ---------- SHORE ---------- */
.shore { z-index: 4; top: auto; bottom: 0; height: 22%; }
/* Warm dune tones with grain, wet-sand sheen at the waterline, and a soft
   crest instead of the old flat polygon. */
.sand {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(196, 176, 146, .16), transparent 70%),
    repeating-linear-gradient(94deg, rgba(255, 245, 220, .045) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(2deg, rgba(0, 0, 0, .05) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #3b3345 0%, #2a2434 38%, #1a1622 100%);
  clip-path: polygon(0 34%, 18% 42%, 42% 30%, 66% 44%, 86% 32%, 100% 40%, 100% 100%, 0 100%);
}
/* Wet band where the sea meets the sand. */
.sand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(160, 190, 240, .18), transparent 26%);
  clip-path: inherit;
}

.palms { z-index: 5; top: auto; bottom: 6%; height: 52%; color: #04060f; }
/* Coconuts: a touch lighter than the silhouette so they read against the trunk. */
.palm .coconuts { fill: rgba(255, 214, 140, .22); }

.palm {
  position: absolute;
  bottom: 0;
  height: 100%;
  width: auto;
  filter: drop-shadow(0 0 18px rgba(0, 0, 0, .5));
  transform-origin: 50% 100%;
  animation: palm-sway 9s ease-in-out infinite alternate;
}
.palm--left { left: -2%; height: 104%; }
.palm--right { right: -1%; height: 88%; animation: palm-sway-mirror 11s ease-in-out -3s infinite alternate; }
/* Laid almost flat across the sand, rocking slower because it is heavier. */
.palm--lean {
  left: 22%;
  bottom: -6%;
  height: 74%;
  opacity: .92;
  transform: rotate(74deg);
  animation: palm-lean-sway 14s ease-in-out infinite alternate;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 100% at 50% 42%, transparent 52%, rgba(2, 4, 14, .66) 100%);
}

/* ---------- PINNED UI ---------- */
.ui {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 4vh, 34px);
  padding: clamp(26px, 6vh, 60px) clamp(20px, 5vw, 56px) clamp(20px, 4vh, 34px);
  pointer-events: none;
  /* --part (0→1) is driven by scroll in script.js once Hihuu starts to appear. */
  --part: 0;
}
.ui-content {
  display: flex;
  width: min(660px, 100%);
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* Greeting lifts, Quick Access drops, so Hihuu gets a clear gap between them.
   Kept small on purpose: the words should feel like a nudge, not a split. */
.ui-content .greeting-window { transform: translate3d(0, calc(var(--part) * -7vh), 0); }
.ui-content .quick { transform: translate3d(0, calc(var(--part) * 6vh), 0); }
.ui-content .cta { opacity: calc(1 - var(--part) * 1.6); }

/* On phones the viewport is short, so even 7vh reads as a long slide. */
@media (max-width: 700px) {
  .ui-content .greeting-window { transform: translate3d(0, calc(var(--part) * -4vh), 0); }
  .ui-content .quick { transform: translate3d(0, calc(var(--part) * 3.5vh), 0); }
}
.ui a, .ui .quick-grid { pointer-events: auto; }

.greeting-window {
  display: grid;
  width: 100%;
  min-height: clamp(96px, 13vw, 140px);
  place-items: center;
}

.greeting-copy { width: 100%; will-change: transform, opacity, clip-path, filter; }
.greeting-copy.is-entering { animation: slide-reveal-in .9s cubic-bezier(.19, 1, .22, 1) both; }
.greeting-copy.is-leaving { animation: slide-reveal-out .44s cubic-bezier(.7, 0, .84, 0) both; }

.greeting-title {
  margin: 0 auto;
  color: #f2f6ff;
  font-size: clamp(26px, 4.8vw, 46px);
  font-weight: 660;
  letter-spacing: -.04em;
  line-height: 1.16;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(4, 8, 24, .8), 0 1px 2px rgba(0, 0, 0, .5);
}
.greeting-title span {
  color: #a8c6ff;
  font-weight: 780;
  text-shadow: 0 0 22px rgba(120, 160, 255, .55);
}

/* ---------- CTA ---------- */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(16px, 2.6vh, 26px);
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: rgba(20, 28, 58, .55);
  box-shadow: 0 8px 26px rgba(2, 4, 16, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 650;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.cta svg { width: 16px; height: 16px; transition: transform .25s ease; }
.cta:hover {
  transform: translateY(-2px);
  background: rgba(34, 48, 90, .7);
  border-color: rgba(170, 200, 255, .34);
  box-shadow: 0 12px 34px rgba(20, 40, 100, .5), 0 0 24px rgba(120, 160, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.cta:hover svg { transform: translateX(3px); }
.cta:active { transform: translateY(0); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .5); }
.cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Hihuu reveal (late scroll) ---------- */
.hihuu {
  position: absolute;
  /* Above the pinned UI so the word is never covered by the parting content.
     Safe: .hihuu is pointer-events:none, so it never steals clicks. */
  z-index: 11;
  top: 50%; left: 50%;
  margin: 0;
  color: #eaf2ff;
  font-size: clamp(48px, 12vw, 132px);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1;
  text-shadow: 0 0 30px rgba(140, 180, 255, .65), 0 8px 40px rgba(4, 8, 30, .9);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 60vh, 0);
  will-change: transform, opacity;
}

/* ---------- Quick Access ---------- */
.quick {
  width: 100%;
  margin-top: clamp(22px, 3.4vh, 34px);
}
.quick-title {
  margin: 0 0 clamp(12px, 2vh, 18px);
  color: #8ea3c8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .28em;
  text-align: center;
  text-transform: uppercase;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.2vw, 14px);
}
.quick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  color: var(--ink);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform .28s cubic-bezier(.2, .7, .3, 1), border-color .28s ease, box-shadow .28s ease, background .28s ease;
  text-align: left;
}
a.quick-card:hover {
  transform: translateY(-3px);
  background: rgba(24, 36, 74, .6);
  border-color: rgba(170, 200, 255, .3);
  box-shadow: 0 10px 26px rgba(10, 24, 60, .45), 0 0 20px rgba(120, 160, 255, .16);
}
a.quick-card:active { transform: translateY(0); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .4); }
a.quick-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.quick-card.is-soon { opacity: .68; }

.quick-icon {
  display: grid;
  width: 30px; height: 30px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(160deg, rgba(120, 150, 230, .22), rgba(60, 80, 160, .12));
  color: #a8c6ff;
}
.quick-icon svg { width: 16px; height: 16px; }
.quick-name { font-size: 12.5px; font-weight: 700; letter-spacing: -.01em; }
.quick-desc { color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.quick-badge {
  position: absolute;
  top: 10px; right: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(120, 150, 230, .16);
  color: #9fb4dc;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- UI footer ---------- */
.ui-footer {
  position: absolute;
  left: 0; right: 0; bottom: clamp(14px, 3vh, 26px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 56px);
  color: #7c8fb4;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.ui-brand { color: #a7b8d8; font-weight: 850; letter-spacing: .22em; }
.ui-scroll { display: inline-flex; align-items: center; gap: 7px; }
.ui-scroll::after {
  content: "";
  width: 5px; height: 5px;
  border-right: 1px solid #8fa2c6;
  border-bottom: 1px solid #8fa2c6;
  transform: rotate(45deg);
  animation: scroll-nudge 2.2s ease-in-out infinite;
}

/* ---------- Postlude ---------- */
.postlude {
  position: relative;
  padding: 34px 20px;
  background: #04061a;
  color: #6f82a6;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .18em;
  text-align: center;
  text-transform: uppercase;
}

/* ---------- Bonfire (beach) ----------
   Pixel-art logs and stepped flame on the sand. Positioned absolutely on the
   .shore layer; every child (glow, flame layers, sparks) is keyed off it. */
.bonfire {
  position: absolute;
  bottom: 2%;
  left: 16%;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.bonfire svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  overflow: visible;
}

/* Cahaya hangat di belakang api */
.bonfire-glow {
  position: absolute;
  inset: -35%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 145, 48, 0.45) 0%,
    rgba(255, 78, 20, 0.18) 45%,
    rgba(255, 78, 20, 0) 72%
  );
  pointer-events: none;
  animation: glow-pulse 1.8s ease-in-out infinite alternate;
}

/* Animasi tiap lapisan api dengan ritme berbeda agar terasa hidup */
.flame-outer {
  transform-origin: 8px 11px;
  animation: flicker-outer 0.85s steps(3, end) infinite alternate;
}

.flame-inner {
  transform-origin: 8px 10px;
  animation: flicker-inner 0.65s steps(2, end) infinite alternate;
}

.flame-core {
  transform-origin: 8px 10px;
  animation: flicker-core 0.5s steps(2, end) infinite alternate;
}

/* Animasi percikan api melayang */
.spark {
  animation: spark-rise 1.6s steps(4, end) infinite;
}
.spark.s2 {
  animation-delay: 0.55s;
  animation-duration: 1.9s;
}
.spark.s3 {
  animation-delay: 1.1s;
  animation-duration: 1.5s;
}

@keyframes flicker-outer {
  0%   { transform: scaleY(1) scaleX(1); }
  50%  { transform: scaleY(1.06) scaleX(0.96) translateY(-0.3px); }
  100% { transform: scaleY(0.95) scaleX(1.03); }
}

@keyframes flicker-inner {
  0%   { transform: scaleY(0.96) translateX(0); }
  100% { transform: scaleY(1.07) translateX(0.3px); }
}

@keyframes flicker-core {
  0%   { transform: scale(1); }
  100% { transform: scale(0.92, 1.08); }
}

@keyframes spark-rise {
  0%   { transform: translateY(2px); opacity: 1; }
  70%  { opacity: 0.9; }
  100% { transform: translateY(-3px); opacity: 0; }
}

@keyframes glow-pulse {
  0%   { transform: scale(0.94); opacity: 0.85; }
  100% { transform: scale(1.08); opacity: 1; }
}

/* ---------- Keyframes ---------- */
@keyframes slide-reveal-in {
  0% { opacity: 0; filter: blur(9px); clip-path: inset(0 0 100% 0); transform: translate3d(0, 34px, 0); }
  58% { opacity: 1; filter: blur(0); clip-path: inset(0 0 0 0); }
  100% { opacity: 1; filter: blur(0); clip-path: inset(0 0 0 0); transform: translate3d(0, 0, 0); }
}
@keyframes slide-reveal-out {
  0% { opacity: 1; filter: blur(0); clip-path: inset(0 0 0 0); transform: translate3d(0, 0, 0); }
  100% { opacity: 0; filter: blur(6px); clip-path: inset(0 0 100% 0); transform: translate3d(0, -22px, 0); }
}
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes nebula-drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(4%, -3%, 0) scale(1.08); } }
@keyframes wave-shift { from { background-position: 0 0; } to { background-position: -340px 0; } }
@keyframes glint-drift { from { transform: translate3d(-2%, 0, 0); opacity: .75; } to { transform: translate3d(2%, 1%, 0); opacity: 1; } }
/* Wind: a couple of degrees of lean, slow enough to read as a breeze. */
@keyframes palm-sway { from { transform: rotate(-1.1deg); } to { transform: rotate(1.4deg); } }
/* The right palm is mirrored; the animation must repeat scaleX(-1) or the
   transform is replaced and the palm un-flips. */
@keyframes palm-sway-mirror { from { transform: scaleX(-1) rotate(-1.1deg); } to { transform: scaleX(-1) rotate(1.4deg); } }
@keyframes palm-lean-sway { from { transform: rotate(72.5deg); } to { transform: rotate(75.5deg); } }
@keyframes shooting {
  0%, 88% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-18deg); }
  90% { opacity: 1; transform: translate3d(0, 0, 0) rotate(-18deg); }
  96% { opacity: 1; transform: translate3d(-260px, 84px, 0) rotate(-18deg); }
  100% { opacity: 0; transform: translate3d(-300px, 96px, 0) rotate(-18deg); }
}
@keyframes scroll-nudge { 0%, 100% { transform: translateY(0) rotate(45deg); } 50% { transform: translateY(4px) rotate(45deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .scene-wrap { height: 220svh; }
  /* Keep the CTA and cards in thumb reach, clear of the footer line. */
  .ui { padding: 20px 16px 16px; gap: 14px; }
  .greeting-window { min-height: 84px; }
  .greeting-title { font-size: clamp(23px, 6.6vw, 32px); }
  .cta { padding: 12px 20px; font-size: 14px; min-height: 44px; }
  .quick { margin-top: 18px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .quick-card { padding: 11px 10px 10px; }
  .quick-name { font-size: 13px; }
  .quick-desc { font-size: 11.5px; }
  .moon { width: 60px; height: 60px; top: 12%; right: 12%; }
  .palm--left { height: 86%; }
  .palm--right { height: 72%; }
  .palm--lean { left: 14%; height: 60%; bottom: -4%; }
  .moon-path { left: 66%; width: 28%; }
  .ui-footer { font-size: 8px; letter-spacing: .12em; padding: 0 16px; }
  /* Blur is the expensive part on phones; trim it. */
  .nebula { filter: blur(18px); }
  .quick-card { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
}

@media (max-width: 380px) {
  .greeting-title { font-size: 22px; }
  .quick-desc { display: none; }
  .quick-card { padding: 10px 9px; }
  .ui-footer { font-size: 7px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .scene-wrap { height: 180svh; }
  .greeting-window { min-height: 60px; }
  .greeting-title { font-size: 22px; }
  .quick { margin-top: 12px; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-desc { display: none; }
}

/* ---------- Cross-document view transition (welcome page side) ---------- */
/* Warp-speed time traveller: the beach sky stretches into streaking stars while
   the cosmos sky flies in. Named layers only — no root-level animation, so a
   back-navigation from /home can never land on an invisible snapshot. */
@view-transition { navigation: auto; }

.sky { view-transition-name: hw-cosmos; }
.hihuu { view-transition-name: hw-welcome-hihuu; }
/* .ui has no transition name: it is transformed by the scroll camera, and a
   named snapshot would freeze the parting mid-flight. */

::view-transition-old(hw-cosmos) { animation: vt-cosmos-old 1.6s cubic-bezier(.65, 0, .35, 1) both; }
::view-transition-new(hw-cosmos) { animation: vt-cosmos-new 1.6s cubic-bezier(.65, 0, .35, 1) both; }
::view-transition-old(hw-welcome-hihuu) { animation: vt-ui-out .3s ease both; }
::view-transition-new(hw-welcome-hihuu) { animation: vt-ui-in .4s ease both; }

@keyframes vt-cosmos-old {
  from { transform: scale(1) translate3d(0, -2%, 0); opacity: 1; }
  to { transform: scale(1.55) translate3d(-3%, -6%, 0); opacity: 1; }
}
@keyframes vt-cosmos-new {
  from { transform: scale(1.35) translate3d(3%, -3%, 0); opacity: 1; }
  to { transform: scale(1) translate3d(0, 0, 0); opacity: 1; }
}
@keyframes vt-ui-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.94); } }
@keyframes vt-ui-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

/* Speedline overlay that sweeps horizontally during the warp. */
::view-transition-group(hw-cosmos)::before,
::view-transition-group(hw-cosmos)::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120%;
  left: -10%;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 1.2%,
    rgba(180, 210, 255, .08) 1.2% 1.6%,
    transparent 1.6% 2.8%
  );
  opacity: 0;
  animation: speedline-sweep 1.6s cubic-bezier(.65, 0, .35, 1) both;
  pointer-events: none;
}
::view-transition-group(hw-cosmos)::after {
  animation-delay: .12s;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 2.1%,
    rgba(180, 210, 255, .05) 2.1% 2.5%,
    transparent 2.5% 4.2%
  );
}
@keyframes speedline-sweep {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  12% { opacity: 1; transform: translate3d(-8%, 0, 0); }
  88% { opacity: 1; transform: translate3d(8%, 0, 0); }
  100% { opacity: 0; transform: translate3d(16%, 0, 0); }
}

/* ---------- Reduced motion: static, readable world ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .greeting-copy.is-entering, .greeting-copy.is-leaving { animation: none !important; }
  .scene-wrap { height: 100svh; }
  .shooting { display: none; }
  .twinkles .star { opacity: .7 !important; }
  /* Static scene: keep the laid palm flat and the right palm mirrored. */
  .palm, .waves, .sea-glint::after { animation: none !important; }
  .palm--right { transform: scaleX(-1); }
  .palm--lean { transform: rotate(74deg); }
  ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
