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

:root {
  --bg: #faf9f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f3f0;
  --text: #1a1714;
  --text-muted: #6b6560;
  --accent: #d48a2c;
  --accent-glow: rgba(212, 138, 44, 0.15);
  --pet-pink: #e06090;
  --pet-pink-glow: rgba(224, 96, 144, 0.12);
  --write-blue: #4a8abf;
  --write-blue-glow: rgba(74, 138, 191, 0.1);
  --border: rgba(26, 23, 20, 0.08);
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ── Pet Background Decorations ── */
.pet-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.pet-bg-item {
  position: absolute;
  border-radius: 50%;
  filter: grayscale(0.3);
  transition: opacity 0.4s;
  user-select: none;
}

/* ── Noise overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c0b8b0; border-radius: 3px; }

/* ── Nav ── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  background: rgba(250, 249, 247, 0.85);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}

.nav-logo {
  font-family: 'Noto Serif SC', serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 2px;
}

.nav-logo span {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
  vertical-align: middle;
}

.nav-links { display: flex; gap: 32px; align-items: center; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
  letter-spacing: 0.5px;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600 !important;
  transition: all 0.2s !important;
}

.nav-cta:hover {
  box-shadow: 0 2px 12px rgba(212, 138, 44, 0.2);
  transform: translateY(-1px);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 40px 80px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 138, 44, 0.08) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
  animation: fadeUp 0.8s ease both;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: #4caf50;
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 8px;
  animation: fadeUp 0.8s ease 0.1s both;
  background: linear-gradient(135deg, #2a2420 0%, #d48a2c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-family: 'Space Mono', monospace;
  font-size: clamp(14px, 2vw, 18px);
  color: var(--accent);
  margin-bottom: 40px;
  letter-spacing: 4px;
  animation: fadeUp 0.8s ease 0.2s both;
  opacity: 0.6;
}

.hero-desc {
  max-width: 520px;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 48px;
  animation: fadeUp 0.8s ease 0.3s both;
  opacity: 0.75;
}

.hero-actions {
  display: flex;
  gap: 16px;
  animation: fadeUp 0.8s ease 0.4s both;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 16px 40px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(212, 138, 44, 0.2);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  padding: 16px 40px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.3s;
  cursor: pointer;
  font-family: inherit;
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.hero-version {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 24px;
  opacity: 0.4;
  animation: fadeUp 0.8s ease 0.5s both;
}

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

/* ── Floating Pet ── */
.floating-pet {
  position: absolute;
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  height: 180px;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(244, 162, 97, 0.2));
}

.pet-body {
  width: 120px;
  height: 110px;
  background: linear-gradient(135deg, #f9d976 0%, #f4a261 100%);
  border-radius: 50% 50% 48% 48%;
  position: relative;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(244, 162, 97, 0.25);
}

.pet-ear-l, .pet-ear-r {
  position: absolute;
  width: 28px;
  height: 40px;
  background: linear-gradient(135deg, #f9d976, #e08a30);
  border-radius: 50% 50% 20% 20%;
  top: -18px;
}
.pet-ear-l { left: 18px; transform: rotate(-15deg); }
.pet-ear-r { right: 18px; transform: rotate(15deg); }

.pet-eye {
  position: absolute;
  width: 14px;
  height: 16px;
  background: #1a1008;
  border-radius: 50%;
  top: 38px;
  animation: blink 3s ease infinite;
}
.pet-eye::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
}
.pet-eye-l { left: 30px; }
.pet-eye-r { right: 30px; }

.pet-nose {
  position: absolute;
  width: 8px;
  height: 6px;
  background: #b5654a;
  border-radius: 50%;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
}

.pet-mouth {
  position: absolute;
  width: 20px;
  height: 10px;
  border-bottom: 2px solid #b5654a;
  border-radius: 0 0 50% 50%;
  top: 57px;
  left: 50%;
  transform: translateX(-50%);
}

.pet-cheek {
  position: absolute;
  width: 18px;
  height: 12px;
  background: rgba(224, 96, 144, 0.35);
  border-radius: 50%;
  top: 50px;
}
.pet-cheek-l { left: 14px; }
.pet-cheek-r { right: 14px; }

.pet-tail {
  position: absolute;
  right: -30px;
  bottom: 20px;
  width: 50px;
  height: 20px;
  border-top: 4px solid #e8943a;
  border-right: 4px solid #e8943a;
  border-radius: 0 20px 0 0;
  animation: wagTail 1s ease infinite;
}

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

@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

@keyframes wagTail {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(10deg); }
}

