/* KAS Digital — homepage (/ and /en), brand C1.
   Requires kas-base.css first (tokens, fonts, type scale, buttons, reset).
   Mobile first; breakpoints 768px / 1200px (CLAUDE.md §7). */

html { scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
.kas-wrap { background: var(--kas-black); color: var(--kas-white); min-height: 100vh; }

/* ==================== TYPE ==================== */
.kas-body { color: var(--kas-grey-300); }

/* Eyebrow: short label above a heading — sentence case, never all caps (§7). */
.kas-eyebrow { font-size: var(--kas-text-meta); font-weight: 500; line-height: 1.5; color: var(--kas-grey-400); margin-bottom: var(--kas-space-4); }
.kas-section-head { margin-bottom: var(--kas-space-6); }
.kas-section-head .kas-body { margin-top: var(--kas-space-4); }

/* ==================== NAV ==================== */
.kas-nav { position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; gap: var(--kas-space-2); padding: var(--kas-space-3) var(--kas-space-4); background: var(--kas-black); border-bottom: 1px solid var(--kas-grey-700); }
.kas-logo { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; }
.kas-logo img { height: 28px; }
.kas-nav-right { display: flex; align-items: center; gap: var(--kas-space-1); }
.kas-nav-phone { display: inline-flex; align-items: center; justify-content: center; gap: var(--kas-space-2); min-width: 44px; min-height: 44px; color: var(--kas-white); font-size: 1rem; font-weight: 500; }
.kas-nav-phone:hover { color: var(--kas-red-soft); }
.kas-nav-phone-num { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Pill stays compact; ::after widens the tap target to 44px. */
.kas-lang-switch { position: relative; font-size: var(--kas-text-meta); font-weight: 500; line-height: 1.5; color: var(--kas-grey-300); border: 1px solid var(--kas-grey-600); border-radius: 100px; padding: var(--kas-space-1) var(--kas-space-3); }
.kas-lang-switch::after { content: ''; position: absolute; inset: -11px -3px; }
.kas-lang-switch:hover { color: var(--kas-white); border-color: var(--kas-white); }
.kas-nav-cta { min-height: 44px; padding: 0 var(--kas-space-3); font-size: var(--kas-text-meta); white-space: nowrap; }
.kas-nav-cta-extra { display: none; }
/* Narrow phones: the horizontal lockup plus the EN label ("Free marketing audit") must fit without hiding anything. */
@media (max-width: 399px) {
  .kas-logo img { height: 26px; }
  .kas-lang-switch { padding: var(--kas-space-1) var(--kas-space-2); }
  .kas-nav-cta { padding: 0 var(--kas-space-2); }
  /* EN at 360px: phone, CTA and Menú need every pixel; the 44px icon boxes keep their own spacing. */
  .kas-nav-right { gap: 0; }
}
@media (max-width: 374px) {
  .kas-logo img { height: 24px; }
}
/* Below 1200px the language switch lives in the menu (room for the Menú button at 360px, EN). */
.kas-nav-right .kas-lang-switch { display: none; }
/* Nav CTA arrow from 768px only (no room at 375px). */
.kas-nav-cta .kas-btn-arrow { display: none; }

/* ==================== NAV: links, services panel, menu (assets/js/nav-menu.js) ====================
   Both panels are native popovers: they open, close on Esc / outside click and return focus
   without JS. .is-open is the no-popover fallback, so states use :is(:popover-open, .is-open)
   (forgiving: an unknown pseudo-class doesn't drop the rule). --kas-nav-h = sticky nav height. */
.kas-wrap { --kas-ease-menu: cubic-bezier(0.22, 0.61, 0.36, 1); }
html { scrollbar-gutter: stable; }
html:is(.kas-menu-open, :has(#kas-menu:popover-open)) { overflow: hidden; }

.kas-nav-links { display: none; list-style: none; }
.kas-nav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; white-space: nowrap; padding: 0 var(--kas-space-2); background: none; border: 0; color: var(--kas-white); font-family: inherit; font-size: 1rem; font-weight: 500; line-height: 1.25; cursor: pointer; }
.kas-nav-link:hover { color: var(--kas-red-soft); }
.kas-chev { flex-shrink: 0; }
[aria-expanded="true"] > .kas-chev, .kas-menu-svc[open] .kas-chev { transform: rotate(180deg); }

/* Menu button: three bars that turn into an ✕ (transform/opacity). */
.kas-menu-btn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; background: none; border: 0; border-radius: var(--kas-radius-btn); color: var(--kas-white); cursor: pointer; }
.kas-menu-bars { position: relative; width: 20px; height: 14px; }
.kas-menu-bars span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 1px; background: currentColor; }
.kas-menu-bars span:nth-child(2) { top: 6px; }
.kas-menu-bars span:nth-child(3) { top: 12px; }
.kas-menu-btn[aria-expanded="true"] .kas-menu-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.kas-menu-btn[aria-expanded="true"] .kas-menu-bars span:nth-child(2) { opacity: 0; }
.kas-menu-btn[aria-expanded="true"] .kas-menu-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Popover reset (the UA centres popovers with a border and Canvas colours). */
.kas-svc-panel, .kas-menu { display: none; position: fixed; z-index: 101; margin: 0; padding: 0; border: 0; max-width: none; max-height: none; color: var(--kas-white); background: var(--kas-black); overflow: auto; }

/* Services panel (desktop): drops below the nav, a red line runs across, items follow one by one. */
.kas-svc-panel { inset: calc(var(--kas-nav-h, 69px) + var(--kas-space-2)) auto auto var(--kas-space-7); width: min(960px, calc(100vw - 2 * var(--kas-space-7))); padding: var(--kas-space-3); background: var(--kas-grey-800); border: 1px solid var(--kas-grey-700); border-radius: var(--kas-radius-card); overflow: visible; transform-origin: 50% 0; }
.kas-svc-panel:is(:popover-open, .is-open) { display: block; }
.kas-svc-panel::before { content: ''; position: absolute; left: var(--kas-space-4); right: var(--kas-space-4); top: -1px; height: 2px; border-radius: 2px; background: var(--kas-red); transform-origin: 0 50%; }
.kas-svc-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--kas-space-2); }
.kas-svc-item { position: relative; display: flex; align-items: flex-start; gap: var(--kas-space-3); min-height: 44px; padding: var(--kas-space-3) var(--kas-space-7) var(--kas-space-3) var(--kas-space-3); border-radius: var(--kas-radius-btn); color: var(--kas-white); }
.kas-svc-item:hover, .kas-svc-item:focus-visible { background: var(--kas-surface-hover); }
.kas-svc-ico { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--kas-surface-hover); }
.kas-svc-item:hover .kas-svc-ico, .kas-svc-item:focus-visible .kas-svc-ico { background: var(--kas-wine); transform: scale(1.06); }
.kas-svc-txt { min-width: 0; }
.kas-svc-txt strong { display: block; font-weight: 700; line-height: 1.35; }
.kas-svc-txt span { display: block; margin-top: 2px; font-size: var(--kas-text-meta); line-height: 1.4; color: var(--kas-grey-400); }
.kas-svc-go { position: absolute; right: var(--kas-space-4); top: 50%; margin-top: -8px; opacity: 0; transform: translateX(-6px); }
.kas-svc-item:hover .kas-svc-go, .kas-svc-item:focus-visible .kas-svc-go { opacity: 1; transform: none; }

