/* aferente.ai. Same palette as the site console (gateway/), no external assets. */
:root {
  --bg: #f6f5f1; --panel: #ffffff; --ink: #18211f; --muted: #56625e; --line: #dcd8cf; --soft: #ecebe4;
  --brand: #0f5c52; --brand-ink: #ffffff; --brand-soft: #e3efec; --accent: #0f5c52;
  --warn: #7a5200; --warn-bg: #fbf1dc; --focus: #2563eb;
  --serif: "Iowan Old Style", "Charter", "Source Serif 4", "Source Serif Pro", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101514; --panel: #161e1d; --ink: #e5ebe9; --muted: #9ba8a3; --line: #29332f; --soft: #1c2523;
    --brand: #5cbfad; --brand-ink: #0b1312; --brand-soft: #18302b; --accent: #7ccfbf;
    --warn: #e8b45a; --warn-bg: #2f2410; --focus: #7aa2ff;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--panel); padding: 8px 12px; z-index: 20; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

h1, h2, h3 { margin: 0; color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.08; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; max-width: 22ch; }
h3 { font-size: 17px; line-height: 1.35; font-weight: 650; margin-bottom: 6px; }
p { margin: 0 0 12px; }
.eyebrow { font-size: 13px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.lead { font-size: 19px; color: var(--muted); max-width: 62ch; margin-top: 18px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: .01em; }
.brand .mark { width: 26px; height: 26px; color: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--soft); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; font-size: 13px; font-weight: 650; }
.lang a, .lang span { padding: 3px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); }
.lang [aria-current] { background: var(--ink); color: var(--bg); }
.lang a:hover { color: var(--ink); }

.button { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 10px; padding: 12px 20px; font: 600 16px/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.button:hover { filter: brightness(1.08); }
.button.small { padding: 8px 14px; font-size: 14px; }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button.ghost:hover { border-color: var(--muted); filter: none; }
.button .note { color: var(--muted); font-weight: 500; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.arrow { font-weight: 600; text-decoration: none; }
.arrow::after { content: " →"; }
.arrow:hover { text-decoration: underline; }

/* hero */
.hero { padding: 88px 0 72px; border-bottom: 1px solid var(--line); background:
  radial-gradient(1200px 400px at 85% -10%, var(--brand-soft), transparent 70%); }
.hero h1 { max-width: 19ch; }
.hero .accent { color: var(--brand); display: block; }
.facts { list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.facts li { padding: 22px 22px 0 0; }
.facts li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.facts p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.fact-n { margin-bottom: 6px; color: var(--ink) !important; }
.fact-n .num { font-family: var(--serif); font-size: 44px; line-height: 1; font-weight: 600; color: var(--brand); }
.fact-n .unit { font-size: 15px; font-weight: 650; color: var(--ink); }

/* sections */
.section { padding: 88px 0; }
.section.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid p { color: var(--muted); font-size: 16px; margin: 0; }
.problem li { border-top: 2px solid var(--ink); padding-top: 18px; }
.icon { width: 28px; height: 28px; color: var(--brand); margin-bottom: 10px; display: block; }
.closing { margin-top: 40px; font-family: var(--serif); font-size: 22px; line-height: 1.4; max-width: 46ch; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps p { color: var(--muted); font-size: 16px; margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700; margin-bottom: 14px; }
.flow { margin: 28px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.flow span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: var(--bg); }
.flow span:nth-child(3) { border-color: var(--brand); color: var(--brand); }
.flow i { flex: 0 0 28px; height: 2px; background: var(--line); position: relative; }
.flow i::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left-color: var(--line); border-right: 0; }
.note-box { margin: 28px 0 18px; padding: 16px 18px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 10px 10px 0; max-width: 72ch; font-size: 16px; }

.disclaimer { margin-top: 28px; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-bg); color: var(--ink); border-radius: 10px; max-width: 80ch; font-size: 15px; }
.disclaimer strong { color: var(--warn); }
.cards li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.tags { display: flex; gap: 6px; margin-bottom: 12px !important; }
.tag { font-size: 12px; font-weight: 650; letter-spacing: .03em; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.tag.example { background: var(--warn-bg); color: var(--warn); text-transform: uppercase; letter-spacing: .07em; }

.checks li { position: relative; padding-left: 34px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); border: 1px solid var(--brand); }
.checks li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 8px; height: 5px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }

/* contact */
.contact { background: var(--ink); color: var(--bg); }
.contact h2, .contact .eyebrow { color: var(--bg); }
.contact .eyebrow { opacity: .75; }
.contact .lead, .contact .muted { color: color-mix(in srgb, var(--bg) 72%, var(--ink)); }
.contact a { color: color-mix(in srgb, var(--brand) 40%, var(--bg)); }
.contact-in { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.demo-cta { margin-top: 26px; font-size: 16px; }
.form { background: var(--panel); color: var(--ink); border-radius: 16px; padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.form p { margin: 0 0 10px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form .req { font-weight: 400; color: var(--muted); font-size: 13px; }
.form input, .form select, .form textarea { width: 100%; font: 16px/1.4 var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.form textarea { resize: vertical; min-height: 120px; }
.form .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.form .button { width: 100%; justify-content: center; }
.form .muted { color: var(--muted); }
.form a { color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.foot p { margin: 0; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; }
.foot-brand .mark { width: 20px; height: 20px; color: var(--brand); flex: none; }
.foot .lang { margin-left: auto; }

/* thanks, error, 404 */
.message { padding-top: 96px; padding-bottom: 120px; min-height: 60vh; }
.message h1 { font-size: clamp(30px, 4.4vw, 46px); max-width: 22ch; }
.message > div + div { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.message > div h1 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 18px; }

@media (max-width: 980px) {
  .nav { display: none; }
  .facts, .grid.four { grid-template-columns: repeat(2, 1fr); }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 0; }
  .grid.three, .steps { grid-template-columns: 1fr 1fr; }
  .contact-in { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .bar { gap: 10px; min-height: 58px; }
  .bar-end { gap: 8px; }
  .bar-end .button.small { padding: 7px 10px; font-size: 13px; }
  .brand { font-size: 17px; }
  .hero { padding: 52px 0 44px; }
  .lead { font-size: 17px; }
  .section { padding: 60px 0; }
  .facts { grid-template-columns: 1fr 1fr; margin-top: 44px; }
  .facts li, .facts li + li { padding: 16px 12px 0 0; border-left: 0; }
  .facts li:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
  .fact-n .num { font-size: 36px; }
  .grid.two, .grid.three, .grid.four, .steps { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; padding: 20px; }
  .closing { font-size: 19px; }
  .foot .lang { margin-left: 0; }
  .actions .button { width: 100%; justify-content: center; flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .bar-end .button.small { display: none; }
}
