:root {
  --bg: #f5f3ef;
  --surface: #eeece7;
  --surface-2: #e7e4dd;
  --border: #d8d4cb;
  --green: #4a5e45;
  --green-mid: #5c7356;
  --green-light: #7a9470;
  --green-pale: #e8efe6;
  --ink: #1e2119;
  --ink-mid: #4a4d45;
  --ink-soft: #6c7065;
  --white: #fafaf8;
  --shadow: 0 14px 40px rgba(30, 33, 25, 0.12), 0 3px 10px rgba(30, 33, 25, 0.07);
  --card: rgba(250, 250, 248, 0.72);
  --header-bg: rgba(250, 250, 248, 0.8);
  --header-border: rgba(216, 212, 203, 0.85);
  --border-green: var(--border-green);
  --btn-solid-hover: #3c4f38;
  --demo-border: #b4afa2;
  --glow-a: rgba(212, 224, 204, 0.52);
  --glow-b: rgba(255, 241, 215, 0.38);
  --glow-c: rgba(129, 154, 118, 0.22);
  --sheen: rgba(255, 255, 255, 0.34);
  --privacy-bg: linear-gradient(160deg, rgba(232, 239, 230, 0.8) 0%, rgba(250, 250, 248, 0.9) 60%);
  --download-bg: linear-gradient(120deg, rgba(232, 239, 230, 0.72) 0%, rgba(250, 250, 248, 0.92) 46%);
  --hero-halo: radial-gradient(circle, rgba(250, 250, 248, 0.95) 0%, rgba(232, 239, 230, 0.7) 55%, rgba(232, 239, 230, 0) 72%);
  color-scheme: light;
}

:root.dark {
  --bg: #1b1915;
  --surface: #26231f;
  --surface-2: #302c27;
  --border: #433f38;
  --green: #6f8f66;
  --green-pale: #2c372c;
  --ink: #f0ebe3;
  --ink-mid: #d2cabc;
  --ink-soft: #a39b8d;
  --white: #1f1d19;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 3px 10px rgba(0, 0, 0, 0.3);
  --card: rgba(42, 38, 34, 0.72);
  --header-bg: rgba(31, 29, 25, 0.8);
  --header-border: rgba(67, 63, 56, 0.85);
  --border-green: #4a5e45;
  --btn-solid-hover: #5c7a54;
  --demo-border: #4a4640;
  --glow-a: rgba(74, 94, 69, 0.14);
  --glow-b: rgba(120, 100, 60, 0.14);
  --glow-c: rgba(74, 94, 69, 0.08);
  --sheen: rgba(255, 255, 255, 0.03);
  --privacy-bg: linear-gradient(160deg, rgba(44, 55, 44, 0.8) 0%, rgba(38, 35, 31, 0.9) 60%);
  --download-bg: linear-gradient(120deg, rgba(44, 55, 44, 0.72) 0%, rgba(38, 35, 31, 0.92) 46%);
  --hero-halo: radial-gradient(circle, rgba(74, 94, 69, 0.2) 0%, rgba(44, 55, 44, 0.12) 55%, rgba(44, 55, 44, 0) 72%);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(1200px 700px at 8% -12%, var(--glow-a) 0%, transparent 62%),
              radial-gradient(1100px 640px at 92% 2%, var(--glow-b) 0%, transparent 58%),
              radial-gradient(840px 540px at 52% 100%, var(--glow-c) 0%, transparent 64%),
              var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(118deg, var(--sheen) 8%, rgba(255, 255, 255, 0) 38%),
    repeating-linear-gradient(
      26deg,
      rgba(74, 94, 69, 0.045) 0,
      rgba(74, 94, 69, 0.045) 1px,
      transparent 1px,
      transparent 28px
    );
  opacity: 0.58;
}

