:root {
  --bark: #1c2820;
  --canopy: #2f6b4f;
  --leaf: #4f8f6b;
  --gold: #c9953a;
  --sand: #e8f0e6;
  --ink: #101612;
  --muted: #5a6a5f;
  --surface: rgba(255, 255, 255, 0.72);
  --line: rgba(28, 40, 32, 0.12);
  --font: 'Manrope', system-ui, sans-serif;
  --display: 'Fraunces', Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: #dfe8dc;
  line-height: 1.5;
}

a {
  color: inherit;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(47, 107, 79, 0.28), transparent 55%),
    radial-gradient(700px 420px at 88% 8%, rgba(201, 149, 58, 0.18), transparent 50%),
    linear-gradient(168deg, #f3f7f1 0%, #e4ede1 45%, #d5e0d2 100%);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.03);
  }
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
}

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

.brand-mark {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold), var(--canopy));
  box-shadow: 0 0 0 4px rgba(47, 107, 79, 0.12);
}

.brand-name {
  font-size: 0.95rem;
}

.top-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

.top-nav a {
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--canopy);
}

.lang-switch select {
  appearance: none;
  min-height: 38px;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 14px) calc(50% - 3px) / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 10px) calc(50% - 3px) / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-switch select:focus-visible {
  outline: 2px solid var(--canopy);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[dir='rtl'] .top-tools {
  flex-direction: row-reverse;
}

html[dir='rtl'] .lang-switch select {
  padding: 0.4rem 0.75rem 0.4rem 2rem;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) 14px calc(50% - 3px) / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) 10px calc(50% - 3px) / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.7);
}

html[lang='ar'] body {
  font-family: 'Noto Sans Arabic', var(--font);
}

html[lang='zh'] body {
  font-family: 'Noto Sans SC', var(--font);
}

html[lang='ar'] .hero-brand,
html[lang='zh'] .hero-brand,
html[lang='ar'] .section-head h2,
html[lang='zh'] .section-head h2 {
  font-family: inherit;
}

.hero {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(3.5rem, 10vh, 6.5rem) 1.5rem 3rem;
  animation: rise 0.8s ease both;
}

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

.hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--canopy);
}

.hero-brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.2rem, 9vw, 5.8rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--bark);
}

.hero-lead {
  max-width: 34rem;
  margin: 1.25rem 0 0;
  font-size: 1.1rem;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn.primary {
  background: var(--bark);
  color: #f4f8f2;
}

.btn.ghost {
  background: transparent;
  color: var(--bark);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.products {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
  animation: rise 0.9s 0.12s ease both;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.product {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.product:last-child {
  border-bottom: 1px solid var(--line);
}

.product.soon {
  opacity: 0.72;
}

.product-visual {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px var(--line);
}

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

.product-visual.placeholder {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: var(--canopy);
  background:
    linear-gradient(145deg, rgba(47, 107, 79, 0.12), rgba(201, 149, 58, 0.1));
}

.product-meta h3 {
  margin: 0;
  font-size: 1.35rem;
  font-family: var(--display);
  font-weight: 600;
}

.product-tag,
.version-line,
.product-note {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.version-line {
  color: var(--canopy);
  font-weight: 600;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bark);
  background: rgba(47, 107, 79, 0.1);
  box-shadow: inset 0 0 0 1px rgba(47, 107, 79, 0.16);
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.dl {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 10.5rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  text-decoration: none;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.dl:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px rgba(47, 107, 79, 0.28),
    0 10px 24px rgba(18, 26, 21, 0.08);
}

.dl-os {
  font-weight: 700;
  font-size: 0.95rem;
}

.dl-file {
  font-size: 0.8rem;
  color: var(--muted);
}

.product-note {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  max-width: 40rem;
}

.feeds {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.feeds summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--bark);
}

.feeds ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.feeds a {
  color: var(--canopy);
}

.foot {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.foot a {
  color: var(--canopy);
}

@media (max-width: 720px) {
  .product {
    grid-template-columns: 1fr;
  }

  .top-nav a:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .hero,
  .products,
  .btn,
  .dl {
    animation: none !important;
    transition: none !important;
  }
}
