:root {
  color-scheme: dark;
  --ink: #f2efe9;
  --muted: rgba(242, 239, 233, 0.68);
  --dim: rgba(242, 239, 233, 0.42);
  --line: rgba(242, 239, 233, 0.18);
  --accent: #d6a55c;
  --scene-x: 50%;
  --scene-y: 50%;
  --scene-scale: 1.03;
  --scene-brightness: 0.72;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #252724;
  --muted: rgba(37, 39, 36, 0.72);
  --dim: rgba(37, 39, 36, 0.48);
  --line: rgba(37, 39, 36, 0.16);
  --accent: #93662d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  background: #11120f;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #11120f;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

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

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #11120f;
}

.scene-image {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  object-position: var(--scene-x) var(--scene-y);
  filter: brightness(var(--scene-brightness)) saturate(0.78) contrast(1.08);
  opacity: 1;
  transform: scale(var(--scene-scale));
  transition:
    opacity 0.35s ease,
    transform 1.3s cubic-bezier(0.16, 1, 0.3, 1),
    object-position 1.3s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1s ease;
  will-change: transform;
}

.js .scene-image {
  opacity: 0;
}

.js .scene-ready .scene-image {
  opacity: 1;
}

.scene-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 7, 0.9) 0%, rgba(7, 8, 7, 0.62) 35%, rgba(7, 8, 7, 0.08) 74%),
    linear-gradient(0deg, rgba(7, 8, 7, 0.78), transparent 42%, rgba(7, 8, 7, 0.26));
  transition: background 0.8s ease;
}

html[data-theme="light"] .scene-image {
  filter: brightness(1.04) saturate(0.72) contrast(0.94);
}

html[data-theme="light"] .scene-shade {
  background:
    linear-gradient(90deg, rgba(248, 249, 247, 0.94) 0%, rgba(248, 249, 247, 0.7) 38%, rgba(248, 249, 247, 0.08) 76%),
    linear-gradient(0deg, rgba(248, 249, 247, 0.86), transparent 44%);
}

html[data-theme="light"] body {
  color: #252724;
}

html[data-theme="light"] .studio-header {
  background: linear-gradient(180deg, rgba(246, 247, 245, 0.92), rgba(246, 247, 245, 0));
}

html[data-theme="light"] :is(.zone-nav a, .exit-link, .entrance-copy > p:not(.entrance-label), .zone-copy > p:not(.zone-kind)) {
  color: rgba(37, 39, 36, 0.72);
}

html[data-theme="light"] :is(.zone-nav a:hover, .zone-nav a[aria-current="location"], .exit-link:hover) {
  color: #252724;
}

body[data-scene="work"] {
  --scene-x: 16%;
  --scene-y: 47%;
  --scene-scale: 1.2;
  --scene-brightness: 0.8;
}

body[data-scene="study"] {
  --scene-x: 39%;
  --scene-y: 50%;
  --scene-scale: 1.23;
  --scene-brightness: 0.76;
}

body[data-scene="tools"] {
  --scene-x: 86%;
  --scene-y: 48%;
  --scene-scale: 1.2;
  --scene-brightness: 0.82;
}

.studio-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  min-height: 88px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(8, 9, 8, 0.86), rgba(8, 9, 8, 0));
}

.studio-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  text-decoration: none;
}

.studio-logo {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

.studio-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.studio-brand strong,
.studio-brand small {
  display: block;
}

.studio-brand strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.studio-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.zone-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  white-space: nowrap;
}

.zone-nav a,
.exit-link {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.25s ease;
}

.zone-nav a:hover,
.zone-nav a[aria-current="location"],
.exit-link:hover {
  color: var(--ink);
}

.exit-link {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
}