body::after {
  content: '';
  position: fixed;
  inset: -12% -8% auto auto;
  width: 58vw;
  height: 58vw;
  max-width: 780px;
  max-height: 780px;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  background:
    conic-gradient(
      from 44deg,
      rgba(122, 148, 112, 0.22),
      rgba(122, 148, 112, 0.02),
      rgba(74, 94, 69, 0.2),
      rgba(255, 244, 223, 0.18),
      rgba(122, 148, 112, 0.22)
    );
  filter: blur(12px);
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(2px);
  z-index: -1;
  pointer-events: none;
}

.bg-orb-a {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle at 30% 30%, rgba(122, 148, 112, 0.25), rgba(122, 148, 112, 0));
  top: -120px;
  left: -90px;
}

.bg-orb-b {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 40% 40%, rgba(74, 94, 69, 0.18), rgba(74, 94, 69, 0));
  right: -120px;
  bottom: -210px;
}

:root.dark body::after {
  opacity: 0.25;
}

:root.dark .bg-orb {
  opacity: 0.3;
}

.site-header,
.section-shell,
.site-footer {
  width: min(1120px, calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;
  margin-top: 16px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  border: 1px solid var(--header-border);
  border-radius: 14px;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(30, 33, 25, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: block;
}

.brand-text {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-mid);
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-lang-toggle {
  gap: 0.35rem;
  height: 40px;
  padding: 0 0.7rem;
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink-mid);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.btn-lang-toggle:hover {
  background: var(--surface-2);
  color: var(--ink);
}

main {
  padding-bottom: 5rem;
}

.section-shell {
  padding-top: 7.5rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.2rem;
  align-items: center;
  /* Fill the first screen below the sticky header; the rest is revealed by scrolling. */
  min-height: calc(100vh - 96px);
  min-height: calc(100svh - 96px);
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  margin-top: 0;
  font-size: clamp(2rem, 5vw, 3.85rem);
  max-width: 15ch;
  text-wrap: balance;
}

.hero-lede {
  margin: 1.1rem 0 0;
  max-width: 52ch;
  color: var(--ink-mid);
  font-size: 1.06rem;
}

.hero-cta-row {
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-meta {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.92rem;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  cursor: pointer;
  white-space: nowrap;
}

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

.btn:focus-visible,
.feature-try:focus-visible,
.shortcut:focus-visible {
  outline: 2px solid var(--green-light);
  outline-offset: 2px;
}

.btn-solid {
  background: var(--green);
  color: var(--white);
  padding: 0.72rem 1.1rem;
}

.btn-solid:hover {
  background: var(--btn-solid-hover);
}

.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink-mid);
  padding: 0.72rem 1.1rem;
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.btn-ghost[aria-pressed='true'] {
  background: var(--green-pale);
  border-color: var(--border-green);
  color: var(--green);
}

.btn-small {
  padding: 0.5rem 0.85rem;
  font-size: 0.86rem;
}

.btn-top-download {
  box-shadow: 0 6px 16px rgba(61, 82, 57, 0.25);
}

/* Hero art: the floating icon. */
.hero-art {
  position: relative;
  height: 430px;
  display: grid;
  place-items: center;
}

.hero-art::before {
  content: '';
  position: absolute;
  z-index: -2;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: var(--hero-halo);
}

/* Soft ground shadow. Static, so the floating icon needs no filter. */
.hero-art::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: calc(50% + 112px);
  width: 190px;
  height: 34px;
  margin-left: -95px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(30, 33, 25, 0.28), rgba(30, 33, 25, 0));
}

.hero-icon {
  position: relative;
  width: 230px;
  height: 230px;
  will-change: transform;
  animation: floatSoft 4s ease-in-out infinite alternate;
}

.section-head {
  max-width: 62ch;
}

.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.65rem);
  text-wrap: balance;
}

.section-note {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
}

/* Live demo */
.demo-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.demo-window {
  margin-top: 1.6rem;
  border: 1px solid var(--demo-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--bg);
}

.demo-host {
  position: relative;
  height: 640px;
  overflow: hidden;
}

