/* ============================================================
   KivoClas landing — design system (redesign 2026-09)
   Direction "A · Claro de producto" from the Claude Design handoff:
   light neutral ground, deep indigo for hero and closing band,
   lavender primary button, Inter with optical sizing, Phosphor icons.
   Every colour, size and radius below comes from the handoff tokens;
   pages take them through the --k-* semantic layer, never raw hex.
   ============================================================ */

:root {
  /* Tonal ramps (Nocturne, OKLCH-generated) */
  --n-100: #f3f5fe; --n-200: #e4e7f5; --n-300: #cfd3e5; --n-400: #b2b6ca;
  --n-500: #9397ab; --n-600: #75798c; --n-700: #595d6c; --n-800: #3f424d; --n-900: #292b31;
  --a-100: #f5f4ff; --a-200: #e7e5fe; --a-300: #d2cefd; --a-400: #b5abfc;
  --a-500: #968ae0; --a-600: #796cbf; --a-700: #5d5294; --a-800: #423a6a; --a-900: #2b2741;
  --section: #262a60; --section-glow: #353b80; --section-ghost: #4c5397;

  /* Semantic layer */
  --k-bg: var(--n-100);
  --k-alt: var(--n-200);
  --k-surface: var(--a-100);
  --k-text: var(--n-900);
  --k-muted: var(--n-700);
  --k-line: var(--n-300);
  --k-accent: var(--a-700);
  --k-accent-tint: var(--a-200);
  --k-btn-bg: var(--a-200);
  --k-btn-hover: var(--a-300);
  --k-btn-line: var(--a-700);
  --k-btn-text: var(--a-800);
  --k-phone: var(--n-900);
  --k-wa: #128C7E;
  --k-wa-bright: #25D366;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-md: 8px;
  --radius-lg: 14px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-pad: clamp(56px, 9vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--k-bg); color: var(--k-text);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  font-optical-sizing: auto; font-kerning: normal; text-rendering: optimizeLegibility;
  font-feature-settings: "ss02";
}
img { display: block; max-width: 100%; }
a { color: var(--k-accent); text-underline-offset: 3px; }
a:hover { color: var(--a-800); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--a-700) 25%, transparent); }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }

.icon { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: middle; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-pad) 0; }
.section--alt { background: var(--k-alt); }
.stack { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }
.head { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }

.kicker {
  font-size: 16px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--k-accent);
}
.h1 {
  font-size: clamp(34px, 6.4vw, 60px); line-height: 1.12; letter-spacing: -0.02em;
  hyphens: auto; overflow-wrap: break-word; text-wrap: balance;
}
.h2 {
  font-size: clamp(28px, 4.4vw, 42px); line-height: 1.16; letter-spacing: -0.015em;
  hyphens: auto; overflow-wrap: break-word; text-wrap: balance;
}
.h3 { font-size: 21px; line-height: 1.25; }
.lead { font-size: clamp(18px, 2vw, 20px); line-height: 1.5; max-width: 30em; text-wrap: pretty; }
.body { font-size: 17px; line-height: 1.55; color: var(--k-muted); text-wrap: pretty; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: var(--radius-md);
  font: inherit; font-size: 18px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { font-size: 20px; }
/* on light ground */
.btn--primary { background: var(--k-btn-bg); border-color: var(--k-btn-line); color: var(--k-btn-text); }
.btn--primary:hover { background: var(--k-btn-hover); color: var(--k-btn-text); }
/* on the indigo band */
.btn--on-dark { background: var(--a-200); color: var(--section); border: 0; }
.btn--on-dark:hover { background: var(--a-300); color: var(--section); }
.btn--ghost-dark {
  border: 1px solid var(--section-ghost); padding: 12px 22px; font-weight: 500;
  background: color-mix(in srgb, var(--n-100) 6%, transparent); color: var(--n-100); text-align: left;
}
.btn--ghost-dark:hover { background: color-mix(in srgb, var(--n-100) 14%, transparent); color: var(--n-100); }
.btn--ghost-dark .icon { font-size: 24px; color: var(--k-wa-bright); }
.btn--wa {
  min-height: 60px; padding: 14px 20px; border-color: var(--k-wa);
  background: color-mix(in srgb, var(--k-wa) 8%, transparent); color: var(--k-text);
}
.btn--wa:hover { background: color-mix(in srgb, var(--k-wa) 16%, transparent); color: var(--k-text); }
.btn--wa .icon { font-size: 28px; color: var(--k-wa); }
.btn--wa-square { width: 56px; height: 56px; padding: 0; border-color: var(--k-wa); color: var(--k-wa); background: transparent; }
.btn--wa-square:hover { background: color-mix(in srgb, var(--k-wa) 12%, transparent); color: var(--k-wa); }
.btn--wa-square .icon { font-size: 28px; }
.btn--block { width: 100%; }
.btn-label { overflow-wrap: anywhere; }

/* ---------- hero (indigo band) ---------- */
.band {
  background: radial-gradient(120% 80% at 90% 0%, var(--section-glow), transparent 60%), var(--section);
  color: var(--n-100);
}
.band--close { background: radial-gradient(90% 120% at 0% 100%, var(--section-glow), transparent 60%), var(--section); }
.nav { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--n-100); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--n-100); }
.brand-logo { width: 32px; height: 32px; flex: none; }
.brand-name { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.nav-links { display: none; gap: 28px; }
.nav-links a { color: var(--n-200); text-decoration: none; font-size: 16px; display: inline-flex; align-items: center; gap: 6px; }
.nav-links a:hover { color: var(--n-100); }
.nav-enter { display: flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--n-100); font-size: 16px; font-weight: 500; text-underline-offset: 4px; }
.nav-enter:hover { color: var(--n-100); }
@media (min-width: 768px) { .nav-links { display: flex; } }

.hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 40px clamp(40px, 6vw, 96px); padding: clamp(28px, 6vw, 72px) 0 0; }
.hero-copy { flex: 1 1 380px; max-width: 620px; display: flex; flex-direction: column; gap: 20px; padding-bottom: clamp(8px, 4vw, 72px); }
.hero-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--a-300); }
.hero-eyebrow .icon { font-size: 20px; }
.hero .lead { color: var(--n-300); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.hero-actions--column { flex-direction: column; align-items: flex-start; }
.hero-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 16px; color: var(--n-300); }
.hero-note .icon { font-size: 18px; }
.hero-note .dot { opacity: 0.5; }

/* ---------- phone frames ---------- */
.phone { margin: 0; display: flex; flex-direction: column; gap: 12px; width: clamp(230px, 26vw, 290px); flex: none; }
.phone-body {
  position: relative; aspect-ratio: 9 / 19; border-radius: 38px; background: var(--n-900); padding: 8px;
  box-shadow: 0 0 0 1px var(--section-ghost), 0 30px 80px -20px var(--section-ghost);
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: var(--n-200); }
/* App screenshots carry no status bar: start them below the notch, on the app's own header grey */
.phone-screen:has(.shot) { background: #f4f4f5; }
.phone-screen .shot { top: 34px; height: calc(100% - 34px); }
.phone-notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 76px; height: 22px; border-radius: 12px; background: var(--n-900); pointer-events: none;
}
.phone figcaption { margin: 0 0 24px; font-size: 16px; color: var(--n-300); }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center;
  font-size: 14px; line-height: 1.4; color: var(--n-600);
  background: repeating-linear-gradient(135deg, var(--n-200) 0 12px, var(--n-100) 12px 24px);
}

.rail {
  display: flex; gap: clamp(20px, 3vw, 40px); overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail-item { flex: 1 0 250px; max-width: 320px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 20px; margin: 0; }
.crop { position: relative; aspect-ratio: 9 / 16; border-radius: 30px 30px 0 0; background: var(--k-phone); padding: 8px 8px 0; overflow: hidden; }
.crop-screen { position: relative; width: 100%; height: 100%; border-radius: 22px 22px 0 0; overflow: hidden; background: var(--k-alt); }
.rail-item figcaption { margin: 0; font-size: 17px; line-height: 1.4; }
.rail-item figcaption strong { font-weight: 500; }
.rail-item figcaption span { color: var(--k-muted); }

.step { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--k-accent); color: var(--k-accent);
  display: grid; place-items: center; font-weight: 600; font-size: 17px;
}
.step-text { display: flex; flex-direction: column; gap: 4px; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.grid--contrast { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.icon-tile {
  width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--k-accent-tint); color: var(--k-accent);
  display: grid; place-items: center; flex: none;
}
.icon-tile .icon { font-size: 26px; }
.feature { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: var(--radius-lg); background: var(--k-bg); border: 1px solid var(--k-line); }
.feature-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feature h3 { font-size: 20px; line-height: 1.25; }
.tag { display: inline-flex; align-items: center; font-size: 16px; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--k-line); color: var(--k-muted); }

.industry {
  display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 16px 18px; border-radius: var(--radius-lg);
  background: var(--k-bg); border: 1px solid var(--k-line); color: var(--k-text); text-decoration: none;
}
.industry:hover { border-color: var(--k-accent); color: var(--k-text); }
.industry-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.industry-title { font-size: 19px; font-weight: 500; line-height: 1.25; }
.industry-sub { font-size: 16px; color: var(--k-muted); line-height: 1.45; }
.industry > .icon { font-size: 22px; color: var(--k-accent); }

