:root {
  color-scheme: light;
  --sw-bg: #b6a8ca;
  --sw-ink: #29213b;
  --sw-ink-soft: #695d78;
  --sw-accent: #f5d58a;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--sw-bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--sw-bg);
  color: var(--sw-ink);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { color: inherit; font: inherit; -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { text-decoration: none; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 90;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--sw-ink);
  transform: translateY(-150%);
  transition: transform 180ms ease-out;
}

.skip-link:focus { transform: translateY(0); }

.sw-root {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--sw-bg);
  color: var(--sw-ink);
}

.sw-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--sw-bg);
}

.sw-sky__wash {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(58% 45% at 76% 12%, color-mix(in srgb, var(--sw-accent) 22%, transparent), transparent 72%),
    linear-gradient(176deg, color-mix(in srgb, #fff 22%, var(--sw-bg)) 0%, var(--sw-bg) 52%, color-mix(in srgb, var(--sw-accent) 11%, var(--sw-bg)) 100%);
  transition: background 500ms var(--ease-out);
}

.sw-sky__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(42% 35% at 49% 52%, rgba(255, 247, 230, 0.3), transparent 72%);
}

.sw-particles { position: absolute; inset: -6% -2%; will-change: transform; }

.sw-particle {
  position: absolute;
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  opacity: 0;
  transform: scale(var(--particle-scale, 1));
  animation: drift linear infinite;
}

.sw-particle::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 32% 28%, #fff7db, var(--sw-accent) 48%, rgba(64, 45, 95, 0.16) 80%);
  box-shadow: 0 0 16px color-mix(in srgb, var(--sw-accent) 62%, transparent);
  content: "";
}

.sw-particle--ring::before {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--sw-accent) 65%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--sw-accent) 52%, transparent);
}

@keyframes drift {
  0% { opacity: 0; transform: scale(var(--particle-scale)) translate3d(0, 12vh, 0) rotate(0); }
  14%, 85% { opacity: 0.52; }
  100% { opacity: 0; transform: scale(var(--particle-scale)) translate3d(4vw, -22vh, 0) rotate(210deg); }
}

.sw-scrollbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 80;
  height: 3px;
  background: color-mix(in srgb, var(--sw-accent) 18%, transparent);
}

.sw-scrollbar span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--sw-accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--sw-accent) 60%, transparent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: background 260ms ease;
}

.sw-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: clamp(16px, 2.4vw, 28px) clamp(18px, 5vw, 70px);
}

.sw-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sw-ink);
}

.sw-brand__mark {
  display: grid;
  width: 27px;
  height: 29px;
  place-items: center;
  border-radius: 8px 8px 12px 12px;
  background: linear-gradient(160deg, var(--sw-accent), color-mix(in srgb, var(--sw-accent) 48%, #5a427c));
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--sw-accent) 36%, transparent);
}

.sw-brand__name {
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: clamp(14px, 1.35vw, 18px);
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.sw-nav {
  position: absolute;
  left: 50%;
  display: flex;
  gap: 3px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 34px rgba(72, 51, 103, 0.08);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.sw-nav__item {
  padding: 7px 13px;
  border-radius: 999px;
  background: transparent;
  color: var(--sw-ink-soft);
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.sw-nav__item:hover { color: var(--sw-ink); transform: translateY(-1px); }
.sw-nav__item.is-active { background: var(--sw-accent); color: #fff; }

.sw-build-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(41, 33, 59, 0.5);
  font-size: 9px;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.sw-build-note i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sw-accent);
  box-shadow: 0 0 10px var(--sw-accent);
}

.sw-stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.sw-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  will-change: opacity;
}

.sw-scene__video,
.sw-scene__still,
.sw-connector__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  will-change: transform, opacity;
}

.sw-scene__video { z-index: 3; opacity: 0; }
.sw-scene.has-clip .sw-scene__still { opacity: 0; }
.sw-scene.has-clip .sw-scene__video { opacity: 1; }
.sw-scene.has-clip .sw-connector__image { opacity: 0; }
.sw-connector__image--bridge { z-index: 2; opacity: 0; }

.sw-character {
  position: absolute;
  inset: 0;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.sw-character__hit-area {
  position: absolute;
  inset: 0;
  z-index: 0;
  cursor: crosshair;
  pointer-events: auto;
}

.sw-character__shadow {
  position: absolute;
  left: var(--char-x, 79%);
  top: var(--char-y, 88%);
  z-index: 1;
  width: clamp(90px, 12vw, 170px);
  height: 18px;
  border-radius: 50%;
  background: rgba(56, 38, 71, 0.22);
  filter: blur(7px);
  opacity: 0.6;
  transform: translate(-50%, -50%);
  transition: left 900ms var(--ease-out), top 900ms var(--ease-out);
}

.sw-character__image {
  position: absolute;
  left: var(--char-x, 79%);
  top: var(--char-y, 88%);
  z-index: 3;
  display: block;
  width: clamp(180px, 21vw, 300px);
  height: auto;
  user-select: none;
  cursor: pointer;
  filter: drop-shadow(0 18px 17px rgba(56, 38, 71, 0.18));
  transform: translate(-50%, -100%) scaleX(var(--char-facing, 1));
  transform-origin: 50% 100%;
  transition: left 900ms var(--ease-out), top 900ms var(--ease-out), filter 180ms ease;
  pointer-events: auto;
}

.sw-character__image:hover {
  filter: drop-shadow(0 21px 22px rgba(56, 38, 71, 0.24)) brightness(1.03);
}

.sw-character__bubble {
  position: absolute;
  left: var(--char-x, 79%);
  top: calc(var(--char-y, 88%) - clamp(155px, 25vw, 330px));
  z-index: 4;
  max-width: 180px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px 14px 4px 14px;
  background: rgba(255, 250, 241, 0.86);
  box-shadow: 0 11px 25px rgba(72, 51, 103, 0.13);
  color: var(--sw-ink);
  font-size: 11px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -100%) translateY(5px);
  transition: opacity 180ms ease, transform 180ms ease, left 900ms var(--ease-out), top 900ms var(--ease-out);
  white-space: nowrap;
}

