/* ==========================================================================
   Espiral · Soluciones de Crecimiento
   Design read: institutional + warm, light theme lock.
   Dials: VARIANCE 6 · MOTION 4 · DENSITY 4
   One accent (#6A47ED). One radius system (soft). Motion: transform/opacity/clip-path only.
   ========================================================================== */

:root {
  --bg: #f7f7fa;
  --surface: #ffffff;
  --ink: #17112b;
  --ink-2: #4a4560;
  --muted: #6e6984;
  --line: #e6e4ee;
  --accent: #6a47ed;
  --accent-soft: #efebfe;
  --deep: #2a0b45;          /* brand purple #4c0c76, deepened for dark panels */
  --deep-2: #3b1061;
  --brand-yellow: #ece058;  /* logo only + one highlighter mark */

  --r: 14px;
  --r-sm: 10px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; letter-spacing: -0.03em; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 10vw, 128px); }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); }

/* ---------- Type ---------- */
.display { font-size: clamp(2.5rem, 6.2vw, 4.75rem); letter-spacing: -0.045em; line-height: 0.98; }
.h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); letter-spacing: -0.04em; }
.h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -0.02em; line-height: 1.2; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-2); max-width: 56ch; line-height: 1.55; }
.body { color: var(--ink-2); max-width: 65ch; }
.small { font-size: 0.875rem; color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mark {
  background: linear-gradient(transparent 62%, var(--brand-yellow) 62%, var(--brand-yellow) 92%, transparent 92%);
  padding-inline: 0.05em;
}
.num { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 500; font-size: 0.95rem; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 200ms var(--ease-out); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--light { background: #fff; color: var(--deep); }
.btn--line-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.28); }
.btn--sm { --h: 40px; padding: 0 16px; font-size: 0.875rem; }
.btn--block { width: 100%; }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: #5a37e0; }
  .btn--dark:hover { background: #2a2342; }
  .btn--ghost:hover { border-color: var(--ink); }
  .btn--light:hover { background: #f1edff; }
  .btn--line-light:hover { border-color: #fff; }
  .btn:hover svg.arrow { transform: translateX(3px); }
}

.link {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--accent);
}
.link svg { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .link:hover svg { transform: translateX(3px); } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 247, 250, 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.nav { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo img { height: 38px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  padding: 8px 12px; border-radius: 8px; font-size: 0.925rem; color: var(--ink-2);
  transition: color 200ms ease, background-color 200ms ease;
}
.nav__links a[aria-current="page"] { color: var(--ink); background: rgba(23,17,43,0.05); }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { color: var(--ink); } }
.nav__cta { display: flex; align-items: center; gap: 8px; }
.nav__toggle {
  display: none; width: 44px; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); align-items: center; justify-content: center; cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.nav__toggle:active { transform: scale(0.95); }
.nav__toggle svg { width: 20px; height: 20px; }

.drawer {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
}
.drawer__scrim {
  position: absolute; inset: 0; background: rgba(23, 17, 43, 0.4); opacity: 0;
  transition: opacity 300ms ease;
}
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 380px);
  background: var(--surface); padding: 20px 20px 28px; display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%);
  transition: transform 400ms var(--ease-drawer);
}
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.drawer__panel > a:not(.btn) { padding: 14px 4px; font-size: 1.25rem; font-weight: 500; border-bottom: 1px solid var(--line); letter-spacing: -0.02em; }
.drawer__panel .btn { margin-top: auto; }