/* Full-screen menu (below 1200px): under the nav bar, links + Servicios accordion, CTA at the bottom. */
.kas-menu { inset: var(--kas-nav-h, 69px) 0 0 0; width: auto; height: auto; overscroll-behavior: contain; }
.kas-menu:is(:popover-open, .is-open) { display: block; }
.kas-menu-inner { display: flex; flex-direction: column; min-height: 100%; max-width: 640px; padding: var(--kas-space-4) var(--kas-gutter, var(--kas-space-4)) var(--kas-space-6); }
.kas-menu-list { list-style: none; margin-bottom: var(--kas-space-6); }
.kas-menu-list > li { border-bottom: 1px solid var(--kas-grey-700); }
.kas-menu-link { display: flex; align-items: center; justify-content: space-between; gap: var(--kas-space-3); min-height: 56px; padding: var(--kas-space-3) 0; color: var(--kas-white); font-size: 1.25rem; font-weight: 700; line-height: 1.3; list-style: none; cursor: pointer; }
.kas-menu-link::-webkit-details-marker { display: none; }
.kas-menu-sub { list-style: none; padding-bottom: var(--kas-space-3); }
.kas-menu-sublink { display: flex; align-items: center; min-height: 48px; padding-left: var(--kas-space-4); font-weight: 500; color: var(--kas-grey-300); }
/* Hover colours only with a real pointer: a tap on a phone would leave them stuck on. */
@media (hover: hover) {
  .kas-menu-btn:hover, .kas-menu-link:hover, .kas-menu-sublink:hover { color: var(--kas-red-soft); }
}
.kas-menu-cta { margin-top: auto; width: 100%; }
/* Stagger index for the open animation (lab: 120ms + i × 70ms). */
.kas-svc-list > li:nth-child(2), .kas-menu-list > li:nth-child(2) { --kas-i: 1; }
.kas-svc-list > li:nth-child(3), .kas-menu-list > li:nth-child(3) { --kas-i: 2; }
.kas-svc-list > li:nth-child(4), .kas-menu-list > li:nth-child(4) { --kas-i: 3; }
.kas-svc-list > li:nth-child(5), .kas-menu-cta { --kas-i: 4; }

@media (prefers-reduced-motion: no-preference) {
  .kas-nav-link .kas-chev, .kas-menu-link .kas-chev { transition: transform 450ms var(--kas-ease-menu); }
  .kas-menu-bars span { transition: transform 300ms var(--kas-ease-menu), opacity 200ms ease-out; }
  .kas-svc-item { transition: background-color 300ms ease; }
  .kas-svc-ico { transition: background-color 300ms ease, transform 350ms var(--kas-ease-menu); }
  .kas-svc-go { transition: opacity 300ms ease, transform 350ms var(--kas-ease-menu); }
  /* Close: quick fade (allow-discrete keeps it painted while it fades; instant where unsupported). */
  .kas-svc-panel, .kas-menu { transition: opacity 200ms ease-in, transform 200ms ease-in, overlay 200ms ease-in allow-discrete, display 200ms ease-in allow-discrete; }
  /* Open: keyframes, so they replay on every open in every browser (popover or fallback). */
  .kas-svc-panel:is(:popover-open, .is-open) { animation: kas-panel-in 500ms var(--kas-ease-menu) both; }
  .kas-svc-panel:is(:popover-open, .is-open)::before { animation: kas-line-in 700ms var(--kas-ease-menu) 100ms both; }
  .kas-svc-panel:is(:popover-open, .is-open) .kas-svc-list > li,
  .kas-menu:is(:popover-open, .is-open) .kas-menu-list > li,
  .kas-menu:is(:popover-open, .is-open) .kas-menu-cta { animation: kas-item-in 450ms var(--kas-ease-menu) calc(120ms + var(--kas-i, 0) * 70ms) both; }
  .kas-menu:is(:popover-open, .is-open) { animation: kas-menu-in 350ms var(--kas-ease-menu) both; }
  .kas-svc-panel:not(:popover-open):not(.is-open) { opacity: 0; transform: translateY(-12px) scale(0.97); }
  .kas-menu:not(:popover-open):not(.is-open) { opacity: 0; transform: translateY(-8px); }
}
@keyframes kas-panel-in { from { opacity: 0; transform: translateY(-12px) scale(0.97); } }
@keyframes kas-menu-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes kas-line-in { from { transform: scaleX(0); } }
@keyframes kas-item-in { from { opacity: 0; transform: translateY(10px); } }

/* ==================== SECTIONS (shared frame) ====================
   Content is 860px wide everywhere (form 640px); --kas-gutter is the side
   padding, so plain sections and full-width bands share the same left edge. */
.kas-wrap { --kas-gutter: var(--kas-space-4); --kas-section-y: var(--kas-space-8); }
.kas-reality, .kas-soluciones, .kas-faq-section, .kas-timeline-section, .kas-equipo, .kas-compare, .kas-tech, .kas-final { max-width: calc(860px + 2 * var(--kas-gutter)); margin: 0 auto; padding-left: var(--kas-gutter); padding-right: var(--kas-gutter); }
.kas-form-section { max-width: calc(640px + 2 * var(--kas-gutter)); margin: 0 auto; padding-left: var(--kas-gutter); padding-right: var(--kas-gutter); }
.kas-reality, .kas-soluciones, .kas-faq-section, .kas-timeline-section, .kas-equipo, .kas-compare, .kas-final, .kas-form-section { padding-top: var(--kas-section-y); padding-bottom: var(--kas-section-y); }
/* Bands stay black (wide black backgrounds, §7); hairlines mark the change of section. */
.kas-porque, .kas-precios { background: var(--kas-black); border-top: 1px solid var(--kas-grey-700); border-bottom: 1px solid var(--kas-grey-700); padding: var(--kas-section-y) var(--kas-gutter); }
.kas-porque-inner, .kas-precios-inner { max-width: 860px; margin: 0 auto; }
.kas-divider { border: none; border-top: 1px solid var(--kas-grey-700); width: calc(100% - 2 * var(--kas-gutter)); max-width: 860px; margin: 0 auto; }

/* ==================== HERO (brand C1) ====================
   Text left; the ambient shader (§7 Exception 5) fills the hero behind it and shows
   on its own in the empty right column from 1200px.
   Full-bleed, so the shader reaches both window edges; the side padding keeps the text in
   the 1200px frame (§7 content max): the gutter, or half the space beyond 1200px. Same text
   position as a centred 1200px + gutters box. The 860px sections below keep their frame. */
.kas-hero { position: relative; isolation: isolate; display: grid; gap: var(--kas-space-7); padding: var(--kas-space-7) max(var(--kas-gutter), calc((100% - 1200px) / 2)) var(--kas-space-8); }
.kas-hero .kas-h1 { max-width: 20ch; }
.kas-hero-value { margin-top: var(--kas-space-5); font-size: var(--kas-text-lead); line-height: 1.55; color: var(--kas-grey-300); max-width: 42ch; text-wrap: pretty; }
.kas-hero-ctas { display: flex; flex-direction: column; gap: var(--kas-space-2); margin-top: var(--kas-space-6); }
/* Secondary hero action: a text link, not a second red button (§7: red max 1–2 per screen). */
.kas-hero-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--kas-space-2); font-weight: 700; color: var(--kas-white); text-decoration: underline; text-underline-offset: 3px; }
.kas-hero-link:hover { color: var(--kas-red-soft); }

/* Shader canvas: behind the text, never interactive. Hidden until the first frame is drawn,
   so no WebGL / no JS = plain black. The fade-in is the page's one memorable motion (§7);
   H1, lead and CTAs never animate (LCP). Reduced motion: the static frame appears directly.
   The mask fades it to black over the hero's last 10%, so it meets the trust band with no edge. */
.kas-hero-canvas { position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; pointer-events: none; opacity: 0;
  -webkit-mask-image: linear-gradient(to bottom, var(--kas-black) 90%, transparent); mask-image: linear-gradient(to bottom, var(--kas-black) 90%, transparent); }
.kas-hero-canvas.is-on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .kas-hero-canvas { transition: opacity 600ms ease-out; }
}

/* ==================== TRUST BAND ==================== */
.kas-trust { background: var(--kas-grey-800); border-top: 1px solid var(--kas-grey-700); border-bottom: 1px solid var(--kas-grey-700); padding: var(--kas-space-6) var(--kas-gutter); }
.kas-trust-inner { display: grid; gap: var(--kas-space-5); max-width: 1200px; margin: 0 auto; }
.kas-trust-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--kas-space-4); }
.kas-trust-stat { display: flex; flex-direction: column; gap: var(--kas-space-1); }
.kas-trust-num { font-family: var(--kas-font-head); font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -1px; color: var(--kas-white); font-variant-numeric: tabular-nums; }
.kas-trust-label { font-size: var(--kas-text-meta); line-height: 1.4; color: var(--kas-grey-400); max-width: 18ch; text-wrap: balance; }
.kas-trust-list { list-style: none; display: grid; gap: var(--kas-space-4); padding-top: var(--kas-space-5); border-top: 1px solid var(--kas-grey-700); }
.kas-trust-item { display: flex; align-items: flex-start; gap: var(--kas-space-3); font-weight: 500; line-height: 1.45; color: var(--kas-white); }
.kas-trust-item span { text-wrap: balance; }
.kas-trust-item svg { flex-shrink: 0; }
/* Count-ups keep a fixed width while counting (§7 Exception 1); count-up.js reserves it. */
[data-count-to] { display: inline-block; font-variant-numeric: tabular-nums; text-align: right; }

