/* ============================================================
   DocFill — landing page (docfill.com)
   Graphite identity. Vanilla CSS, no build step.
   Hero: split (A) · Screenshots: tabs · Reveal animations on.
   ============================================================ */

:root {
  /* Brand / graphite */
  --accent: #1f2630;
  --accent-hover: #2c3542;
  --accent-press: #161b22;
  --accent-soft: #eef0f3;
  --accent-soft-2: #e3e7ec;
  --on-accent: #ffffff;

  /* Surfaces */
  --bg: #eceef1;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #f0f2f5;

  /* Ink */
  --ink: #181c22;
  --ink-2: #4a525e;
  --ink-3: #818b98;
  --ink-4: #a8b0ba;

  /* Lines */
  --border: #e4e7eb;
  --border-strong: #d3d8de;

  /* Domain accents (used sparingly) */
  --excel: #237a4b;
  --excel-soft: #e7f1ea;
  --pdf: #c0392b;
  --var: #2f6df0;
  --var-soft: #e9f0fe;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;

  --sh-sm: 0 1px 2px rgba(20,26,33,.05), 0 1px 1px rgba(20,26,33,.04);
  --sh-md: 0 2px 4px rgba(20,26,33,.06), 0 6px 16px rgba(20,26,33,.07);
  --sh-lg: 0 8px 24px rgba(20,26,33,.10), 0 2px 6px rgba(20,26,33,.06);
  --sh-xl: 0 30px 80px rgba(15,20,28,.22), 0 8px 24px rgba(15,20,28,.12);
  --sh-float: 0 18px 50px rgba(15,20,28,.16), 0 4px 12px rgba(15,20,28,.08);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --maxw: 1160px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-feature-settings: "ss01", "cv01"; }
