@font-face {
  font-family: "Instrument Serif";
  src: url("./instrument-serif-latin.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --paper: #f9f8f5;
  --charcoal: #242124;
  --graphite: #615b60;
  --stone: #e7e2de;
  --mulberry: #893853;
}

body { background: var(--paper); color: var(--charcoal); }
.hero.wrap, header .nav.wrap {
  width: min(1200px, calc(100% - clamp(36px, 8vw, 112px)));
}

.home-intro > .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(25px, 5vw, 78px);
  padding-block: clamp(45px, 7vw, 96px);
  text-align: start;
}
.hero-message { min-width: 0; }
.hero .hero-message h1 {
  margin: 0;
  max-width: none;
  color: var(--charcoal);
  font-size: clamp(3.25rem, 5.65vw, 5.9rem);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: .97;
}
html[lang="en"] .hero .hero-message h1 {
  font-family: "Instrument Serif", "Avenir Next", "Segoe UI", sans-serif;
  font-size-adjust: from-font;
}
.hero .hero-message h1 span { display: block; color: var(--mulberry); }
html[lang^="zh"] .hero .hero-message h1 {
  font-size: clamp(2.3rem, 4.8vw, 4.5rem);
  letter-spacing: -.045em;
  line-height: 1.17;
  font-weight: 600;
}
.hero .hero-copy {
  max-width: 36ch;
  margin: 19px 0 0;
  font-size: clamp(1rem, 1.45vw, 1.125rem);
  line-height: 1.6;
  color: var(--graphite);
  text-wrap: pretty;
}
.hero .web-entry-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px 17px;
  flex-wrap: wrap;
  margin: 23px 0 0;
}
.hero .web-entry-actions .primary {
  min-height: 48px;
  width: auto;
  padding: 12px 18px;
  border-radius: 9px;
  background: var(--mulberry);
  border-color: var(--mulberry);
  box-shadow: none;
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
}
.hero .web-entry-actions .primary:hover { background: #713048; border-color: #713048; }
.hero .hero-app-link, .hero .hero-sample-link {
  min-height: 44px;
  align-content: center;
  color: var(--charcoal);
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hero .hero-app-link { display: inline-flex; align-items: center; }
.hero .hero-app-link.web-locale-zh { display: none; }
html[lang^="zh"] .hero .hero-app-link.web-locale-zh { display: inline-flex; }
.hero .hero-sample-link { color: var(--mulberry); font-weight: 600; }
.hero a:focus-visible { outline: 2px solid var(--mulberry); outline-offset: 4px; }
.hero .web-start-hint, .hero .web-entry-note {
  margin-inline: 0;
  margin-block-start: 9px;
  color: var(--graphite);
  font-size: .79rem;
  line-height: 1.45;
}
.hero .web-entry-note { margin-block-start: 3px; }

.portrait-demo picture { display: block; }
.portrait-demo picture img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 33%;
  border-radius: clamp(8px, 1.1vw, 15px);
  background: var(--stone);
}
.portrait-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-start: 13px;
  padding-block-start: 5px;
  min-block-size: 50px;
  border-block-start: 1px solid var(--stone);
  font-size: .75rem;
  line-height: 1.45;
  color: var(--graphite);
}
[data-home-video] .web-locale-zh { display: none; }
html[lang^="zh"] [data-home-video] .web-locale-zh { display: inline; }
[data-demo-frame] { position: relative; }
[data-home-video] .home-demo-video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  opacity: 0;
  pointer-events: none;
  object-fit: contain;
}
.portrait-demo .home-demo-video {
  border-radius: clamp(8px, 1.1vw, 15px);
}
.feature-panel .feature-reveal { width: min(100%, 350px); }
.feature-panel .feature-reveal figcaption { text-align: start; }
[data-home-video][data-edit-running] .home-demo-video { opacity: 1; }
[data-home-video] .edit-demo-running,
[data-home-video][data-edit-running] .edit-demo-idle { display: none; }
[data-home-video][data-edit-running] .edit-demo-running { display: inline; }
.home-demo-control {
  flex-shrink: 0;
  min-height: 44px;
  padding: 4px 11px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: var(--paper);
  color: var(--mulberry);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
}
.home-demo-control:focus-visible { outline: 2px solid var(--mulberry); outline-offset: 3px; }
.results-section .compare-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 100%;
  margin: 0 0 20px;
  border-radius: 10px;
  background: #efeae7;
}
.results-section .compare-tabs button {
  padding-inline: clamp(9px, 2vw, 16px);
  min-height: 44px;
  border-radius: 7px;
  white-space: nowrap;
}
.results-section .compare-tabs button[aria-selected=true] { color: var(--mulberry); }
.results-section .sample-note { font-size: .85rem; }
.sample-continue {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--mulberry);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
}
.sample-continue.web-locale-zh { display: none; }
html[lang^="zh"] .sample-continue.web-locale-zh { display: inline-flex; }
.results-section .result-view img { aspect-ratio: 9 / 16; height: clamp(320px, 50vw, 465px); }
.feature-section .section-heading p:not(.eyebrow), .results-section .section-heading p:not(.eyebrow) { line-height: 1.65; }

@media (prefers-reduced-motion: no-preference) {
  .hero .web-entry-actions .primary { transition: transform 140ms ease; }
  .hero .web-entry-actions .primary:active { transform: translateY(1px); }
}
@media (min-width: 768px) {
  .home-intro {
    display: grid;
    align-items: center;
    min-block-size: calc(100vh - 69px);
    min-block-size: calc(100svh - 69px);
    padding-block: 28px 44px;
  }
  .home-intro > .hero.hero-with-gallery.wrap { margin-block: 0; }
  main > :is(.feature-section, .results-section, .guide-section, .faq-section) {
    padding-block: clamp(80px, 10vh, 108px);
  }
}
@media (max-width: 767px) {
  .home-intro > .hero { grid-template-columns: minmax(0, 1fr); gap: 23px; padding-block: 31px 36px; }
  .hero .hero-message h1 { font-size: clamp(2.7rem, 9.9vw, 4.5rem); }
  html[lang^="zh"] .hero .hero-message h1 { font-size: clamp(2.35rem, 9.4vw, 4rem); }
  .hero .hero-copy { margin-top: 12px; }
  .hero .web-entry-actions { margin-top: 16px; }
}
