:root {
  --paper: #f3ecd8;
  --paper-light: #fbf6e9;
  --paper-deep: #ded1b6;
  --ink: #142232;
  --ink-soft: rgba(20, 34, 50, 0.72);
  --ink-faint: rgba(20, 34, 50, 0.48);
  --line: rgba(20, 34, 50, 0.16);
  --line-strong: rgba(20, 34, 50, 0.3);
  --signal: #d14b32;
  --signal-deep: #a93621;
  --olive: #68745b;
  --content-width: 1200px;
  --shadow: 0 28px 70px rgba(20, 34, 50, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "IBM Plex Sans", "PingFang SC", "Noto Sans SC", sans-serif;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 34, 50, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 34, 50, 0.032) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.38) 55%, transparent 92%);
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(209, 75, 50, 0.42);
  outline-offset: 3px;
}

.page-shell {
  position: relative;
  overflow: clip;
}

.topbar,
main,
.footer {
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding-inline: 26px;
}

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--ink);
  color: var(--paper-light);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.75rem;
  box-shadow: 0 12px 28px rgba(20, 34, 50, 0.17);
}

.brand-copy {
  display: grid;
  gap: 1px;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-copy strong,
.brand strong {
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.topnav,
.hero-actions,
.cta-actions,
.footer-links,
.visual-label,
.visual-foot,
.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.topnav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--ink-soft);
  font-size: 0.91rem;
  transition: color 180ms ease, transform 180ms ease;
}

.topnav a:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.topnav .nav-install {
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--paper-light);
  background: var(--ink);
  font-weight: 600;
}

main {
  padding-bottom: 64px;
}

.hero {
  min-height: 710px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
  align-items: center;
  gap: clamp(34px, 5vw, 74px);
  padding-block: 72px 76px;
}

.eyebrow,
.kicker {
  color: var(--signal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 5px rgba(209, 75, 50, 0.12);
  content: "";
}

.hero h1,
.section-heading h2,
.demo-intro h2,
.trust-copy h2,
.cta-panel h2,
.page-hero h1,
.article h2,
.article h3 {
  font-family: "Cormorant Garamond", "Songti SC", "Noto Serif SC", serif;
  text-wrap: balance;
}

.hero h1 {
  margin: 22px 0 22px;
  font-size: clamp(4rem, 6.7vw, 6.25rem);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: var(--signal);
  font-weight: 500;
}

.hero-lead {
  max-width: 600px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.75;
  text-wrap: pretty;
}

.hero-actions,
.cta-actions {
  flex-wrap: wrap;
  margin-top: 28px;
}

.button,
.button-secondary,
.button-ghost {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-inline: 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.button {
  color: #fff8ed;
  background: var(--signal);
  box-shadow: 0 16px 34px rgba(209, 75, 50, 0.23);
}

.button:hover {
  background: var(--signal-deep);
  transform: translateY(-2px);
}

.button-secondary,
.button-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.28);
}

.button-secondary:hover,
.button-ghost:hover {
  background: rgba(255, 255, 255, 0.58);
  transform: translateY(-2px);
}

.store-note {
  margin: 16px 0 0;
  color: var(--ink-faint);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
}

.hero-visual {
  position: relative;
}

.visual-label,
.visual-foot {
  justify-content: space-between;
  color: var(--ink-faint);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual-label {
  padding: 0 4px 12px;
}

.visual-foot {
  padding: 13px 5px 0;
}

.product-frame,
.demo-frame {
  margin: 0;
}

.product-frame {
  position: relative;
  padding: 15px;
  border: 1px solid rgba(20, 34, 50, 0.24);
  border-radius: 26px;
  background: rgba(251, 246, 233, 0.72);
  box-shadow: var(--shadow);
  transform: rotate(1.1deg);
}

.product-frame::before {
  position: absolute;
  z-index: -1;
  inset: 20px -18px -18px 20px;
  border: 1px solid rgba(20, 34, 50, 0.18);
  border-radius: 26px;
  background: var(--paper-deep);
  content: "";
}

.product-frame img {
  width: 100%;
  border-radius: 17px;
  border: 1px solid rgba(20, 34, 50, 0.12);
}

.value-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line-strong);
}