/* ==================== REALITY ==================== */
/* Past-agency problems: a thin minus-circle, never a check (benefits) or an ✗. */
.kas-checks-intro { margin-top: var(--kas-space-5); font-weight: 700; color: var(--kas-white); }
.kas-checks { list-style: none; display: grid; gap: var(--kas-space-3); margin-top: var(--kas-space-4); }
.kas-check { display: flex; align-items: flex-start; gap: var(--kas-space-3); line-height: 1.5; color: var(--kas-grey-300); max-width: 65ch; }
.kas-check svg { flex-shrink: 0; margin-top: 3px; color: var(--kas-white); }
/* The screen's one supporting block: wine, always white text (§7). */
.kas-highlight-box { margin-top: var(--kas-space-6); padding: var(--kas-space-5); background: var(--kas-wine); border-radius: var(--kas-radius-block); line-height: 1.6; color: var(--kas-white); }
.kas-highlight-box strong { display: block; margin-bottom: var(--kas-space-2); font-weight: 700; }

/* ==================== CARDS ==================== */
.kas-cards { display: grid; grid-template-columns: 1fr; gap: var(--kas-space-4); }
.kas-card { display: flex; flex-direction: column; background: var(--kas-grey-800); border: 1px solid var(--kas-grey-700); border-radius: var(--kas-radius-card); padding: var(--kas-space-5); }
.kas-card-title { margin-bottom: var(--kas-space-2); }
.kas-card-text { color: var(--kas-grey-300); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .kas-card { transition: transform 200ms ease-out; }
  .kas-card:hover { transform: translateY(-4px); }
}

.kas-card-link { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; margin-top: auto; padding-top: var(--kas-space-3); font-weight: 700; color: var(--kas-white); text-decoration: underline; text-underline-offset: 3px; }
.kas-card-link:hover { color: var(--kas-red-soft); }

/* ==================== SERVICES (outcome groups) ====================
   Three large blocks: grey-800, wine (white text, §7), grey-800 — no red block.
   Stacked without JS; R4b turns the group titles into tabs. */
.kas-groups { display: grid; gap: var(--kas-space-5); }
.kas-group { padding: var(--kas-space-5); background: var(--kas-grey-800); border: 1px solid var(--kas-grey-700); border-radius: var(--kas-radius-block); }
.kas-group-title { margin-bottom: var(--kas-space-5); }
.kas-group-services { display: grid; gap: var(--kas-space-5); }
.kas-service { display: flex; flex-direction: column; }
.kas-service + .kas-service { padding-top: var(--kas-space-5); border-top: 1px solid var(--kas-grey-700); }
.kas-service-title { margin-bottom: var(--kas-space-2); font-family: var(--kas-font-head); font-size: var(--kas-text-lead); font-weight: 600; line-height: 1.25; letter-spacing: -0.3px; color: var(--kas-white); text-wrap: balance; }
.kas-service-text { color: var(--kas-grey-300); max-width: 65ch; }
.kas-includes-title { margin-top: var(--kas-space-4); margin-bottom: var(--kas-space-2); font-size: var(--kas-text-meta); font-weight: 500; color: var(--kas-grey-400); }
.kas-includes { list-style: none; display: grid; gap: var(--kas-space-2); }
.kas-includes li { display: flex; align-items: flex-start; gap: var(--kas-space-2); line-height: 1.5; color: var(--kas-grey-300); }
/* No one-word last lines in short list items and step text (§12 2026-10-01). */
.kas-includes span, .kas-check span, .kas-service-text, .kas-timeline-text { text-wrap: pretty; }
.kas-includes svg { flex-shrink: 0; margin-top: 4px; color: var(--kas-white); }
/* Short note under a list (e.g. who provides the photos): meta size, grey-400 on grey-800 (7.3:1). */
.kas-service-note { margin-top: var(--kas-space-3); font-size: var(--kas-text-meta); line-height: 1.55; color: var(--kas-grey-400); max-width: 65ch; text-wrap: pretty; }
/* Wine block: white text (12.5:1), secondary text wine-text (9.4:1). red-soft on wine is 4.2:1,
   so the link hover keeps white and thickens the underline instead. */
.kas-group-wine { background: var(--kas-wine); border-color: var(--kas-wine); }
.kas-group-wine .kas-service-text, .kas-group-wine .kas-includes li, .kas-group-wine .kas-includes-title { color: var(--kas-wine-text); }
.kas-group-wine .kas-card-link:hover { color: var(--kas-white); text-decoration-thickness: 3px; }

/* Tabs (assets/js/tabs.js, lab §3): the tablist exists only with JS; without it the groups
   stay stacked. Red pill slides under the selected tab (transform + width, §7 Exception 2).
   Equal columns on phones (labels may wrap), content width from 768px. */
.kas-tabs { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--kas-space-1); padding: var(--kas-space-1); background: var(--kas-grey-800); border: 1px solid var(--kas-grey-700); border-radius: var(--kas-radius-card); }
.kas-tab { position: relative; z-index: 1; min-width: 0; min-height: 44px; padding: var(--kas-space-2) var(--kas-space-1); background: none; border: 0; border-radius: 12px; color: var(--kas-grey-300); font-family: inherit; font-size: 0.9375rem; font-weight: 700; line-height: 1.25; text-wrap: balance; cursor: pointer; }
.kas-tab:hover { color: var(--kas-white); }
.kas-tab[aria-selected="true"] { color: var(--kas-btn-text); }
.kas-tabs-pill { position: absolute; z-index: 0; top: var(--kas-space-1); bottom: var(--kas-space-1); left: var(--kas-space-1); width: 0; border-radius: 12px; background: var(--kas-red); }
/* The tab names the panel, so the group title stays only for screen readers and the outline. */
.kas-groups.is-tabs .kas-group-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kas-group[hidden] { display: none; }
/* EN "Be remembered" at 360px: the longest word needs the 14px size to fit its third. */
@media (max-width: 399px) { .kas-tab { font-size: var(--kas-text-meta); } }
@media (prefers-reduced-motion: no-preference) {
  .kas-tab { transition: color 200ms ease-out; }
  .kas-tabs.is-ready .kas-tabs-pill { transition: transform 350ms cubic-bezier(0.2, 0.7, 0.2, 1), width 350ms cubic-bezier(0.2, 0.7, 0.2, 1); }
}

/* ==================== CALCULATOR (#calculadora, assets/js/calculator.js) ====================
   Lab §7 on §7 tokens. Inputs sit on black (grey-600 control borders keep 3:1, §12);
   results on grey-800. Every figure is a range or the cautious scenario; fees and ad spend
   on separate lines (§3, §4). Values are HTML text at 14px+, the chart is shapes only. */
