:root {
  color-scheme: light;
  --bg: #f5f2ed;
  --surface: #ffffff;
  --surface-soft: #fbf8f3;
  --line: #e6dfd6;
  --line-strong: #d7cdc1;
  --text: #171411;
  --muted: #6f685f;
  --accent: #b96a38;
  --accent-soft: #f4e6d8;
  --shadow: 0 20px 60px rgba(36, 28, 18, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html[dir="rtl"] body {
  direction: rtl;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(185, 106, 56, 0.08), transparent 26%),
    linear-gradient(180deg, #f8f5f0 0%, var(--bg) 100%);
}

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

button {
  font: inherit;
  color: inherit;
}

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

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

.page-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.topbar > *,
.hero > *,
.section-download > * {
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.brand-copy strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
}

.brand-copy span,
.section-head p,
.feature-card p,
.preview-card span,
.recover-result,
.site-status,
.hero-copy p {
  color: var(--muted);
}

.brand-copy span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
}

.topnav,
.lang-switch,
.hero-actions,
.hero-points,
.recover-actions {
  display: flex;
  align-items: center;
}

.topnav {
  justify-content: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.topnav::-webkit-scrollbar {
  display: none;
}

.lang-switch {
  justify-content: flex-end;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(248, 245, 240, 0.92);
}

.topnav-link,
.lang-link {
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
}

.topnav-link {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.topnav-link:hover,
.lang-link:hover,
.lang-link.is-active {
  color: var(--text);
  background: rgba(23, 20, 17, 0.05);
}

.lang-link {
  min-width: 68px;
  text-align: center;
}

.lang-link.is-active {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(23, 20, 17, 0.06);
}

.hero,
.section {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  gap: 28px;
  padding: 34px;
  align-items: start;
}

.hero-copy {
  max-width: 640px;
}

.kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
.section-head h2 {
  font-family: "Iowan Old Style", "Baskerville", "Songti SC", serif;
  letter-spacing: -0.04em;
}

h1 {
  margin-top: 14px;
  font-size: clamp(38px, 4.8vw, 64px);
  line-height: 1.02;
}

.hero-copy p {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.72;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

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

.button-primary {
  color: #ffffff;
  background: var(--text);
}

.button-secondary {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface);
}

.button-wide {
  width: 100%;
}

.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.hidden {
  display: none !important;
}

.hero-points {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-points span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
  color: #4d443a;
}

.hero-frame,
.preview-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #f6efe7;
}

.hero-visual {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.hero-frame {
  width: 100%;
  max-width: 620px;
  padding: 10px;
}

.hero-frame img {
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.preview-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  border-radius: 18px;
}

.section {
  padding: 34px;
}

.section-head {
  max-width: 640px;
}

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.06;
}

.section-head p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.75;
}

.feature-grid,
.preview-grid,
.faq-grid {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faq-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card,
.preview-card,
.recover-card,
.faq-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.feature-card {
  padding: 24px;
}

.feature-card h3,
.faq-card h3,
.preview-card strong {
  display: block;
  font-size: 21px;
  line-height: 1.25;
  color: var(--text);
}

.feature-card p,
.faq-card p,
.preview-card span {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.75;
}

.faq-card {
  padding: 24px;
}

.preview-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.preview-card {
  padding: 14px;
}

.preview-card-large {
  grid-row: span 2;
}

.preview-card figcaption {
  padding: 16px 6px 6px;
}

.section-recover {
  display: grid;
  gap: 24px;
}

.recover-card {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.recover-input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  outline: none;
  font: inherit;
  color: var(--text);
  background: var(--surface-soft);
}

.recover-input:focus {
  border-color: #c9b39d;
  background: #ffffff;
}

.recover-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.recover-result,
.site-status {
  font-size: 14px;
  line-height: 1.7;
  word-break: break-all;
}

.section-download {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: center;
}

.download-copy p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.download-actions {
  display: grid;
  gap: 14px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 6px 0;
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.footer-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar {
    background: rgba(255, 255, 255, 0.96);
  }
}

@media (max-width: 1080px) {
  .topbar,
  .hero,
  .feature-grid,
  .preview-grid,
  .faq-grid,
  .section-download {
    grid-template-columns: 1fr;
  }

  .topbar {
    gap: 14px;
  }

  .topnav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .preview-card-large {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 14px;
  }

  .topbar,
  .hero,
  .section {
    padding: 18px;
  }

  .topbar {
    top: 10px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-actions,
  .recover-actions,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .topnav {
    order: 2;
    overflow: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .lang-switch {
    order: 1;
    width: fit-content;
    max-width: 100%;
    justify-content: flex-start;
    align-self: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .lang-link {
    width: auto;
    flex: 0 0 auto;
  }

  h1 {
    font-size: 38px;
  }
}