.header-end {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(20, 21, 18, 0.42);
  cursor: pointer;
  font: 600 13px/1 system-ui, sans-serif;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html[data-theme="light"] .theme-toggle {
  color: #252724;
  background: rgba(246, 247, 245, 0.72);
}

.studio-journey {
  position: relative;
  z-index: 1;
}

.studio-stop {
  position: relative;
  display: grid;
  min-height: 100dvh;
  padding: clamp(112px, 14vh, 152px) clamp(20px, 5vw, 72px) clamp(62px, 8vh, 92px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.entrance {
  align-items: end;
}

.entrance-copy {
  width: min(1560px, 92vw);
  padding-bottom: clamp(68px, 10vh, 104px);
}

.entrance-label,
.zone-kind {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.entrance h1,
.zone-copy h2 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  margin: 0;
  text-wrap: balance;
}

.entrance h1 {
  max-width: 10em;
  font-size: clamp(64px, min(8.8vw, 14vh), 156px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
  text-wrap: wrap;
}

.entrance h1 span {
  display: block;
}

.entrance h1 span + span {
  margin-top: 0.13em;
}

.entrance-copy > p:not(.entrance-label) {
  max-width: 34em;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.75;
}

.entrance-copy .entrance-intro {
  max-width: 38em;
  margin-top: 18px;
  font-size: clamp(14px, 1.08vw, 18px);
  line-height: 1.7;
}

.czt-framework {
  margin-top: clamp(16px, 2.4vh, 28px);
}

.entrance-copy .czt-signature {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--dim);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.czt-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.czt-map a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 14px 18px 0 0;
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.czt-map a:hover,
.czt-map a:focus-visible {
  color: var(--ink);
  transform: translateY(-2px);
}

.czt-letter {
  color: var(--ink);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

.czt-map strong,
.czt-map small {
  display: block;
}

.czt-map strong {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.czt-map small {
  margin-top: 7px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.45;
}

.czt-signature strong {
  color: var(--ink);
  font-size: 13px;
}

.zone-link,
.coming-soon {
  border-radius: 4px;
}

.zone-link:active {
  transform: scale(0.98);
}

.zone-copy {
  align-self: end;
  width: min(760px, 88vw);
  margin-bottom: clamp(76px, 11vh, 118px);
  padding: 0;
  border: 0;
  background: transparent;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.72);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-stop.is-active .zone-copy {
  opacity: 1;
  transform: translateY(0);
}

.zone-copy-left {
  justify-self: start;
}

.zone-copy-right {
  justify-self: end;
}

.zone-copy h2 {
  max-width: 9em;
  font-size: clamp(52px, min(8.2vw, 14vh), 124px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.zone-copy > p:not(.zone-kind) {
  max-width: 34em;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.25vw, 20px);
  line-height: 1.8;
}

.zone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.zone-link,
.coming-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  margin-top: 24px;
  padding: 0 17px;
  border: 1px solid rgba(242, 239, 233, 0.3);
  color: var(--ink);
  background: rgba(13, 14, 12, 0.42);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.zone-actions .zone-link {
  margin-top: 0;
}

.zone-link:hover {
  border-color: rgba(242, 239, 233, 0.7);
  background: rgba(242, 239, 233, 0.16);
  transform: translateY(-2px);
}

.zone-link-secondary {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(242, 239, 233, 0.08);
}

.zone-link-secondary:hover {
  background: rgba(242, 239, 233, 0.14);
}

.coming-soon {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(242, 239, 233, 0.06);
}

.inline-contact {
  position: absolute;
  right: clamp(20px, 5vw, 72px);
  bottom: clamp(30px, 5vh, 58px);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--dim);
  font-size: 13px;
  text-shadow: none;
}

.inline-contact > :first-child {
  color: inherit;
  font-weight: 600;
}

.inline-contact a {
  color: inherit;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

.noscript-message {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 8;
  max-width: 360px;
  padding: 16px;
  color: #141510;
  background: #f2efe9;
}

@media (max-width: 880px) {
  .studio-header {
    grid-template-columns: 1fr auto;
  }

  .zone-nav {
    display: none;
  }

  .exit-link {
    font-size: 12px;
  }

  .studio-stop {
    align-items: end;
    padding-right: 18px;
    padding-left: 18px;
  }

  .zone-copy,
  .zone-copy-left,
  .zone-copy-right {
    justify-self: stretch;
    width: 100%;
    margin-bottom: 92px;
  }

  .entrance-copy {
    width: 100%;
    padding-bottom: 62px;
    transform: translateY(-24px);
  }

  .czt-map {
    grid-template-columns: 1fr;
  }

  .czt-map a {
    padding: 11px 0;
    border-top: 1px solid var(--line);
  }

  .czt-map a:first-child {
    border-top: 0;
  }

  .inline-contact {
    right: 18px;
    bottom: 22px;
    left: 18px;
    justify-content: center;
    gap: 7px 14px;
    font-size: 12px;
    text-align: center;
  }

  .scene-image {
    width: 116%;
    height: 116%;
    inset: -8%;
  }

  body[data-scene="work"] {
    --scene-x: 10%;
    --scene-scale: 1.08;
  }

  body[data-scene="study"] {
    --scene-x: 37%;
    --scene-scale: 1.1;
  }

  body[data-scene="tools"] {
    --scene-x: 92%;
    --scene-scale: 1.08;
  }

}

@media (max-width: 520px) {
  .studio-header {
    min-height: 64px;
    padding: 10px 14px;
  }

  .studio-logo {
    width: 36px;
    height: 36px;
  }

  .studio-logo img {
    width: 36px;
    height: 36px;
  }

  .studio-brand strong {
    font-size: 13px;
  }

  .studio-brand small {
    font-size: 8px;
  }

  .exit-link {
    max-width: 5em;
    line-height: 1.4;
    text-align: right;
  }

  .entrance h1 {
    max-width: none;
    font-size: clamp(40px, 11.2vw, 58px);
    line-height: 0.94;
  }

  .entrance-copy {
    transform: translateY(-40px);
  }

  .entrance-label {
    margin-bottom: 10px;
    font-size: 10px;
  }

  .entrance-copy .entrance-intro {
    margin-top: 13px;
    font-size: 12px;
    line-height: 1.6;
  }

  .czt-framework {
    margin-top: 12px;
  }

  .entrance-copy .czt-signature {
    margin-bottom: 4px;
    font-size: 9px;
  }

  .czt-map a {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 7px;
    padding: 7px 0;
  }

  .czt-letter {
    font-size: 18px;
  }

  .czt-map strong,
  .czt-map small {
    font-size: 9px;
  }

  .czt-map small {
    margin-top: 3px;
    line-height: 1.35;
  }

  .zone-copy h2 {
    font-size: clamp(30px, 9.5vw, 44px);
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scene-image,
  .scene-shade,
  .zone-copy,
  .zone-link,
  .czt-map a {
    transition: none;
  }

  .loading-line::after {
    animation: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .studio-header,
  .zone-copy {
    background: rgba(17, 18, 16, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