.kas-calc { max-width: calc(1200px + 2 * var(--kas-gutter)); margin: 0 auto; padding: var(--kas-section-y) var(--kas-gutter); }
.kas-calc-grid { display: grid; gap: var(--kas-space-5); align-items: start; }
.kas-calc-box { min-width: 0; padding: var(--kas-space-5) var(--kas-space-4); background: var(--kas-grey-800); border: 1px solid var(--kas-grey-700); border-radius: var(--kas-radius-block); }
.kas-calc-in { background: var(--kas-black); }
.kas-calc-field { min-width: 0; margin: 0; padding: var(--kas-space-5) 0; border: 0; border-top: 1px solid var(--kas-grey-700); }
.kas-calc-field:first-child { padding-top: 0; border-top: 0; }
.kas-calc-field:last-child { padding-bottom: 0; }
.kas-calc-label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--kas-space-3); width: 100%; margin-bottom: var(--kas-space-3); padding: 0; font-weight: 700; line-height: 1.35; color: var(--kas-white); }
.kas-calc-label output { flex-shrink: 0; font-family: var(--kas-font-head); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kas-calc-hint { margin-top: var(--kas-space-2); font-size: var(--kas-text-meta); line-height: 1.5; color: var(--kas-grey-400); }
.kas-chips { display: flex; flex-wrap: wrap; gap: var(--kas-space-2); }
.kas-chip { position: relative; display: inline-flex; cursor: pointer; }
.kas-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.kas-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--kas-space-4); background: var(--kas-black); border: 1.5px solid var(--kas-grey-600); border-radius: 100px; color: var(--kas-grey-100); font-size: 0.9375rem; font-weight: 500; line-height: 1.2; }
.kas-chip:hover span { border-color: var(--kas-grey-400); }
.kas-chip input:checked + span { background: var(--kas-red-tint); border-color: var(--kas-red); box-shadow: 0 0 0 1px var(--kas-red); color: var(--kas-white); }
.kas-chip input:focus-visible + span { outline: 2px solid var(--kas-red-soft); outline-offset: 2px; }
.kas-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--kas-space-1); padding: var(--kas-space-1); background: var(--kas-black); border: 1.5px solid var(--kas-grey-600); border-radius: var(--kas-radius-card); }
.kas-seg .kas-chip { display: flex; }
.kas-seg .kas-chip { min-width: 0; }
.kas-seg .kas-chip span { flex: 1; justify-content: center; min-width: 0; padding: 0 var(--kas-space-1); text-align: center; border: 0; border-radius: 12px; background: transparent; }
.kas-seg .kas-chip input:checked + span { background: var(--kas-red); color: var(--kas-btn-text); box-shadow: none; font-weight: 700; }
/* Range: the filled part of the track is one solid colour (--fill set by JS), not a gradient effect. */
.kas-calc input[type="range"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; }
.kas-calc input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(var(--kas-red), var(--kas-red)) 0 / var(--fill, 0%) 100% no-repeat, var(--kas-grey-700); }
.kas-calc input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--kas-grey-700); }
.kas-calc input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--kas-red); }
.kas-calc input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border: 5px solid var(--kas-red); border-radius: 50%; background: var(--kas-white); }
.kas-calc input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 5px solid var(--kas-red); border-radius: 50%; background: var(--kas-white); }
.kas-calc input[type="range"]:focus-visible { outline: 2px solid var(--kas-red-soft); outline-offset: 2px; border-radius: 8px; }
.kas-calc-ends { display: flex; justify-content: space-between; margin-top: calc(-1 * var(--kas-space-1)); font-size: var(--kas-text-meta); color: var(--kas-grey-400); font-variant-numeric: tabular-nums; }

