:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-soft: #efefec;
  --ink: #0c0c0c;
  --muted: #686866;
  --line: rgba(12, 12, 12, 0.11);
  --line-strong: rgba(12, 12, 12, 0.2);
  --inverse: #ffffff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.1);
  --radius: 22px;
  --max: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --surface: rgba(25, 25, 24, 0.84);
    --surface-solid: #181817;
    --surface-soft: #222220;
    --ink: #f6f6f3;
    --muted: #a4a49f;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --inverse: #090909;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(900px 480px at 78% -140px, color-mix(in srgb, var(--ink) 7%, transparent), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, select { font: inherit; }
img { max-width: 100%; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--inverse);
}
.skip-link:focus { transform: none; }

.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
}
.header-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 730;
  letter-spacing: -0.025em;
}
.brand-mark { width: 27px; height: 34px; object-fit: contain; filter: brightness(0); }
@media (prefers-color-scheme: dark) { .brand-mark { filter: none; } }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 570;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-soft); color: var(--ink); }
.header-tools { display: flex; align-items: center; gap: 9px; }
.language-wrap { position: relative; }
.language-select {
  max-width: 150px;
  min-height: 40px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
[dir="rtl"] .language-select { padding: 0 12px 0 30px; }
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--inverse);
  text-decoration: none;
  font-size: 14px;
  font-weight: 670;
  transition: transform 180ms ease, opacity 180ms ease;
}
.button:hover { transform: translateY(-1px); }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.menu-button {
  display: none;
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.hero { padding: clamp(70px, 10vw, 128px) 0 76px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(460px, 1.12fr); gap: clamp(50px, 7vw, 96px); align-items: center; }
.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
h1, h2, h3 { margin-top: 0; letter-spacing: -0.04em; line-height: 1.04; }
h1 { margin-bottom: 20px; font-size: clamp(46px, 6vw, 78px); font-weight: 760; text-wrap: balance; }
h2 { margin-bottom: 16px; font-size: clamp(32px, 4.2vw, 52px); font-weight: 730; text-wrap: balance; }
h3 { margin-bottom: 10px; font-size: 20px; font-weight: 690; }
.hero-copy, .section-intro, .legal-lead { color: var(--muted); font-size: clamp(17px, 1.65vw, 20px); line-height: 1.62; }
.hero-copy { max-width: 620px; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.proof { margin: 24px 0 0; color: var(--muted); font-size: 13px; }

.product-window {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: color-mix(in srgb, var(--surface-solid) 70%, transparent);
  box-shadow: var(--shadow);
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
}
[dir="rtl"] .product-window { transform: perspective(1200px) rotateY(2deg) rotateX(1deg); }
.window-bar { height: 32px; display: flex; align-items: center; gap: 6px; padding-inline: 10px; }
.window-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.app-frame { min-height: 430px; display: grid; grid-template-columns: 144px 1fr; border: 1px solid var(--line); border-radius: 21px; overflow: hidden; background: var(--surface-solid); }
.app-sidebar { padding: 20px 12px; border-inline-end: 1px solid var(--line); background: var(--surface-soft); }
.app-sidebar strong { display: block; margin-bottom: 22px; padding-inline: 8px; font-size: 15px; }
.demo-nav { display: grid; gap: 5px; }
.demo-nav span { padding: 8px 9px; border-radius: 9px; color: var(--muted); font-size: 12px; }
.demo-nav span:first-child { background: var(--surface-solid); color: var(--ink); font-weight: 650; }
.app-main { min-width: 0; padding: 26px; }
.demo-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.demo-heading strong { font-size: 24px; letter-spacing: -0.035em; }
.demo-add { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--inverse); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 18px; }
.stat { padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.stat b { display: block; font-size: 20px; }
.stat span { color: var(--muted); font-size: 11px; }
.item-list { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.demo-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 14px; }
.demo-item + .demo-item { border-top: 1px solid var(--line); }
.demo-emoji { font-size: 22px; }
.demo-item b { display: block; font-size: 13px; }
.demo-item small { color: var(--muted); }
.demo-quantity { font-size: 14px; font-weight: 680; }
.demo-item.warning .demo-quantity { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }

.section { padding: 92px 0; }
.section-heading { max-width: 760px; margin-bottom: 38px; }
.section-intro { margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feature-card {
  min-height: 220px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.feature-number { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 36px; border-radius: 50%; background: var(--ink); color: var(--inverse); font-size: 12px; font-weight: 700; }
.feature-card p { margin: 0; color: var(--muted); }
.cta-panel { padding: clamp(30px, 7vw, 72px); border-radius: 30px; background: var(--ink); color: var(--inverse); }
.cta-panel p { max-width: 650px; color: color-mix(in srgb, var(--inverse) 68%, transparent); font-size: 18px; }
.cta-panel .button { background: var(--inverse); color: var(--ink); border-color: var(--inverse); }

.page-hero { padding: 82px 0 48px; }
.page-hero h1 { max-width: 900px; font-size: clamp(42px, 6vw, 70px); }
.page-hero .section-intro { max-width: 780px; }
.legal-wrap { width: min(calc(100% - 40px), 780px); margin: 0 auto; padding: 74px 0 100px; }
.legal-wrap h1 { font-size: clamp(40px, 6vw, 62px); }
.legal-updated { margin: -8px 0 30px; color: var(--muted); font-size: 14px; }
.legal-lead { margin-bottom: 52px; }
.legal-section { padding: 30px 0; border-top: 1px solid var(--line); }
.legal-section h2 { font-size: 25px; letter-spacing: -0.025em; }
.legal-section p { margin: 0; color: color-mix(in srgb, var(--ink) 82%, var(--muted)); line-height: 1.78; }
.support-contact { margin: 0 0 50px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.support-contact a { font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.join-page { min-height: 100svh; display: grid; place-items: center; padding: 28px; }
.join-card { width: min(100%, 470px); padding: 38px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.join-logo { width: 56px; height: 70px; margin-bottom: 20px; object-fit: contain; filter: brightness(0); }
@media (prefers-color-scheme: dark) { .join-logo { filter: none; } }
.join-card h1 { font-size: 32px; }
.join-card p { color: var(--muted); }
.invite-code { min-height: 52px; display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin: 26px 0; }
.invite-code span { min-width: 38px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface-solid); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 21px; font-weight: 750; }
.join-card .button { width: 100%; }
.join-hint { margin-top: 18px; font-size: 13px; }

.site-footer { padding: 42px 0; border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-inline-start: auto; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 520ms ease, transform 520ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 720px; }
  .product-window { max-width: 680px; transform: none; }
  [dir="rtl"] .product-window { transform: none; }
  .header-row > .button { display: none; }
}

@media (max-width: 720px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .header-row { min-height: 64px; gap: 10px; }
  .menu-button { display: grid; place-items: center; }
  .nav {
    display: none;
    position: absolute;
    inset: 64px 14px auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: grid; }
  .nav a { padding: 12px 13px; }
  .header-tools { margin-inline-start: auto; }
  .language-select { width: 118px; }
  .hero { padding-top: 68px; }
  h1 { font-size: clamp(42px, 13vw, 60px); }
  .product-window { margin-inline: -4px; border-radius: 24px; }
  .app-frame { min-height: 380px; grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .app-main { padding: 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 190px; }
  .section { padding: 70px 0; }
  .footer-links { width: 100%; margin-inline-start: 0; }
  .join-card { padding: 30px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  :root { --ink: #000000; --muted: #555555; --line: #dddddd; }
  .site-header, .site-footer, .hero-actions { display: none !important; }
  body { background: white; color: black; }
  .legal-wrap { width: 100%; padding: 0; }
}
