/*
 * VARKAEN Digital — estilos del sitio público.
 * Tokens de VARKAEN Digital (contraste medido, WCAG 2.2 AA). Ver docs/DESIGN_SYSTEM.md.
 * Sin estilos en línea: la CSP solo admite hojas propias.
 */

/* ---- Fuentes autoalojadas (sin solicitudes a terceros) ---- */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/assets/fonts/archivo-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2-variations");
  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;
}

/* ---- Tokens ---- */
:root {
  color-scheme: light;
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-2: #eef0ec;
  --surface-3: #e3e6e0;
  --ink: #20242a;
  --muted: #565f6b;
  --accent: #4a5a6e;
  --accent-hover: #3c4a5b;
  --on-accent: #f7f8f6;
  --highlight: #dbe1e8;
  --invert-bg: #20242a;
  --invert-ink: #f1f3f0;
  --invert-muted: #b9c0c9;
  --rule: #cdd2cb;
  --border-control: #7c8590;
  --focus: #3b5b85;
  --error: #a4332b;
  --error-bg: #fbeceb;
  --success: #2d6a4f;
  --success-bg: #e6f2ec;
  --warn-bg: #fff4c2;
  --warn-ink: #5c4400;

  --font-sans: "Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Archivo Variable", "Inter Variable", ui-sans-serif, system-ui, sans-serif;

  --step-display: clamp(2.5rem, 0.9rem + 5.4vw, 6rem);
  --step-xl: clamp(1.875rem, 1.15rem + 2.6vw, 3.75rem);
  --step-l: clamp(1.25rem, 1.05rem + 0.75vw, 1.75rem);
  --step-m: 1.0625rem;
  --step-s: 0.875rem;

  --margin: clamp(1.25rem, 0.6rem + 3vw, 3rem);
  --gap: clamp(1rem, 0.6rem + 1.4vw, 2rem);
  --section: clamp(5.5rem, 3.5rem + 8vw, 11rem);
  --max: 90rem;
  --measure: 62ch;

  --radius: 2px;
  --control-h: 3rem;

  --dur-fast: 160ms;
  --dur: 240ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15181d;
  --surface: #20242b;
  --surface-2: #1b1f25;
  --surface-3: #262b33;
  --ink: #e9ecf0;
  --muted: #adb5c0;
  --accent: #8fa3ba;
  --accent-hover: #a5b6ca;
  --on-accent: #15181d;
  --highlight: #2f3946;
  --invert-bg: #e9ecf0;
  --invert-ink: #15181d;
  --invert-muted: #47505b;
  --rule: #363c45;
  --border-control: #737c88;
  --focus: #9cb8da;
  --error: #f2a097;
  --error-bg: #3a1f1d;
  --success: #8fcdae;
  --success-bg: #1c3329;
  --warn-bg: #4a3d00;
  --warn-ink: #ffe9a3;
}

/* ---- Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 6rem;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-m);
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 108%;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure,
blockquote,
fieldset {
  margin: 0;
}

fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}

p {
  text-wrap: pretty;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: var(--radius);
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--margin);
  top: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

/* Campo trampa de los formularios: fuera de pantalla, no «display: none» (los robots lo detectan). */
.hp {
  position: absolute;
  left: -200vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Marco ---- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: max(var(--margin), env(safe-area-inset-left)) max(var(--margin), env(safe-area-inset-right));
}

.section {
  padding-block: var(--section);
}

.section:not(.field) + .section:not(.field) {
  padding-top: 0;
}

.field {
  background: var(--surface-2);
}

.field + .field:not(.field--invert):not(.field--accent) {
  border-top: 1px solid var(--rule);
}

.field--invert {
  background: var(--invert-bg);
  color: var(--invert-ink);
  --muted: var(--invert-muted);
  --focus: var(--invert-ink);
}

.field--accent {
  background: var(--accent);
  color: var(--on-accent);
  --muted: var(--on-accent);
  --focus: var(--on-accent);
}

.idx {
  display: block;
  margin-bottom: 0.9rem;
  font-family: var(--font-display);
  font-size: var(--step-s);
  font-weight: 500;
  font-stretch: 125%;
  letter-spacing: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lede {
  font-size: var(--step-l);
  line-height: 1.4;
  max-width: 36ch;
}

.section-title {
  font-size: var(--step-xl);
  max-width: 16ch;
}

.split-head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 5rem);
}

.split-head > p {
  max-width: 48ch;
}

.split-title {
  font-size: var(--step-l);
  letter-spacing: -0.01em;
}

@media (min-width: 64rem) {
  .split-head {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

.after-grid {
  margin-top: 2.5rem;
}

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  font-size: var(--step-l);
  letter-spacing: -0.015em;
  margin-top: 2.6em;
}

.prose h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  margin-top: 2em;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 0.4em;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: var(--step-s);
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---- Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: var(--control-h);
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    transform var(--dur-fast) ease;
}

