/* Light is the base; dark applies when the OS asks for it (unless the visitor picked light in
   the footer switch) or when the visitor picked dark. The pick is stored as data-theme on <html>. */
:root {
  --bg: #fafafa;
  --bg-raised: #ffffff;
  --bg-sunk: #f1f3f5;
  --border: #e3e6ea;
  --text: #14171a;
  --text-dim: #4b5563;
  --text-dimmer: #5f6773;
  --accent: #047857;
  --accent-strong: #065f46;
  --accent-text: #ffffff;
  --accent-soft: #d1fae5;
  --danger: #b91c1c;
  --field-border: #7c848f;
  --radius: 10px;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b0d10;
    --bg-raised: #13161b;
    --bg-sunk: #0f1215;
    --border: #262b33;
    --text: #e7e9ec;
    --text-dim: #a3aab4;
    --text-dimmer: #8b939e;
    --accent: #6ee7b7;
    --accent-strong: #34d399;
    --accent-text: #06251a;
    --accent-soft: #0f2a21;
    --danger: #f87171;
    --field-border: #636c78;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #0b0d10;
  --bg-raised: #13161b;
  --bg-sunk: #0f1215;
  --border: #262b33;
  --text: #e7e9ec;
  --text-dim: #a3aab4;
  --text-dimmer: #8b939e;
  --accent: #6ee7b7;
  --accent-strong: #34d399;
  --accent-text: #06251a;
  --accent-soft: #0f2a21;
  --danger: #f87171;
  --field-border: #636c78;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

code {
  font-family: var(--font-mono);
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.88em;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
}

/* Long flags like --dangerously-skip-permissions are wider than a 320px phone. */
@media (max-width: 480px) {
  code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.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: absolute;
  inset-inline-start: 16px;
  top: -48px;
  z-index: 10;
  background: var(--accent);
  color: var(--accent-text);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--accent-text);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.logo:hover {
  color: var(--text);
}

.logo-mark,
.logo-mark svg {
  display: block;
  width: 24px;
  height: 24px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Language menu */

.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: 8px;
  min-height: 40px;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary:hover,
.lang-menu[open] summary {
  color: var(--text);
  background: var(--bg-sunk);
}

.lang-menu ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  z-index: 20;
  list-style: none;
  margin: 0;
  padding: 6px;
  width: max-content;
  max-width: calc(100vw - 32px);
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
}

.lang-menu a {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.lang-menu a:hover {
  background: var(--bg-sunk);
}

.lang-menu a[aria-current] {
  color: var(--accent);
  font-weight: 600;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 10px 18px;
  min-height: 44px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--accent-text);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

@media (max-width: 560px) {
  .btn-join {
    display: none;
  }
}

/* Hero */

.hero {
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--border);
}

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 0 0 24px;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 auto 20px;
  max-width: 760px;
  text-wrap: balance;
}

h2,
h3 {
  text-wrap: balance;
}

.lede {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 40px;
}

/* Waitlist form */

.waitlist-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.waitlist-form input[type='email'] {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 44px;
  background: var(--bg-raised);
  border: 1px solid var(--field-border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 1rem;
  font-family: inherit;
  direction: ltr;
}

[dir='rtl'] .waitlist-form input[type='email']::placeholder {
  text-align: right;
}

.waitlist-form input[type='email']:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Brevo's honeypot: invisible to people, filled in by naive bots (Brevo drops those). */
.waitlist-form .hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  /* No large negative left offset: in RTL pages (ar) that widens the layout and mobile
     browsers zoom the whole page out to fit it. */
}

/* Replaces the form after Brevo redirects back with ?signup=pending|confirmed. */
.form-status {
  max-width: 440px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: center;
}

.form-note {
  margin: 14px auto 0;
  max-width: 520px;
  font-size: 0.85rem;
  color: var(--text-dimmer);
  text-align: center;
}

.form-note a {
  color: inherit;
}

/* Sections */

.how,
.differentiators,
.faq {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.how h2,
.differentiators h2,
.faq h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  margin: 0 0 48px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.steps h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.pricing-teaser {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.pricing-teaser p {
  margin: 0;
  color: var(--text-dim);
}

.pricing-teaser strong {
  color: var(--text);
}

/* "A guardrail, not a sandbox" teaser */

.scope-teaser {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.scope-card {
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 28px;
}

.scope-card h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.scope-card p {
  margin: 0 0 14px;
  color: var(--text-dim);
}

.text-link {
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

[dir='rtl'] .arrow {
  display: inline-block;
  transform: scaleX(-1);
}

/* FAQ */

.faq-list {
  max-width: 680px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  color: var(--text-dimmer);
  flex: none;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item p {
  margin: 0 0 18px;
  color: var(--text-dim);
}

/* Bottom waitlist */

.waitlist-bottom {
  padding: 88px 0;
  text-align: center;
}

.waitlist-bottom h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}

/* Prose pages: what Saeta is / privacy / 404 */

.prose-page {
  padding: 64px 0 88px;
}

.prose {
  max-width: 720px;
}

.prose h1 {
  margin-inline: 0;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.prose .lede {
  margin-inline: 0;
  margin-bottom: 32px;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}

.prose p,
.prose li {
  color: var(--text-dim);
}

.prose strong {
  color: var(--text);
}

.prose ul {
  padding-inline-start: 1.2em;
  margin: 0 0 16px;
}

.prose li + li {
  margin-top: 8px;
}

.meta-line,
.translation-note {
  font-size: 0.88rem;
  color: var(--text-dimmer) !important;
  margin: -8px 0 16px;
}

.translation-note {
  margin: 0 0 24px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
}

.is-isnt {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.is-isnt section {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px 8px;
}

.is-isnt h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-size: 0.85rem;
  flex: none;
}

.mark-yes {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.mark-no {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}

.page-cta {
  margin-top: 40px;
}

.notfound {
  text-align: center;
}

.notfound h1,
.notfound .lede {
  margin-inline: auto;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  justify-content: space-between;
  color: var(--text-dimmer);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 0;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.theme-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.theme-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dimmer);
  cursor: pointer;
}

.theme-switch button:hover {
  color: var(--text);
}

.theme-switch button[aria-pressed='true'] {
  background: var(--bg-sunk);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
