:root {
  color-scheme: light;
  --paper: oklch(0.975 0.012 78);
  --paper-strong: oklch(0.953 0.02 72 / 0.94);
  --surface: oklch(0.988 0.008 72 / 0.9);
  --ink: oklch(0.24 0.02 52);
  --ink-soft: oklch(0.43 0.02 56);
  --ink-faint: oklch(0.57 0.018 58);
  --line: oklch(0.8 0.026 65 / 0.7);
  --accent: oklch(0.5 0.12 42);
  --accent-soft: oklch(0.9 0.05 58 / 0.85);
  --shadow: 0 22px 48px rgba(73, 50, 28, 0.1);
  --radius-lg: 2rem;
  --radius-md: 1.25rem;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(163, 104, 68, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(177, 157, 122, 0.16), transparent 30%),
    linear-gradient(180deg, color-mix(in srgb, var(--paper) 92%, white 8%) 0%, var(--paper) 56%, color-mix(in srgb, var(--paper) 88%, #e9decd 12%) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.26;
  background-image:
    linear-gradient(to right, rgba(125, 99, 73, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(125, 99, 73, 0.08) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 84%);
}

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

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

button {
  font: inherit;
}

.container {
  width: min(1120px, calc(100vw - 3rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0.8rem;
  z-index: 30;
  padding-top: 1rem;
}

.site-header.scrolled .nav-inner {
  box-shadow: 0 12px 28px rgba(67, 48, 31, 0.09);
  background: color-mix(in srgb, var(--surface) 84%, white 16%);
}

.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 88%, white 12%);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(67, 48, 31, 0.06);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo,
.footer-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.9rem;
  box-shadow: 0 8px 18px rgba(36, 26, 16, 0.14);
}

.brand-text {
  display: grid;
  gap: 0.1rem;
}

.brand-title {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.nav-link {
  padding: 0.48rem 0.82rem;
  border-radius: var(--radius-pill);
  color: var(--ink-faint);
  font-size: 0.9rem;
  transition: color 180ms var(--ease), background-color 180ms var(--ease), transform 180ms var(--ease);
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.35rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 84%, #321d12 16%), var(--accent));
  color: #fff7ef;
  font-weight: 700;
  box-shadow: 0 18px 30px rgba(143, 79, 44, 0.2);
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background-color 180ms var(--ease);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 34px rgba(143, 79, 44, 0.24);
}

.btn-primary.is-disabled {
  background: #c8b8a7;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-cta {
  white-space: nowrap;
}

main {
  display: grid;
  gap: clamp(3.4rem, 6vw, 6.2rem);
  padding: 2.6rem 0 4.5rem;
}

.hero {
  padding-top: 1.6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.82fr);
  gap: clamp(1.6rem, 3vw, 3rem);
  align-items: start;
}

.hero-copy,
.hero-rail,
.download-shell,
.about-block,
.faq-item {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, white 8%);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-rail,
.download-shell,
.about-block {
  padding: clamp(1.6rem, 3vw, 2.7rem);
  border-radius: var(--radius-lg);
}

.hero-copy {
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -4rem;
  bottom: -4rem;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(165, 106, 68, 0.14), transparent 68%);
}

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.hero-eyebrow,
.section-eyebrow,
.card-label,
.capability-label,
.download-label,
.rail-key {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title,
.section-heading h2,
.rail-card h2,
.capability-row h3,
.use-card h3,
.download-heading h2,
.download-item h3,
.about-block h2 {
  font-family: "Noto Serif SC", serif;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-title {
  margin-top: 0.8rem;
  max-width: 11ch;
  font-size: clamp(3.6rem, 10vw, 6.5rem);
}

.hero-subtitle {
  max-width: 40rem;
  margin-top: 1.35rem;
  font-size: clamp(1.08rem, 1.9vw, 1.26rem);
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.link-ghost {
  padding-bottom: 0.15rem;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  font-weight: 600;
}

.hero-notes {
  display: grid;
  gap: 0.85rem;
  margin-top: 2.3rem;
  list-style: none;
}

.hero-notes li {
  padding-top: 0.95rem;
  border-top: 1px solid rgba(125, 99, 73, 0.16);
  color: var(--ink-faint);
}

.hero-rail {
  display: grid;
  gap: 1.3rem;
  align-content: start;
}

.rail-card {
  display: grid;
  gap: 0.8rem;
}

.rail-card p,
.rail-list p {
  color: var(--ink-soft);
}

.rail-list {
  display: grid;
  gap: 1.1rem;
}

.rail-list div {
  padding-top: 0.95rem;
  border-top: 1px solid rgba(125, 99, 73, 0.16);
}

.section {
  padding: 0.4rem 0;
}

.section-band .container,
.use-cases .container,
.faq .container {
  display: grid;
  gap: 1.8rem;
}

.section-heading {
  display: grid;
  gap: 0.8rem;
  max-width: 48rem;
}

.section-heading h2,
.download-heading h2,
.about-block h2 {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
}

.capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 4vw, 4rem);
  row-gap: 1.5rem;
}

.capability-row {
  display: grid;
  gap: 0.55rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(125, 99, 73, 0.16);
}

.capability-row p:last-child {
  color: var(--ink-soft);
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.use-card {
  display: grid;
  gap: 0.95rem;
  min-height: 12rem;
  padding: 1.5rem 1.45rem 1.7rem;
  border-top: 1px solid rgba(125, 99, 73, 0.18);
}

.download-shell {
  display: grid;
  gap: 1.6rem;
}

.download-heading {
  display: grid;
  gap: 0.7rem;
  max-width: 44rem;
}

.download-heading p:last-child {
  color: var(--ink-soft);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.download-item {
  display: grid;
  gap: 0.75rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--paper-strong) 84%, white 16%);
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.download-item.featured {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: 0 14px 28px rgba(116, 78, 46, 0.12);
}

.download-item h3 {
  font-size: 1.55rem;
}

.download-meta,
.download-version {
  color: var(--ink-faint);
  font-size: 0.94rem;
}

.download-version {
  color: var(--accent);
  min-height: 1.2rem;
}

.download-links,
.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.download-links a,
.footer-links a {
  color: var(--ink-soft);
  font-weight: 600;
}

.download-links a::after,
.footer-links a::after {
  content: "↗";
  margin-left: 0.35rem;
  font-size: 0.82em;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  padding: 1.1rem 1.25rem 1.25rem;
  border-radius: var(--radius-md);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-item p {
  margin-top: 0.8rem;
  color: var(--ink-soft);
}

.about-block {
  max-width: 56rem;
  display: grid;
  gap: 0.95rem;
}

.about-block p:last-child {
  color: var(--ink-soft);
}

.footer {
  padding: 0 0 3rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(125, 99, 73, 0.16);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-brand h3 {
  font-size: 1.1rem;
}

.footer-brand p {
  color: var(--ink-faint);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: var(--delay, 0s);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .hero-grid,
  .capability-list,
  .use-grid,
  .download-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .nav-inner {
    grid-template-columns: 1fr;
    justify-items: start;
    border-radius: 1.5rem;
  }

  .nav-links {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100vw - 1rem, 100%);
  }

  .site-header {
    position: static;
  }

  .site-header,
  main {
    padding-top: 0.7rem;
  }

  main {
    gap: 3rem;
  }

  .hero-title {
    font-size: clamp(2.9rem, 16vw, 4.6rem);
  }

  .hero-copy,
  .hero-rail,
  .download-shell,
  .about-block {
    padding: 1.25rem;
    border-radius: 1.45rem;
  }

  .btn-primary,
  .download-btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

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

  * {
    animation: none !important;
    transition: none !important;
  }
}