.btn:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.btn--wide {
  width: 100%;
}

.field--invert .btn {
  background: var(--invert-ink);
  border-color: var(--invert-ink);
  color: var(--invert-bg);
}

.field--accent .btn {
  background: var(--on-accent);
  border-color: var(--on-accent);
  color: var(--accent);
}

.field--accent .btn:hover,
.field--invert .btn:hover {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.btn .arrow,
.link-arrow .arrow {
  transition: transform var(--dur) var(--ease-out);
}

.btn:hover .arrow,
.link-arrow:hover .arrow {
  transform: translateX(4px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* ---- Estado (texto, nunca solo color) ---- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem;
  border: 1.5px solid currentColor;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: var(--step-s);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: middle;
}

.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

/* ---- Datos ---- */
.facts {
  display: grid;
  grid-template-columns: minmax(7rem, 0.4fr) 1fr;
  border-top: 1px solid var(--rule);
}

.facts dt,
.facts dd {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
  min-width: 0;
  overflow-wrap: anywhere;
}

.facts dt {
  color: var(--muted);
  font-size: var(--step-s);
  padding-right: 1rem;
  padding-top: 1.05rem;
}

.d1 {
  --d: 1;
}
.d2 {
  --d: 2;
}
.d3 {
  --d: 3;
}

/* ---- Marca ---- */
.wm {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  line-height: 1;
  white-space: nowrap;
}

.wm-mark {
  width: 1.375rem;
  height: 1.375rem;
  flex: none;
}

.wm-name {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.2em;
}

.wm-div {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding-left: 0.7rem;
  border-left: 1.5px solid currentColor;
}

.wm--s .wm-name,
.wm--s .wm-div {
  font-size: 0.9375rem;
}

/* Teléfonos: la marca y el botón «Menú» entran en una sola fila. */
@media (max-width: 30rem) {
  .wm {
    gap: 0.5rem;
  }
  .wm-mark {
    width: 1.125rem;
    height: 1.125rem;
  }
  .wm-name {
    font-size: 0.875rem;
    letter-spacing: 0.14em;
  }
  .wm-div {
    font-size: 0.875rem;
    padding-left: 0.5rem;
  }
  .js .bar {
    flex-wrap: nowrap;
  }
}

/* ---- Selector de tema ---- */
.theme-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.6rem;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  font-size: var(--step-s);
  font-weight: 500;
}

.js .theme-toggle {
  display: inline-flex;
}

.theme-toggle:hover {
  background: var(--surface-2);
}

.tt-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform var(--dur) var(--ease-out);
}

.theme-toggle[aria-pressed="true"] .tt-icon {
  transform: rotate(180deg);
}

/* ---- Encabezado ---- */
.site-header {
  position: relative;
  z-index: 10;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  min-height: 5.5rem;
  flex-wrap: wrap;
  padding-block: 0.75rem;
}

.home {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.nav-desktop ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.6rem;
}

.nav-desktop a,
.tool-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--dur-fast) ease;
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"],
.tool-link:hover {
  text-decoration-color: currentColor;
}

.tools {
  display: flex;
  align-items: center;
  gap: 0.5rem 1rem;
}

.tool-link {
  font-size: 0.9375rem;
  white-space: nowrap;
}

.header-cta {
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
}

.menu-open,
.menu-close {
  display: none;
  min-height: 44px;
  min-width: 44px;
  padding: 0 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  font-weight: 600;
}

.tools .tt-label {
  display: none;
}

/* Móvil y tablet: con JS, menú en diálogo modal; sin JS, enlaces visibles en una fila. */
@media (max-width: 79.99rem) {
  .nav-desktop {
    order: 3;
    width: 100%;
  }
  .header-cta,
  .tools .tool-link {
    display: none;
  }
  .js .nav-desktop,
  .js .tools .theme-toggle {
    display: none;
  }
  .js .menu-open {
    display: inline-flex;
    align-items: center;
  }
}

.mobile-menu {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--ink);
  overscroll-behavior: contain;
}

.mobile-menu::backdrop {
  background: var(--bg);
}

.mm-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.mm-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 4.5rem;
}

.menu-close {
  display: inline-flex;
  align-items: center;
}

.mm-list {
  margin-top: 2rem;
  display: grid;
  gap: 0.25rem;
}

.mm-list a {
  display: block;
  padding: 0.35rem 0;
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 600;
  font-size: clamp(2rem, 9vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-decoration: none;
}

.mm-list a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.15em;
}

.mm-foot {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

@media (prefers-reduced-motion: no-preference) {
  .mobile-menu[open] {
    animation: mm-in var(--dur) var(--ease-out);
  }
}

@keyframes mm-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---- Pie ---- */
.site-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--rule);
  padding-block: clamp(3.5rem, 2.5rem + 3vw, 5.5rem) 2rem;
  font-size: 0.9375rem;
}