.sw-character.is-talking .sw-character__bubble {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(0);
}

.sw-character__tip {
  position: absolute;
  right: clamp(18px, 5vw, 70px);
  bottom: 15%;
  z-index: 4;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  color: rgba(41, 33, 59, 0.56);
  font-size: 10px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.sw-character.is-walking .sw-character__image {
  animation: character-step 360ms ease-in-out infinite;
}

@keyframes character-step {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

.sw-copylayer {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.sw-copylayer::before {
  display: none;
}

.sw-copy {
  position: absolute;
  top: 54%;
  left: 50%;
  width: min(88vw, 1380px);
  padding: clamp(18px, 2vw, 30px) clamp(24px, 4vw, 70px);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 54px rgba(72, 51, 103, 0.1);
  backdrop-filter: blur(12px) saturate(1.08);
  opacity: 0;
  text-align: center;
  transform: translate(-50%, -50%);
  will-change: opacity, transform;
}

.sw-copy__num {
  display: block;
  color: rgba(41, 33, 59, 0.44);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.13em;
}

.sw-copy__eyebrow {
  display: block;
  margin-top: 19px;
  color: var(--sw-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.sw-copy__title {
  max-width: none;
  margin: 0;
  color: var(--sw-ink);
  font-family: "Cormorant Garamond", "Noto Sans SC", serif;
  font-size: clamp(34px, 4.5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1.08;
  white-space: nowrap;
}

.sw-copy__body {
  max-width: 315px;
  margin: 24px 0 0;
  color: var(--sw-ink-soft);
  font-size: 13px;
  line-height: 2;
}

.sw-copy__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.sw-copy__tags li {
  padding: 6px 11px;
  border: 1px solid rgba(41, 33, 59, 0.15);
  border-radius: 999px;
  color: rgba(41, 33, 59, 0.58);
  font-size: 10px;
}

.sw-copy__cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  padding: 12px 16px 12px 18px;
  border-radius: 999px;
  background: var(--sw-ink);
  color: #fff;
  font-size: 12px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.sw-copy__cta span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

.sw-copy__cta:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(41, 33, 59, 0.18); }

.sw-route {
  position: fixed;
  right: clamp(20px, 5vw, 70px);
  bottom: 45px;
  z-index: 70;
  display: flex;
  gap: 9px;
}

.sw-route__dot {
  position: relative;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(41, 33, 59, 0.48);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.sw-route__dot span {
  position: absolute;
  right: -8px;
  bottom: 18px;
  display: block;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--sw-ink-soft);
  font-size: 9px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.sw-route__dot:hover span,
.sw-route__dot.is-active span { opacity: 1; transform: translateY(0); }
.sw-route__dot.is-active { border-color: var(--dot-accent); background: var(--dot-accent); transform: scale(1.35); }

.sw-hint {
  position: fixed;
  bottom: 41px;
  left: 50%;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(41, 33, 59, 0.48);
  font-size: 9px;
  letter-spacing: 0.2em;
  transform: translateX(-50%);
  transition: opacity 240ms ease;
}

.sw-hint i {
  display: block;
  width: 24px;
  height: 38px;
  border: 1px solid rgba(41, 33, 59, 0.35);
  border-radius: 99px;
}

.sw-hint i::after {
  display: block;
  width: 3px;
  height: 7px;
  margin: 8px auto;
  border-radius: 50%;
  background: var(--sw-accent);
  content: "";
  animation: hint-dot 1.8s ease-in-out infinite;
}

@keyframes hint-dot {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(8px); }
}

.sw-caption {
  position: fixed;
  bottom: 48px;
  left: clamp(20px, 5vw, 70px);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(41, 33, 59, 0.47);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.sw-caption__line { width: 29px; height: 1px; background: var(--sw-accent); }

@media (max-width: 860px) {
  .sw-topbar { padding: 16px 18px; }
  .sw-nav { top: 70px; right: 18px; left: 18px; justify-content: center; overflow-x: auto; transform: none; }
  .sw-nav__item { padding: 7px 10px; font-size: 10px; }
  .sw-build-note { display: none; }
  .sw-copy { top: 52%; left: 50%; width: calc(100% - 32px); padding: 17px 16px; }
  .sw-copy__num, .sw-copy__eyebrow { text-align: center; }
  .sw-copy__title { max-width: none; font-size: clamp(32px, 9.5vw, 52px); white-space: normal; }
  .sw-copy__body { margin-right: auto; margin-left: auto; font-size: 12px; }
  .sw-copy__tags { justify-content: center; }
  .sw-copy__cta { margin-top: 22px; }
  .sw-stage { top: 18vh; height: 82vh; }
  .sw-scene__still, .sw-connector__image { object-position: center 46%; }
  .sw-character__image { width: clamp(138px, 35vw, 210px); }
  .sw-character__tip { right: 20px; bottom: 19%; font-size: 9px; }
  .sw-character__bubble { max-width: 140px; font-size: 10px; }
  .sw-route { right: 20px; bottom: 28px; }
  .sw-caption { bottom: 31px; left: 20px; font-size: 8px; }
  .sw-hint { display: none; }
}

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

:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 4px; }
