/* ============================================================
   OpenCortex — landing page
   Tokens no :root; tema claro/escuro automático via prefers-color-scheme.
   ============================================================ */

:root {
  --bg:            #ffffff;
  --bg-alt:        #f6f7f9;
  --surface:       #ffffff;
  --border:        #e4e7ec;
  --text:          #14161a;
  --text-muted:    #5b6472;
  --accent:        #4f46e5;
  --accent-hover:  #4338ca;
  --accent-soft:   #eef0fe;
  --on-accent:     #ffffff;

  --radius:        14px;
  --radius-sm:     9px;
  --maxw:          1120px;
  --maxw-narrow:   680px;
  --shadow:        0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .12);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #0b0d10;
    --bg-alt:       #11141a;
    --surface:      #14181f;
    --border:       #242a35;
    --text:         #f1f3f6;
    --text-muted:   #9aa4b2;
    --accent:       #8b85ff;
    --accent-hover: #a29dff;
    --accent-soft:  #1b1c33;
    --on-accent:    #0b0d10;
    --shadow:       0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .7);
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.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;
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.container-narrow { max-width: var(--maxw-narrow); }

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-title { font-size: clamp(1.75rem, 3.4vw, 2.5rem); text-align: center; }
.section-lede {
  max-width: 46ch; margin: 0 auto 56px;
  text-align: center; color: var(--text-muted);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #22d3ee));
}
.brand-name { letter-spacing: -.01em; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--text-muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { gap: 16px; }
  .brand { margin-right: auto; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-size: .97rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-sm:not(.btn-primary) { background: var(--accent-soft); color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  padding: 112px 0 104px;
  text-align: center;
  background: var(--bg);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%,
      color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}
.hero h1 { font-size: clamp(2.25rem, 6vw, 4rem); max-width: 20ch; margin-inline: auto; }
.eyebrow {
  display: inline-block;
  padding: 5px 13px; margin-bottom: 22px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface);
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  color: var(--text-muted);
}
.lede {
  max-width: 56ch; margin: 20px auto 36px;
  font-size: 1.15rem; color: var(--text-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-note { margin-top: 22px; font-size: .88rem; color: var(--text-muted); }

/* ---------- grid + cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.12rem; }
.card p { margin: 0; color: var(--text-muted); font-size: .97rem; }
.card-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: 18px;
  border-radius: 11px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 1.05rem;
}

/* ---------- steps ---------- */
.steps {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 48px;
}
.steps li { position: relative; padding-top: 8px; }
.steps h3 { font-size: 1.08rem; margin-top: 16px; }
.steps p { margin: 0; color: var(--text-muted); font-size: .97rem; }
.step-num {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-size: .9rem; font-weight: 700;
}

/* ---------- faq ---------- */
.faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.faq-item:first-of-type { border-top: 1px solid var(--border); margin-top: 40px; }
.faq-item summary {
  cursor: pointer; font-weight: 600;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; color: var(--text-muted); font-weight: 400; font-size: 1.35rem; line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 12px 0 0; color: var(--text-muted); }

/* ---------- cta ---------- */
.cta {
  padding: 96px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.cta-inner { text-align: center; }
.cta h2 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); }
.cta > .container > p { color: var(--text-muted); }
.signup {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin: 28px 0 14px;
}
.signup input {
  flex: 1 1 260px; max-width: 340px;
  padding: 12px 16px;
  font: inherit; font-size: .97rem;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.signup input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.fineprint { font-size: .82rem; color: var(--text-muted); margin: 0; }

/* ---------- footer ---------- */
.site-footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  font-size: .9rem; color: var(--text-muted);
}
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

/* ---------- a11y ---------- */
:where(a, button, summary, input):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