@media (max-width: 960px) {
  .nav__links, .nav__cta .btn--ghost { display: none; }
  .nav__toggle { display: inline-flex; }
}
@media (max-width: 420px) { .nav__cta .btn--primary { display: none; } }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(56px, 8vw, 96px); }
.hero__grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 24px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero__media { position: relative; }
.hero__img {
  aspect-ratio: 4 / 5; width: 100%; object-fit: cover; border-radius: var(--r);
  background: var(--line);
}
.chip-float {
  position: absolute; left: -24px; bottom: 32px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 18px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 2px rgba(23,17,43,0.04), 0 12px 32px -12px rgba(23,17,43,0.18);
}
.chip-float strong { font-size: 1.75rem; letter-spacing: -0.04em; line-height: 1; }
.chip-float span { font-size: 0.8125rem; color: var(--muted); line-height: 1.3; }
.chip-float--top { left: auto; right: -20px; top: 28px; bottom: auto; }
.chip-dot { width: 10px; height: 10px; border-radius: 50%; background: #1fb26b; box-shadow: 0 0 0 4px rgba(31,178,107,0.15); }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__img { aspect-ratio: 4 / 3; }
  .chip-float { left: 12px; bottom: 12px; }
  .chip-float--top { right: 12px; top: 12px; left: auto; bottom: auto; }
}

/* ---------- Marquee (only one per page) ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee__item {
  display: flex; align-items: center; gap: 28px; padding: 18px 28px 18px 0;
  font-size: clamp(1rem, 1.6vw, 1.25rem); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; color: var(--ink-2);
}
.marquee__item img { width: 22px; height: 22px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) { .marquee:hover .marquee__track { animation-play-state: paused; } }

/* ---------- Manifesto ---------- */
.manifesto { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.manifesto__quote { font-size: clamp(1.75rem, 3.6vw, 2.75rem); line-height: 1.12; letter-spacing: -0.035em; font-weight: 500; }
.manifesto__quote em { font-style: normal; color: var(--muted); }
.big-stat { display: flex; flex-direction: column; gap: 6px; }
.big-stat strong { font-size: clamp(5rem, 13vw, 10rem); line-height: 0.85; letter-spacing: -0.07em; font-weight: 600; color: var(--accent); }
@media (max-width: 860px) { .manifesto { grid-template-columns: 1fr; align-items: start; } }

/* ---------- Section head ---------- */
.s-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px 48px; margin-bottom: clamp(36px, 5vw, 56px); }
.s-head > div { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 760px) { .s-head { grid-template-columns: 1fr; } }