.value-strip div {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 20px 28px;
}

.value-strip div + div {
  border-left: 1px solid var(--line);
}

.value-strip strong {
  font-family: "Cormorant Garamond", "Songti SC", serif;
  font-size: 1.65rem;
  line-height: 1;
}

.value-strip span {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.section {
  padding-block: 100px;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 38px;
  margin-bottom: 46px;
}

.section-heading h2,
.demo-intro h2,
.trust-copy h2,
.cta-panel h2 {
  margin: 10px 0 0;
  font-size: clamp(3rem, 5.2vw, 5.25rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.section-heading > p,
.demo-intro p,
.trust-copy p,
.cta-panel p {
  max-width: 500px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.75;
  text-wrap: pretty;
}

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

.feature-card,
.faq-item,
.page-card,
.article-callout {
  border: 1px solid var(--line);
  background: rgba(251, 246, 233, 0.46);
}

.feature-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  transition: transform 200ms ease, background-color 200ms ease;
}

.feature-card:hover {
  background: rgba(251, 246, 233, 0.8);
  transform: translateY(-5px);
}

.feature-card-dark {
  color: var(--paper-light);
  background: var(--ink);
}

.feature-card-dark:hover {
  background: #1d3045;
}

.feature-index {
  margin-bottom: auto;
  color: var(--signal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
}

.feature-card h3,
.step-card h3,
.faq-item h3,
.page-card h3 {
  margin: 0 0 12px;
  font-size: 1.28rem;
}

.feature-card p,
.step-card p,
.faq-item p,
.page-card p,
.article p,
.article li,
.sidebar-card li,
.footer-copy,
.install-note {
  color: var(--ink-soft);
  line-height: 1.72;
}

.feature-card-dark p {
  color: rgba(251, 246, 233, 0.7);
}

.demo-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: center;
}

.demo-intro p {
  margin-top: 20px;
}

.demo-frame {
  padding: 14px;
  border: 1px solid rgba(20, 34, 50, 0.2);
  border-radius: 26px;
  background: var(--ink);
  box-shadow: 0 32px 78px rgba(20, 34, 50, 0.22);
}

.demo-frame video {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: #0d1824;
}

.demo-frame figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 4px 1px;
  color: rgba(251, 246, 233, 0.58);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-card {
  min-height: 245px;
  padding: 27px;
  border-top: 3px solid var(--ink);
  background: rgba(251, 246, 233, 0.32);
}

.step-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 62px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--signal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}

.trust-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: clamp(40px, 8vw, 110px);
}

.trust-copy p {
  margin-top: 24px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  font-weight: 600;
}

.markdown-output {
  padding: 28px;
  border: 1px solid rgba(251, 246, 233, 0.14);
  border-radius: 18px;
  background: var(--ink);
  box-shadow: var(--shadow);
  color: #f5ead7;
  transform: rotate(-1deg);
}

.markdown-output code {
  white-space: pre-wrap;
  color: inherit;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.72;
}

.faq-grid,
.page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.faq-item,
.page-card {
  padding: 25px;
}

.faq-item p,
.page-card p {
  margin-bottom: 0;
}

.cta-panel {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 38px;
  padding: clamp(34px, 6vw, 74px);
  border-radius: 28px;
  color: var(--paper-light);
  background: var(--ink);
  box-shadow: var(--shadow);
}

.cta-panel .kicker {
  color: #f1846d;
}

.cta-panel p {
  margin-top: 20px;
  color: rgba(251, 246, 233, 0.68);
}

.cta-panel .button-secondary {
  border-color: rgba(251, 246, 233, 0.28);
  color: var(--paper-light);
  background: rgba(251, 246, 233, 0.07);
}

.footer {
  padding-block: 0 40px;
}

