/* Faden — landing V0 · faden.cl
   Tokens: Faden UI v2.1 ramps + landing-only tokens (--paper, --band). */

@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3/SourceSans3VF-Upright.otf.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F6F4EE;
  --surface: #FFFFFF;
  --band: #E9EEEE;
  --deep: #00222D;
  --ink: #181F23;
  --ink-2: #3A4449;
  --muted: #4C575D;
  --faint: #616C72;
  --line: #D6DCDF;
  --line-2: #BCC4C8;
  --control: #7B878D;
  --gray-50: #F5F7F8;
  --gray-100: #EAEDEF;
  --p50: #EDF9FE;
  --p100: #DAF2FA;
  --p200: #B8E3F3;
  --p300: #8CCEE5;
  --p400: #58B0CD;
  --p600: #007692;
  --p700: #005F76;
  --p800: #004A5D;
  --warm: #FCF5EA;
  --warn-300: #F1B66B;
  --warn-500: #B47607;
  --warn-600: #915E01;
  --warn-700: #754B01;
  --ok: #177E50;
  --danger: #972622;
  --inst: #6E8FB0;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(56px, 7vw, 104px);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure { margin: 0; }
img, svg { display: block; }
a { color: var(--p700); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--p600); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--band { background: var(--band); }
.section--deep { background: var(--deep); color: #FFFFFF; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px 48px; align-items: end; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--lg { gap: 44px; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--p700); }
.section--deep .eyebrow { color: var(--p300); }
.h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.lead { color: var(--muted); max-width: 32em; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px;
  padding: 12px 22px; border-radius: 8px; background: var(--p700); color: #FFFFFF;
  font-weight: 600; text-decoration: none; transition: background-color .18s ease;
}
.btn:hover { background: var(--p800); }
.btn svg { transition: transform .18s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn--sm { min-height: 44px; padding: 10px 18px; gap: 8px; font-size: 16px; }
.link-strong { color: var(--p700); font-weight: 600; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 18px; padding-bottom: 18px; }
.wordmark { font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1; color: var(--ink); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 16px; }
.nav__link {
  color: var(--ink-2); text-decoration: none; padding-bottom: 3px;
  background-image: linear-gradient(var(--p600), var(--p600)); background-size: 0 2px;
  background-repeat: no-repeat; background-position: 0 100%; transition: background-size .2s ease;
}
.nav__link:hover { background-size: 100% 2px; }
@media (max-width: 560px) {
  .nav { width: 100%; justify-content: space-between; gap: 8px 16px; }
  .wordmark { font-size: 34px; }
}

/* Thread (brand motif) */
@keyframes fd-flow-y { from { background-position: 0 0; } to { background-position: 0 10px; } }
@keyframes fd-flow-x { from { background-position: 0 0; } to { background-position: 10px 0; } }
@keyframes fd-weave { to { stroke-dashoffset: -180; } }
@keyframes fd-spin { to { transform: rotate(360deg); } }
.thread-y { background-image: linear-gradient(180deg, var(--p600) 60%, transparent 60%); background-size: 2px 10px; background-repeat: repeat-y; animation: fd-flow-y 1.1s linear infinite; }
.thread-x { background-image: linear-gradient(90deg, var(--p600) 60%, transparent 60%); background-size: 10px 2px; background-repeat: repeat-x; animation: fd-flow-x 1.1s linear infinite; }
.thread-x--soft { background-image: linear-gradient(90deg, var(--p300) 60%, transparent 60%); animation: none; }
.spin { animation: fd-spin 1.2s linear infinite; transform-origin: 50% 50%; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero__weave { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__weave path { animation: fd-weave 14s linear infinite; }
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 56px; align-items: center;
  padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(56px, 7vw, 104px);
}
.hero__copy { display: flex; flex-direction: column; gap: 28px; }
.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 16px; padding: 4px 12px;
}
.pill__dot { width: 8px; height: 8px; border-radius: 4px; background: var(--warn-500); }
.hero h1 { font-size: clamp(42px, 5.6vw, 70px); line-height: 1.03; font-weight: 700; letter-spacing: -.03em; }
.hero__lead { font-size: clamp(18px, 1.5vw, 21px); color: var(--ink-2); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.hero__note { font-size: 15px; color: var(--muted); padding-top: 20px; border-top: 1px solid var(--line); }

.hero__visual { display: flex; flex-direction: column; max-width: 540px; width: 100%; justify-self: center; }
.batch {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: 0 10px 24px rgba(24, 31, 35, .05);
}
.batch__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.batch__title { display: flex; flex-direction: column; line-height: 1.3; }
.batch__title strong { font-size: 15px; font-weight: 600; }
.batch__title span { font-size: 13px; color: var(--faint); }
.tag { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--gray-100); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.tag--brand { color: var(--p800); background: var(--p100); }
.batch__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.batch__row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; }
.batch__row--active { background: var(--p50); border-color: var(--p200); }
.batch__folio { flex: 1; font-family: var(--mono); font-size: 13px; }
.state-proposal { font-size: 13px; font-weight: 600; color: var(--p800); }
.state-reading { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }

.connector { display: flex; align-items: center; gap: 14px; padding: 4px 0 4px 28px; }
.connector__line { width: 2px; height: 36px; }
.connector__label { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--p700); }

.proposal { background: var(--warm); border: 2px dotted var(--faint); border-radius: 12px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.proposal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.proposal__title { font-size: 14px; font-weight: 600; color: var(--p800); display: inline-flex; align-items: center; gap: 8px; }
.proposal__ref { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.uncertain { background: var(--surface); border: 2px dotted var(--warn-600); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.uncertain__title { font-size: 14px; font-weight: 600; color: var(--warn-700); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--control); border-radius: 8px; padding: 8px 12px; min-height: 40px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.field__value { font-size: 16px; }
.state-ok { font-size: 13px; color: var(--ok); display: inline-flex; align-items: center; gap: 4px; }
.proposal__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 4px; }
.proposal__foot p { font-size: 14px; color: var(--ink-2); }
.btn-mock { font: inherit; font-size: 15px; font-weight: 600; color: #FFFFFF; background: var(--p600); border: 0; border-radius: 8px; padding: 10px 18px; min-height: 44px; }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); border-top: 1px solid var(--line); }
.step { padding: 28px 24px 8px 0; display: flex; flex-direction: column; gap: 12px; }
.step__num { display: flex; align-items: center; gap: 12px; }
.step__num span:first-child { font-size: 44px; font-weight: 300; line-height: 1; color: var(--p600); letter-spacing: -.02em; }
.step__num .thread-x { flex: 1; height: 2px; }
.step .tag { align-self: flex-start; }
.step h3 { font-size: 22px; line-height: 1.25; font-weight: 600; }
.step p { font-size: 16px; color: var(--muted); }
.notice { display: flex; align-items: flex-start; gap: 14px; background: var(--gray-50); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; max-width: 760px; }
.notice svg { flex-shrink: 0; margin-top: 2px; }
.notice p { font-size: 16px; color: var(--ink-2); }

/* Reuse diagram */
.flow { display: flex; flex-wrap: wrap; align-items: center; row-gap: 24px; }
.flow__pair { flex: 1 1 520px; min-width: 0; display: flex; align-items: center; }
.flow__node { flex: 1 1 0; min-width: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 18px; display: flex; gap: 12px; align-items: flex-start; }
.flow__node svg { flex-shrink: 0; }
.flow__node strong { display: block; font-size: 17px; font-weight: 600; }
.flow__node span { display: block; font-size: 14px; line-height: 1.45; color: var(--muted); }
.flow__arrow { flex: 0 0 44px; display: flex; align-items: center; justify-content: center; color: var(--p600); }
.flow__arrow .thread-x { width: 26px; height: 2px; }
.flow__out { flex: 1 1 380px; min-width: 0; display: flex; align-items: stretch; }
.flow__rail { flex: 1 1 auto; min-width: 0; list-style: none; margin: 0; padding: 4px 0; display: flex; flex-direction: column; gap: 10px; }
.flow__item { display: flex; align-items: center; }
.flow__item .thread-x { flex: 0 0 18px; height: 2px; }
.use { flex: 1 1 auto; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.use:hover { transform: translateX(4px); border-color: var(--p300); box-shadow: 0 6px 16px rgba(24, 31, 35, .06); }
.use strong { display: block; font-size: 16px; font-weight: 600; }
.use span { display: block; font-size: 14px; color: var(--muted); }
@media (max-width: 520px) {
  .flow__pair { flex-direction: column; align-items: stretch; }
  .flow__node { flex: none; }
  .flow__pair .flow__arrow { transform: rotate(90deg); height: 44px; }
}

/* Product mock */
.mock { display: flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--gray-50); box-shadow: 0 16px 40px rgba(24, 31, 35, .07); }
.mock__top { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.mock__brand { display: inline-flex; align-items: baseline; gap: 8px; }
.mock__brand strong { font-size: 22px; font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.mock__brand span { font-size: 14px; color: var(--faint); }
.mock__actor { display: flex; align-items: center; gap: 12px; }
.chip-synthetic { font-size: 13px; font-weight: 600; color: var(--warn-700); background: var(--warm); border: 1px solid var(--warn-300); border-radius: 6px; padding: 2px 8px; }
.avatar { width: 32px; height: 32px; border-radius: 16px; background: var(--p100); color: var(--p800); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.actor { display: flex; flex-direction: column; line-height: 1.25; }
.actor strong { font-size: 14px; font-weight: 600; }
.actor span { font-size: 12px; color: var(--faint); }
.mock__side { flex: 1 1 200px; max-width: 100%; background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.mock__nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.mock__nav li { flex: 1 1 150px; display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); }
.mock__nav li svg { color: var(--control); }
.mock__nav li.is-active { background: var(--p50); color: var(--p800); font-weight: 600; }
.mock__nav li.is-active svg { color: var(--p800); }
.mock__school { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 13px; color: var(--muted); }
.mock__school::before { content: ""; width: 4px; height: 24px; border-radius: 2px; background: var(--inst); }
.mock__main { flex: 999 1 560px; min-width: 0; padding: clamp(16px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 18px; }
.mock__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.crumb { font-size: 13px; color: var(--faint); }
.mock__title { display: block; font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.01em; }
.mock__meta { font-size: 15px; color: var(--muted); }
.select-mock { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--control); border-radius: 8px; padding: 8px 12px; min-height: 40px; display: inline-flex; align-items: center; gap: 24px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi__value { font-size: 28px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi__sub { font-size: 14px; color: var(--ink-2); }
.kpi__overdue { color: var(--danger); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; vertical-align: bottom; }
.situations { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.situations strong { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.situations ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.situations li { font-size: 14px; border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 8px; }
.situations small { font-size: 13px; color: var(--faint); }
.table-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.table-box table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.table-box th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 12px; border-bottom: 1px solid var(--line); }
.table-box td { padding: 11px 12px; border-bottom: 1px solid var(--gray-100); white-space: nowrap; }
.table-box th:first-child, .table-box td:first-child { padding-left: 16px; }
.table-box tr:last-child td { border-bottom: 0; }
.table-box .num { font-variant-numeric: tabular-nums; }
.table-box .none { color: var(--muted); }
.table-box .overdue { color: var(--danger); font-weight: 600; }
.table-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); min-width: 760px; }
.caption { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* Professionals */
.roles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 24px 0; }
.roles li { border-left: 1px solid var(--line-2); padding: 4px 20px; display: flex; flex-direction: column; gap: 6px; }
.roles strong { font-size: 19px; font-weight: 600; }
.roles span { font-size: 15px; line-height: 1.45; color: var(--muted); }

/* Trust */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 32px 40px; }
.principle { display: flex; flex-direction: column; gap: 10px; border-top: 2px solid var(--p600); padding-top: 18px; }
.principle h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }
.principle p { font-size: 16px; color: var(--p200); }

/* Contact */
.contact .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px 64px; align-items: center; }
.contact h2 { font-size: clamp(32px, 4vw, 50px); line-height: 1.08; font-weight: 700; letter-spacing: -.025em; }
.contact__body { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; border-left: 2px dashed var(--p600); padding-left: 28px; }
.contact__body p { font-size: 20px; color: var(--ink-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-top: 26px; padding-bottom: 26px; font-size: 14px; color: var(--muted); }
.site-footer__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.site-footer__brand strong { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -.04em; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer .domain { color: var(--ink); font-weight: 600; }

/* Simple pages (privacy, 404) */
.page { max-width: 720px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter); display: flex; flex-direction: column; gap: 20px; }
.page h1 { font-size: clamp(36px, 4.4vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -.025em; }
.page h2 { font-size: 22px; font-weight: 600; margin-top: 12px; }
.page p { color: var(--ink-2); }
.page .updated { color: var(--faint); font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .thread-y, .thread-x, .hero__weave path, .spin { animation: none; }
  .btn, .btn svg, .nav__link, .use { transition: none; }
}

@media print {
  .hero__weave, .skip { display: none; }
  .section--deep { background: #FFFFFF; color: var(--ink); }
  .principle p { color: var(--muted); }
}