/* ---------- Audience tabs (clip-path technique) ---------- */
.tabs {
  position: relative; display: inline-grid; grid-auto-flow: column; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.tabs__list { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.tabs__btn {
  height: 40px; padding: 0 18px; border: 0; background: none; cursor: pointer; border-radius: 7px;
  font-size: 0.9rem; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
.tabs__list--active {
  position: absolute; inset: 4px; pointer-events: none;
  clip-path: inset(0 50% 0 0 round 7px);
  transition: clip-path 280ms var(--ease-out);
}
.tabs__list--active .tabs__btn { background: var(--ink); color: #fff; border-radius: 0; }
.tabs[data-active="1"] .tabs__list--active { clip-path: inset(0 0 0 50% round 7px); }
@media (max-width: 480px) { .tabs { display: grid; width: 100%; } .tabs__btn { padding: 0 10px; font-size: 0.84rem; } }

/* ---------- Services list ---------- */
.services { border-top: 1px solid var(--ink); }
.service {
  display: grid; grid-template-columns: 80px 1fr 1.3fr; gap: 24px 40px;
  padding: 32px 0; border-bottom: 1px solid var(--line); align-items: start;
}
.service__title { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -0.035em; line-height: 1.1; }
.service__body { display: grid; }
.service__body > * { grid-area: 1 / 1; transition: opacity 260ms ease, transform 260ms var(--ease-out), filter 260ms ease; }
.service__body > [hidden] { display: block; visibility: hidden; opacity: 0; transform: translateY(6px); filter: blur(2px); }
.service__body p { color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  font-size: 0.8125rem; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: #4a2fc0; white-space: nowrap;
}
.tag--neutral { background: rgba(23,17,43,0.05); color: var(--ink-2); }
@media (max-width: 860px) {
  .service { grid-template-columns: 48px 1fr; }
  .service__body { grid-column: 2; }
}

/* ---------- Industrial teaser (dark panel, page theme stays light) ---------- */
.panel-dark {
  background: var(--deep); color: #fff; border-radius: calc(var(--r) + 6px);
  padding: clamp(32px, 6vw, 72px); position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 64px); align-items: center;
}
.panel-dark .lead { color: rgba(255,255,255,0.74); }
.panel-dark .eyebrow { color: var(--brand-yellow); }
.panel-dark__spiral {
  position: absolute; right: -120px; bottom: -160px; width: 520px; opacity: 0.08; pointer-events: none;
}
.sector-list { display: grid; gap: 2px; position: relative; }
.sector-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; background: rgba(255,255,255,0.06); border-radius: var(--r-sm);
  font-weight: 500;
}
.sector-list li span { color: rgba(255,255,255,0.6); font-size: 0.875rem; font-weight: 400; text-align: right; }
@media (max-width: 860px) { .panel-dark { grid-template-columns: 1fr; } }

/* ---------- Case study ---------- */
.case { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(24px, 4vw, 48px); align-items: stretch; }
.case__img { border-radius: var(--r); overflow: hidden; }
.case__img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.case__side { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.stat { padding: 20px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat strong { display: block; font-size: clamp(2.25rem, 4vw, 3rem); letter-spacing: -0.05em; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.875rem; color: var(--muted); }
@media (max-width: 860px) { .case { grid-template-columns: 1fr; } }

/* ---------- Bento (exact cells) ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cell {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 28px; display: flex; flex-direction: column; gap: 12px; min-height: 220px;
}
.cell--a { grid-column: span 4; }
.cell--b { grid-column: span 2; }
.cell--c { grid-column: span 2; }
.cell--d { grid-column: span 4; }
.cell--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.cell--accent p { color: rgba(255,255,255,0.82); }
.cell--img { padding: 0; overflow: hidden; position: relative; }
.cell--img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cell__icon { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.cell--accent .cell__icon { background: rgba(255,255,255,0.16); color: #fff; }
.cell__icon svg { width: 20px; height: 20px; }
.cell h3 { margin-top: auto; }
.cell p { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .cell--a, .cell--d { grid-column: span 2; }
  .cell--b, .cell--c { grid-column: span 1; }
}
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
  .cell--a, .cell--b, .cell--c, .cell--d { grid-column: span 1; }
  .cell { min-height: 0; }
  .cell--img { min-height: 220px; }
}

/* ---------- Logos ---------- */
.logos { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.logos li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: 28px 16px; background: var(--surface); }
.logos img { max-height: 44px; width: auto; filter: grayscale(1); opacity: 0.7; transition: filter 200ms ease, opacity 200ms ease; }
@media (hover: hover) and (pointer: fine) { .logos li:hover img { filter: none; opacity: 1; } }
@media (max-width: 760px) { .logos { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Team / advisor cards ---------- */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.team--single { grid-template-columns: minmax(0, 360px); }
@media (max-width: 860px) { .team { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .team { grid-template-columns: 1fr; } }
.advisor-card {
  display: flex; flex-direction: column; gap: 14px; padding: 10px 10px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: transform 160ms var(--ease-out), border-color 200ms ease;
}
.advisor-card:active { transform: scale(0.985); }
.advisor-card__text { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-inline: 8px; }
.advisor-card__name { font-weight: 600; letter-spacing: -0.02em; font-size: 1.125rem; line-height: 1.25; }
.advisor-card__go {
  width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: rgba(23,17,43,0.05); color: var(--ink);
  transition: background-color 200ms ease, color 200ms ease;
}
.advisor-card__go svg { width: 18px; height: 18px; transition: transform 200ms var(--ease-out); }

/* Portrait: front photo, colour side shot crossfades in on hover (blur masks the swap) */
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-sm); overflow: hidden; background: #ececf0; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
.portrait__alt { opacity: 0; filter: blur(4px); transform: scale(1.04); transition: opacity 280ms ease, filter 280ms ease, transform 500ms var(--ease-out) !important; }
.portrait--empty { display: grid; place-items: center; background: var(--deep); }
@media (hover: hover) and (pointer: fine) {
  .advisor-card:hover { border-color: var(--ink); }
  .advisor-card:hover .portrait__alt { opacity: 1; filter: blur(0); transform: scale(1); }
  .advisor-card:hover .advisor-card__go { background: var(--accent); color: #fff; }
  .advisor-card:hover .advisor-card__go svg { transform: translateX(2px); }
}
@media (prefers-reduced-motion: reduce) { .portrait__alt { transform: none; filter: none; } }

.avatar {
  --s: 56px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center; background: var(--deep); color: var(--brand-yellow);
  font-weight: 600; letter-spacing: -0.02em; font-size: calc(var(--s) * 0.36);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 80px); }
.contact__info { display: flex; flex-direction: column; gap: 28px; }
.info-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.info-list li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-list .num { padding-top: 3px; }
.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(22px, 3.5vw, 36px); display: grid; gap: 16px; grid-template-columns: 1fr 1fr;
}
.form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.875rem; font-weight: 500; color: var(--ink); }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid #d6d3e1; border-radius: var(--r-sm);
  background: #fff; color: var(--ink); font: inherit; font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.textarea { height: 120px; padding: 12px 14px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #8d899e; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(106,71,237,0.14); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form__status { font-size: 0.9rem; color: #137a49; min-height: 1.4em; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 32px; background: var(--surface); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer__grid h4 { font-size: 0.8125rem; font-family: var(--mono); font-weight: 400; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.footer__grid li + li { margin-top: 8px; }
.footer__grid a { color: var(--ink-2); transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .footer__grid a:hover { color: var(--ink); } }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Industrial page ---------- */
.page-hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 72px); }
.page-hero__grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(28px, 5vw, 64px); align-items: end; }
.page-hero__grid .lead { justify-self: end; }
@media (max-width: 860px) { .page-hero__grid { grid-template-columns: 1fr; } .page-hero__grid .lead { justify-self: start; } }

.wide-img { border-radius: var(--r); overflow: hidden; }
.wide-img img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
@media (max-width: 640px) { .wide-img img { aspect-ratio: 4 / 3; } }

.segments { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.segment { padding: 24px 24px 24px 0; display: flex; flex-direction: column; gap: 10px; }
.segment + .segment { padding-left: 24px; border-left: 1px solid var(--line); }
.segment p { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 860px) {
  .segments { grid-template-columns: 1fr 1fr; }
  .segment:nth-child(3) { border-left: 0; padding-left: 0; }
  .segment:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .segments { grid-template-columns: 1fr; }
  .segment + .segment { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
}

.offer { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.offer .cell { min-height: 260px; }
.o-7 { grid-column: span 7; } .o-5 { grid-column: span 5; } .o-4 { grid-column: span 4; } .o-8 { grid-column: span 8; }
.cell ul.ticks { display: grid; gap: 6px; margin-top: 4px; }
.cell ul.ticks li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 0.95rem; }
.cell ul.ticks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 2px; background: var(--accent); }
.cell--accent ul.ticks li { color: rgba(255,255,255,0.86); }
.cell--accent ul.ticks li::before { background: var(--brand-yellow); }
.cell .from { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; }
.cell--accent .from { color: rgba(255,255,255,0.7); }
@media (max-width: 960px) { .o-7, .o-5, .o-4, .o-8 { grid-column: span 6; } }
@media (max-width: 640px) { .offer { grid-template-columns: 1fr; } .o-7, .o-5, .o-4, .o-8 { grid-column: span 1; } .offer .cell { min-height: 0; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: s; }
.step { padding-top: 20px; border-top: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; position: relative; }
.step::before { content: ""; position: absolute; top: -2px; left: 0; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 900ms var(--ease-in-out); }
.step.is-in::before { transform: scaleX(1); }
.step:nth-child(2)::before { transition-delay: 150ms; } .step:nth-child(3)::before { transition-delay: 300ms; } .step:nth-child(4)::before { transition-delay: 450ms; }
.step p { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; gap: 28px 12px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 1.125rem; font-weight: 500; letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; transition: transform 220ms var(--ease-out); color: var(--muted); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding-bottom: 22px; color: var(--ink-2); max-width: 70ch; }
.faq-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(32px, 6vw, 80px); }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* ---------- Profile (digital business card) ---------- */
.profile-page { background: var(--bg); }
.profile { max-width: 1080px; margin-inline: auto; padding: clamp(24px, 5vw, 56px) var(--gutter) 96px; display: grid; grid-template-columns: 380px 1fr; gap: clamp(20px, 3vw, 32px); align-items: start; }
.p-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px);
  overflow: hidden; position: sticky; top: 92px;
}
.p-card__cover { height: 112px; background: var(--deep); position: relative; overflow: hidden; }
.p-card__cover img { position: absolute; right: -40px; top: -60px; width: 240px; opacity: 0.16; }
.p-card__body { padding: 0 24px 24px; margin-top: -48px; position: relative; display: flex; flex-direction: column; gap: 16px; }
.p-card .avatar { --s: 96px; border: 4px solid var(--surface); }
.p-card__photo { padding: 10px 10px 0; }
.p-card__photo .portrait { aspect-ratio: 1 / 1; }
.p-card__photo .portrait img { object-position: 50% 18%; }
.p-card__body--photo { margin-top: 0; padding-top: 20px; }
@media (hover: hover) and (pointer: fine) {
  .p-card__photo:hover .portrait__alt { opacity: 1; filter: blur(0); transform: scale(1); }
}
.p-card__name { font-size: 1.625rem; letter-spacing: -0.035em; line-height: 1.1; }
.p-card__role { color: var(--ink-2); margin-top: 4px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--ink-2); }
.status .chip-dot { width: 8px; height: 8px; box-shadow: 0 0 0 3px rgba(31,178,107,0.15); }
.status.is-off .chip-dot { background: #b8b4c6; box-shadow: 0 0 0 3px rgba(184,180,198,0.25); }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px;
  border-radius: var(--r-sm); background: rgba(23,17,43,0.04); font-size: 0.75rem; font-weight: 500; color: var(--ink);
  border: 0; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.action svg { width: 20px; height: 20px; }
.action:active { transform: scale(0.95); }
.action--wa { background: #e7f7ee; color: #0d6b3c; }
@media (hover: hover) and (pointer: fine) { .action:hover { background: rgba(23,17,43,0.08); } .action--wa:hover { background: #d6f1e2; } }
.p-meta { display: grid; gap: 0; border-top: 1px solid var(--line); }
.p-meta li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.p-meta li span:first-child { color: var(--muted); }
.p-meta li span:last-child { text-align: right; word-break: break-word; }

.p-main { display: flex; flex-direction: column; gap: 12px; }
.p-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 16px; }
.p-block h2 { font-size: 1.25rem; letter-spacing: -0.025em; }
.p-services { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p-service { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-sm); background: rgba(23,17,43,0.03); }
.p-service .cell__icon { width: 36px; height: 36px; flex: none; }
.p-service strong { display: block; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.p-service span { font-size: 0.85rem; color: var(--muted); }
.p-split { display: grid; grid-template-columns: 1fr 200px; gap: 24px; align-items: center; }
.qr { width: 200px; height: 200px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; display: grid; place-items: center; }
.qr img, .qr canvas { width: 100% !important; height: 100% !important; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-sm); font-size: 0.9rem;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: transform 300ms var(--ease-out), opacity 200ms ease;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.proposal-note {
  background: #fffbe0; border: 1px dashed #d8c84a; color: #5c5310; border-radius: var(--r-sm);
  padding: 10px 14px; font-size: 0.85rem;
}
@media (max-width: 900px) {
  .profile { grid-template-columns: 1fr; }
  .p-card { position: static; }
}
@media (max-width: 560px) {
  .p-services { grid-template-columns: 1fr; }
  .p-split { grid-template-columns: 1fr; }
  .qr { margin-inline: auto; }
}

/* Sticky mobile action bar on profile */
.p-bar { display: none; }
@media (max-width: 900px) {
  .p-bar {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
}

/* ---------- Catálogo de servicios ---------- */
.search {
  position: relative; display: flex; align-items: center; max-width: 520px; width: 100%;
}
.search svg { position: absolute; left: 16px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search .input { height: 56px; padding-left: 48px; font-size: 1.05rem; border-radius: var(--r); background: var(--surface); }

.catnav {
  position: sticky; top: 72px; z-index: 30; background: rgba(247,247,250,0.88);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-block: 1px solid var(--line);
}
.catnav__list { display: grid; grid-template-columns: repeat(4, 1fr); }
.catnav a {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 16px 4px; font-weight: 500; font-size: 0.95rem;
  color: var(--ink-2); white-space: nowrap; transition: color 200ms ease;
}
.catnav a svg { width: 18px; height: 18px; flex: none; }
.catnav__count { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.catnav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 280ms var(--ease-out);
}
.catnav a.is-active { color: var(--ink); }
.catnav a.is-active::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .catnav a:hover { color: var(--ink); } }
@media (max-width: 860px) {
  .catnav__list { display: flex; overflow-x: auto; gap: 24px; scrollbar-width: none; }
  .catnav__list::-webkit-scrollbar { display: none; }
}

.cat { padding-top: clamp(56px, 8vw, 96px); scroll-margin-top: 120px; }
.cat-head {
  position: relative; overflow: hidden; background: var(--deep); color: #fff; border-radius: calc(var(--r) + 6px);
  padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end;
}
.cat-head__num {
  position: absolute; top: -0.12em; right: 0.04em; font-size: clamp(8rem, 22vw, 17rem); font-weight: 600; line-height: 1;
  letter-spacing: -0.08em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.14); pointer-events: none; user-select: none;
}
.cat-head__copy { position: relative; display: flex; flex-direction: column; gap: 16px; max-width: 60ch; }
.cat-head .cell__icon { background: rgba(255,255,255,0.12); color: var(--brand-yellow); }
.cat-head .lead { color: rgba(255,255,255,0.74); }
.cat-head__stats { position: relative; display: flex; gap: 32px; margin: 0; }
.cat-head__stats dt { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.cat-head__stats dd { margin: 4px 0 0; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: var(--brand-yellow); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .cat-head { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 0.875rem; color: var(--ink-2); transition: border-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}
.chip:active { transform: scale(0.97); }
@media (max-width: 760px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; flex: none; }
}
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--ink); color: var(--ink); } }

.sub { margin-top: clamp(40px, 5vw, 64px); scroll-margin-top: 140px; display: flex; flex-direction: column; gap: 14px; }
.sub__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }

/* Cards */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; display: flex; flex-direction: column; gap: 8px; min-height: 180px;
  transition: border-color 200ms ease;
}
.item__name { font-size: 1.075rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.item__desc { color: var(--ink-2); font-size: 0.925rem; line-height: 1.5; }
.item__foot { margin-top: auto; padding-top: 14px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.item:has([aria-pressed="true"]) { border-color: var(--accent); }

.price { display: flex; flex-direction: column; line-height: 1.15; }
.price strong { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price span { font-size: 0.8125rem; color: var(--muted); }

/* Add-to-quote button: plus morphs to check */
.add {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; flex: none;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  font-size: 0.8125rem; font-weight: 500; color: var(--ink);
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.add:active { transform: scale(0.95); }
.add svg { width: 16px; height: 16px; grid-area: 1 / 1; transition: opacity 180ms ease, transform 220ms var(--ease-out); }
.add__plus, .add__check { display: block; }
.add > svg + svg { margin-left: -22px; }
.add__check { opacity: 0; transform: scale(0.6); }
.add[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.add[aria-pressed="true"] .add__plus { opacity: 0; transform: rotate(90deg) scale(0.6); }
.add[aria-pressed="true"] .add__check { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) { .add:hover { border-color: var(--ink); } .add[aria-pressed="true"]:hover { background: #5a37e0; } }

/* Tiers */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tier {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px;
  display: flex; flex-direction: column; gap: 14px; transition: border-color 200ms ease;
}
.tier--mid { background: var(--accent-soft); border-color: #dcd3fd; }
.tier:has([aria-pressed="true"]) { border-color: var(--accent); }
.tier__level { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.tier .price strong { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }
.tier__scope { display: grid; gap: 6px; padding: 12px 0; border-block: 1px solid var(--line); }
.tier--mid .tier__scope { border-color: #dcd3fd; }
.tier__scope li { position: relative; padding-left: 20px; font-size: 0.875rem; font-weight: 500; }
.tier__scope li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 2px; background: var(--accent); }
.tier__desc { color: var(--ink-2); font-size: 0.875rem; line-height: 1.5; }
.tier .add { margin-top: auto; align-self: flex-start; }
@media (max-width: 860px) { .tiers { grid-template-columns: 1fr; } }

/* Compact price list */
.rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row__name { font-weight: 500; }
.row .price { text-align: right; }
.row .price strong { font-size: 1.05rem; }
.row .add { padding: 0; width: 36px; justify-content: center; }
.row .add__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 760px) { .rows { grid-template-columns: 1fr; } }

.empty { padding: 64px 0; text-align: center; color: var(--ink-2); }

/* Quote bar + drawer */
.qbar {
  position: fixed; left: 50%; bottom: 20px; z-index: 45; display: flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 18px; background: var(--ink); color: #fff; border-radius: calc(var(--r) + 2px);
  box-shadow: 0 16px 40px -12px rgba(23,17,43,0.45);
  transform: translate(-50%, calc(100% + 32px)); transition: transform 360ms var(--ease-out);
}
.qbar.is-on { transform: translate(-50%, 0); }
.qbar.is-on.is-hidden { transform: translate(-50%, calc(100% + 32px)); }
.qbar svg { width: 18px; height: 18px; }
.qbar__count { font-size: 0.925rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.drawer__panel--wide { width: min(94vw, 440px); overflow-y: auto; gap: 16px; }
.qlist { display: grid; gap: 0; border-top: 1px solid var(--line); }
.qlist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.qlist li > div { display: flex; flex-direction: column; gap: 2px; }
.qlist strong { font-weight: 500; line-height: 1.3; }
.qremove { width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: rgba(23,17,43,0.05); cursor: pointer; display: grid; place-items: center; transition: transform 160ms var(--ease-out); }
.qremove:active { transform: scale(0.92); }
.qremove svg { width: 14px; height: 14px; }
.qform { display: grid; gap: 12px; }
.qform .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.textlink { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 0.85rem; justify-self: start; }

/* ---------- Reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 1000ms var(--ease-in-out); }
.reveal-img.is-in { clip-path: inset(0 0 0 0); }
.no-js .reveal, .no-js .reveal-img { opacity: 1; transform: none; clip-path: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: opacity 300ms ease; }
  .reveal-img { clip-path: none; transition: none; }
  .marquee__track { animation: none; }
  .step::before { transform: scaleX(1); transition: none; }
  .drawer__panel { transition: none; }
  .service__body > * { transform: none !important; filter: none !important; }
}