.contrast { display: flex; flex-direction: column; border-radius: var(--radius-lg); border: 1px solid var(--k-line); background: var(--k-surface); }
.contrast-row { display: flex; gap: 14px; padding: 20px 20px 18px; }
.contrast-row + .contrast-row { padding: 18px 20px 22px; }
.contrast-row > .icon { font-size: 26px; color: var(--k-muted); }
.contrast-row--yes > .icon { color: var(--k-accent); }
.contrast-label { font-size: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--k-muted); }
.contrast-row--yes .contrast-label { color: var(--k-accent); }
.contrast-row p { font-size: 17px; line-height: 1.55; color: var(--k-muted); text-wrap: pretty; }
.contrast-row--yes p { font-size: 18px; line-height: 1.4; font-weight: 500; color: var(--k-text); }
.contrast-copy { display: flex; flex-direction: column; gap: 4px; }

/* Rules fade at both ends — the design's signature separator */
.fade-rule { height: 1px; background: linear-gradient(to right, transparent, var(--k-line) 48px, var(--k-line) calc(100% - 48px), transparent); }

/* ---------- promoter ---------- */
.promoter-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(28px, 4vw, 48px) 64px; }
.promoter-intro { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; }
.promoter-card {
  flex: 1 1 340px; max-width: 520px; display: flex; flex-direction: column; gap: 20px; padding: 24px;
  border-radius: var(--radius-lg); background: var(--k-bg); border: 1px solid var(--k-line);
  box-shadow: 0 20px 40px -28px color-mix(in srgb, var(--section) 45%, transparent);
}
.promoter-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.avatar {
  position: relative; flex: none; width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
  background: var(--k-accent-tint); color: var(--k-accent); display: grid; place-items: center; font-size: 32px; font-weight: 500;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promoter-name { font-size: 24px; line-height: 1.2; font-weight: 500; overflow-wrap: anywhere; text-wrap: balance; }
.promoter-phone { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--k-muted); }

/* ---------- FAQ (native details, one open at a time via site.js) ---------- */
.faq-wrap { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 48px) 64px; }
.faq-head { flex: 1 1 280px; display: flex; flex-direction: column; gap: 10px; }
.faq-list { flex: 2 1 460px; display: flex; flex-direction: column; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 14px 0;
  font-size: 19px; font-weight: 500; line-height: 1.3; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--k-accent); }
.faq-toggle {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--k-line);
  display: grid; place-items: center; color: var(--k-accent);
}
.faq-toggle .icon { font-size: 18px; }
.faq .i-minus { display: none; }
.faq[open] .i-minus { display: inline-block; }
.faq[open] .i-plus { display: none; }
.faq-answer { padding: 0 52px 22px 0; font-size: 17px; line-height: 1.6; color: var(--k-muted); text-wrap: pretty; }
.faq-answer a { color: var(--k-accent); }

/* ---------- closing band ---------- */
.close { padding: clamp(56px, 9vw, 104px) 0; }
.close .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.close-title { font-size: clamp(30px, 5vw, 48px); line-height: 1.14; letter-spacing: -0.015em; max-width: 16em; hyphens: auto; overflow-wrap: break-word; text-wrap: balance; }
.close p { font-size: 18px; line-height: 1.5; color: var(--n-300); max-width: 28em; }
.close .hero-actions { margin-top: 8px; }

/* ---------- footer ---------- */
.footer { padding: 40px 0 48px; }
.footer .wrap { display: flex; flex-direction: column; gap: 24px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.footer-brand .brand-logo { width: 28px; height: 28px; }
.footer-brand-row { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 500; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 16px; color: var(--k-text); }
.footer-legal { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--k-muted); }
.footer-legal a { color: var(--k-muted); }
.lang { display: flex; gap: 4px; font-size: 16px; color: var(--k-muted); align-items: center; }
.lang button {
  font: inherit; font-size: 16px; background: none; border: 0; padding: 10px 4px; min-height: 44px;
  color: var(--k-muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.lang button[aria-pressed="true"] { color: var(--k-text); font-weight: 600; text-decoration: none; }

/* ---------- sticky mobile CTA ---------- */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--k-bg);
  box-shadow: 0 -1px 0 var(--k-line), 0 -12px 24px -12px color-mix(in srgb, var(--section) 25%, transparent);
  transform: translateY(110%); transition: transform 0.2s ease;
}
.sticky .btn--primary { flex: 1; }
.sticky.is-visible { transform: none; }
.sticky-spacer { height: 84px; }
@media (min-width: 768px) { .sticky, .sticky-spacer { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .sticky { transition: none; } }

/* Promoter-only elements stay hidden until site.js resolves a known promoter code */
html:not(.has-promoter) [data-promoter] { display: none !important; }
html.has-promoter [data-no-promoter] { display: none !important; }