.footer-inner {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-copy {
  margin: 0;
  font-size: 0.86rem;
}

.footer-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.footer-links a {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

/* Secondary pages */
.page-hero {
  max-width: 930px;
  padding-block: 82px 42px;
}

.page-hero h1 {
  margin: 18px 0;
  font-size: clamp(3.4rem, 7vw, 6rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.page-hero > p {
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 1.06rem;
  line-height: 1.78;
}

.meta-row {
  flex-wrap: wrap;
  margin-top: 24px;
}

.meta-pill {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.page-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-block: 34px 70px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.58fr);
  gap: 22px;
  padding-bottom: 70px;
}

.article,
.sidebar-card {
  padding: clamp(25px, 4vw, 42px);
}

.article h2 {
  margin: 0 0 22px;
  font-size: 2.6rem;
  line-height: 1;
}

.article h3 {
  margin: 36px 0 12px;
  font-size: 1.8rem;
  line-height: 1.05;
}

.article ul,
.article ol,
.sidebar-card ul {
  padding-left: 20px;
}

.article li + li,
.sidebar-card li + li {
  margin-top: 9px;
}

.article-callout {
  margin-block: 26px;
  padding: 20px;
  border-left: 4px solid var(--signal);
}

.sidebar-stack {
  display: grid;
  align-self: start;
  gap: 18px;
  position: sticky;
  top: 18px;
}

.sidebar-card h3 {
  margin-top: 0;
}

.sidebar-card .button-ghost {
  width: 100%;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

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

.hero .reveal,
.page-hero.reveal {
  opacity: 1;
  transform: none;
}

@media (max-width: 1040px) {
  .topbar {
    align-items: flex-start;
    padding-block: 19px;
  }

  .topnav a:not(.nav-install) {
    display: none;
  }

  .hero,
  .demo-section,
  .trust-layout,
  .article-layout,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 58px;
  }

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

  .hero-visual {
    max-width: 780px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

  .cta-panel {
    align-items: start;
  }

  .sidebar-stack {
    position: static;
  }
}

@media (max-width: 700px) {
  .topbar,
  main,
  .footer {
    padding-inline: 18px;
  }

  .topbar {
    min-height: 72px;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
  }

  .brand-copy {
    font-size: 0.8rem;
  }

  .brand-copy strong {
    display: none;
  }

  .topnav .nav-install {
    min-height: 40px;
    padding-inline: 13px;
    font-size: 0.78rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 48px 58px;
  }

  .hero h1 {
    font-size: clamp(3.35rem, 17vw, 5rem);
    line-height: 0.92;
  }

  .hero-lead {
    font-size: 1rem;
  }

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

  .hero-actions a,
  .cta-actions a {
    width: 100%;
  }

  .product-frame {
    padding: 8px;
    border-radius: 18px;
    transform: none;
  }

  .product-frame::before {
    inset: 10px -8px -8px 10px;
    border-radius: 18px;
  }

  .product-frame img {
    border-radius: 12px;
  }

  .visual-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .value-strip,
  .feature-grid,
  .steps,
  .faq-grid,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .value-strip div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .section {
    padding-block: 72px;
  }

  .section-heading h2,
  .demo-intro h2,
  .trust-copy h2,
  .cta-panel h2 {
    font-size: clamp(2.85rem, 14vw, 4rem);
  }

  .feature-card {
    min-height: 260px;
  }

  .step-number {
    margin-bottom: 36px;
  }

  .demo-frame {
    padding: 8px;
    border-radius: 18px;
  }

  .demo-frame video {
    border-radius: 12px;
  }

  .demo-frame figcaption {
    align-items: flex-start;
    flex-direction: column;
  }

  .trust-layout {
    gap: 46px;
  }

  .markdown-output {
    transform: none;
  }

  .cta-panel {
    min-height: auto;
    padding: 34px 24px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 26px;
  }

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

  .page-hero {
    padding-block: 58px 28px;
  }

  .page-hero h1 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
