/* facilita.com.mx. Colors, type scale, spacing and shape come from tokens.css (brand/tokens.css).
   Brand rules (brand/IDENTITY.md): structure is straight, software is round; orange only for graphics
   and text >= 24px; flat color, no textures. */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --max: 1200px;
  --gutter: 32px;
  --input-border: #C3CBD6;
  --error: #B42318;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: 18px;
  line-height: var(--leading-body);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  color: var(--color-heading);
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-heading);
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5.2vw, 61px); line-height: 1.06; }
h2 { font-size: clamp(28px, 3vw, 39px); }
h3 { font-size: var(--text-xl); letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 640px) { :root { --gutter: 16px; } body { font-size: 17px; } }

.skip { position: absolute; left: -999px; top: 0; background: var(--overol); color: #fff; padding: 10px 14px; z-index: 20; }
.skip:focus { left: 16px; top: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--blanco); border-bottom: 1px solid var(--color-border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.logo { display: inline-flex; align-items: center; padding: 6px 0; }
.logo img { height: var(--logo-nav-height); width: auto; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: var(--weight-medium); }
.nav a { text-decoration: none; padding: 12px; border-radius: var(--radius-control); color: var(--color-text); }
.nav a:hover { background: var(--tinte); }
.nav .lang { color: var(--color-text-muted); }
.nav .nav-cta { background: var(--color-action-bg); color: var(--color-action-text); margin-left: 8px; padding: 11px 16px; }
.nav .nav-cta:hover { background: var(--overol-profundo); }
@media (max-width: 760px) { .nav .hide-sm { display: none; } .nav .nav-cta { margin-left: 0; padding: 10px 14px; } }

/* Buttons: Overol with white text (13.6:1). Hover darkens; nothing fades. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: var(--radius-control);
  font: inherit; font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--color-action-bg); color: var(--color-action-text); }
.btn-primary:hover { background: var(--overol-profundo); }
.btn-primary:disabled { background: var(--lapiz); cursor: progress; }
.btn-plain { background: transparent; color: var(--overol); border: 1px solid var(--input-border); }
.btn-plain:hover { background: var(--tinte); }

/* Sections */
section { padding: var(--space-9) 0; }
@media (max-width: 640px) { section { padding: 72px 0; } }
.surface { background: var(--tinte); }
.dark { background: var(--overol); color: var(--color-on-dark); }
.dark h2 { color: var(--color-on-dark); }
.measure { max-width: var(--measure); }
.letter h2 { margin-bottom: var(--space-6); }
.letter p { font-size: 19px; line-height: 1.65; }
@media (max-width: 640px) { .letter p { font-size: 18px; } }

/* Top */
.top { padding: 104px 0 112px; border-bottom: 1px solid var(--color-border); }
.top-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.top .lead { font-size: var(--text-lg); line-height: 1.55; max-width: 34em; margin: var(--space-6) 0; }
.top .lead p:last-child { margin-bottom: 0; }
.product-card {
  background: var(--blanco); border: 1px solid var(--color-border); border-radius: var(--radius-structure);
  padding: 40px 36px 36px; display: grid; justify-items: start; gap: 28px;
}
.product-card picture img { display: block; width: 100%; max-width: 300px; height: auto; }
.product-card p { margin: 0; font-size: 15px; color: var(--color-text-muted); }
@media (max-width: 900px) {
  .top-grid { grid-template-columns: 1fr; gap: 48px; }
  .top { padding: 64px 0 72px; }
  .product-card { padding: 24px; gap: 18px; }
  .product-card picture img { max-width: 324px; }
}

/* Quotes: large, in Overol. */
.quote { margin: 48px 0 0; }
.quote + .quote { margin-top: 36px; }
.letter .quote p { font-size: clamp(23px, 2.4vw, 29px); line-height: 1.28; font-weight: var(--weight-medium); color: var(--overol); letter-spacing: -0.01em; margin: 0 0 10px; }
.quote footer { font-size: 15px; color: var(--color-text-muted); }

/* Quedó section: prose + the illustrative report, drawn as a Quedó surface */
.letter-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 72px; align-items: start; }
.report-wrap { margin: 8px 0 0; }
@media (max-width: 1000px) { .letter-grid { grid-template-columns: 1fr; gap: 40px; } }

.report {
  background: var(--blanco); color: var(--overol-profundo);
  border: 1px solid var(--color-border); border-radius: var(--radius-structure);
  padding: 28px 28px 24px; font-size: 15px; line-height: 1.4; max-width: 470px;
}
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--overol-profundo); }
.report-head img { height: 30px; width: auto; }
.report-head .folio { font-size: 14px; color: var(--lapiz); font-variant-numeric: tabular-nums; }
.report dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report .cell { padding: 10px 0; border-bottom: 1px solid var(--color-border); min-width: 0; }
.report .cell + .cell { padding-left: 12px; }
.report .cell.wide { grid-column: 1 / -1; padding-left: 0; }
.report dt { font-size: 12.8px; color: var(--lapiz); font-weight: var(--weight-medium); margin-bottom: 2px; }
.report dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.report .dictated dd { font-weight: 400; }
.report .dictated dt::after { content: " (dictado)"; color: var(--naranja-texto); }
.report .photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.report .photo { aspect-ratio: 4 / 3; border-radius: var(--radius-structure); background: #E9ECEF; display: flex; align-items: flex-end; padding: 6px 8px; font-size: 12px; color: var(--lapiz); position: relative; overflow: hidden; }
.report .photo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.report .photo span { position: relative; background: var(--blanco); padding: 1px 6px; border-radius: 2px; }
.report .closing { display: grid; grid-template-columns: 1fr 1fr 96px; gap: 18px; align-items: end; margin-top: 22px; }
.report .sig { border-top: 1px solid var(--overol-profundo); padding-top: 6px; font-size: 12.8px; color: var(--lapiz); position: relative; }
.report .sig svg { position: absolute; bottom: 100%; left: 2px; width: 110px; height: 38px; }
.report .sig strong { display: block; color: var(--overol-profundo); font-weight: 600; font-size: 14px; }
.report .seal { width: 96px; height: 96px; transform: rotate(-8deg); }
.report-caption { margin: 14px 0 0; font-size: 14px; color: var(--color-text-muted); }
@media (max-width: 520px) {
  .report { padding: 20px 16px 18px; }
  .report .cell + .cell { padding-left: 8px; }
  .report .cell.wide { padding-left: 0; }
  .report .closing { grid-template-columns: 1fr 1fr 72px; gap: 12px; }
  .report .seal { width: 72px; height: 72px; }
  .report .sig svg { width: 84px; }
}

/* Facilita (dark band) */
.dark .logo-dark { height: 34px; width: auto; margin-bottom: var(--space-7); }
.dark p { color: #E6EAF0; }

/* Pilot + form */
.pilot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.pilot .ask { font-size: clamp(24px, 2.4vw, 31px); line-height: 1.22; font-weight: 700; color: var(--overol); letter-spacing: -0.015em; margin-bottom: var(--space-5); text-wrap: balance; }
.sign { margin-top: var(--space-6); font-size: 17px; color: var(--color-text-muted); line-height: 1.5; }
.sign strong { display: block; color: var(--overol); font-size: 19px; }
.sign a { color: var(--color-link); }
@media (max-width: 960px) { .pilot { grid-template-columns: 1fr; gap: 40px; } }

.form-panel { background: var(--blanco); border: 1px solid var(--color-border); border-radius: var(--radius-structure); }
.form { padding: 32px; }
.form-head { padding-bottom: 14px; margin-bottom: 4px; border-bottom: 2px solid var(--overol); }
.form-head strong { font-size: var(--text-lg); color: var(--overol); }
.field { display: block; padding: 16px 0 0; }
.field-label { display: block; font-size: 15px; font-weight: var(--weight-medium); margin-bottom: 6px; }
.field-label .opt { font-weight: 400; color: var(--color-text-muted); }
.form input:not([type=checkbox]), .form select, .survey input[type=text], .survey input:not([type]) {
  width: 100%; min-height: 50px; padding: 10px 14px;
  font: inherit; font-size: 17px; color: var(--color-text);
  background: var(--blanco); border: 1px solid var(--input-border); border-radius: var(--radius-control);
}
.form input:hover, .form select:hover { border-color: var(--lapiz); }
.form input:focus, .form select:focus, .survey input:not([type]):focus { outline: 2px solid var(--overol); outline-offset: 0; border-color: var(--overol); }
.form [aria-invalid=true] { border-color: var(--error); }
.field-error { display: block; font-size: 14px; color: var(--error); margin-top: 4px; }
.field-error:empty { display: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } .form { padding: 22px 18px; } }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 22px 0 4px; font-size: 15px; color: var(--color-text-muted); cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--overol); }
.consent a { color: var(--color-link); }
.turnstile { margin: 18px 0 0; min-height: 65px; }
.form .btn { width: 100%; margin-top: 18px; }
.form-status { margin: 14px 0 0; font-size: 15px; min-height: 1.4em; }
.form-status.error { color: var(--error); }
/* Confirmation: the seal lands like a stamp with an orange ring (the reward), the title rises,
   then in Spanish the accent on "quedó" turns into Quedó's checkmark. Reduced motion: final state. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.done { padding: 40px 32px; }
.reward { position: relative; width: 112px; height: 112px; }
.reward .seal { width: 112px; height: 112px; transform: rotate(-8deg); position: relative; }
.reward .burst { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--naranja); opacity: 0; }
.done h3 { font-size: clamp(36px, 4vw, var(--text-4xl)); line-height: 1.1; margin: 28px 0 14px; }
.done p { color: var(--color-text-muted); margin: 0; }
.o-check { position: relative; display: inline-block; }
.o-check svg { position: absolute; left: 50%; top: -0.24em; width: 0.6em; height: 0.48em; transform: translateX(-42%); overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.o-check .acute { stroke: var(--overol); stroke-width: 2.6; opacity: 0; }
.o-check .check { stroke: var(--naranja); stroke-width: 3.4; }
@media (prefers-reduced-motion: no-preference) {
  .done.play .seal { animation: stamp 520ms cubic-bezier(.2, .9, .3, 1.25) both; }
  .done.play .burst { animation: burst 750ms ease-out 320ms both; }
  .done.play h3, .done.play p { animation: rise 420ms ease-out both; }
  .done.play h3 { animation-delay: 480ms; }
  .done.play p { animation-delay: 620ms; }
  .done.play .acute { animation: accent-out 260ms ease-in 1250ms both; }
  .done.play .check { stroke-dasharray: 1 2; animation: draw 400ms cubic-bezier(0.2, 0, 0, 1) 1380ms both; }
  @keyframes stamp { from { opacity: 0; transform: rotate(-8deg) scale(1.7); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }
  @keyframes burst { from { opacity: .9; transform: scale(.85); } to { opacity: 0; transform: scale(1.7); } }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @keyframes accent-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-2px); } }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
}

/* Footer */
.site-footer { padding: 40px 0 48px; font-size: 15px; color: var(--color-text-muted); border-top: 1px solid var(--color-border); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.site-footer .brandline { display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer .brandline img { height: 26px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { padding: 4px 0; }

/* Mobile sticky CTA */
.sticky-cta { display: none; }
@media (max-width: 760px) {
  .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--color-border);
    transition: transform 200ms ease;
  }
  .sticky-cta .btn { width: 100%; }
  .sticky-cta.is-hidden { transform: translateY(110%); }
  body.has-sticky { padding-bottom: 76px; }
}

/* Legal + 404 */
.legal { max-width: 760px; padding: 64px 0 96px; }
.legal h1 { font-size: clamp(34px, 4.6vw, 49px); margin-bottom: 16px; }
.legal h2 { font-size: var(--text-xl); margin: 40px 0 12px; }
.legal a { color: var(--color-link); }
.legal .updated { color: var(--color-text-muted); font-size: 15px; }
.notfound { padding: 120px 0; }
.notfound p { color: var(--color-text-muted); margin: 20px 0 32px; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* v2 sections (copy v2, 8994e73) */
/* El problema: the flow as a numbered sequence; a straight connector (structure). */
.flow { list-style: none; margin: var(--space-8) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: none; }
.flow li { position: relative; padding: 0 20px 0 0; }
.flow li::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 2px; background: var(--overol); }
.flow li:last-child::before { right: auto; width: 40px; }
.flow-n {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-structure);
  background: var(--overol); color: var(--blanco); font-weight: 700; font-size: 17px;
}
.flow-t { display: block; margin-top: 16px; font-size: 17px; line-height: 1.35; font-weight: var(--weight-medium); color: var(--overol); max-width: 13em; }
.flow-end .flow-n { background: var(--blanco); color: var(--naranja-texto); border: 2px solid var(--naranja-texto); }
.flow-end .flow-t { color: var(--naranja-texto); font-weight: 700; }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; gap: 0; margin-top: var(--space-7); }
  .flow li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: center; padding: 0 0 22px; }
  .flow li::before { left: 19px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .flow li:last-child::before { bottom: auto; height: 20px; width: 2px; }
  .flow-t { margin: 0; max-width: none; }
}