.ft-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .ft-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.ft-desc {
  margin-top: 1.25rem;
  max-width: 32ch;
  color: var(--muted);
}

.ft-desc a {
  color: var(--ink);
}

.ft-nav ul,
.ft-nav-list {
  display: grid;
  gap: 0.15rem;
}

.ft-nav a,
.ft-nav-list a,
.ft-legal a,
.ft-email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.ft-nav a,
.ft-nav-list a {
  text-decoration: none;
  font-weight: 500;
}

.ft-nav a:hover,
.ft-nav-list a:hover {
  text-decoration: underline;
}

.ft-email {
  font-weight: 600;
}

.ft-meta {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: var(--step-s);
}

.ft-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.ft-legal a {
  color: var(--ink);
}

/* ---- Cabecera de página ---- */
.page-head {
  padding-top: clamp(2.5rem, 1rem + 6vw, 7rem);
  padding-bottom: clamp(3.5rem, 2rem + 5vw, 7rem);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 3rem);
}

.crumbs,
.crumbs a {
  font-size: var(--step-s);
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.crumbs li::after {
  content: "/" / "";
  margin-left: 0.5rem;
  color: var(--muted);
}

.page-title {
  font-size: var(--step-display);
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 18ch;
  overflow-wrap: break-word;
}

.page-lede {
  margin-top: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
  max-width: 44ch;
  font-size: var(--step-l);
  line-height: 1.4;
}

.error-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---- Inicio: hero ---- */
.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(calc(100svh - 5.5rem), 54rem);
  padding-top: clamp(3rem, 10vh, 8rem);
  padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem);
}

.hero-place {
  margin-bottom: auto;
  align-self: flex-end;
  max-width: 30ch;
  text-align: right;
  font-size: var(--step-s);
  color: var(--muted);
}

.hero-title {
  margin-top: clamp(3rem, 8vh, 6rem);
  font-size: clamp(2.25rem, 0.4rem + 5vw, 5.375rem);
  font-stretch: 104%;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-foot {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  display: grid;
  gap: 2rem;
  align-items: end;
}

@media (min-width: 64rem) {
  .hero-foot {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--gap);
  }
}

.hero-sub {
  font-size: var(--step-l);
  line-height: 1.4;
  max-width: 44ch;
}

.hero-actions,
.access-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
}

@media (max-width: 30rem) {
  .hero-place {
    align-self: flex-start;
    text-align: left;
  }
  .hero-actions .btn,
  .access-actions .btn {
    flex: 1 1 100%;
  }
}

/* ---- Bloque de dos columnas con lista tipo carta ---- */
.services-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 64rem) {
  .services-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: calc(var(--gap) * 2.5);
    align-items: start;
  }
  .services-copy {
    position: sticky;
    top: 3rem;
  }
}

.services-title {
  font-size: var(--step-xl);
  max-width: 14ch;
  margin-bottom: 1.75rem;
}

.services-copy .lede {
  margin-bottom: 1.5rem;
}

.sheet {
  background: var(--surface);
  padding: clamp(1rem, 0.5rem + 2vw, 2.25rem) clamp(1.25rem, 1rem + 2vw, 3rem);
  border-radius: var(--radius);
}

.sheet li + li {
  border-top: 1px solid var(--rule);
}

.sheet-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  flex-wrap: wrap;
  padding: 1.05rem 0;
  text-decoration: none;
}

.sheet-name {
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.3;
}

a.sheet-row:hover .sheet-name {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.sheet-value {
  font-size: var(--step-s);
  font-weight: 600;
  color: var(--muted);
}

/* ---- Proceso en escalera ---- */
.process-title,
.statement-title {
  font-size: var(--step-l);
  letter-spacing: -0.01em;
  margin-bottom: clamp(2.5rem, 2rem + 3vw, 5rem);
}

.stairs {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 2.5vw, 4rem);
}

