:root {
  --bg: #f7f6f3;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --accent: #6aa5a9;
  --accent-light: rgba(106,165,169,.35);
  --ring: rgba(0,0,0,.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.7 'Inter var', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(900px, 90vw);
  margin: 0 auto;
}

/* ===== HERO ===== */
header.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.brand {
  font-size: clamp(42px, 7vw, 90px);
  letter-spacing: .12em;
  font-weight: 600;
  text-transform: lowercase;
  position: relative;
}

.tag {
  font-size: clamp(15px, 2.5vw, 22px);
  color: var(--muted);
  margin-top: .5rem;
  position: relative;
}

.tag-cn {
  font-size: clamp(14px, 2vw, 20px);
  color: var(--muted);
  opacity: .95;
  position: relative;
}

.brand::after,
.tag::after,
.tag-cn::after {
  content: "";
  display: block;
  width: 2px;
  height: 22px;
  margin: 12px auto 0;
  background: linear-gradient(180deg, rgba(0,0,0,.82), rgba(0,0,0,.28));
  border-radius: 2px;
  opacity: .95;
}

.brand::after { height: 40px; }
.tag::after { height: 30px; opacity: .9; }
.tag-cn::after { height: 24px; opacity: .85; }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  will-change: transform;
}

.hero-bg img { width: 100%; height: 100%; object-fit: cover; }

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(247,246,243,.35), rgba(247,246,243,.75) 65%, rgba(247,246,243,.95));
  pointer-events: none;
}

/* 幻灯片：浅入浅出 + 慢速漂浮 */
.hero-bg img.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2400ms cubic-bezier(.25,.1,.25,1), filter 3000ms ease;
  filter: brightness(92%) contrast(96%) saturate(88%) blur(1px);
}

.hero-bg img.slide.active {
  opacity: 1;
  filter: brightness(96%) contrast(100%) saturate(92%) blur(.5px);
  animation: floatZoom 22s ease-in-out infinite alternate;
}

.hero-bg img.slide.leaving {
  opacity: .18;
  filter: brightness(94%) contrast(98%) saturate(90%) blur(.8px);
}

@keyframes floatZoom {
  0%   { transform: scale(1.03) translateY(0); }
  50%  { transform: scale(1.05) translateY(-6px); }
  100% { transform: scale(1.03) translateY(0); }
}

.hero-logo {
  margin-top: 1.2rem;
  width: clamp(60px, 10vw, 100px);
  opacity: .95;
  display: block;
  margin-left: auto;
  margin-right: auto;
  will-change: transform, opacity, filter;
  animation: fadein 1.2s ease forwards, breathLogo 7s ease-in-out infinite;
}

.hero-logo.fadein {
  animation: fadein 1.2s ease forwards, breathLogo 7s ease-in-out infinite;
}

@keyframes breathLogo {
  0%,
  100% { opacity: .78; filter: brightness(92%); transform: translateY(0) scale(1); }
  50%  { opacity: 1;   filter: brightness(100%); transform: translateY(-5px) scale(1.03); }
}

/* ===== ABOUT ===== */
section#about {
  padding: 100px 0 60px;
  text-align: center;
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.intro-text {
  max-width: 70ch;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.8;
  font-size: 18px;
}

.intro-text-cn {
  margin-top: 1.5rem;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.8;
  opacity: .95;
}

.signature {
  margin-top: 40px;
  font-weight: 500;
  letter-spacing: .05em;
  font-style: italic;
  color: var(--muted);
}

/* ===== 音乐播放器（隐藏视频，只保留按钮） ===== */
.music-player {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.audio-shell {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--ring);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  font-size: 14px;
  color: var(--muted);
}

.audio-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--ring);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .2s;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.audio-btn:hover { transform: translateY(-1px); }

.audio-label { letter-spacing: .02em; }

#yt-hidden {
  width: 0;
  height: 0;
  overflow: hidden;
  position: absolute;
  pointer-events: none;
}

/* ===== Creative Notes — Enso Slider（禅·圆相） ===== */
#values {
  position: relative;
  padding: 70px 0;
}

#values h2 {
  font-size: 24px;
  letter-spacing: .05em;
  margin-bottom: 1rem;
  text-align: center;
}

.enso-wrap { position: relative; }

.enso-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 12px 6px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.enso {
  flex: 0 0 82%;
  max-width: 82%;
  scroll-snap-align: center;
  background: #fff;
  border: 1px solid var(--ring);
  border-radius: 20px;
  padding: 18px 16px 16px;
  position: relative;
  box-shadow: 0 6px 22px rgba(0,0,0,.06);
}

.enso .circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.7);
  margin: 0 auto 10px;
  position: relative;
  transform: rotate(var(--r, 0deg));
  transition: transform .8s ease;
  will-change: transform;
}

.enso .circle::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0,0,0,.75);
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
  transform: translate(var(--dx, 0px), var(--dy, 0px));
  transition: transform .8s ease;
  will-change: transform;
  opacity: 0;
}