.kas-calc-tag { display: flex; align-items: center; gap: var(--kas-space-2); margin-bottom: var(--kas-space-4); font-size: var(--kas-text-meta); font-weight: 500; color: var(--kas-grey-300); }
.kas-calc-tag span { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--kas-red); }
.kas-calc-hero { margin-bottom: var(--kas-space-4); padding: var(--kas-space-5); background: var(--kas-wine); border-radius: var(--kas-radius-card); }
.kas-calc-hero-k { margin-bottom: var(--kas-space-2); font-weight: 500; color: var(--kas-wine-text); }
.kas-calc-hero-n { font-family: var(--kas-font-head); font-size: clamp(2.5rem, 1.9rem + 2.5vw, 4rem); font-weight: 800; line-height: 1; color: var(--kas-white); font-variant-numeric: tabular-nums; }
.kas-calc-hero-n small { font-family: var(--kas-font-body); font-size: 1.125rem; font-weight: 500; color: var(--kas-wine-text); }
/* Phones: label | value rows. 768px+: three small cards. */
.kas-calc-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--kas-space-3); padding: var(--kas-space-3) 0; border-top: 1px solid var(--kas-grey-700); }
.kas-calc-stats dt { font-size: var(--kas-text-meta); line-height: 1.35; color: var(--kas-grey-400); }
.kas-calc-stats dd { flex-shrink: 0; font-family: var(--kas-font-head); font-size: 1.125rem; font-weight: 700; color: var(--kas-white); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kas-calc-payback { margin: var(--kas-space-5) 0 var(--kas-space-2); min-height: 1.5em; font-size: var(--kas-text-meta); font-weight: 700; color: var(--kas-white); }
.kas-calc-chart-wrap { position: relative; }
.kas-calc-chart { display: block; width: 100%; height: auto; }
.kas-calc-chart .band { fill: var(--kas-surface-hover); }
.kas-calc-chart .zero { stroke: var(--kas-grey-600); stroke-width: 1; stroke-dasharray: 4 4; }
.kas-calc-chart .line { fill: none; stroke: var(--kas-red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.kas-calc-chart .pay { fill: var(--kas-black); stroke: var(--kas-red); stroke-width: 3; }
/* Month labels under the chart: x = month 1, 6, 12 of 12 points (0, 5/11, 1). */
.kas-calc-months { position: relative; height: 1.5em; margin-top: var(--kas-space-1); font-size: var(--kas-text-meta); color: var(--kas-grey-400); }
.kas-calc-months span { position: absolute; top: 0; }
.kas-calc-months span:nth-child(1) { left: 2%; }
.kas-calc-months span:nth-child(2) { left: 46.2%; transform: translateX(-50%); }
.kas-calc-months span:nth-child(3) { right: 3%; }
.kas-calc-sum { margin: var(--kas-space-4) 0; }
.kas-calc-sum > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--kas-space-4); padding: var(--kas-space-2) 0; border-top: 1px solid var(--kas-grey-700); }
.kas-calc-sum dt { font-size: var(--kas-text-meta); line-height: 1.45; color: var(--kas-grey-300); }
.kas-calc-sum dd { flex-shrink: 0; font-weight: 700; color: var(--kas-white); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kas-calc-total dt { font-size: 1rem; font-weight: 700; color: var(--kas-white); }
.kas-calc-total dd { font-family: var(--kas-font-head); font-size: 1.25rem; }
/* Red as text only at ≥18px (§7): the positive total is 20px. */
.kas-calc-total.is-pos dd { color: var(--kas-red); }
.kas-calc-total.is-neg dd { color: var(--kas-grey-300); }
.kas-calc-verdict { margin: var(--kas-space-4) 0; padding: var(--kas-space-4); background: var(--kas-black); border: 1.5px solid var(--kas-grey-700); border-radius: var(--kas-radius-card); }
.kas-calc-verdict-title { margin-bottom: var(--kas-space-1); font-family: var(--kas-font-head); font-size: 1.125rem; font-weight: 700; line-height: 1.3; color: var(--kas-white); }
#kas-calc-verdict-text { font-size: 0.9375rem; color: var(--kas-grey-300); }
.kas-calc-verdict.is-compensa { border-color: var(--kas-red); }
.kas-calc-verdict.is-compensa .kas-calc-verdict-title { color: var(--kas-red); }
.kas-calc-verdict.is-no_compensa { background: var(--kas-wine-tint); border-color: var(--kas-wine); }
.kas-calc-cta { width: 100%; }
.kas-calc-source { margin-top: var(--kas-space-4); font-size: var(--kas-text-meta); font-weight: 500; line-height: 1.55; color: var(--kas-grey-300); }
.kas-calc-source a { color: var(--kas-white); text-decoration: underline; text-underline-offset: 3px; }
.kas-calc-source a:hover { color: var(--kas-red-soft); }
.kas-calc-fine { margin-top: var(--kas-space-2); font-size: var(--kas-text-meta); line-height: 1.5; color: var(--kas-grey-400); }
@media (prefers-reduced-motion: no-preference) {
  .kas-chip span { transition: border-color 250ms ease-out, background-color 250ms ease-out, color 250ms ease-out, box-shadow 250ms ease-out; }
  .kas-calc input[type="range"]::-webkit-slider-thumb { transition: transform 200ms ease; }
  .kas-calc input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
  /* Chart line draws in once (§7 Exception 4, 1.1 s); calculator.js removes .is-drawing after. */
  .kas-calc-chart.is-drawing .line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: kas-draw 1100ms var(--kas-ease-menu) forwards; }
}
@keyframes kas-draw { to { stroke-dashoffset: 0; } }

/* ==================== HOW WE WORK (timeline) ====================
   Real steps, so numbered. Dots: grey-600 ring on black (3.1:1); only the first is red
   (the logo dot) — R4b turns each one red as the progress line reaches it (§8).
   The grey line runs dot to dot per step (static — R4b fills it on scroll).
   Geometry is set once here: every dot and line layer (base and red fill) is centred on
   --tl-x, and each dot on the middle of its "01" line (--tl-y = meta size × 1.5 line-height / 2).
   Pseudo-elements set their own border-box: the global * reset doesn't reach them. */
.kas-timeline { list-style: none; max-width: 720px;
  --tl-dot: 12px; --tl-line: 2px; --tl-x: 6px; --tl-y: calc(var(--kas-text-meta) * 0.75);
  --tl-gap: calc(var(--tl-y) - var(--tl-dot) / 2); }   /* ring-to-line gap, the same above and below */
.kas-timeline-step { position: relative; padding: 0 0 var(--kas-space-6) var(--kas-space-6); }
.kas-timeline-step::before, .kas-timeline-num::before { position: absolute; left: var(--tl-x); top: var(--tl-y); box-sizing: border-box; width: var(--tl-dot); height: var(--tl-dot); border: 2px solid; border-radius: 50%; transform: translate(-50%, -50%); }
.kas-timeline-step::after, .kas-timeline-text::after { position: absolute; left: var(--tl-x); top: calc(var(--tl-y) + var(--tl-dot) / 2 + var(--tl-gap)); bottom: 0; width: var(--tl-line); transform: translateX(-50%); }
.kas-timeline-step::before { content: ''; border-color: var(--kas-grey-600); background: var(--kas-black); }
.kas-timeline-step:first-child::before { border-color: var(--kas-red); background: var(--kas-red); }
.kas-timeline-step::after { content: ''; background: var(--kas-grey-700); }
.kas-timeline-step:last-child { padding-bottom: 0; }
.kas-timeline-step:last-child::after { content: none; }
.kas-timeline-num { display: block; font-size: var(--kas-text-meta); font-weight: 500; line-height: 1.5; color: var(--kas-grey-400); font-variant-numeric: tabular-nums; }
.kas-timeline-when { margin: var(--kas-space-1) 0 var(--kas-space-2); }
.kas-timeline-text { color: var(--kas-grey-300); max-width: 65ch; }
/* Keeps a hyphenated term on one line ("15-minute"); &nbsp; can't stop a break at a hyphen. */
.kas-nowrap { white-space: nowrap; }
/* Progress (lab §5, §8): a red segment per step fills as you scroll and always ends at
   60% of the viewport height (view-timeline-inset trims the bottom 40%, so "entry" = how
   much of the step has crossed that line); each dot fades to red as the line reaches it. Scroll-driven CSS, transform/opacity only. Static (no
   support, reduced motion, print): the full grey line with only the first dot red.
   The red layers reuse the geometry above: the line's range runs from its own top to its
   bottom, and the dot turns red as the line passes its centre. z-index 1: the grey line
   comes later in the tree and would otherwise paint over the red one. */
@supports (animation-timeline: view()) and (view-timeline-name: --kas-a) {
  @media screen and (prefers-reduced-motion: no-preference) {
    .kas-timeline-step { view-timeline: --kas-step block; view-timeline-inset: 0 40%; }
    .kas-timeline-step:not(:last-child) .kas-timeline-text::after { content: ''; z-index: 1; background: var(--kas-red); transform-origin: 50% 0; animation: kas-tl-fill linear both; animation-timeline: --kas-step; animation-range: entry calc(var(--tl-y) + var(--tl-dot) / 2 + var(--tl-gap)) entry 100%; }
    .kas-timeline-num::before { content: ''; border-color: var(--kas-red); background: var(--kas-red); animation: kas-tl-dot linear both; animation-timeline: --kas-step; animation-range: entry calc(var(--tl-y) - 1px) entry calc(var(--tl-y) + 1px); }
  }
}
@keyframes kas-tl-fill { from { transform: translateX(-50%) scaleY(0); } to { transform: translateX(-50%) scaleY(1); } }
@keyframes kas-tl-dot { from { opacity: 0; } to { opacity: 1; } }
.kas-timeline-close { margin-top: var(--kas-space-7); padding-top: var(--kas-space-5); border-top: 1px solid var(--kas-grey-700); font-weight: 700; color: var(--kas-white); max-width: 65ch; }

/* ==================== WHY KAS (numbered list) ==================== */
.kas-why { list-style: none; max-width: 720px; }
.kas-why-item { display: grid; grid-template-columns: var(--kas-space-7) 1fr; gap: var(--kas-space-3); padding: var(--kas-space-5) 0; border-top: 1px solid var(--kas-grey-700); }
.kas-why-item:last-child { border-bottom: 1px solid var(--kas-grey-700); }
.kas-why-num { font-size: var(--kas-text-meta); font-weight: 500; line-height: 1.6; color: var(--kas-grey-400); font-variant-numeric: tabular-nums; }
.kas-why-title { margin-bottom: var(--kas-space-2); }
.kas-why-text { color: var(--kas-grey-300); }

/* ==================== TEAM (#equipo, R5) ====================
   No card frame: a 26px portrait block (§7) with the text on black below it.
   Below 768px the portrait sits beside the name and role, so three 3:4 portraits don't
   stack at full width; from 768px, three columns with the portrait on top.
   Until the photo shoot each portrait is the person's initial on a solid block (§7 Imagery):
   black on red 5.1:1, white on wine 12.5:1, black on grey-100 17.6:1. Initial is aria-hidden;
   the <h3> carries the name. Hover = the .kas-card lift. */
.kas-team { list-style: none; display: grid; gap: var(--kas-space-6); }
.kas-team-card { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); column-gap: var(--kas-space-4); row-gap: var(--kas-space-4); align-items: end; }
.kas-team-portrait { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--kas-radius-block); font-family: var(--kas-font-head); font-size: clamp(3.5rem, 2rem + 6vw, 6rem); font-weight: 700; line-height: 1; }
.kas-team-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kas-team-portrait-red { background: var(--kas-red); color: var(--kas-btn-text); }
.kas-team-portrait-wine { background: var(--kas-wine); color: var(--kas-white); }
.kas-team-portrait-light { background: var(--kas-grey-100); color: var(--kas-black); }
.kas-team-name { font-size: var(--kas-text-h3); }
.kas-team-role { margin-top: var(--kas-space-1); font-weight: 500; line-height: 1.4; color: var(--kas-grey-300); text-wrap: balance; }
.kas-team-body { grid-column: 1 / -1; }
.kas-team-label { margin-bottom: var(--kas-space-1); font-size: var(--kas-text-meta); font-weight: 500; line-height: 1.5; color: var(--kas-grey-400); }
.kas-team-text { color: var(--kas-grey-300); text-wrap: pretty; }
.kas-team-contact { margin-top: var(--kas-space-2); font-weight: 500; color: var(--kas-white); text-wrap: pretty; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .kas-team-card { transition: transform 200ms ease-out; }
  .kas-team-card:hover { transform: translateY(-4px); }
}
.kas-team-group { margin-top: var(--kas-space-6); }
.kas-team-group img { display: block; width: 100%; height: auto; border-radius: var(--kas-radius-block); }
.kas-team-facts { list-style: none; display: grid; gap: var(--kas-space-3); font-weight: 500; }
.kas-team-facts li { display: flex; align-items: flex-start; gap: var(--kas-space-3); }
.kas-team-facts span { text-wrap: balance; }
.kas-team-facts svg { flex-shrink: 0; margin-top: 3px; }
.kas-team-cta { margin-top: var(--kas-space-6); }

/* ==================== FAQ ====================
   Native <details>/<summary>: keyboard and no-JS for free. The answer stays in the DOM
   (and matches the FAQPage JSON-LD verbatim). Chevron only — accordion height motion is R4b. */