.stair-line {
  font-size: var(--step-xl);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.stair-text {
  margin-top: 0.85rem;
  max-width: 44ch;
  color: var(--muted);
}

.stair:nth-child(2) {
  margin-left: 4vw;
}
.stair:nth-child(3) {
  margin-left: 8vw;
}
.stair:nth-child(4) {
  margin-left: 12vw;
}
.stair:nth-child(5) {
  margin-left: 16vw;
}

@media (min-width: 64rem) {
  .stair:nth-child(2) {
    margin-left: 12%;
  }
  .stair:nth-child(3) {
    margin-left: 24%;
  }
  .stair:nth-child(4) {
    margin-left: 36%;
  }
  .stair:nth-child(5) {
    margin-left: 48%;
  }
}

@media (max-width: 30rem) {
  .stair:nth-child(2) {
    margin-left: 1rem;
  }
  .stair:nth-child(3) {
    margin-left: 2rem;
  }
  .stair:nth-child(4) {
    margin-left: 3rem;
  }
  .stair:nth-child(5) {
    margin-left: 4rem;
  }
}

/* ---- Texto con resaltados ---- */
.statement-body {
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.875rem);
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.statement-body strong {
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 64rem) {
  .statement-body > p:first-child {
    columns: 2;
    column-gap: calc(var(--gap) * 2);
  }
}

.statement-body mark {
  background: var(--highlight);
  color: var(--ink);
  padding: 0 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.statement-end {
  margin-top: 2rem;
}

.statement-end a {
  color: var(--ink);
  font-weight: 600;
  text-decoration-thickness: 2px;
}

/* ---- Estado vacío del portafolio ---- */
.vacant {
  border: 2px dashed var(--border-control);
  border-radius: var(--radius);
  padding: clamp(2rem, 1rem + 5vw, 5rem);
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.vacant-line {
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 600;
  font-size: var(--step-xl);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 18ch;
}

.vacant-text {
  max-width: 52ch;
  color: var(--muted);
}

/* ---- Portafolio: grilla y tarjetas ---- */
.pgrid {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 2vw, 4rem) var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}

.pcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Marco de proporción fija (4:3). La imagen entra completa, horizontal o vertical, sin recortes ni deformación. */
.pcard-frame {
  --pad: clamp(0.9rem, 4%, 1.5rem);
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
}

.field .pcard-frame {
  background: var(--surface);
}

/* Posición absoluta: el alto del marco lo fija la proporción, no la imagen (una vertical no lo estira). */
.pcard-frame img {
  position: absolute;
  inset: var(--pad);
  width: calc(100% - 2 * var(--pad));
  height: calc(100% - 2 * var(--pad));
  object-fit: contain;
  transition: transform 500ms var(--ease-out);
}

.pcard:hover .pcard-frame img {
  transform: scale(1.02);
}

.pcard-empty {
  color: var(--muted);
  font-size: var(--step-s);
}

.pcard-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 1.1rem;
}

.pcard-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  font-size: var(--step-s);
  color: var(--muted);
}

.pcard-meta .status {
  color: var(--ink);
}

.pcard-title {
  margin-top: 0.8rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.pcard-title a {
  text-decoration: none;
}

.pcard-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.pcard-summary {
  margin-top: 0.6rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcard-tech {
  margin-top: 0.6rem;
}

.pcard-actions {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.filters ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.filters a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1.5px solid var(--border-control);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.filters a:hover {
  border-color: var(--ink);
}

.filters a[aria-current] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.pagination {
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.pg-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.pg-link.is-off {
  color: var(--muted);
  opacity: 0.6;
}

.pg-status {
  color: var(--muted);
  font-size: var(--step-s);
  font-variant-numeric: tabular-nums;
}

/* ---- Detalle (servicio y proyecto) ---- */
.detail-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 64rem) {
  .detail-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: calc(var(--gap) * 3);
    align-items: start;
  }
  .detail-side {
    position: sticky;
    top: 2rem;
  }
}

.detail-side {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.detail-side .facts {
  width: 100%;
}

.detail-h {
  font-size: var(--step-l);
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}

.detail-main .detail-h:not(:first-child) {
  margin-top: 3.5rem;
}

.check-list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 2rem;
  border-top: 1px solid var(--rule);
  font-size: 1.125rem;
}

.check-list li:last-child {
  border-bottom: 1px solid var(--rule);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.45rem;
  width: 0.9rem;
  height: 0.45rem;
  border-left: 2.5px solid var(--success);
  border-bottom: 2.5px solid var(--success);
  transform: rotate(-45deg) translateY(-50%);
}

.check-list--no li {
  color: var(--muted);
}

.check-list--no li::before {
  top: 1.55rem;
  width: 0.9rem;
  height: 0;
  border-left: 0;
  border-bottom: 2.5px solid var(--border-control);
  transform: none;
}

.gallery {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-item {
  grid-column: 1 / -1;
}

.gallery-item.is-portrait {
  grid-column: auto;
}

@media (max-width: 40rem) {
  .gallery-item.is-portrait {
    grid-column: 1 / -1;
  }
}

.gallery-item a {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
}

.project-text {
  margin-top: 3rem;
  font-size: 1.125rem;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: clamp(0.75rem, 3vw, 2.5rem);
  border: 0;
  background: transparent;
  overscroll-behavior: contain;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgb(10 12 15 / 0.92);
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-out;
}

.lightbox-close {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 1;
  min-height: 44px;
  padding: 0 1rem;
  border: 2px solid #f1f3f0;
  border-radius: var(--radius);
  background: #15181d;
  color: #f1f3f0;
  font-weight: 600;
}

.lightbox-close:focus-visible {
  outline-color: #f1f3f0;
}

/* ---- Servicios (listado) ---- */
.svc {
  display: grid;
  gap: 0.75rem 2rem;
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.5rem) 0;
  border-top: 1px solid var(--rule);
}

.svc:last-child {
  border-bottom: 1px solid var(--rule);
}

.svc .idx {
  margin: 0;
  padding-top: 0.5rem;
}

.svc-name {
  font-size: var(--step-xl);
  letter-spacing: -0.035em;
}

.svc-name a {
  text-decoration: none;
}

.svc-name a:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.12em;
}

.svc-short {
  margin-top: 0.75rem;
  max-width: 48ch;
  color: var(--muted);
}

.svc-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
}