/* ── Section Shared ── */
section { padding: 60px 40px; position: relative; }

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.7;
}

.section-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
}

.section-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.8;
  opacity: 0.8;
}

/* ── Pet Section ── */
.pet-section {
  background: linear-gradient(180deg, rgba(250,249,247,0.85) 0%, rgba(254,245,248,0.85) 50%, rgba(250,249,247,0.85) 100%);
  text-align: center;
  overflow: hidden;
}

.pet-section .section-desc { margin: 0 auto 60px; }

.pet-showcase {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.pet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  width: 280px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.pet-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pet-pink), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}

.pet-card:hover {
  border-color: rgba(224, 96, 144, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.pet-card:hover::before { opacity: 1; }

.pet-card-icon {
  font-size: 48px;
  margin-bottom: 20px;
  display: block;
}

.pet-card h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pet-card .en {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 1px;
  opacity: 0.7;
}

.pet-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  opacity: 0.85;
}

/* ── Writing Section ── */
.writing-section {
  text-align: center;
}

.writing-section .section-desc { margin: 0 auto 60px; }

.writing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.wf-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: left;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.wf-item:hover {
  border-color: rgba(74, 138, 191, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.wf-icon {
  font-size: 28px;
  margin-bottom: 16px;
  display: block;
}

.wf-item h4 {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.wf-item .en {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 1px;
  opacity: 0.7;
}

.wf-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  opacity: 0.85;
}

/* ── Themes Section ── */
.themes-section {
  text-align: center;
  background: linear-gradient(180deg, rgba(250,249,247,0.85) 0%, rgba(245,242,237,0.85) 50%, rgba(250,249,247,0.85) 100%);
}

.themes-section .section-desc { margin: 0 auto 60px; }

.theme-grid {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.theme-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  transition: all 0.3s;
  cursor: default;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.theme-chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.theme-chip span {
  font-size: 14px;
  font-weight: 500;
}

.theme-chip .en {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 4px;
  opacity: 0.7;
}

/* ── Stats ── */
.stats-section {
  text-align: center;
  background: linear-gradient(180deg, rgba(250,249,247,0.85) 0%, rgba(248,245,240,0.85) 50%, rgba(250,249,247,0.85) 100%);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 60px auto 0;
}

.stat-item {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 20px 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s;
  position: relative;
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: var(--accent);
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--pet-pink));
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-item:hover::before {
  opacity: 1;
}

.stat-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 32px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1.4;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.8;
  line-height: 1.4;
}

/* ── Download CTA ── */
.cta-section {
  text-align: center;
  padding: 60px 40px;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 138, 44, 0.06) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.cta-section .section-title {
  position: relative;
  z-index: 1;
}

.cta-section .section-desc {
  margin: 0 auto 40px;
  position: relative;
  z-index: 1;
}

.cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-download {
  background: linear-gradient(135deg, var(--accent) 0%, #c07a20 100%);
  color: #fff;
  padding: 18px 48px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-download:hover {
  box-shadow: 0 4px 30px rgba(212, 138, 44, 0.25);
  transform: translateY(-3px);
}

.btn-download .arrow {
  font-size: 20px;
  transition: transform 0.3s;
}

.btn-download:hover .arrow { transform: translateX(4px); }

.cta-note {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
  position: relative;
  z-index: 1;
  opacity: 0.45;
}

/* ── Footer ── */
footer {
  padding: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg);
}

footer .left {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.5;
}

footer .right {
  display: flex;
  gap: 24px;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

footer a:hover { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  section { padding: 80px 20px; }
  .hero { padding: 100px 20px 60px; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 320px; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; }
  .floating-pet { display: none; }
  .pet-showcase { flex-direction: column; align-items: center; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat-num { font-size: 32px; }
  .stat-item { padding: 24px 16px; }
  .stat-label { font-size: 12px; }
  .btn-download { width: 100%; justify-content: center; }
}

/* ── Scroll animations ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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