.kas-faq-list { max-width: 720px; }
.kas-faq-item { border-top: 1px solid var(--kas-grey-700); }
.kas-faq-item:last-child { border-bottom: 1px solid var(--kas-grey-700); }
.kas-faq-summary { display: flex; justify-content: space-between; align-items: center; gap: var(--kas-space-4); min-height: 48px; padding: var(--kas-space-5) 0; list-style: none; cursor: pointer; }
.kas-faq-summary::-webkit-details-marker { display: none; }
.kas-bullet-title { font-size: var(--kas-text-lead); font-weight: 600; line-height: 1.3; letter-spacing: -0.3px; }
.kas-faq-summary:hover .kas-bullet-title { color: var(--kas-red-soft); }
/* Plus in a ring (lab §4): turns into an ✕ and fills red when open (black on red, 5.1:1). */
.kas-faq-plus { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border: 1.5px solid var(--kas-grey-600); border-radius: 50%; color: var(--kas-white); }
.kas-faq-item[open] .kas-faq-plus { transform: rotate(45deg); background: var(--kas-red); border-color: var(--kas-red); color: var(--kas-btn-text); }
.kas-bullet-text { padding-bottom: var(--kas-space-5); color: var(--kas-grey-300); }
@media (prefers-reduced-motion: no-preference) {
  .kas-faq-plus { transition: transform 550ms var(--kas-ease-menu), background-color 350ms ease, border-color 350ms ease, color 350ms ease; }
}
/* Smooth open/close (§7 Exception 2, 650 ms) where ::details-content + interpolate-size
   exist; instant everywhere else and under reduced motion. Text stays in the DOM. */
@supports (interpolate-size: allow-keywords) and selector(::details-content) {
  @media (prefers-reduced-motion: no-preference) {
    .kas-faq-list { interpolate-size: allow-keywords; }
    .kas-faq-item::details-content { block-size: 0; overflow-y: clip; transition: block-size 650ms var(--kas-ease-menu), content-visibility 650ms allow-discrete; }
    .kas-faq-item[open]::details-content { block-size: auto; }
    .kas-faq-item .kas-bullet-text { opacity: 0; transform: translateY(-8px); transition: opacity 300ms ease-out, transform 300ms ease-out; }
    .kas-faq-item[open] .kas-bullet-text { opacity: 1; transform: none; transition: opacity 450ms ease-out 140ms, transform 450ms var(--kas-ease-menu) 140ms; }
    @starting-style { .kas-faq-item[open] .kas-bullet-text { opacity: 0; transform: translateY(-8px); } }
  }
}

/* ==================== PRICING ==================== */
.kas-price-label { font-size: var(--kas-text-meta); font-weight: 500; color: var(--kas-grey-400); margin-bottom: var(--kas-space-2); }
.kas-price-rows { margin: var(--kas-space-4) 0; }
.kas-price-row { padding: var(--kas-space-4) 0; border-top: 1px solid var(--kas-grey-700); }
.kas-price-row dt { font-size: var(--kas-text-meta); font-weight: 500; color: var(--kas-grey-400); margin-bottom: var(--kas-space-1); }
.kas-price-row dd { line-height: 1.55; color: var(--kas-grey-300); }
.kas-price-num { display: block; margin-bottom: var(--kas-space-1); font-family: var(--kas-font-head); font-size: 1.75rem; font-weight: 700; line-height: 1.1; letter-spacing: -1px; color: var(--kas-white); font-variant-numeric: tabular-nums; }
.kas-price-num span { font-family: var(--kas-font-body); font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--kas-grey-400); }
/* "Webs · SEO · Redes" card: wine, white text (12.5:1); secondary text wine-text (9.4:1). */
.kas-price-card-wine { background: var(--kas-wine); border-color: var(--kas-wine); }
.kas-price-card-wine .kas-price-label, .kas-price-card-wine .kas-card-text { color: var(--kas-wine-text); }
.kas-precios-trust { margin: var(--kas-space-6) 0 var(--kas-space-5); color: var(--kas-grey-300); max-width: 60ch; }

/* ==================== COMPARISON (#comparativa) ====================
   The table scrolls inside its own container on small screens (never the page);
   the row-label column stays pinned. KAS column: grey-800 + red top border (§8). */
.kas-compare-scroll { overflow-x: auto; border: 1px solid var(--kas-grey-700); border-radius: var(--kas-radius-card); -webkit-overflow-scrolling: touch; }
.kas-compare-table { width: 100%; min-width: 680px; table-layout: fixed; border-collapse: separate; border-spacing: 0; line-height: 1.5; text-align: left; }
.kas-compare-table th, .kas-compare-table td { padding: var(--kas-space-3); vertical-align: top; border-bottom: 1px solid var(--kas-grey-700); }
.kas-compare-table tbody tr:last-child > * { border-bottom: none; }
.kas-compare-table td { color: var(--kas-grey-300); }
.kas-compare-table thead th { font-size: var(--kas-text-meta); font-weight: 500; color: var(--kas-grey-400); vertical-align: bottom; }
.kas-compare-table tbody th { font-weight: 700; color: var(--kas-white); }
/* Pinned first column: solid background so scrolled cells pass underneath it.
   Mobile widths show labels + the whole KAS column, with the next column peeking in. */
.kas-compare-table tr > :first-child { position: sticky; left: 0; z-index: 1; width: 8rem; background: var(--kas-black); border-right: 1px solid var(--kas-grey-700); }
.kas-compare-table .kas-compare-kas { background: var(--kas-grey-800); color: var(--kas-white); font-weight: 500; }
.kas-compare-table thead .kas-compare-kas { width: 11.5rem; font-weight: 700; color: var(--kas-white); box-shadow: inset 0 3px 0 var(--kas-red); }
.kas-compare-yes { display: flex; align-items: flex-start; gap: var(--kas-space-2); }
.kas-compare-yes svg { flex-shrink: 0; margin-top: 3px; color: var(--kas-white); }
.kas-compare-hint { margin-top: var(--kas-space-3); font-size: var(--kas-text-meta); color: var(--kas-grey-400); }

/* ==================== TECH ==================== */
.kas-tech { padding-top: var(--kas-space-7); padding-bottom: var(--kas-space-7); }
.kas-tech-strip { list-style: none; display: flex; flex-wrap: wrap; gap: var(--kas-space-2); }
.kas-tech-item { font-size: var(--kas-text-meta); font-weight: 500; color: var(--kas-grey-300); border: 1px solid var(--kas-grey-700); border-radius: 100px; padding: var(--kas-space-2) var(--kas-space-4); }

/* ==================== FINAL CTA ==================== */
.kas-final { text-align: center; border-top: 1px solid var(--kas-grey-700); }
.kas-final-text { margin: var(--kas-space-4) auto var(--kas-space-6); max-width: 46ch; font-size: var(--kas-text-lead); line-height: 1.55; color: var(--kas-grey-300); }

/* ==================== FORM ==================== */
.kas-form-section { padding-top: var(--kas-space-6); }
.kas-reassurance { margin-top: var(--kas-space-4); font-size: var(--kas-text-meta); line-height: 1.6; color: var(--kas-grey-400); }
/* The form sits on black so the grey-600 field borders keep 3:1 (WCAG 1.4.11). */
.kas-form-box { background: var(--kas-black); border: 1px solid var(--kas-grey-700); border-radius: var(--kas-radius-block); padding: var(--kas-space-5) var(--kas-space-4); }
.kas-field { margin-bottom: var(--kas-space-4); }
.kas-label { display: block; margin-bottom: var(--kas-space-2); font-size: 1rem; font-weight: 500; color: var(--kas-grey-300); }
/* 16px inputs: no iOS zoom on focus. */
.kas-input { width: 100%; min-height: 48px; padding: var(--kas-space-3) var(--kas-space-4); background: var(--kas-grey-800); border: 1px solid var(--kas-grey-600); border-radius: var(--kas-radius-btn); color: var(--kas-white); font-family: inherit; font-size: 1rem; }
.kas-input:focus { border-color: var(--kas-red-soft); }
.kas-input::placeholder { color: var(--kas-grey-400); }
.kas-hp { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }
.kas-form-legal { margin-top: var(--kas-space-4); font-size: var(--kas-text-meta); line-height: 1.6; color: var(--kas-grey-400); }

/* Multi-step (assets/js/multistep-form.js). Without JS every .kas-step shows,
   stacked, as one normal form; .is-multistep shows one step at a time. */
