/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #1f2230;
  background: #fbfaf7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
a { color: #4338ca; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #3730a3; }
:focus-visible { outline: 3px solid #4f46e5; outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; color: #1a1d2b; margin-top: 0; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; font-weight: 600; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* ----- Skip link ----- */
.skip-link {
  position: absolute;
  left: -1000px;
  top: 0;
  background: #1f2230;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ----- Header ----- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e9e6df;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #1f2230;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}
.brand-mark {
  width: 1.1rem;
  height: 1.1rem;
  background: #4f46e5;
  border-radius: 50%;
  display: inline-block;
  color: transparent;
  font-size: 0;
}
.site-nav {
  display: flex;
  gap: 0.25rem 1.25rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: #3c3f52;
  text-decoration: none;
  padding: 0.4rem 0.25rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #4338ca; }
.site-nav a[aria-current="page"] {
  color: #4338ca;
  border-bottom-color: #4f46e5;
}

/* ----- Hero ----- */
.hero {
  padding: 3rem 0 2.5rem;
  background:
    radial-gradient(1200px 400px at 20% 0%, #eef2ff 0, transparent 60%),
    radial-gradient(900px 400px at 100% 100%, #fdf2f8 0, transparent 60%),
    #fbfaf7;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 820px) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
  .hero { padding: 4.5rem 0 4rem; }
}
.hero p.lead {
  font-size: 1.25rem;
  color: #3c3f52;
  max-width: 36ch;
}
.hero h1 { margin: 0 0 1rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  border: 2px solid transparent;
  background: #4f46e5;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  min-height: 48px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: #4338ca; color: #fff; }
.btn-secondary {
  background: #fff;
  color: #1f2230;
  border-color: #d4d0c5;
}
.btn-secondary:hover { background: #f3efe6; color: #1f2230; }
.btn[aria-disabled="true"], .btn:disabled {
  background: #e7e4dc;
  color: #6b6f7e;
  cursor: not-allowed;
  border-color: transparent;
}
.btn-tag {
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(0,0,0,0.08);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  color: inherit;
}

.hero-screenshot {
  background: #fff;
  border: 1px solid #e9e6df;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 18px 40px -20px rgba(79, 70, 229, 0.25);
}
.hero-screenshot img { border-radius: 10px; }

/* ----- Sections ----- */
.section { padding: 3.5rem 0; }
.section + .section { border-top: 1px solid #efece4; }
.section-title { max-width: 48ch; margin-bottom: 2rem; }
.section-lead { color: #4a4d60; max-width: 60ch; }

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.card {
  background: #fff;
  border: 1px solid #ece9e0;
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1.4rem;
}
.card h3 { margin-bottom: 0.4rem; color: #1f2230; }
.card p { margin: 0; color: #4a4d60; }

/* ----- Steps ----- */
.steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  background: #fff;
  border: 1px solid #ece9e0;
  border-radius: 14px;
  padding: 1.5rem 1.25rem;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: #4f46e5;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.step h3 { margin: 0 0 0.4rem; }
.step p { margin: 0; color: #4a4d60; }

/* ----- Principles ----- */
.principles {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .principles { grid-template-columns: repeat(2, 1fr); }
}
.principle {
  background: #fff;
  border: 1px solid #ece9e0;
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.principle-mark {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #eef2ff;
  color: #4338ca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.principle h3 { margin: 0 0 0.25rem; }
.principle p { margin: 0; color: #4a4d60; }

/* ----- FAQ ----- */
.faq { display: grid; gap: 0.75rem; max-width: 800px; }
.faq details {
  background: #fff;
  border: 1px solid #ece9e0;
  border-radius: 12px;
  padding: 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: #4f46e5;
  line-height: 1;
  flex: 0 0 auto;
}
.faq details[open] summary::after { content: "−"; }
.faq .faq-body { padding: 0 1.25rem 1.1rem; color: #3c3f52; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ----- Contact ----- */
.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .contact-grid { grid-template-columns: 1fr 1.2fr; }
}
.contact-info p { color: #4a4d60; }
.contact-info a { font-weight: 600; }

.form {
  background: #fff;
  border: 1px solid #ece9e0;
  border-radius: 16px;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; color: #1f2230; }
.field input, .field textarea {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 2px solid #dad6cb;
  border-radius: 10px;
  background: #fbfaf7;
  color: #1f2230;
  min-height: 44px;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: #4f46e5;
  background: #fff;
}
.field textarea { min-height: 140px; resize: vertical; }

.field-checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
}
.field-checkbox input { width: 1.15rem; height: 1.15rem; margin-top: 0.35rem; }
.field-checkbox label { font-weight: 400; color: #3c3f52; }

.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid;
  font-weight: 500;
}
.alert-success { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

/* ----- Prose (legal pages) ----- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin-bottom: 0.4rem; }
.prose .todo {
  background: #fff7ed;
  border-left: 4px solid #f59e0b;
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  color: #7c2d12;
  margin: 0.75rem 0;
}

/* ----- Footer ----- */
.site-footer {
  background: #1f2230;
  color: #d8d6cf;
  padding: 2rem 0;
  margin-top: 3rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.footer-text { margin: 0; color: #c0bdb3; }
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-nav a { color: #e8e6df; text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ----- Download page ----- */
.download-card {
  background: #fff;
  border: 1px solid #ece9e0;
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem 0 2rem;
}
.download-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.download-meta {
  margin: 0.35rem 0 0;
  color: #4a4d60;
  font-size: 0.95rem;
}
.btn-download { background: #4f46e5; min-width: 200px; }
.download-meta-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1rem;
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #efece4;
  font-size: 0.95rem;
}
.download-meta-list dt { color: #6b6f7e; }
.download-meta-list dd { margin: 0; }
.download-meta-list code { font-size: 0.9rem; word-break: break-all; }
.download-meta-list code.sha {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f6f4ec;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.alert-warning {
  background: #fff7ed;
  border-color: #fcd34d;
  color: #78350f;
}

.prose .hint {
  font-size: 0.95rem;
  color: #4a4d60;
}