.demo-fallback {
  margin: 0;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--ink-soft);
}

/* Features */
.feature-grid {
  margin-top: 1.7rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 0.95rem 1.05rem;
}

.feature-card h3 {
  font-size: 1.12rem;
}

.feature-card p {
  margin: 0.3rem 0 0.7rem;
  color: var(--ink-mid);
  font-size: 0.92rem;
}

.feature-try {
  margin-top: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--green);
  font: 500 0.86rem 'DM Sans', sans-serif;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}

.feature-try::after {
  content: ' →';
  display: inline-block;
  transition: transform 0.16s ease;
  white-space: pre;
}

.feature-try:hover {
  text-decoration: underline;
}

.feature-try:hover::after {
  transform: translateX(3px);
}

.provider-list li {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  padding: 0.32rem 0.8rem;
  color: var(--ink-mid);
  font-size: 0.88rem;
}

/* Shortcuts */
.shortcut-grid {
  margin-top: 1.7rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 0.7rem 0.85rem;
  color: var(--ink-mid);
  font: 400 0.92rem 'DM Sans', sans-serif;
  text-align: left;
}

button.shortcut {
  cursor: pointer;
  color: var(--ink);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

button.shortcut:hover {
  background: var(--green-pale);
  border-color: var(--border-green);
  transform: translateY(-1px);
}

.keys {
  display: inline-flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

kbd {
  min-width: 1.75rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font: 500 0.74rem 'DM Sans', sans-serif;
  text-align: center;
}

/* Providers and privacy */
.providers-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
}

.provider-list {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.provider-note {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.privacy-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--privacy-bg);
  padding: 1.5rem;
}

.privacy-card h3 {
  font-size: 1.45rem;
}

.privacy-card p {
  margin: 0.8rem 0 1rem;
  color: var(--ink-mid);
}

.privacy-card a,
a.download-link-note,
.site-footer p a {
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}

.privacy-card a:hover,
a.download-link-note:hover,
.site-footer p a:hover {
  text-decoration: underline;
}

/* Download */
.download {
  margin-top: 7.5rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--download-bg);
  padding: clamp(1.4rem, 4vw, 2.25rem);
}

.download h2 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
}

.download-cta {
  margin-top: 1.3rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
}

.download-link-note {
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
  color: var(--ink-soft);
}

.footer-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.footer-links a {
  color: var(--ink-mid);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

@keyframes floatSoft {
  from {
    transform: translate3d(0, -10px, 0);
  }
  to {
    transform: translate3d(0, 10px, 0);
  }
}

@media (max-width: 980px) {
  .site-header {
    top: 10px;
  }

  .site-nav {
    display: none;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .btn-top-download {
    padding-inline: 0.95rem;
  }

  .hero {
    grid-template-columns: 1fr;
    align-content: center;
    padding-top: 1rem;
  }

  .hero-art {
    order: -1;
    height: 340px;
    max-width: 520px;
    width: 100%;
    margin-inline: auto;
  }

  .hero-icon {
    width: 180px;
    height: 180px;
  }

  .hero-art::after {
    top: calc(50% + 87px);
    width: 150px;
    margin-left: -75px;
  }

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

  .providers-grid {
    grid-template-columns: 1fr;
  }

  .header-actions {
    gap: 0.4rem;
  }
}

@media (max-width: 640px) {
  .site-header,
  .section-shell,
  .site-footer {
    width: min(1120px, calc(100% - 1.2rem));
  }

  .section-shell {
    padding-top: 5rem;
  }

  h1 {
    font-size: clamp(1.85rem, 7.2vw, 2.45rem);
  }

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

  .site-header {
    padding: 0 0.7rem;
  }

  .btn-lang-toggle {
    padding: 0 0.55rem;
  }

  .hero-art {
    height: 300px;
  }

  .feature-grid,
  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .download {
    margin-top: 5rem;
  }
}

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

  .hero-icon {
    animation: none;
  }

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