:root {
  --ink: #111111;
  --muted: #6b7280;
  --line: #ececee;
  --card: #ffffff;
  --soft: #f4f4f5;
  --pill: #111111;
  --pill-ink: #ffffff;
  --shadow: 0 30px 80px rgba(20, 16, 10, 0.22);
  --radius: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: #1a140c;
}

.scene {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, #f2c14b 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 20%, #7ec8e3 0%, transparent 50%),
    radial-gradient(ellipse 90% 70% at 70% 90%, #6aa84f 0%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 10% 20%, #f7e27d 0%, transparent 45%),
    linear-gradient(180deg, #87b7e6 0%, #f4d35e 42%, #3d7a3a 100%);
  filter: blur(28px) saturate(1.15);
  transform: scale(1.08);
  z-index: 0;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.shell,
.panel {
  position: relative;
  z-index: 2;
  width: min(1080px, calc(100% - 3.5rem));
  margin: 2.4rem auto 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.8rem 1.4rem;
  overflow: hidden;
}

.panel {
  margin: 1.1rem auto 3rem;
  padding: 1.4rem 1.8rem 1.3rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.diamond {
  width: 10px;
  height: 10px;
  background: #111;
  transform: rotate(45deg);
  border-radius: 1px;
}

.links {
  display: flex;
  gap: 1.1rem;
  margin-left: 1.25rem;
}

.links a {
  color: #3f3f46;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.links a:hover { color: #111; }

.nav-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.86rem;
}

.muted { color: var(--muted); }

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-weight: 600;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #3f3f46;
}

.icon-btn:hover { background: var(--soft); }
.theme-toggle .moon { display: none; }
body.dark .theme-toggle .sun { display: none; }
body.dark .theme-toggle .moon { display: block; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2.4rem 0 0;
  padding: 0.38rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
  color: #3f3f46;
}

.folder {
  width: 14px;
  height: 11px;
  border: 1.6px solid #c9a227;
  border-radius: 2px;
  position: relative;
  display: inline-block;
}

.folder::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 1px;
  width: 6px;
  height: 3px;
  border: 1.6px solid #c9a227;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 0.85fr);
  gap: 2rem;
  align-items: end;
  margin-top: 1.4rem;
}

.display {
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero-copy p {
  margin: 0 0 1.4rem;
  color: #52525b;
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 28rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.78rem 1.15rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn.primary {
  background: var(--pill);
  color: var(--pill-ink);
}

.search-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  color: #71717a;
  min-width: min(280px, 100%);
  cursor: pointer;
  font: inherit;
}

.search-pill kbd,
.spot-bar kbd {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  font-size: 0.72rem;
  color: #52525b;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2.2rem;
  font-size: 0.92rem;
}

.meta-row p { margin: 0; line-height: 1.35; }

.avatars { display: flex; }
.avatars span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
  background: #d4d4d8;
}
.avatars span:first-child { margin-left: 0; background: #111; }
.avatars span:nth-child(2) { background: #a1a1aa; }
.avatars span:nth-child(3) { background: #e4e4e7; }

.pills {
  display: flex;
  gap: 0.7rem;
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  color: #71717a;
  font-size: 0.86rem;
}

.pills li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d4d4d8;
  margin-right: 0.4rem;
  transform: translateY(-1px);
}

.watermark {
  margin: 1.6rem 0 0;
  text-align: center;
  font-size: clamp(3.2rem, 12vw, 7.4rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  color: #f3f3f4;
  line-height: 0.85;
  user-select: none;
}

.showcase, .docs { margin-top: 0.25rem; padding-top: 0.5rem; }

.section-head h2 {
  margin: 0 0 0.4rem;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0 0 1.2rem;
  color: var(--muted);
  max-width: 40rem;
  line-height: 1.5;
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.tile {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.05rem 1.15rem;
  background: #fff;
  min-height: 168px;
}

.tile.wide { grid-column: span 2; }

.tile header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.tile h3 { margin: 0; font-size: 0.95rem; }
.tile header span { color: var(--muted); font-size: 0.75rem; }

.magnet {
  position: relative;
  display: flex;
  gap: 0.2rem;
  background: #ececef;
  padding: 0.22rem;
  border-radius: 999px;
  width: fit-content;
}

.magnet button {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: #52525b;
}

.magnet button.is-on { color: #111; }

.magnet-pill {
  position: absolute;
  top: 0.22rem;
  bottom: 0.22rem;
  left: 0;
  width: 0;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 220ms ease, width 220ms ease;
}

.tab-copy { margin: 0.9rem 0 0; color: #52525b; font-size: 0.92rem; }

.arrow-fill {
  position: relative;
  overflow: hidden;
  border: 0;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.arrow-fill svg {
  transition: transform 220ms ease;
}

.arrow-fill:hover svg { transform: translateX(3px); }

.arrow-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16));
  transform: translateX(-100%);
  transition: transform 280ms ease;
}

.arrow-fill:hover::after { transform: translateX(0); }

.jelly {
  display: flex;
  gap: 0.4rem;
  align-items: end;
  height: 54px;
}

.jelly i {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #111;
  animation: jelly 0.9s ease-in-out infinite;
}

.jelly i:nth-child(2) { animation-delay: 0.1s; }
.jelly i:nth-child(3) { animation-delay: 0.2s; }
.jelly i:nth-child(4) { animation-delay: 0.3s; }

@keyframes jelly {
  0%, 100% { height: 12px; transform: translateY(0); }
  50% { height: 36px; transform: translateY(-4px); }
}

.otp {
  display: flex;
  gap: 0.4rem;
}

.otp input {
  width: 2.2rem;
  height: 2.6rem;
  text-align: center;
  border: 1.5px solid #c4c4c8;
  background: #fafafa;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: #111;
}

.otp input:focus {
  outline: 2px solid #111;
  outline-offset: 1px;
}

.flip {
  margin: 0.4rem 0 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.flip span {
  display: inline-block;
  animation: flipin 0.7s ease both;
}

@keyframes flipin {
  from { transform: rotateX(80deg); opacity: 0; }
  to { transform: rotateX(0); opacity: 1; }
}

.card3d {
  position: relative;
  border-radius: 16px;
  padding: 1.1rem;
  min-height: 120px;
  color: #fff;
  background: linear-gradient(145deg, #1a1a1a, #3f3f46 55%, #111);
  transform-style: preserve-3d;
  transition: transform 80ms linear;
  overflow: hidden;
}

.card3d-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 20%), rgba(255,255,255,0.22), transparent 42%);
  pointer-events: none;
}

.card3d-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.card3d h4 { margin: 0.35rem 0 0.4rem; font-size: 1.2rem; }
.card3d p:last-child { margin: 0; color: #d4d4d8; font-size: 0.88rem; }

.docs .steps {
  margin: 0;
  padding-left: 1.15rem;
  color: #3f3f46;
  line-height: 1.7;
}

.source { color: var(--muted); font-size: 0.9rem; }
.source a { color: #111; }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}

.foot a { color: inherit; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(17, 17, 17, 0.28);
  display: none;
  place-items: start center;
  padding-top: 12vh;
}

.overlay.is-open {
  display: grid;
}

.spotlight {
  width: min(520px, calc(100% - 2rem));
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.spot-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.spot-bar input {
  flex: 1;
  border: 0;
  font: inherit;
  outline: none;
}

.spotlight ul { list-style: none; margin: 0; padding: 0.4rem; }
.spotlight li button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.spotlight li button:hover,
.spotlight li.is-active button { background: var(--soft); }

body.dark {
  --ink: #f4f4f5;
  --muted: #a1a1aa;
  --line: #2a2a2e;
  --card: #141416;
  --soft: #1c1c1f;
  --pill: #f4f4f5;
  --pill-ink: #111;
  --shadow: 0 30px 80px rgba(0,0,0,0.45);
}

body.dark .shell,
body.dark .panel { background: var(--card); }
body.dark .diamond,
body.dark .btn.primary,
body.dark .arrow-fill,
body.dark .jelly i { background: #f4f4f5; }
body.dark .arrow-fill { color: #111; }
body.dark .search-pill,
body.dark .tile,
body.dark .spotlight { background: #18181b; color: #f4f4f5; }
body.dark .magnet { background: #1c1c1f; }
body.dark .magnet-pill { background: #27272a; }
body.dark .magnet button { color: var(--muted); }
body.dark .magnet button.is-on { color: var(--ink); }
body.dark .watermark { color: #1f1f22; }
body.dark .otp input,
body.dark .chip,
body.dark .eyebrow { border-color: #3f3f46; background: transparent; color: inherit; }
body.dark .otp input:focus { outline-color: var(--ink); }
body.dark .spot-bar input { color: inherit; background: transparent; }
body.dark .links a,
body.dark .icon-btn { color: #d4d4d8; }
body.dark .hero-copy p,
body.dark .tab-copy,
body.dark .docs .steps { color: var(--muted); }
body.dark .source a { color: var(--ink); }
body.dark .search-pill kbd,
body.dark .spot-bar kbd { color: var(--muted); border-color: var(--line); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .tile.wide { grid-column: auto; }
  .hide-sm { display: none; }
  .links { display: none; }
  .shell,
  .panel { width: calc(100% - 1rem); margin-top: 0.6rem; padding: 0.9rem 1rem 1.2rem; }
  .panel { margin-bottom: 1.5rem; }
}