.enso strong {
  display: block;
  text-align: center;
  font-size: 18px;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.enso span {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.enso-ctrl {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.enso-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,.25);
  border: 0;
  cursor: pointer;
}

.enso-dot.is-active { background: rgba(0,0,0,.7); }

/* Enso 初次出现的墨迹淡入（0.6s，仅首次） */
.enso.seen .circle::after { opacity: 1; animation: inkFade .6s ease-out both; }

@keyframes inkFade {
  from { opacity: 0; transform: translate(var(--dx,0px), var(--dy,0px)) scale(.92); }
  to   { opacity: 1; transform: translate(var(--dx,0px), var(--dy,0px)) scale(1); }
}

/* ===== Footer ===== */
footer {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 1rem;
}

.socials svg {
  width: 20px;
  height: 20px;
  fill: var(--ink);
  opacity: .6;
  transition: .3s;
}

.socials a:hover svg {
  opacity: 1;
  fill: #5e5e5e;
  transition: fill .35s ease, transform .25s ease;
  transform: translateY(-1px);
}

footer .built {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  opacity: .85;
}

/* ===== 通用动画 ===== */
.fadein { opacity: 0; animation: fadein 1.2s ease forwards; }

@keyframes fadein {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.breath-a { animation: breathA 7.5s ease-in-out infinite; }
.breath-b { animation: breathB 9s ease-in-out infinite .6s; }
.breath-c { animation: breathC 11s ease-in-out infinite 1.2s; }

@keyframes breathA {
  0%,100% { opacity: .9; letter-spacing: .02em; transform: translateY(0) scale(1); }
  50%     { opacity: 1;  letter-spacing: .09em; transform: translateY(-2px) scale(1.01); }
}

@keyframes breathB {
  0%,100% { opacity: .9; letter-spacing: .015em; transform: translateY(0) scale(1); }
  50%     { opacity: 1;  letter-spacing: .06em;  transform: translateY(-1.5px) scale(1.008); }
}

@keyframes breathC {
  0%,100% { opacity: .9; letter-spacing: .012em; transform: translateY(0) scale(1); }
  50%     { opacity: 1;  letter-spacing: .05em;  transform: translateY(-1px) scale(1.006); }
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg img.slide.active { animation: none !important; }
}

/* ===== Scroll buttons ===== */
.scroll-down {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--ring);
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transition: .25s;
  z-index: 1;
}

.scroll-down:hover { transform: translateX(-50%) translateY(-2px); }

.scroll-down svg,
.back-to-top svg {
  width: 18px;
  height: 18px;
  fill: var(--ink);
  opacity: .8;
}

.footer-cta { margin-top: 24px; }

.back-to-top {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--ring);
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  transition: .2s;
}

.back-to-top:hover { transform: translateY(-2px); }

/* ===== Preloader ===== */
body.is-loading { overflow: hidden; }

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .6s ease .15s, visibility .6s ease .15s;
}

#preloader.hide { opacity: 0; visibility: hidden; pointer-events: none; }

#preloader .loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#preloader .mark {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,.85), rgba(0,0,0,.4));
  animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes pulseDot {
  0%,100% { transform: scale(1); opacity: .9; }
  50%     { transform: scale(1.06); opacity: 1; }
}

#preloader .bar {
  width: 180px;
  height: 2px;
  border-radius: 2px;
  background: rgba(0,0,0,.08);
  overflow: hidden;
}

#preloader .bar .bar-fill {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0,0,0,.85), rgba(0,0,0,.35));
  transition: width .2s ease;
}

#preloader .pct {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .08em;
}

#preloader .tip {
  font-size: 13px;
  color: var(--muted);
  opacity: .9;
  margin-top: 2px;
}

#preloader .tip span.cn {
  display: block;
  font-size: 12px;
  color: rgba(0,0,0,.5);
  margin-top: 4px;
  font-style: italic;
  letter-spacing: .05em;
}

/* ===== Floating email button ===== */
.floating-mail {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--ring);
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .02em;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, opacity .25s ease;
  opacity: .98;
}

.floating-mail:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  background: #fff;
}

.floating-mail svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: .9;
}

.floating-mail .label { font-weight: 500; opacity: .9; }

@media (prefers-reduced-motion: reduce) { .floating-mail { animation: none; } }

@media (max-width: 480px) {
  .floating-mail { right: 16px; bottom: 16px; padding: 10px 12px; }
  .floating-mail .label { display: none; }
}

/* ===== Floating Social Dock (right middle) ===== */
.floating-dock {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9997;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--ring);
  border-radius: 18px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.dock-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ring);
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
}

.dock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  background: #fff;
}

.dock-btn svg {
  width: 18px;
  height: 18px;
  fill: var(--ink);
  opacity: .85;
}

.dock-divider { height: 1px; background: var(--ring); margin: 4px 2px; }

/* Compact mode on mobile: single toggle button */
.dock-toggle { display: none; }

@media (max-width: 640px) {
  .floating-dock {
    right: 16px;
    top: auto;
    bottom: calc(24px + 44px + 10px + 44px + 10px);
    /* 邮件底(24) + 邮件高(44) + 间距(10) + 三点高(44) + 间距(10) */
    transform: none;
    padding: 8px;
    gap: 8px;
    z-index: 9999;
    display: none;
  }
  .dock-toggle {
    position: fixed;
    right: 16px;
    bottom: calc(24px + 44px + 10px); /* 与email按钮上方10px对齐 */
    z-index: 9998;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--ring);
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
  }
  .dock-toggle svg { width: 20px; height: 20px; fill: var(--ink); opacity: .9; }
  .floating-dock { display: none; }
  .floating-dock.is-open { display: flex; }
}