/* Lo que escuchamos: the two quotes side by side */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: var(--space-7); max-width: 1040px; }
.quotes .quote, .quotes .quote + .quote { margin: 0; }
@media (max-width: 760px) { .quotes { grid-template-columns: 1fr; gap: 36px; } }

/* Quedó: wordmark as the heading, the seal beside the text */
.quedo-title { margin-bottom: var(--space-3); }
.quedo-title img { height: 51px; width: auto; }
.letter .descriptor { font-size: var(--text-lg); color: var(--color-text-muted); margin-bottom: var(--space-6); }
.seal-wrap { display: flex; justify-content: center; align-items: center; padding-top: 72px; }
.seal-big { width: 220px; height: 220px; transform: rotate(-8deg); }
@media (max-width: 1000px) { .seal-wrap { justify-content: flex-start; padding-top: 0; } .seal-big { width: 150px; height: 150px; } }

/* Para quién es: two cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: var(--space-6); max-width: 1040px; }
.card { border: 1px solid var(--color-border); border-radius: var(--radius-structure); padding: 32px; background: var(--blanco); }
.card h3 { margin-bottom: var(--space-3); }
.letter .card p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--color-text); }
.letter .cards-note { margin-top: var(--space-6); color: var(--overol); font-weight: var(--weight-medium); max-width: var(--measure); }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } .card { padding: 24px; } }

/* Lo que gana tu empresa: the outcome sentence set larger */
.letter .gain { font-size: clamp(22px, 2.2vw, 27px); line-height: 1.35; font-weight: var(--weight-medium); color: var(--overol); letter-spacing: -0.01em; }

/* Survey after the form */
.survey { margin-top: var(--space-7); padding-top: var(--space-6); border-top: 1px solid var(--color-border); }
.survey-intro { font-weight: var(--weight-medium); color: var(--overol); }
.survey fieldset { border: 0; padding: 0; margin: 0 0 var(--space-5); }
.survey legend { font-weight: 700; color: var(--overol); margin-bottom: var(--space-2); font-size: 17px; }
.survey fieldset label { display: flex; gap: 10px; align-items: center; padding: 7px 0; font-size: 16px; cursor: pointer; }
.survey fieldset input { width: 20px; height: 20px; margin: 0; accent-color: var(--overol); flex: none; }
.survey fieldset label:has(input:disabled) { color: var(--color-text-muted); cursor: not-allowed; }
.survey-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-5); }
.survey-actions .btn { width: auto; margin: 0; }
.survey-done { margin-top: var(--space-6); font-weight: var(--weight-medium); color: var(--overol); }
@media (prefers-reduced-motion: no-preference) {
  .done.play .survey { animation: rise 420ms ease-out 1900ms both; }
}
