:root {
  /* Matches the app's default "ledger" theme (frontend/src/styles.css):
     plum accent on a cool grey page with white panels. */
  --bg: #f4f3f6;
  --bg-deep: #e9e6ed;
  --surface: #ffffff;
  --ink: #1f1a24;
  --ink-soft: #645c6c;
  --line: #cfc8d6;
  --line-soft: #e2dee7;
  --accent: #7a4a8c;
  --accent-deep: #643874;
  --accent-ink: #4a1a46;
  --brand: #5b1f55;
  --brand-deep: #431740;
  --btn: #5b1f55;
  --btn-hover: #431740;
  --white: #ffffff;
  --top-bg: color-mix(in srgb, var(--surface) 92%, transparent);
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 72rem;
  --pad: clamp(1.25rem, 3vw, 2.5rem);
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(
      120% 80% at 100% 0%,
      color-mix(in srgb, var(--brand) 18%, transparent) 0%,
      transparent 55%
    ),
    linear-gradient(
      168deg,
      color-mix(in srgb, var(--bg) 82%, var(--accent)) 0%,
      var(--bg) 42%,
      color-mix(in srgb, var(--bg-deep) 88%, var(--brand)) 100%
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 55px,
      color-mix(in srgb, var(--ink) 5%, transparent) 55px,
      color-mix(in srgb, var(--ink) 5%, transparent) 56px
    ),
    var(--bg);
  background-attachment: fixed;
}

a {
  color: var(--brand-deep);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-ink);
}

a:focus-visible,
.btn:focus-visible,
.logo:focus-visible {
  outline: 3px solid var(--accent-deep);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  background: var(--white);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  z-index: 20;
  text-decoration: none;
  border: 2px solid var(--brand-deep);
}

.skip:focus {
  left: 0.75rem;
  outline: 3px solid var(--accent-deep);
  outline-offset: 2px;
}

.top {
  border-bottom: 1px solid var(--line);
  background: var(--top-bg);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow:
    inset 0 -3px 0 var(--accent),
    inset 0 -6px 0 var(--brand);
}

.top-inner,
.foot-inner,
.hero-copy,
.section,
.page-hero,
.feature-block,
.features-cta {
  width: min(100% - (var(--pad) * 2), var(--max));
  margin-inline: auto;
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.logo {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.05rem;
  font-size: 0.9375rem;
}

.top nav a {
  text-decoration: none;
  color: var(--ink-soft);
}

.top nav a:hover {
  color: var(--brand-deep);
  text-decoration: underline;
}

.top nav a.nav-cta {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.hero {
  padding-block: clamp(2.75rem, 8vh, 5.5rem) clamp(2.5rem, 6vh, 4rem);
  overflow: hidden;
}

.hero-copy {
  text-align: center;
}

.domain {
  margin: 0 0 0.65rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--accent-ink);
}

.hero h1 {
  margin: 0 auto;
  max-width: 18ch;
  font-family: var(--mono);
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  margin: 1.15rem 0 0;
  max-width: 34rem;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.hero .lede {
  margin-inline: auto;
  max-width: 40rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  text-wrap: pretty;
}

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

.hero .cta-row {
  justify-content: center;
}

.btn-lg {
  min-height: 3.1rem;
  padding: 0.7rem 1.5rem;
  font-size: 1.05rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.hero-facts li::before {
  content: "✓";
  margin-right: 0.4rem;
  font-weight: 600;
  color: var(--brand);
}

.hero-app-link {
  margin: 1.1rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.hero-app-link a {
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.975rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--btn);
  color: var(--white);
  box-shadow: inset 0 -3px 0 var(--accent-deep);
}

.btn-primary:hover {
  background: var(--btn-hover);
  color: var(--white);
}

.btn-secondary {
  /* Solid mix — avoid translucent backgrounds that fail contrast sampling */
  background: #efe6ee;
  border-color: var(--accent-deep);
  color: var(--accent-ink);
}

.btn-secondary:hover {
  background: #e4d4e3;
  border-color: var(--accent-ink);
  color: var(--accent-ink);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--brand-deep);
}

.btn-ghost:hover {
  border-color: var(--brand-deep);
  color: var(--brand-deep);
  background: #efebf3;
}

.hero-visual {
  width: min(100% - (var(--pad) * 2), 76rem);
  margin: clamp(2.25rem, 5vh, 3.25rem) auto 0;
}

.app-window {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--brand-deep) 10%, transparent),
    0 24px 60px -18px color-mix(in srgb, var(--brand-deep) 35%, transparent);
}

