/* ==========================================================================
   Avanzza · Inicio (componentes propios). Requiere site.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   7. Hero + growth flow
   -------------------------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(3.5rem, 8vw, 6.5rem); padding-bottom: clamp(3rem, 6vw, 5rem); overflow: clip; }
.hero-inner { display: grid; justify-items: center; text-align: center; }
.hero-title {
  max-width: 14ch;
  font-size: var(--fs-h1);
  line-height: 1;
  letter-spacing: -0.032em;
}
.hero-title em { letter-spacing: -0.02em; }
.hero-sub { max-width: 50ch; margin-top: var(--space-6); font-size: clamp(15px, 1.15vw, 17px); line-height: 1.7; color: var(--graphite); }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: 36px; }

.flow { margin-top: clamp(3rem, 6vw, 4.5rem); }
.flow-svg { width: 100%; height: auto; overflow: visible; }
.flow-svg--tall { display: none; }
.flow-curve { fill: none; stroke: var(--ash); stroke-width: 1.25; }
.flow-node rect { fill: var(--paper); stroke: var(--ash); stroke-width: 1; }
.flow-node text {
  fill: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.flow-icon { fill: none; stroke: var(--graphite); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hub-diamond { fill: var(--paper); stroke: var(--ash); stroke-width: 1; }
.hub-diamond-inner { fill: color-mix(in oklab, var(--accent) 7%, var(--paper)); stroke: color-mix(in oklab, var(--accent) 40%, var(--ash)); stroke-width: 1; }
.hub-mark path { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hub-label {
  fill: var(--graphite);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.stop-accent { stop-color: var(--accent); }
.flow-chip rect { fill: var(--paper); stroke: color-mix(in oklab, var(--accent) 55%, var(--ash)); stroke-width: 1; }
.flow-chip circle { fill: var(--accent); }
.flow-svg--tall .flow-chip text { font-size: 9.5px; }
.flow-chip text { fill: var(--ink); font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   8. Platforms marquee
   -------------------------------------------------------------------------- */
.platforms { padding-block: var(--space-6) var(--space-4); }
.platforms-label { font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--graphite); }
.marquee {
  margin-top: var(--space-5);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  padding: var(--space-4) 0;
  list-style: none;
}
.marquee-track li { display: inline-flex; align-items: center; gap: 12px; padding-right: clamp(3rem, 6vw, 5.5rem); color: var(--ink); }
.marquee-track .logo { width: 26px; height: 26px; }
.marquee-track span { font-family: var(--font-serif); font-size: 26px; line-height: 1; letter-spacing: -0.02em; }

/* --------------------------------------------------------------------------
   9. Pillars: sticky stack
   -------------------------------------------------------------------------- */
.stack { display: grid; gap: clamp(1.5rem, 3.5vw, 3rem); margin-top: clamp(3.5rem, 7vw, 6rem); }
.pillar {
  position: sticky;
  top: calc(var(--header-h) + 20px + var(--i) * 14px);
}
.pillar-card {
  --dim: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  min-height: min(660px, calc(100svh - var(--header-h) - 64px));
  padding: clamp(28px, 4vw, 60px);
  border-radius: var(--radius-panel);
  background-color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--ash), var(--shadow-soft);
  overflow: hidden;
  isolation: isolate;
  transform-origin: 50% 0%;
}
.pillar-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background-color: #11100f;
  opacity: var(--dim);
  pointer-events: none;
}
.pillar-wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(56% 70% at 88% 34%, color-mix(in oklab, var(--wash) 78%, transparent), transparent 72%),
    radial-gradient(38% 48% at 4% 104%, color-mix(in oklab, var(--wash) 45%, transparent), transparent 72%);
  opacity: calc(0.62 * var(--wash-o));
}
.pillar--marketing { --wash: var(--wash-sand); }
.pillar--sistema { --wash: var(--wash-teal); }
.pillar--software { --wash: var(--wash-sky); }
.pillar--ia { --wash: #139595; }

.pillar-copy { position: relative; z-index: 1; }
.pillar-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.pillar-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--ash);
}
.pillar-icon .icon { width: 18px; height: 18px; }
.pillar-title { max-width: 13ch; margin-top: var(--space-5); font-size: var(--fs-h3); line-height: 1.02; letter-spacing: -0.028em; }
.pillar-text { max-width: 44ch; margin-top: 20px; line-height: 1.7; color: var(--graphite); }
.pillar-copy .pill { margin-top: 36px; }
.pillar-visual { position: relative; z-index: 1; align-self: stretch; min-height: 440px; }


