:root {
  --ink: #14181f;
  --ink-soft: #2a313c;
  --paper: #eef1f4;
  --paper-deep: #d9dee6;
  --jade: #0f766e;
  --jade-bright: #14b8a6;
  --coral: #dc2626;
  --muted: #5e6875;
  --line: rgba(20, 24, 31, 0.12);
  --font-display: "Noto Serif SC", "Songti SC", serif;
  --font-ui: "Outfit", "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-ui);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(20, 184, 166, 0.14), transparent 55%),
    radial-gradient(900px 600px at 90% 8%, rgba(220, 38, 38, 0.08), transparent 50%),
    linear-gradient(180deg, #f5f7fa 0%, var(--paper) 40%, #e8edf2 100%);
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ——— Topbar ——— */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(12px);
  background: rgba(238, 241, 244, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(238, 241, 244, 0.9);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.logo-mark {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50% 50% 48% 52%;
  background:
    radial-gradient(circle at 35% 35%, #fff 0 18%, transparent 19%),
    radial-gradient(circle at 65% 35%, #fff 0 14%, transparent 15%),
    linear-gradient(145deg, var(--jade-bright), var(--jade));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:not(.nav-cta) {
  color: var(--muted);
  transition: color 0.2s;
}

.nav a:not(.nav-cta):hover {
  color: var(--ink);
}

.nav-cta {
  padding: 0.55rem 1rem;
  background: var(--ink);
  color: #fff !important;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--ink-soft);
  transform: translateY(-1px);
}

.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.menu-btn span {
  display: block;
  width: 1.35rem;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.menu-btn.is-open span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-btn.is-open span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  top: 4.25rem;
  right: 1rem;
  left: 1rem;
  z-index: 39;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mobile-nav a {
  padding: 0.85rem 1rem;
  font-weight: 500;
  border-radius: var(--radius);
}

.mobile-nav a:hover {
  background: var(--paper-deep);
}

.mobile-nav[hidden] {
  display: none !important;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }

  .menu-btn,
  .mobile-nav {
    display: none !important;
  }
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 6.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  gap: 2.5rem;
}

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

.hero-wash {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  right: -18%;
  top: -10%;
  border-radius: 50%;
  background:
    conic-gradient(from 210deg at 50% 50%, rgba(15, 118, 110, 0.2), transparent 40%, rgba(220, 38, 38, 0.1), transparent 75%);
  filter: blur(40px);
  animation: wash-drift 14s ease-in-out infinite alternate;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 55% at 70% 40%, #000 20%, transparent 75%);
  opacity: 0.55;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 36rem;
}

.brand-en {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  color: var(--jade);
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s var(--ease) 0.1s forwards;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4.5rem, 16vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(28px);
  animation: rise 1s var(--ease) 0.22s forwards;
}

.headline {
  margin: 1.35rem 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.9s var(--ease) 0.38s forwards;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 22rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.9s var(--ease) 0.5s forwards;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.9s var(--ease) 0.62s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.45rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.25s var(--ease);
}

.btn-primary:hover {
  background: var(--jade);
  transform: translateY(-2px);
}

.btn-ghost {
  padding: 0.95rem 1.1rem;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.btn-wide {
  margin-top: 0.5rem;
}

/* ——— Hero stage / comic panels ——— */
.hero-stage {
  position: relative;
  z-index: 1;
  height: min(52vh, 420px);
  margin-top: 0.5rem;
}

.panel-stack {
  position: absolute;
  inset: 0;
}

.panel {
  position: absolute;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: #1a1f27;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  animation: panel-in 0.9s var(--ease) forwards;
}

.panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.panel-a {
  width: 42%;
  height: 58%;
  left: 0;
  top: 8%;
  animation-delay: 0.45s;
}

.panel-b {
  width: 48%;
  height: 64%;
  right: 4%;
  top: 0;
  animation-delay: 0.6s;
}

.panel-c {
  width: 36%;
  height: 42%;
  left: 28%;
  bottom: 0;
  animation-delay: 0.75s;
  z-index: 2;
}

.phone-cover {
  background-size: cover;
  background-position: center;
}

.phone {
  position: absolute;
  right: 6%;
  bottom: -6%;
  width: min(34%, 150px);
  z-index: 3;
  opacity: 0;
  transform: translateY(30px);
  animation: rise 1s var(--ease) 0.9s forwards, float-y 5.5s ease-in-out 1.8s infinite;
}

.phone-bezel {
  padding: 8px;
  border-radius: 18px;
  background: var(--ink);
  border: 2px solid #0b0d11;
}

.phone-screen {
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  display: grid;
  grid-template-rows: auto 1fr 1fr 1fr;
  gap: 6px;
  padding: 8px;
}

.app-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 2px 4px;
}

.app-bar .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade-bright);
}

.app-cover {
  border-radius: 4px;
  border: 1.5px solid rgba(20, 24, 31, 0.15);
}

.c1 {
  background: linear-gradient(135deg, #0f766e, #99f6e4);
}

.c2 {
  background: linear-gradient(135deg, #1e293b, #64748b);
}

.c3 {
  background: linear-gradient(135deg, #dc2626, #fecaca);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    padding-top: 5.5rem;
    padding-bottom: 4rem;
  }

  .hero-stage {
    height: min(70vh, 560px);
    margin-top: 0;
  }

  .phone {
    width: min(28%, 170px);
    right: 8%;
  }
}

/* ——— Gallery ——— */
.gallery {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

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

.gallery-item {
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: #111;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item figcaption {
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
}

.gallery-wide {
  grid-column: 1 / -1;
}

.gallery-wide img {
  aspect-ratio: 16 / 9;
}

@media (min-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
  }

  .gallery-wide {
    grid-column: auto;
  }

  .gallery-wide img {
    aspect-ratio: 3 / 4;
  }
}

/* ——— About ——— */
.about {
  padding: 0 clamp(1.25rem, 4vw, 3rem) clamp(3.5rem, 8vw, 6rem);
}

.about-inner {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

.about-visual {
  overflow: hidden;
  border: 2px solid var(--ink);
}

.about-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.about-copy h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.about-copy p {
  margin: 0 0 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.02rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .about-inner {
    grid-template-columns: 1.05fr 1fr;
    gap: 2.5rem;
  }
}

/* ——— SEO text ——— */
.seo-text {
  padding: 0 clamp(1.25rem, 4vw, 3rem) clamp(3.5rem, 8vw, 5.5rem);
}

.seo-inner {
  max-width: 48rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.seo-inner h2 {
  margin: 1.75rem 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 1.95rem);
  font-weight: 700;
}

.seo-inner p {
  margin: 0 0 0.95rem;
  color: var(--muted);
  line-height: 1.85;
  font-size: 0.98rem;
}

.seo-inner p:last-child {
  margin-bottom: 0;
}

/* ——— Features ——— */
.features {
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 36rem;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.section-head h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.feature {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  padding: 1.65rem 0;
  border-bottom: 1px solid var(--line);
}

.feature-index {
  grid-row: 1 / span 2;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--jade);
  padding-top: 0.15rem;
}

.feature h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 34rem;
}

@media (min-width: 900px) {
  .feature-list {
    grid-template-columns: repeat(3, 1fr);
    border-top: 0;
    gap: 0;
  }

  .feature {
    grid-template-columns: 1fr;
    padding: 0 1.75rem 0 0;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .feature:last-child {
    border-right: 0;
    padding-right: 0;
  }

  .feature-index {
    grid-row: auto;
    margin-bottom: 1.25rem;
  }
}

/* ——— Guide ——— */
.guide {
  padding: 0 clamp(1.25rem, 4vw, 3rem) clamp(4rem, 10vw, 7rem);
}

.guide-inner {
  padding: clamp(2.5rem, 6vw, 4rem);
  background:
    linear-gradient(145deg, rgba(15, 118, 110, 0.08), transparent 45%),
    linear-gradient(180deg, #e7ebf0, #dde3ea);
  border: 1px solid var(--line);
}

.steps {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.steps li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  align-items: start;
}

.step-num {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
}

.steps h3 {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .steps li {
    grid-template-columns: 1fr;
  }
}

/* ——— Closing ——— */
.closing {
  padding: 0 clamp(1.25rem, 4vw, 3rem) clamp(4rem, 10vw, 6rem);
}

.closing-inner {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.closing-brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  letter-spacing: 0.06em;
}

.closing-line {
  margin: 0.5rem 0 1.75rem;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ——— Footer ——— */
.footer {
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 2.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer p {
  margin: 0.25rem 0;
}

.footer a {
  color: var(--jade);
  border-bottom: 1px solid rgba(15, 118, 110, 0.35);
}

.footer a:hover {
  border-bottom-color: var(--jade);
}

.footer-note {
  font-size: 0.82rem;
  opacity: 0.9;
}

/* ——— Motion helpers ——— */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panel-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes wash-drift {
  from {
    transform: translate(0, 0) rotate(0deg);
  }
  to {
    transform: translate(-4%, 3%) rotate(8deg);
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