.kas-form-layout { display: grid; gap: var(--kas-space-6); }
.kas-step { border: 0; min-width: 0; }
.kas-step + .kas-step { margin-top: var(--kas-space-6); padding-top: var(--kas-space-6); border-top: 1px solid var(--kas-grey-700); }
.is-multistep .kas-step + .kas-step { margin-top: 0; padding-top: 0; border-top: 0; }
.kas-step[hidden] { display: none; }
.kas-step-legend { padding: 0; margin-bottom: var(--kas-space-4); }
.kas-step-note { margin-top: var(--kas-space-3); font-size: var(--kas-text-meta); line-height: 1.5; color: var(--kas-grey-400); }
.kas-step-hint { margin: calc(-1 * var(--kas-space-2)) 0 var(--kas-space-4); }
.kas-step-actions { display: flex; gap: var(--kas-space-3); margin-top: var(--kas-space-5); }
.kas-step-actions .kas-submit { flex: 1; width: auto; margin-top: 0; }
.kas-step-actions-final { flex-direction: column; }
.kas-step-actions-final .kas-step-back { align-self: flex-start; }
.kas-submit { width: 100%; margin-top: var(--kas-space-2); }

/* Submit states (lead-form.js sets data-state): sending = spinner, done = grey-100 + tick
   while redirecting, error = back to the label (the alert below says what happened).
   Full opacity when disabled: black on red must stay 5.1:1 (§7). Width never changes. */
.kas-btn-spin, .kas-btn-done { display: none; flex-shrink: 0; }
.kas-btn-spin { width: 18px; height: 18px; border: 2.5px solid transparent; border-top-color: var(--kas-btn-text); border-right-color: var(--kas-btn-text); border-radius: 50%; }
#cta-form-submit:disabled { opacity: 1; cursor: default; }
#cta-form-submit[data-state="sending"] { background: var(--kas-red); }
#cta-form-submit[data-state="sending"] .kas-btn-spin, #cta-form-submit[data-state="done"] .kas-btn-done { display: block; }
#cta-form-submit[data-state="sending"] .kas-btn-arrow, #cta-form-submit[data-state="done"] .kas-btn-arrow { display: none; }
#cta-form-submit[data-state="done"] { background: var(--kas-grey-100); }
@media (prefers-reduced-motion: no-preference) {
  #cta-form-submit[data-state="sending"] .kas-btn-spin { animation: kas-spin 700ms linear infinite; }
  #cta-form-submit[data-state="done"] .kas-btn-done { animation: kas-pop 300ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  .kas-form-alert:not([hidden]) { animation: kas-reveal 300ms ease-out both; }
}
@keyframes kas-spin { to { transform: rotate(360deg); } }
@keyframes kas-pop { from { opacity: 0; transform: scale(0.5); } }

/* Progress: "Paso X de N" + bar (bar is decorative; the text carries it). */
.kas-progress { margin-bottom: var(--kas-space-5); }
.kas-progress-count { margin-bottom: var(--kas-space-2); font-size: var(--kas-text-meta); font-weight: 500; color: var(--kas-grey-400); }
.kas-progress-bar { height: 4px; border-radius: 2px; background: var(--kas-grey-700); overflow: hidden; }
.kas-progress-bar span { display: block; height: 100%; background: var(--kas-red); transform: scaleX(0); transform-origin: left; }
@media (prefers-reduced-motion: no-preference) {
  .kas-progress-bar span { transition: transform 300ms ease-out; }
}

/* Option cards (lab §6): a real radio/checkbox covers the card (focusable, clickable).
   Selected = red border + ring, red-tint surface, and the mark (right) fills red and
   pops a tick in; the mark stays round (one choice) or square (several), so state
   never relies on colour alone. Pop = transform/opacity only (§7). */
.kas-options { display: grid; gap: var(--kas-space-3); }
/* Flex label + flex: 1 body: cards in one grid row stretch to the tallest. */
.kas-option { position: relative; display: flex; min-width: 0; cursor: pointer; }
.kas-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.kas-option-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--kas-space-3); min-height: 56px; padding: var(--kas-space-3) var(--kas-space-4); background: var(--kas-grey-800); border: 1px solid var(--kas-grey-600); border-radius: var(--kas-radius-card); font-weight: 500; line-height: 1.35; color: var(--kas-grey-300); }
/* Mark: after the text (order), grey-400 ring on grey-800 (7.3:1, WCAG 1.4.11). */
.kas-option-mark { position: relative; order: 1; flex-shrink: 0; width: 24px; height: 24px; border: 1.5px solid var(--kas-grey-400); border-radius: 50%; }
.kas-option-body > span:last-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kas-option-check .kas-option-mark { border-radius: 6px; }
.kas-option-mark::before { content: ''; position: absolute; inset: -1.5px; border-radius: inherit; background: var(--kas-red); opacity: 0; transform: scale(0.4); }
.kas-option-mark::after { content: ''; position: absolute; left: 7px; top: 3px; width: 7px; height: 12px; border: solid var(--kas-btn-text); border-width: 0 2px 2px 0; opacity: 0; transform: rotate(45deg) scale(0.5); }
.kas-option:hover .kas-option-body { border-color: var(--kas-grey-400); background: var(--kas-surface-hover); }
.kas-option input:checked + .kas-option-body { border-color: var(--kas-red); box-shadow: 0 0 0 1px var(--kas-red); background: var(--kas-red-tint); color: var(--kas-white); }
.kas-option input:checked + .kas-option-body .kas-option-mark { border-color: var(--kas-red); }
.kas-option input:checked + .kas-option-body .kas-option-mark::before { opacity: 1; transform: none; }
.kas-option input:checked + .kas-option-body .kas-option-mark::after { opacity: 1; transform: rotate(45deg); }
.kas-option input:focus-visible + .kas-option-body { outline: 2px solid var(--kas-red-soft); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .kas-option-body { transition: border-color 250ms ease-out, background-color 250ms ease-out, box-shadow 250ms ease-out, color 250ms ease-out; }
  .kas-option-mark { transition: border-color 250ms ease-out; }
  .kas-option-mark::before { transition: transform 280ms var(--kas-ease-menu), opacity 200ms ease-out; }
  .kas-option-mark::after { transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 150ms ease-out; }
  .kas-option input:checked + .kas-option-body .kas-option-mark::after { transition-delay: 120ms; }
}

/* Inline errors: --kas-red-soft is never alone — text + alert icon + a heavier input border carry the state.
   The icon is a thin-line circle-"!" (§7 icons) drawn as a mask, so no markup or JS changes. */
.kas-field-error { display: flex; align-items: flex-start; gap: var(--kas-space-2); margin-top: var(--kas-space-2); font-size: 1rem; font-weight: 700; line-height: 1.4; color: var(--kas-red-soft); }
.kas-field-error::before, .kas-form-alert-text::before { content: ''; flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; background: var(--kas-red-soft); -webkit-mask: var(--kas-icon-alert) center / contain no-repeat; mask: var(--kas-icon-alert) center / contain no-repeat; }
.kas-wrap { --kas-icon-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E"); }
.kas-field-error[hidden] { display: none; }
.kas-input[aria-invalid="true"] { border-color: var(--kas-red-soft); box-shadow: inset 0 0 0 1px var(--kas-red-soft); }

/* Submit failed (lead-form.js): message + direct contact, answers kept. */
.kas-form-alert { margin-top: var(--kas-space-4); padding: var(--kas-space-4); background: var(--kas-black); border: 1px solid var(--kas-red-soft); border-radius: var(--kas-radius-card); }
.kas-form-alert[hidden] { display: none; }
.kas-form-alert-text { display: flex; align-items: flex-start; gap: var(--kas-space-2); margin-bottom: var(--kas-space-3); font-weight: 700; line-height: 1.45; color: var(--kas-red-soft); }

/* Side panel: "Qué pasa después". Black, like every surface that holds grey-600-bordered controls (3:1, WCAG 1.4.11). */
.kas-next { padding: var(--kas-space-5); background: var(--kas-black); border: 1px solid var(--kas-grey-700); border-radius: var(--kas-radius-card); }
.kas-next-title { margin-bottom: var(--kas-space-4); }
.kas-next-steps { list-style: none; }
.kas-next-step { display: grid; grid-template-columns: var(--kas-space-7) 1fr; gap: var(--kas-space-2); padding: var(--kas-space-3) 0; border-top: 1px solid var(--kas-grey-700); line-height: 1.55; color: var(--kas-grey-300); }
/* Red dot (the logo dot, as on the timeline) + the 01–03 label (§8). */
.kas-next-num { display: flex; align-items: center; gap: var(--kas-space-2); height: 1.55em; font-size: var(--kas-text-meta); font-weight: 500; color: var(--kas-grey-400); font-variant-numeric: tabular-nums; }
.kas-next-num::before { content: ''; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--kas-red); }
.kas-next-direct { margin-top: var(--kas-space-4); padding-top: var(--kas-space-5); border-top: 1px solid var(--kas-grey-700); }
.kas-next-direct-title { margin-bottom: var(--kas-space-3); font-weight: 700; color: var(--kas-white); }
.kas-next-links { display: flex; flex-wrap: wrap; gap: var(--kas-space-2); }
.kas-next-link { padding: 0 var(--kas-space-4); }
.kas-next-privacy { margin-top: var(--kas-space-5); font-size: var(--kas-text-meta); line-height: 1.6; color: var(--kas-grey-400); }