/* Marketing: orbits */
.pv-orbit { --size: min(400px, 100%); display: grid; place-items: center; }
.orbit-rings { position: absolute; top: 50%; left: 50%; width: var(--size); height: var(--size); margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2); }
.orbit-rings circle { fill: none; stroke: var(--line-ink); stroke-width: 1; stroke-dasharray: 1.5 6; stroke-linecap: round; }
.orbit { --spin: 0deg; position: absolute; top: 50%; left: 50%; width: 0; height: 0; }
.orbit--1 { --r: calc(var(--size) * 0.305); }
.orbit--2 { --r: calc(var(--size) * 0.43); }
.orbit-item {
  position: absolute;
  top: -28px;
  left: -28px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--ink);
  background-color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--ash), 0 12px 24px -14px rgba(29, 28, 27, 0.45);
  transform: rotate(calc(var(--a) + var(--spin))) translateX(var(--r)) rotate(calc(-1 * (var(--a) + var(--spin))));
}
.orbit-item .logo { width: 24px; height: 24px; }
.orbit-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: calc(var(--size) * 0.3);
  height: calc(var(--size) * 0.3);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 1.7vw, 1.5rem);
  font-style: italic;
  color: var(--paper);
  background-color: var(--ink);
  box-shadow: 0 0 0 12px color-mix(in oklab, var(--wash) calc(40% * var(--wash-o)), transparent), 0 24px 48px -20px rgba(29, 28, 27, 0.55);
}
.float-chip--a { top: 8%; left: 0; }
.float-chip--b { top: 20%; right: 0; }
.float-chip--c { bottom: 6%; left: 14%; }