@media (min-width: 64rem) {
  .svc {
    grid-template-columns: 4rem minmax(0, 1fr) auto;
    align-items: start;
  }
  .svc-side {
    flex-direction: column;
    align-items: flex-end;
    padding-top: 0.5rem;
  }
}

.int-table {
  border-top: 1px solid var(--rule);
}

.int-row {
  display: grid;
  gap: 0.4rem 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.int-row dt {
  font-size: 1.1875rem;
  font-weight: 500;
}

.int-row dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.int-note {
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 48rem) {
  .int-row {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: center;
  }
}

/* ---- Planes ---- */
.plans {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  /* Todas las tarjetas del mismo alto. */
  align-items: stretch;
}

/* Computadora: los cuatro planes en una fila, del mismo ancho. */
@media (min-width: 72rem) {
  .plans {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Tablet: de a dos. */
@media (min-width: 40rem) and (max-width: 71.99rem) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 1.1rem + 1.5vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--border-control);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(32 36 42 / 0.06), 0 10px 28px rgb(32 36 42 / 0.10);
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.plan:hover {
  box-shadow: 0 2px 4px rgb(32 36 42 / 0.08), 0 16px 40px rgb(32 36 42 / 0.16);
}

.plan.is-featured {
  border: 2px solid var(--ink);
  box-shadow: 0 2px 4px rgb(32 36 42 / 0.08), 0 16px 40px rgb(32 36 42 / 0.16);
}

/* En modo oscuro la sombra se nota con más opacidad. */
:root[data-theme="dark"] .plan { box-shadow: 0 1px 2px rgb(0 0 0 / 0.35), 0 12px 32px rgb(0 0 0 / 0.45); }
:root[data-theme="dark"] .plan:hover,
:root[data-theme="dark"] .plan.is-featured { box-shadow: 0 2px 4px rgb(0 0 0 / 0.4), 0 18px 44px rgb(0 0 0 / 0.55); }

@media (prefers-reduced-motion: reduce) {
  .plan { transition: none; }
}

.plan-flag {
  align-self: flex-start;
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.7rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
  font-size: var(--step-s);
  font-weight: 600;
}

.plan-name {
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.375rem);
  letter-spacing: -0.03em;
}

.plan-tagline {
  margin-top: 0.6rem;
  color: var(--muted);
  max-width: 34ch;
}

.plan-price {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.2rem;
}

.plan-amount {
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 600;
  font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.plan-currency {
  font-size: 0.4em;
  font-stretch: 125%;
  letter-spacing: 0.04em;
  vertical-align: 0.9em;
  color: var(--muted);
}

.plan-period,
.plan-note {
  color: var(--muted);
  font-size: 0.9375rem;
}

.plan-note {
  margin-top: 0.75rem;
}

.plan-note strong {
  color: var(--ink);
}

.plan-cta {
  margin-top: 1.5rem;
  white-space: normal;
  text-align: center;
}

.plan-includes,
.plan-sub {
  margin-top: 2rem;
  font-weight: 600;
}

.plan-sub {
  font-size: var(--step-s);
  color: var(--muted);
}

.plan-list {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9875rem;
  line-height: 1.45;
}

.plan-list li {
  position: relative;
  padding-left: 1.6rem;
}

.plan-list li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.38em;
  width: 0.75rem;
  height: 0.38rem;
  border-left: 2px solid var(--success);
  border-bottom: 2px solid var(--success);
  transform: rotate(-45deg);
}

.plan-list--no li,
.plan-list--plain li {
  color: var(--muted);
}

.plan-list--no li::before {
  top: 0.7em;
  height: 0;
  border-left: 0;
  border-bottom: 2px solid var(--border-control);
  transform: none;
}

.plan-list--plain li::before {
  top: 0.62em;
  left: 0.3rem;
  width: 0.3rem;
  height: 0.3rem;
  border: 0;
  border-radius: 50%;
  background: var(--border-control);
  transform: none;
}

.plans-foot {
  margin-top: 2rem;
  max-width: 70ch;
}

.plans--compact .plan-cta {
  margin-top: auto;
}

.plans--compact .plan-price {
  margin-bottom: 1.5rem;
}

.plans--compact .plan-note {
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
}

.plans--compact {
  align-items: stretch;
}

.two-col {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  display: grid;
  gap: 2.5rem var(--gap);
}

@media (min-width: 48rem) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.two-col p {
  max-width: 50ch;
  color: var(--muted);
}

.two-h {
  font-size: var(--step-l);
  letter-spacing: -0.015em;
  margin-bottom: 0.9rem;
}

.faq-wrap {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 64rem) {
  .faq-wrap {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: calc(var(--gap) * 2.5);
  }
}

.faq details {
  border-top: 1px solid var(--rule);
}

.faq details:last-child {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
  padding: 0.75rem 0;
  font-size: 1.1875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+" / "";
  flex: none;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  transition: transform var(--dur) var(--ease-out);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding-bottom: 1.5rem;
  max-width: 60ch;
  color: var(--muted);
}

/* ---- Inicio: hero con demo, video, tarjetas de la demo y beneficios ---- */
.hero--home .hero-inner {
  min-height: min(calc(100svh - 9rem), 46rem);
}

.hero-cta {
  display: grid;
  gap: 0.9rem;
}

.hero-note {
  font-size: var(--step-s);
  color: var(--muted);
}

.hero-links {
  font-size: var(--step-s);
}

.hero-links a {
  text-underline-offset: 0.2em;
}

.video-section {
  scroll-margin-top: 1rem;
}

.video-figure {
  margin: 0;
  display: grid;
  gap: 1.25rem;
}

.video-frame {
  aspect-ratio: 16 / 9;
  background: var(--invert-bg);
  border: 1px solid var(--rule);
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: var(--step-s);
  color: var(--muted);
}

.transcript {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.transcript summary {
  min-height: 3rem;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}

.transcript ol {
  padding: 0 0 1.25rem;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  max-width: var(--measure);
}

.transcript-time {
  display: inline-block;
  min-width: 2.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.demo-cards {
  display: grid;
  gap: var(--gap);
  padding: 0;
  margin: 0;
}

@media (min-width: 48rem) {
  .demo-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.demo-card-link {
  display: grid;
  height: 100%;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--rule);
  transition: border-color var(--dur-fast);
}

.demo-card-link:hover {
  border-color: var(--ink);
}

.demo-card-link img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border-bottom: 1px solid var(--rule);
}

.demo-card-body {
  display: grid;
  gap: 0.4rem;
  padding: 1.1rem 1.25rem 1.4rem;
}

.demo-card-title {
  font-family: var(--font-display);
  font-size: var(--step-l);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.demo-card-link:hover .demo-card-title {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.demo-card-text {
  color: var(--muted);
}

.benefit-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}

@media (min-width: 48rem) {
  .benefit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--gap);
  }
}

@media (min-width: 75rem) {
  .benefit-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.benefit {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: 1.5rem 0 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.benefit-title {
  font-size: var(--step-l);
  letter-spacing: -0.015em;
}

.benefit-text {
  color: var(--muted);
  max-width: 44ch;
}

.benefit-plan {
  justify-self: start;
  padding: 0.15rem 0.55rem;
  font-size: var(--step-s);
  font-weight: 600;
  border: 1px solid var(--border-control);
}

.plans-after {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
}

/* ---- Área de clientes y CTA ---- */
.access-grid {
  display: grid;
  gap: 2rem;
  align-items: end;
}

.access-grid .lede {
  margin-top: 1.5rem;
  max-width: 40ch;
}

@media (min-width: 64rem) {
  .access-grid {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.cta-band {
  padding-block: clamp(5rem, 3rem + 7vw, 9.5rem);
}

.cta-inner {
  display: grid;
  gap: 2.5rem;
}

.cta-title {
  font-size: clamp(2.25rem, 0.9rem + 4.6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 20ch;
}

.cta-side {
  display: grid;
  gap: 2rem;
}

.cta-side p {
  font-size: var(--step-l);
  line-height: 1.4;
  max-width: 34ch;
}

@media (min-width: 64rem) {
  .cta-side {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--gap);
    align-items: end;
  }
}

/* ---- Nosotros ---- */
.principles {
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  display: grid;
  gap: 0 calc(var(--gap) * 2);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.principle {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
}

.principle h3 {
  font-size: var(--step-l);
  letter-spacing: -0.015em;
}

.principle p {
  margin-top: 0.75rem;
  max-width: 46ch;
  color: var(--muted);
}

.legal {
  max-width: 70ch;
}

/* ---- Formularios ---- */
.form-grid {
  display: grid;
  gap: 3.5rem;
}

@media (min-width: 64rem) {
  .form-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: calc(var(--gap) * 3);
    align-items: start;
  }
}

.form {
  display: grid;
  gap: 1.75rem;
}

.form-row {
  display: grid;
  gap: 1.75rem var(--gap);
}

@media (min-width: 40rem) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-field {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  min-width: 0;
}

.form-field--center {
  align-content: center;
}

.form-field > label,
.form-field > legend {
  font-weight: 600;
  font-size: 0.9375rem;
}

.form-field > legend {
  padding: 0;
  margin-bottom: 0.5rem;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: var(--control-h);
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border-control);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color var(--dur-fast) ease;
}

textarea {
  resize: vertical;
  min-height: 7rem;
}

input[readonly] {
  background: var(--surface-2);
  color: var(--muted);
}

input:hover:not([readonly]),
select:hover,
textarea:hover {
  border-color: var(--ink);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 0;
  border-color: var(--focus);
}

input[type="file"] {
  width: 100%;
  padding: 0.75rem;
  border: 1.5px dashed var(--border-control);
  border-radius: var(--radius);
  background: var(--surface);
}

[aria-invalid="true"] {
  border-color: var(--error) !important;
  border-width: 2px;
}

.field-hint {
  font-size: var(--step-s);
  color: var(--muted);
}

.field-error {
  font-size: var(--step-s);
  font-weight: 600;
  color: var(--error);
}

.form-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
}

.form-choices > legend {
  width: 100%;
}

.form-choices--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}

.choice {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-height: 44px;
  padding-block: 0.6rem;
  font-weight: 400;
  cursor: pointer;
}

.choice input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  accent-color: var(--ink);
}

.form-alert,
.flash,
.form-done {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--error);
  border-radius: var(--radius);
  background: var(--error-bg);
}