/* ==================== FOOTER ==================== */
.kas-footer-band { background: var(--kas-black); border-top: 1px solid var(--kas-grey-700); }
.kas-footer { max-width: calc(860px + 2 * var(--kas-gutter)); margin: 0 auto; padding: var(--kas-space-6) var(--kas-gutter); display: flex; flex-direction: column; align-items: flex-start; gap: var(--kas-space-4); }
.kas-footer-logo { height: 72px; }
.kas-footer-links { display: flex; flex-wrap: wrap; gap: 0 var(--kas-space-5); color: var(--kas-grey-400); }
.kas-footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.kas-footer-links a:hover { color: var(--kas-white); }
.kas-footer-copy { font-size: var(--kas-text-meta); color: var(--kas-grey-400); }

/* ==================== MOTION: section reveal ([data-reveal]) ====================
   CSS scroll-driven: fade + 12px rise over the first 20% of the element's entry.
   Section headings, service groups and timeline steps only. Transform/opacity only (§7).
   No support (e.g. Firefox), reduced motion or print = static. animation-timeline goes
   after the shorthand, which would reset it. */
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    [data-reveal] { animation: kas-reveal ease-out both; animation-timeline: view(); animation-range: entry 0% entry 20%; }
  }
}
@keyframes kas-reveal { from { opacity: 0; transform: translateY(12px); } }

/* ==================== TABLET (768px+) ==================== */
@media (min-width: 768px) {
  html { scroll-padding-top: 96px; }
  .kas-wrap { --kas-gutter: var(--kas-space-6); --kas-section-y: var(--kas-space-9); }
  .kas-nav { padding: var(--kas-space-3) var(--kas-space-6); }
  .kas-logo img { height: 36px; }
  .kas-nav-right { gap: var(--kas-space-4); }
  .kas-nav-phone-num { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .kas-nav-cta { padding: 0 var(--kas-space-4); font-size: 1rem; }
  .kas-nav-cta-extra { display: inline; }
  .kas-nav-cta .kas-btn-arrow { display: block; }

  .kas-form-section { padding-top: var(--kas-space-7); }
  .kas-compare-hint { display: none; }
  .kas-compare-table th, .kas-compare-table td { padding: var(--kas-space-4); }
  .kas-compare-table tr > :first-child { width: 20%; }
  .kas-compare-table thead .kas-compare-kas { width: 32%; }
  .kas-tech { padding-top: var(--kas-space-8); padding-bottom: var(--kas-space-8); }

  .kas-hero { padding-top: var(--kas-space-8); }
  .kas-hero-ctas { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: var(--kas-space-5); }
  .kas-trust { padding-top: var(--kas-space-7); padding-bottom: var(--kas-space-7); }
  .kas-trust-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--kas-space-5); }
  .kas-highlight-box { padding: var(--kas-space-6); }
  .kas-group { padding: var(--kas-space-6); }
  .kas-group-services { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--kas-space-6); }
  .kas-service + .kas-service { padding-top: 0; border-top: 0; }
  .kas-group-wine .kas-group-services { grid-template-columns: minmax(0, 1fr); }
  .kas-tabs { display: inline-grid; grid-template-columns: repeat(3, auto); justify-self: start; }
  .kas-tab { padding: 0 var(--kas-space-4); }

  .kas-calc-box { padding: var(--kas-space-6); }
  .kas-calc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--kas-space-2); }
  .kas-calc-stats > div { flex-direction: column-reverse; justify-content: flex-end; gap: var(--kas-space-1); padding: var(--kas-space-3) var(--kas-space-4); background: var(--kas-black); border: 1px solid var(--kas-grey-700); border-radius: var(--kas-radius-card); }

  .kas-team { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--kas-space-5); }
  .kas-team-card { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .kas-team-body { grid-column: auto; }

  .kas-cards { grid-template-columns: repeat(2, 1fr); gap: var(--kas-space-5); }
  .kas-cards.kas-cards-precios { grid-template-columns: 3fr 2fr; align-items: start; }
  .kas-card { padding: var(--kas-space-6); }
  .kas-form-box { padding: var(--kas-space-6); }
  .kas-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .kas-footer { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
  .kas-footer-copy { width: 100%; }
}

/* ==================== DESKTOP (1200px+) ==================== */
@media (min-width: 1200px) {
  .kas-nav { padding: var(--kas-space-3) var(--kas-space-7); }
  .kas-nav-links { display: flex; align-items: center; gap: var(--kas-space-2); margin: 0 auto 0 var(--kas-space-6); }
  .kas-nav-right .kas-lang-switch { display: inline; }
  .kas-menu-btn { display: none; }
  .kas-hero { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: center; column-gap: var(--kas-space-8); padding-top: var(--kas-space-9); padding-bottom: var(--kas-space-9); }
  .kas-trust-inner { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--kas-space-7); }
  .kas-trust-stats { gap: var(--kas-space-6); padding-right: var(--kas-space-7); border-right: 1px solid var(--kas-grey-700); }
  .kas-trust-list { padding-top: 0; border-top: 0; }
  .kas-group { padding: var(--kas-space-7); }
  .kas-form-section { max-width: calc(860px + 2 * var(--kas-gutter)); }
  .kas-form-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
  .kas-calc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .kas-calc-res { position: sticky; top: calc(var(--kas-nav-h, 69px) + var(--kas-space-4)); }
}
/* 1200–1439px: room for the "Calculadora" link — the phone shows as its icon; the number
   stays the link's accessible name (cta-phone-nav unchanged). Full number from 1440px.
   R5 "Equipo" needed 41px more in ES at 1200px: tighter spacing, never smaller type
   (nav padding = the 32px content gutter at this width). */
@media (min-width: 1200px) and (max-width: 1439px) {
  .kas-nav-phone-num { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .kas-nav { padding-left: var(--kas-space-6); padding-right: var(--kas-space-6); }
  .kas-nav-links { gap: 0; margin-left: var(--kas-space-4); }
  .kas-nav-right { gap: var(--kas-space-2); }
}

/* COOKIE BANNER — colours, font and radius only (CLAUDE.md §10: behaviour and copy unchanged). */
#kas-cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; background: var(--kas-black); border-top: 1px solid var(--kas-grey-700); padding: var(--kas-space-4); font-family: var(--kas-font-body); }
#kas-cookie-inner { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--kas-space-4); }
#kas-cookie-inner p { font-size: var(--kas-text-meta); color: var(--kas-grey-300); line-height: 1.6; margin: 0; font-family: inherit; }
#kas-cookie-btns { display: flex; flex-wrap: wrap; gap: var(--kas-space-2); }
#kas-cookie-btns button { flex: 1 1 auto; min-width: 140px; min-height: 44px; font-size: var(--kas-text-meta); padding: var(--kas-space-2) var(--kas-space-4); }
@media (min-width: 640px) {
  #kas-cookie-inner { flex-direction: row; align-items: center; }
  #kas-cookie-inner p { flex: 1; }
  #kas-cookie-btns { flex-shrink: 0; flex-wrap: nowrap; }
  #kas-cookie-btns button { flex: none; min-width: auto; }
}