code, .mono {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: .1em .4em;
  border-radius: 5px;
}
img { max-width: 100%; display: block; }
::selection { background: #d7dde6; }

.wrap { width: min(var(--maxw), 92vw); margin: 0 auto; }

/* i18n: show only the active language */
[data-i18n="en"] { display: none; }
body[data-lang="en"] [data-i18n="es"] { display: none; }
body[data-lang="en"] [data-i18n="en"] { display: revert; }

/* ====================================================== NAV */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(236,238,241,.78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.nav.is-scrolled { border-bottom-color: var(--border); background: rgba(246,247,249,.9); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; flex: 0 0 auto;
  box-shadow: var(--sh-sm);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-sub { font-size: 11.5px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-top: -2px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.nav-spacer { flex: 1; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink-2); font-size: 14.5px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }

.lang-toggle {
  display: inline-flex; align-items: center; border: 1px solid var(--border-strong);
  border-radius: 999px; overflow: hidden; background: var(--surface); height: 30px;
}
.lang-toggle button {
  border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--ink-3); padding: 0 11px; height: 100%; cursor: pointer; transition: all .15s;
}
.lang-toggle button.is-on { background: var(--accent); color: #fff; }

.nav-gh { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--ink-2); transition: all .15s; }
.nav-gh:hover { background: var(--surface); color: var(--ink); }
.nav-gh svg { width: 19px; height: 19px; }
.nav-cta { padding: 8px 16px; font-size: 14px; }
.nav-links a.nav-cta { color: var(--on-accent); }  /* texto blanco sobre el botón grafito */
.nav-links a.nav-cta:hover { color: var(--on-accent); }

/* ====================================================== BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--r-md);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .16s var(--ease); white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--sh-md); }
.btn-primary:active { transform: translateY(0); background: var(--accent-press); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 13px; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; letter-spacing: .01em;
  color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--excel); box-shadow: 0 0 0 3px var(--excel-soft); }

/* ====================================================== HERO (split) */
.hero { padding: 70px 0 56px; position: relative; }
.hero-eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(36px, 5.4vw, 60px); line-height: 1.03; letter-spacing: -.035em;
  margin: 0 0 22px; font-weight: 800;
}
.hero h1 .hl { position: relative; white-space: nowrap; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: .06em; height: .34em;
  background: var(--accent-soft-2); border-radius: 4px; z-index: -1;
}
.lead { font-size: 18.5px; color: var(--ink-2); margin: 0 0 30px; max-width: 36em; }
.lead strong { color: var(--ink); font-weight: 650; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hero-sub { font-size: 13.5px; color: var(--ink-3); margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-sub svg { width: 15px; height: 15px; color: var(--excel); }

#hero-a .hero-inner { display: grid; grid-template-columns: 1.04fr 1fr; gap: 56px; align-items: center; }
#hero-a .hero-shot-wrap { position: relative; }

/* ====================================================== APP WINDOW CHROME */
.win {
  border-radius: 13px; overflow: hidden; background: var(--surface);
  border: 1px solid rgba(15,20,28,.12); box-shadow: var(--sh-xl);
}
.win-bar {
  display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  background: linear-gradient(#fbfcfd,#f1f3f6); border-bottom: 1px solid var(--border);
  position: relative;
}
.win-dot { width: 11px; height: 11px; border-radius: 50%; }
.win-dot.r { background: #ec6a5e; }
.win-dot.y { background: #f4be4f; }
.win-dot.g { background: #61c554; }
.win-title {
  position: absolute; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--ink-3);
  font-weight: 600; pointer-events: none;
}
.win img { width: 100%; height: auto; display: block; }
.win-shot { position: relative; }

/* floating callout chip on hero window */
.hero-float {
  position: absolute; z-index: 3; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--sh-float); padding: 11px 14px; font-size: 13px;
}
.hero-float.tl { top: -18px; left: -26px; }
.hero-float.br { bottom: -20px; right: -22px; }
.hero-float .ttl { font-weight: 700; display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.hero-float .ttl svg { width: 15px; height: 15px; }
.hero-float .sub { color: var(--ink-3); font-size: 12px; }
.chip-var { font-family: var(--mono); color: var(--var); background: var(--var-soft); padding: .08em .4em; border-radius: 5px; font-size: 12px; }

/* ====================================================== TRUST STRIP */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.strip-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding: 28px 0; }
.strip-item { display: flex; flex-direction: column; align-items: center; flex: 1 1 180px; text-align: center; }
.strip-item strong { font-size: 24px; letter-spacing: -.025em; font-weight: 800; }
.strip-item span { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

/* ====================================================== SECTIONS */
.section { padding: 92px 0; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark { background: var(--accent); color: #fff; }
.section-head { text-align: center; max-width: 42em; margin: 0 auto 56px; }
.section-head .kicker {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(27px, 3.6vw, 39px); letter-spacing: -.03em; margin: 0 0 14px; font-weight: 800; line-height: 1.1; }
.section-head p { font-size: 17.5px; color: var(--ink-2); margin: 0; }

/* ====================================================== FEATURE GRID */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--sh-sm); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--border-strong); }
.card-ic {
  width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card-ic svg { width: 24px; height: 24px; }
.card h3 { font-size: 17.5px; margin: 0 0 8px; letter-spacing: -.01em; }
.card p { font-size: 14.5px; color: var(--ink-2); margin: 0; }

/* ====================================================== FLOW (how it works) */
.flow {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1.2fr; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.flow-node {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; padding: 20px;
  box-shadow: var(--sh-md); position: relative;
}
.flow-node .fn-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.flow-node .fn-label svg { width: 15px; height: 15px; }
.flow-arrow { color: var(--ink-4); display: grid; place-items: center; }
.flow-arrow svg { width: 30px; height: 30px; }

.mini-doc .md-line { height: 7px; border-radius: 3px; background: var(--surface-3); margin-bottom: 9px; }
.mini-doc .md-line.s { width: 55%; }
.mini-chip { display: inline-block; font-family: var(--mono); font-size: 11px; color: var(--var); background: var(--var-soft); border-radius: 4px; padding: .1em .35em; margin: 1px 2px 1px 0; }

.mini-xls { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.mini-xls .xr { display: grid; grid-template-columns: repeat(3, 1fr); }
.mini-xls .xr > span { padding: 5px 8px; font-size: 11px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mini-xls .xr.head > span { background: var(--excel-soft); color: var(--excel); font-weight: 700; }
.mini-xls .xr > span:last-child { border-right: 0; }
.mini-xls .xr:last-child > span { border-bottom: 0; }
.mini-xls .xr.active > span { background: #fff7e8; }

.doc-stack { position: relative; height: 150px; }
.doc-stack .ds {
  position: absolute; width: 96px; height: 124px; border-radius: 9px; background: var(--surface);
  border: 1px solid var(--border-strong); box-shadow: var(--sh-md); padding: 12px 11px;
  transition: transform .5s var(--ease), opacity .5s;
}
.doc-stack .ds .badge { position: absolute; bottom: 9px; left: 11px; font-size: 9px; font-weight: 700; color: #fff; background: var(--accent); padding: 2px 6px; border-radius: 4px; letter-spacing: .03em; }
.doc-stack .ds .badge.pdf { background: var(--pdf); }
.doc-stack .ds .dl { height: 5px; border-radius: 3px; background: var(--surface-3); margin-bottom: 7px; }
.doc-stack .ds .dl.s { width: 60%; }
.flow-count { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.flow-count b { color: var(--ink); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 22px; box-shadow: var(--sh-sm); }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.step h3 { font-size: 16px; margin: 0 0 6px; }
.step p { font-size: 14px; color: var(--ink-2); margin: 0; }

/* ====================================================== SCREENSHOTS (tabs) */
.tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 26px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: 14px; font-weight: 600; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  transition: all .15s; display: inline-flex; align-items: center; gap: 8px;
}
.tab svg { width: 16px; height: 16px; }
.tab:hover { border-color: var(--ink-3); }
.tab.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.tab-stage { max-width: 1000px; margin: 0 auto; position: relative; }
.tab-panel { display: none; }
.tab-panel.is-on { display: block; animation: fadeUp .4s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ====================================================== DOWNLOAD */
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 980px; margin: 0 auto; }
.dl { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; padding: 20px; box-shadow: var(--sh-sm); transition: all .16s var(--ease); }
.dl:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--sh-md); }
.dl-os { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.dl-os svg { width: 26px; height: 26px; }
.dl-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dl-body strong { font-size: 15px; }
.dl-body span { font-size: 12.5px; color: var(--ink-3); }
.dl-arrow { width: 20px; height: 20px; color: var(--ink-3); flex: 0 0 auto; transition: transform .15s; }
.dl:hover .dl-arrow { color: var(--accent); transform: translateY(2px); }
.dl-note { text-align: center; font-size: 14px; color: var(--ink-2); margin: 30px auto 0; max-width: 48em; }
.dl-note a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ====================================================== FAQ */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 4px; font-size: 17px; font-weight: 650;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q-ic { width: 22px; height: 22px; color: var(--ink-3); flex: 0 0 auto; transition: transform .25s var(--ease); }
.faq details[open] summary .q-ic { transform: rotate(45deg); }
.faq .ans { padding: 0 4px 24px; font-size: 15.5px; color: var(--ink-2); max-width: 64ch; }
.faq .ans code { font-size: .9em; }

/* ====================================================== PRIVACY (dark) */
.privacy-inner { display: flex; align-items: center; gap: 30px; max-width: 860px; margin: 0 auto; }
.privacy-ic { width: 60px; height: 60px; flex: 0 0 auto; color: #fff; opacity: .92; }
.section-dark h2 { font-size: 28px; margin: 0 0 10px; letter-spacing: -.025em; }
.section-dark p { font-size: 16.5px; margin: 0; color: rgba(255,255,255,.8); }
.section-dark strong { color: #fff; }

/* ====================================================== FOOTER */
.footer { background: var(--surface-2); border-top: 1px solid var(--border); padding: 44px 0; }
.footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.footer-brand .brand-mark { width: 28px; height: 28px; }
.footer-brand .brand-mark svg { width: 16px; height: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { font-size: 14px; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }
.footer-legal { width: 100%; font-size: 13px; color: var(--ink-3); margin: 8px 0 0; }

/* ====================================================== REVEAL ANIM */
body[data-anim="on"] .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
body[data-anim="on"] .reveal.in { opacity: 1; transform: none; }
body[data-anim="on"] .reveal[data-d="1"] { transition-delay: .07s; }
body[data-anim="on"] .reveal[data-d="2"] { transition-delay: .14s; }
body[data-anim="on"] .reveal[data-d="3"] { transition-delay: .21s; }
body[data-anim="on"] .reveal[data-d="4"] { transition-delay: .28s; }
body[data-anim="on"] .reveal[data-d="5"] { transition-delay: .35s; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ====================================================== RESPONSIVE */
@media (max-width: 920px) {
  #hero-a .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; gap: 18px; }
  .flow-arrow { transform: rotate(90deg); }
  .downloads { grid-template-columns: 1fr; }
  .privacy-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.lang-host):not(.nav-gh):not(.nav-cta) { display: none; }
  .hero { padding: 46px 0 30px; }
  .grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .strip-item { flex-basis: 42%; }
  .hero-float { display: none; }
}