.app-window-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.1rem;
  padding-inline: 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}

.app-window-bar span:not(.app-window-url) {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--line);
}

.app-window-url {
  margin-left: 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

/* Crop to the header, toolbar, and first rows, where the linked bars sit. */
.hero-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1440 / 560;
  object-fit: cover;
  object-position: left top;
}

.section {
  padding-block: 2.75rem;
  border-top: 1px solid var(--line);
}

.section-last {
  padding-bottom: 4rem;
}

.section h2 {
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.section p {
  margin: 0 0 1rem;
  max-width: 42rem;
}

.aside {
  color: var(--ink-soft);
  border-left: 3px solid var(--accent);
  padding-left: 0.9rem;
}

.plain-list {
  margin: 0;
  padding: 0;
  max-width: 42rem;
  list-style: none;
}

.plain-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
}

.plain-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent-deep);
}

.pricing-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.price-table {
  display: grid;
  gap: 0;
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.price-row h3 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.price-row p {
  margin: 0;
  color: var(--ink-soft);
}

.price {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--brand-deep);
  white-space: nowrap;
}

.price span {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent-ink);
}

.pricing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.foot {
  border-top: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--accent) 0 3px, var(--brand) 3px 6px, transparent 6px),
    var(--bg-deep);
  padding-block: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.foot p {
  margin: 0;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  align-items: center;
}

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

/* Motion: quiet presence, not spectacle (JS only; no-js stays visible).
   Keep opacity at 1 so content stays readable / contrast-safe before scroll. */
.js .section,
.js .feature-block,
.js .features-cta {
  transform: translateY(0.6rem);
  transition: transform 0.55s ease;
}

.js .section.is-in,
.js .feature-block.is-in,
.js .features-cta.is-in {
  transform: none;
}

.js .hero-copy {
  animation: copy-in 0.65s ease both;
}

.js .hero-shot {
  animation: shot-in 0.85s ease both;
  animation-delay: 0.08s;
}

@keyframes copy-in {
  from {
    transform: translateY(0.75rem);
  }
  to {
    transform: none;
  }
}

@keyframes shot-in {
  from {
    transform: translateY(1.25rem);
  }
  to {
    transform: none;
  }
}

@media (max-width: 640px) {
  .top-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 0.85rem;
  }
}

/* —— Features page —— */
.page-hero {
  padding-block: clamp(2.5rem, 7vh, 4.5rem) 2rem;
  border-top: 0;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.page-hero .lede {
  margin-top: 1rem;
}

.feature-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  max-width: none;
  font-size: 0.9375rem;
}

.feature-toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

.feature-toc a:hover {
  color: var(--brand-deep);
  text-decoration: underline;
}

.feature-block {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.75rem;
  border-top: 1px solid var(--line);
}

.feature-block-copy h2 {
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.feature-block-copy p {
  margin: 0 0 1rem;
  max-width: 42rem;
}

.feature-shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: var(--ink);
}

.feature-shot-caption {
  margin: 0.55rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
  max-width: none;
}

.features-cta {
  padding-block: 2.75rem 4rem;
  border-top: 1px solid var(--line);
}

.features-cta h2 {
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.features-cta p {
  margin: 0 0 1rem;
  max-width: 42rem;
}

.features-more {
  margin-top: 1.25rem;
}

.features-more a {
  font-weight: 500;
}

@media (min-width: 900px) {
  .feature-block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 2rem 2.5rem;
    align-items: start;
  }

  .feature-block-reverse {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .feature-block-reverse .feature-block-copy {
    order: 2;
  }

  .feature-block-reverse .feature-block-media {
    order: 1;
  }
}

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

  .js .section,
  .js .feature-block,
  .js .features-cta,
  .js .hero-copy,
  .js .hero-shot {
    transform: none;
    transition: none;
    animation: none;
  }
}