.form-alert ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.flash,
.form-done {
  border-left-color: var(--success);
  background: var(--success-bg);
}

.flash--info {
  border-left-color: var(--border-control);
  background: var(--surface-2);
}

.form-done {
  padding: clamp(1.5rem, 1rem + 2vw, 3rem);
  display: grid;
  gap: 1rem;
  align-content: start;
}

.form-done-title {
  font-size: var(--step-xl);
}

.form-context {
  padding: 0.9rem 1.1rem;
  background: var(--surface-2);
  border-radius: var(--radius);
}

.form-side {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.form-side .detail-h {
  margin-bottom: 0;
}

.form-side .detail-h:not(:first-child) {
  margin-top: 2rem;
}

.steps {
  margin: 0;
  padding-left: 1.3rem;
  display: grid;
  gap: 0.8rem;
}

.steps li::marker {
  font-weight: 600;
}

.contact-list {
  display: grid;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* ---- Movimiento: solo con JS y sin preferencia de movimiento reducido ---- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 700ms var(--ease-out),
      transform 700ms var(--ease-out);
    transition-delay: calc(var(--d, 0) * 80ms);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  .js .lines .line > span {
    transform: translateY(105%);
    animation: line-up 800ms var(--ease-out) forwards;
  }

  .js .lines .line:nth-child(2) > span {
    animation-delay: 110ms;
  }

  .js .hero-after {
    opacity: 0;
    animation: fade-up 600ms var(--ease-out) 380ms forwards;
  }
}

@keyframes line-up {
  to {
    transform: none;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lines .line {
  display: block;
  overflow: clip;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.lines .line > span {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .cta-band,
  .skip-link {
    display: none;
  }
}

/* Modo vitrina: aviso de prelanzamiento y cotización cerrada */
.showcase-note { margin: 0; padding: .65rem var(--margin); background: var(--warn-bg); color: var(--warn-ink); font-size: .92rem; text-align: center; text-wrap: balance; }
.showcase-closed { max-width: 44rem; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.showcase-closed h2 { margin-top: 0; font-size: var(--step-l); }


/* ---- Submenú de Servicios ---- */
.nav-desktop .has-sub {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.sub-toggle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.sub-toggle svg {
  transition: transform var(--dur-fast) ease;
}

.has-sub.is-open .sub-toggle svg {
  transform: rotate(180deg);
}

.subnav {
  position: absolute;
  top: 100%;
  left: -1rem;
  z-index: 40;
  display: none;
  min-width: 16rem;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border-control);
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgb(32 36 42 / 0.08), 0 16px 40px rgb(32 36 42 / 0.16);
}

.nav-desktop .subnav {
  /* Más específico que «.nav-desktop ul» (que muestra la lista principal): cerrado hasta que se abra. */
  display: none;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
}

/* Se abre al pasar el mouse, con el teclado (foco) o tocando la flecha. */
@media (hover: hover) {
  .nav-desktop .has-sub:hover > .subnav {
    display: flex;
  }
}

/* Con el teclado (Tab): foco visible dentro del menú. Con el mouse, solo la flecha lo abre y lo cierra. */
.nav-desktop .has-sub:has(:focus-visible) > .subnav,
.nav-desktop .has-sub.is-open > .subnav {
  display: flex;
}

.nav-desktop .subnav a {
  display: flex;
  width: 100%;
  min-height: 44px;
  padding: 0 0.75rem;
  white-space: nowrap;
  border-radius: var(--radius);
}

.nav-desktop .subnav a:hover,
.nav-desktop .subnav a:focus-visible {
  background: var(--highlight);
}

:root[data-theme="dark"] .subnav {
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.4), 0 18px 44px rgb(0 0 0 / 0.55);
}

/* Menú del celular: los servicios debajo de «Servicios», más chicos. */
.mm-sub {
  display: grid;
  gap: 0.1rem;
  margin: 0.25rem 0 0.75rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
}

.mm-list .mm-sub a {
  font-family: var(--font-sans);
  font-stretch: normal;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0;
  padding: 0.45rem 0;
}


/* ---- Proyectos y marcas (carrusel automático con flechas) ---- */
/* Tipografías de cada marca, copiadas de sus proyectos (todas con licencia SIL Open Font License). */
@font-face {
  font-family: "Marca Instrument Serif";
  src: url("../fonts/marcas/aurvenio-instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Marca Cormorant Garamond";
  src: url("../fonts/marcas/ashoka-cormorant-garamond-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Marca Schibsted Grotesk";
  src: url("../fonts/marcas/bufalo-schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

.brands-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

.brands-controls {
  display: flex;
  gap: 0.25rem;
}

.brands-controls[hidden] {
  display: none;
}

.brands-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background var(--dur-fast) ease;
}

.brands-btn:hover,
.brands-btn:focus-visible {
  background: var(--highlight);
}

/* Fila de marcas: se desplaza sola y con las flechas; sin barra de desplazamiento a la vista. */
.brands-track {
  display: grid;
  grid-auto-flow: column;
  /* Celular: una marca y parte de la siguiente. */
  grid-auto-columns: 70%;
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-block: 1px solid var(--rule);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.brands-track::-webkit-scrollbar {
  display: none;
}

@media (min-width: 40rem) {
  .brands-track {
    grid-auto-columns: 50%;
  }
}

@media (min-width: 64rem) {
  .brands-track {
    grid-auto-columns: calc(100% / 3);
  }
}

.brands-track:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .brands-track {
    scroll-behavior: auto;
  }
}

.brand-item {
  scroll-snap-align: start;
  display: flex;
}

.brand-item + .brand-item {
  border-left: 1px solid var(--rule);
}

.brand-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 7.5rem;
  padding: 1rem 1.5rem;
}

a.brand-chip {
  text-decoration: none;
  transition: opacity var(--dur-fast) ease;
}

a.brand-chip:hover .brand-chip-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a.brand-chip:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.brand-chip-logo {
  flex: none;
  width: 40px;
  height: 40px;
}

.brand-chip-name {
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--ink);
  white-space: nowrap;
}

/* Cada nombre con la tipografía de su marca */
.brand-chip--aurvenio .brand-chip-name {
  font-family: "Marca Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0.22em;
  margin-right: -0.22em;
  text-transform: uppercase;
}

.brand-chip--freepets .brand-chip-name {
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-chip--ashoka .brand-chip-name {
  font-family: "Marca Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.8rem;
  letter-spacing: 0.01em;
}

.brand-chip--bufalo .brand-chip-name {
  font-family: "Marca Schibsted Grotesk", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #6d1a2b;
}

:root[data-theme="dark"] .brand-chip--bufalo .brand-chip-name {
  color: #e7a4b2;
}

/* ---- Idioma: selector del encabezado, lista del menú del celular y elección en la primera visita ---- */
.lang-menu {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.6rem;
  border-radius: var(--radius);
  font-size: var(--step-s);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.lang-btn::-webkit-details-marker {
  display: none;
}

.lang-btn:hover,
.lang-menu[open] .lang-btn {
  background: var(--surface-2);
}

.lang-list {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 13rem;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border-control);
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgb(32 36 42 / 0.08), 0 16px 40px rgb(32 36 42 / 0.16);
}

.lang-list a,
.mm-langs a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
}

.lang-list a:hover,
.lang-list a:focus-visible,
.mm-langs a:hover {
  background: var(--highlight);
}

.lang-list a[aria-current],
.mm-langs a[aria-current] {
  font-weight: 700;
}

.mm-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.mm-langs a {
  font-size: 0.95rem;
}

/* En el celular el selector del encabezado se oculta: está dentro del menú. */
@media (max-width: 79.99rem) {
  .js .tools .lang-menu {
    display: none;
  }
}

.lang-first {
  width: min(28rem, calc(100% - 2rem));
  padding: 0;
  border: 1px solid var(--border-control);
  border-radius: calc(var(--radius) * 4);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.25);
}

.lang-first::backdrop {
  background: rgb(15 18 22 / 0.45);
}

.lang-first-inner {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}

.lang-first-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
}

.lang-first-list {
  display: grid;
  gap: 0.4rem;
}

.lang-first-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}

.lang-first-list a:hover,
.lang-first-list a:focus-visible {
  border-color: var(--ink);
  background: var(--highlight);
}

.lang-first-list .is-suggested a {
  border-color: var(--ink);
}

.lang-first-close {
  justify-self: start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
