:root {
  color-scheme: light;
  --page: #f6f6f3;
  --surface: #fcfcfb;
  --surface-2: #eeede8;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #7a7872;
  --border: rgba(11, 11, 11, 0.1);
  --accent: #2a78d6;
  --accent-soft: #e3eefb;
  --good: #0ca30c;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 12px 40px rgba(11, 11, 11, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #262624;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #96948d;
    --border: rgba(255, 255, 255, 0.11);
    --accent: #3987e5;
    --accent-soft: #14294a;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 650; }
h3 { font-size: 18px; font-weight: 620; letter-spacing: -0.01em; }
code { font: 0.9em ui-monospace, "Cascadia Mono", Consolas, monospace; }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  background: color-mix(in srgb, var(--page) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 680; font-size: 18px; text-decoration: none; }
.brand img { border-radius: 7px; }
.nav nav { display: flex; gap: 22px; font-size: 15px; }
.nav nav a { color: var(--ink-2); text-decoration: none; }
.nav nav a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lang-toggle { display: flex; padding: 3px; border-radius: 9px; background: var(--surface-2); }
.lang-toggle a { padding: 3px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
[data-lang="en"] .lang-toggle a[data-code="en"], [data-lang="es"] .lang-toggle a[data-code="es"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 11px;
  background: var(--accent); color: #fff; font-weight: 600; text-decoration: none;
  transition: filter 0.15s, transform 0.15s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--border); }
.btn.ghost:hover { background: var(--surface); }
.btn.small { padding: 6px 14px; border-radius: 9px; font-size: 14px; background: var(--ink); color: var(--page); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Sections ---------- */

main > section { max-width: 1180px; margin: 0 auto; padding: 88px 24px; }
.eyebrow { font-size: 13.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.section-lead { color: var(--ink-2); max-width: 640px; margin-top: 12px; }

.hero { text-align: center; padding-top: 104px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { max-width: 660px; margin: 26px auto 0; font-size: 19px; color: var(--ink-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }
.cta.center { margin-top: 40px; }

/* ---------- Claude ---------- */

.claude { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.claude-text > p:not(.eyebrow) { color: var(--ink-2); margin-top: 16px; }
.ticks { list-style: none; padding: 0; margin-top: 24px; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink-2); }
.ticks li b { color: var(--ink); font-weight: 620; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.36em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.6 2.6L13 6.4' fill='none' stroke='%232a78d6' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.chat { display: grid; gap: 12px; padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 15.5px; }
.bubble { padding: 12px 16px; border-radius: 16px; max-width: 92%; }
.bubble.user { justify-self: end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.bubble.bot { justify-self: start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.tool { justify-self: start; display: flex; align-items: center; gap: 8px; font: 12.5px ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--muted); padding-left: 4px; }
.tool i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.chat-note { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 4px; }

/* ---------- Demo ---------- */

.demo { text-align: center; max-width: 1280px; }
.demo .section-lead { margin-inline: auto; }
.window { margin-top: 40px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 45%, transparent); }
.window-bar span { margin-left: 8px; font-size: 13px; color: var(--muted); }
.window iframe { display: block; width: 100%; height: 820px; border: 0; }

/* ---------- Grids ---------- */

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; margin-inline: auto; }
.grid.two .btn { margin-top: 18px; padding: 9px 18px; }
.services .eyebrow { margin-bottom: 12px; }
.grid article { padding: 26px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.grid article p { color: var(--ink-2); margin-top: 8px; font-size: 16px; }
.tag { display: inline-block; margin: 0 0 12px !important; padding: 3px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent) !important; font-size: 12.5px !important; font-weight: 600; }

.privacy { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); gap: 56px; align-items: start; }
.privacy .ticks { margin-top: 6px; }
.privacy .ticks li { color: var(--ink); }

.services, .start { text-align: center; }
.services .section-lead, .start .section-lead { margin-inline: auto; }
.services .grid { text-align: left; }

.start pre { display: inline-block; margin: 28px 0 0; padding: 22px 28px; border-radius: 16px; background: #14161c; color: #e9e8e4; text-align: left; max-width: 100%; overflow-x: auto; font-size: 15px; line-height: 1.7; }
.small-note { color: var(--muted); font-size: 14px; margin-top: 18px; }

/* ---------- FAQ ---------- */

.faq { max-width: 820px; }
.faq h2 { text-align: center; }
.faq-list { margin-top: 36px; display: grid; gap: 10px; }
.faq details { padding: 18px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 620; font-size: 17.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); margin-top: 10px; }

/* ---------- Blog ---------- */

.from-blog { text-align: center; }
.post-index { max-width: 860px; }
.post-index h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -0.03em; }
.post-list { display: grid; gap: 14px; margin-top: 36px; text-align: left; }
.post-list.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { display: block; padding: 24px 26px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.post-card time, .post-meta { font-size: 13.5px; color: var(--muted); }
.post-card h3 { margin-top: 6px; font-size: 19px; line-height: 1.3; }
.post-card p { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; }

main > .post { max-width: 768px; margin: 0 auto; padding: 64px 24px 40px; }
.post-back { font-size: 14.5px; color: var(--muted); text-decoration: none; }
.post-back:hover { color: var(--ink); }
.post h1 { margin-top: 18px; font-size: clamp(32px, 5vw, 46px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.post-meta { margin-top: 14px; }
.post h2 { margin-top: 44px; font-size: 26px; }
.post h3 { margin-top: 30px; font-size: 19px; }
.post p, .post ul, .post ol { margin-top: 16px; color: var(--ink-2); font-size: 18px; line-height: 1.7; }
.post ul, .post ol { padding-left: 24px; }
.post li + li { margin-top: 8px; }
.post b, .post strong { color: var(--ink); font-weight: 620; }
.post a { color: var(--accent); }
.post .stat { margin-top: 24px; padding: 20px 24px; border-radius: 16px; background: var(--accent-soft); color: var(--ink); }
.post .stat b { display: block; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); line-height: 1.15; }
.post .table-wrap { margin-top: 22px; overflow-x: auto; }
.post table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.post th, .post td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.post th { font-weight: 620; color: var(--ink); white-space: nowrap; }
.post td { color: var(--ink-2); }
.post .sources { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 15px; }
.post .sources p, .post .sources ul { font-size: 15px; }
main > .post-cta { max-width: 720px; margin: 24px auto 72px; padding: 36px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); text-align: center; }
.post-cta h2 { font-size: 26px; }
.post-cta p { margin: 10px 0 22px; color: var(--ink-2); }

footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; max-width: 1180px; margin: 0 auto; padding: 32px 24px 48px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }

@media (max-width: 900px) {
  .nav nav { display: none; }
  main > section { padding: 64px 20px; }
  .hero { padding-top: 72px; }
  .claude, .privacy { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .grid, .grid.two, .post-list.three { grid-template-columns: minmax(0, 1fr); }
  .window iframe { height: 1180px; }
}