/* All-in-one system: customer journey */
.pv-journey { min-height: 480px; }
.journey-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.journey-track { fill: none; stroke: var(--line-ink); stroke-width: 1.25; stroke-dasharray: 2 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.journey-live { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.journey-steps { position: absolute; inset: 0; list-style: none; }
.journey-steps li {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  background-color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--ash), 0 12px 24px -16px rgba(29, 28, 27, 0.4);
}
.journey-steps .icon { width: 16px; height: 16px; }
.journey-steps li.is-hot { color: var(--paper); background-color: var(--ink); box-shadow: 0 16px 32px -16px rgba(29, 28, 27, 0.55); }
.journey-steps li.is-hot .icon { color: var(--accent); }

/* Automation & AI: the night card */
.pillar--ia .pillar-card {
  color: #9da7ba;
  background-color: var(--night);
  box-shadow: inset 0 0 0 1px rgba(186, 215, 247, 0.14), 0 40px 80px -40px rgba(5, 6, 15, 0.7);
}
.pillar--ia .pillar-wash {
  background:
    radial-gradient(50% 60% at 78% 50%, rgba(43, 182, 177, 0.26), transparent 70%),
    linear-gradient(rgba(186, 215, 247, 0.05) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, rgba(186, 215, 247, 0.05) 1px, transparent 1px) 0 0 / 44px 100%;
  opacity: 1;
}
.pillar--ia .pillar-label,
.pillar--ia .pillar-title { color: #f3f8fe; }
.pillar--ia .pillar-text { color: #9da7ba; }
.pillar--ia .pillar-icon { color: #f3f8fe; background-color: rgba(152, 192, 239, 0.08); box-shadow: inset 0 0 0 1px rgba(186, 215, 247, 0.16); }
.pillar--ia .tags li { color: #d1e4fa; background-color: rgba(152, 192, 239, 0.06); box-shadow: inset 0 0 0 1px rgba(186, 215, 247, 0.16); }
.pillar--ia .pill--accent { background-color: #139595; color: #041212; }
.pillar--ia .pill--accent:hover { background-color: #2bb6b1; }
.pv-chat { display: grid; place-items: center; }
.chat-window {
  display: grid;
  gap: 10px;
  width: min(100%, 390px);
  padding: 18px;
  border-radius: 20px;
  font-size: 13px;
  line-height: 1.5;
  background-color: #0b0e1c;
  box-shadow: inset 0 1px 1px rgba(216, 236, 248, 0.18), inset 0 0 0 1px rgba(186, 215, 247, 0.12), 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.chat-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: #9da7ba;
  box-shadow: inset 0 -1px 0 rgba(186, 215, 247, 0.12);
}
.chat-time { margin-left: auto; }
.chat-dot { width: 7px; height: 7px; border-radius: 50%; background-color: #4cc38a; box-shadow: 0 0 0 3px rgba(76, 195, 138, 0.18); }
.chat-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; }
.chat-msg--in { justify-self: start; color: #d1e4fa; background-color: rgba(152, 192, 239, 0.08); box-shadow: inset 0 0 0 1px rgba(186, 215, 247, 0.12); border-bottom-left-radius: 4px; }
.chat-msg--out { justify-self: end; color: #f3f8fe; background-color: #1b2a44; border-bottom-right-radius: 4px; }
.chat-event {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #041212;
  background-color: #3cc4c0;
  box-shadow: 0 8px 24px -8px rgba(60, 196, 192, 0.55);
}
.chat-event .icon { width: 15px; height: 15px; stroke-width: 1.8; }
.float-chip--night { right: 2%; bottom: 10%; color: #f3f8fe; background-color: #0b0e1c; box-shadow: inset 0 0 0 1px rgba(186, 215, 247, 0.18), 0 16px 32px -16px rgba(0, 0, 0, 0.8); }
.float-chip--night .icon { color: #3cc4c0; }

/* Custom systems: blueprint */
.pv-blueprint { display: grid; place-items: center; }
.bp-window {
  width: min(100%, 470px);
  border-radius: 18px;
  overflow: hidden;
  background-color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--ash), 0 30px 60px -30px rgba(29, 28, 27, 0.4);
}
.bp-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; box-shadow: inset 0 -1px 0 var(--ash); }
.bp-bar i { width: 9px; height: 9px; border-radius: 50%; background-color: var(--ash); }
.bp-bar span { margin-left: auto; font-size: 11px; letter-spacing: 0.02em; color: var(--graphite); }
.bp-body {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  min-height: 250px;
  background:
    linear-gradient(color-mix(in oklab, var(--wash-sky) 22%, transparent) 1px, transparent 1px) 0 0 / 100% 24px,
    linear-gradient(90deg, color-mix(in oklab, var(--wash-sky) 22%, transparent) 1px, transparent 1px) 0 0 / 24px 100%;
}
.bp-side { display: grid; align-content: start; gap: 12px; padding: 18px 12px; box-shadow: inset -1px 0 0 var(--ash); background-color: var(--paper); }
.bp-side span { height: 8px; border-radius: 4px; background-color: var(--ash); }
.bp-side span:first-child { background-color: var(--ink); }
.bp-main { display: grid; gap: 14px; padding: 16px; }
.bp-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bp-kpi { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background-color: var(--paper); box-shadow: inset 0 0 0 1px var(--ash); }
.bp-kpi small { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite); }
.bp-spark { display: flex; align-items: flex-end; gap: 3px; height: 30px; }
.bp-spark i { flex: 1; height: var(--h); border-radius: 2px 2px 0 0; background-color: color-mix(in oklab, var(--wash-sky) 75%, var(--ink)); transform-origin: bottom center; }
.bp-spark i:last-child { background-color: var(--ink); }
.bp-chart { width: 100%; height: 110px; overflow: visible; }
.bp-grid { fill: none; stroke: var(--ash); stroke-width: 1; stroke-dasharray: 2 5; vector-effect: non-scaling-stroke; }
.bp-line { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.float-chip--d { right: 0; bottom: 8%; }

/* --------------------------------------------------------------------------
   10. Connect panel (integrations rail)
   -------------------------------------------------------------------------- */
.connect.section { padding-top: clamp(3rem, 6vw, 6rem); }
.connect-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: var(--space-6);
  min-height: 580px;
  padding: clamp(32px, 5vw, 72px);
  border-radius: 40px;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--periwinkle);
}
.connect-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(34% 58% at 104% 62%, color-mix(in oklab, var(--wash-teal) 95%, transparent), transparent 72%);
  opacity: calc(0.85 * var(--wash-o));
}
.connect-copy { display: grid; justify-items: start; gap: var(--space-5); }
.connect-copy h2 { max-width: 12ch; }
.connect-rail {
  position: relative;
  height: 560px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
}
.rail-chevrons { position: absolute; inset: 0; width: 100%; height: 100%; }
.rail-chevrons path { fill: none; stroke: color-mix(in oklab, var(--ink) 16%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rail-list { position: relative; display: grid; gap: 18px; padding-top: 24px; list-style: none; }
.rail-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.3vw, 2.125rem);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--ink);
}
.connect-rail.is-live .rail-list { position: absolute; inset: 0; padding: 0; }
.connect-rail.is-live .rail-list li { position: absolute; top: 0; left: 0; will-change: transform; }
.rail-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 50%;
  color: var(--ink);
  background-color: var(--paper);
  box-shadow: 0 8px 20px -12px rgba(29, 28, 27, 0.4);
}
.rail-logo .logo { width: 24px; height: 24px; }

/* --------------------------------------------------------------------------
   11. Why cards
   -------------------------------------------------------------------------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.why-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 270px;
  padding: clamp(28px, 3.2vw, 40px);
  border-radius: var(--radius-card);
  overflow: hidden;
  isolation: isolate;
  box-shadow: inset 0 0 0 1px var(--line-ink);
}
.why-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(46% 64% at 12% 16%, color-mix(in oklab, var(--wash) 85%, transparent), transparent 72%);
  opacity: calc(0.75 * var(--wash-o));
  transform-origin: 12% 16%;
  transition: opacity 0.5s var(--ease-out), transform 0.8s var(--ease-out);
}
.why-card:hover::before { opacity: var(--wash-o); transform: scale(1.12); }
.why-card--sky { --wash: var(--wash-sky); }
.why-card--sand { --wash: var(--wash-sand); }
.why-card--teal { --wash: var(--wash-teal); }
.why-card--lilac { --wash: var(--wash-lilac); }
.why-icon { color: var(--ink); }
.why-icon .icon { width: 28px; height: 28px; stroke-width: 1.4; }
.why-card h3 { margin-top: var(--space-3); font-size: clamp(1.5rem, 2.1vw, 1.875rem); line-height: 1.15; letter-spacing: -0.018em; }
.why-card p { max-width: 50ch; font-size: 14.5px; line-height: 1.7; color: var(--graphite); }

/* --------------------------------------------------------------------------
   12. Responsive (inicio)
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .pillar { position: relative; top: auto; }
  .pillar-card { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .pillar-visual { min-height: 400px; }
  .pv-journey { min-height: 440px; }
  .connect-panel { grid-template-columns: minmax(0, 1fr); }
  .connect-rail { height: 440px; }
}

@media (max-width: 767px) {
  .hero-ctas { flex-direction: column; width: 100%; max-width: 380px; }
  .hero-ctas .pill { width: 100%; }
  .flow-svg--wide { display: none; }
  .flow-svg--tall { display: block; max-width: 420px; margin-inline: auto; }
  .marquee-track span { font-size: 22px; }
  .pillar-card { padding: 24px 20px 28px; border-radius: 28px; }
  .pillar-title { font-size: clamp(2rem, 9vw, 2.5rem); }
  .pillar-visual { min-height: 340px; }
  .pv-orbit { --size: min(320px, 100%); }
  .orbit-item { width: 46px; height: 46px; top: -23px; left: -23px; }
  .orbit-item .logo { width: 20px; height: 20px; }
  .pv-journey { min-height: 420px; }
  .journey-steps li { height: 34px; padding: 0 12px; font-size: 10px; gap: 6px; }
  .journey-steps li:nth-child(odd) { left: 32%; }
  .journey-steps li:nth-child(even) { left: 66%; }
  .journey-steps .icon { width: 14px; height: 14px; }
  .bp-kpi small { font-size: 9.5px; }
  .connect-panel { padding: 28px 20px; border-radius: 28px; }
  .connect-rail { height: 380px; }
  .rail-list li { font-size: 1.375rem; gap: 12px; }
  .rail-logo { width: 44px; height: 44px; }
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .why-card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

@media (forced-colors: active) {
  .pillar-wash,
  .why-card::before,
  .connect-panel::after { display: none; }
}
