/* ═══════════════════════════════════════════════════════════════
   ADAPTIA — home.css
   Estilos exclusivos de index.html
═══════════════════════════════════════════════════════════════ */

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-top: clamp(6rem, 14vh, 10rem); /* clear fixed navbar on short viewports */
  padding-bottom: 8vh;
  overflow: hidden;
}

/* Canvas del océano */
#ocean-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Capa de oscuridad profunda encima del canvas */
.hero__depth {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 50% at 50% 70%, rgba(2,12,27,0) 0%, rgba(1,8,16,0.85) 100%),
    linear-gradient(to top, var(--bg-abyss) 0%, transparent 60%);
}

/* Grid perspectiva */
.hero__grid {
  position: absolute;
  inset: 0; z-index: 2;
  background-image:
    linear-gradient(var(--blue-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--blue-border) 1px, transparent 1px);
  background-size: 70px 70px;
  transform: perspective(600px) rotateX(35deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, black 0%, transparent 65%);
  opacity: 0.5;
}

/* Glow central de horizonte */
.hero__horizon {
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 100vw);
  height: 200px;
  background: radial-gradient(ellipse 80% 100% at 50% 100%, var(--blue-glow-lg), transparent);
  z-index: 3;
  pointer-events: none;
}

/* Contenido del hero */
.hero__content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 1000px;
  padding: 0 1.5rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(14,165,233,0.08);
  border: 1px solid var(--blue-border);
  border-radius: 100px;
  padding: 0.45rem 1.1rem;
  margin-bottom: 2.25rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.3s forwards;
}
.hero__badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
  animation: breathe 2.5s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.4; transform: scale(0.65); }
}

.hero__title {
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeSlideUp 1s var(--ease-out) 0.5s forwards;
  word-break: break-word;
  overflow-wrap: break-word;
}
.hero__title .line {
  display: block;
  overflow: hidden;
}
.hero__title .line > span {
  display: block;
  animation: clipUp 0.9s var(--ease-out) both;
}
.hero__title .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero__title .line:nth-child(3) > span { animation-delay: 0.24s; }

@keyframes clipUp {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}

.hero__title .accent {
  color: var(--blue);
  position: relative;
  display: inline-block;
  padding-bottom: 0.25em; /* space below descenders so the underline sits cleanly */
}
.hero__title .accent::after {
  content: '';
  position: absolute;
  bottom: 0.05em; left: 0; right: 0; /* em-based: scales with display-xl font size */
  height: max(2px, 0.04em);          /* scales but never thinner than 2px */
  background: linear-gradient(90deg, var(--blue), var(--blue-dim), transparent);
  border-radius: 2px;
  opacity: 0.6;
}

.hero__sub {
  max-width: 600px;
  margin: 0 auto 2.75rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeSlideUp 0.9s var(--ease-out) 0.8s forwards;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeSlideUp 0.9s var(--ease-out) 1s forwards;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out) 1.8s forwards;
}
.hero__scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--blue), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { transform: scaleY(1); opacity: 0.6; }
  50%     { transform: scaleY(0.6); opacity: 1; }
}
.hero__scroll span {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  writing-mode: vertical-rl;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── TESTIMONIALS ─── */
.testimonials {
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}
.testimonials::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-mid), transparent);
}
.testimonials__header {
  text-align: center;
  margin-bottom: 3rem;
}
.testimonials__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-height: 480px;
  overflow: hidden;
  position: relative;
}
.testimonials__cols::before,
.testimonials__cols::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 90px;
  z-index: 2;
  pointer-events: none;
}
.testimonials__cols::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg-abyss), transparent);
}
.testimonials__cols::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bg-abyss), transparent);
}
.tscroll-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: scrollUpCards 20s linear infinite;
}
.tscroll-col:nth-child(2) {
  animation-duration: 26s;
  animation-delay: -10s;
}
@keyframes scrollUpCards {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
.tcard {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: border-color 0.3s, box-shadow 0.3s;
  flex-shrink: 0;
}
.tcard:hover {
  border-color: var(--blue-border);
  box-shadow: var(--shadow-glow);
}
.tcard__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(14,165,233,0.12);
  border: 1px solid rgba(14,165,233,0.28);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--blue);
  flex-shrink: 0;
}
.tcard__avatar::after {
  content: attr(data-initials);
}
.tcard__body { flex: 1; }
.tcard__quote {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
  font-style: italic;
}
.tcard__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-primary);
}
.tcard__role {
  display: block;
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}
@media (prefers-reduced-motion: reduce) {
  .tscroll-col { animation: none; }
}

/* ─── PRODUCTOS (ENTREGABLES PREVIEW) ─── */
.products {
  padding: var(--space-xl) 0;
}
.products__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3.5rem;
  gap: 2rem;
  flex-wrap: wrap;
}
.products__header-left h2 { margin-top: 0.75rem; }

.phases-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0 3rem;
}
.phase-btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-faint);
  background: transparent;
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
}
.phase-btn:hover {
  border-color: var(--blue-border);
  color: var(--text-muted);
}
.phase-btn:active { transform: scale(0.94); }
.phase-btn.active {
  background: var(--blue-subtle);
  border-color: var(--blue-border);
  color: var(--blue);
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* ─── DIFERENCIADORES ─── */
.why {
  padding: var(--space-xl) 0;
  background: var(--bg-mid);
  position: relative;
}
.why::before, .why::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-mid), transparent);
}
.why::before { top: 0; }
.why::after  { bottom: 0; }

.why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
}
.why__card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.why__card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--blue-border) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 0;
}
.why__card > * { position: relative; z-index: 1; }
.why__card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: var(--border-mid);
}
.why__card:hover::before { opacity: 1; }

.why__icon {
  width: 50px; height: 50px;
  background: var(--blue-subtle);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  margin-bottom: 1.5rem;
  transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out), transform 0.4s var(--ease-out);
}
.why__icon svg { flex-shrink: 0; }
.why__card:hover .why__icon {
  background: rgba(14,165,233,0.16);
  border-color: rgba(14,165,233,0.42);
  transform: rotate(-7deg) scale(1.10);
}
.why__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.why__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── CTA FINAL ─── */
.cta-final {
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-final__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(14,165,233,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-final__inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}
.cta-final h2 { margin: 0.75rem 0 1.25rem; }
.cta-final p  { color: var(--text-muted); margin-bottom: 2.5rem; }
.cta-final__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-final__location {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ─── HERO ANIMATION — Compass & Particles ─── */
.hero__compass {
  position: absolute;
  right: 6%;
  top: 50%;
  transform: translateY(-60%);
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  animation: compassReveal 1.5s var(--ease-out) 1.2s forwards;
}
.hero__compass-svg {
  width: clamp(180px, 22vw, 340px);
  height: auto;
  animation: compassSpin 80s linear infinite;
  transform-origin: 50% 50%;
  will-change: transform;
}
@keyframes compassReveal {
  from { opacity: 0; transform: translateY(-60%) scale(0.85); }
  to   { opacity: 0.07; transform: translateY(-60%) scale(1); }
}
@keyframes compassSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero__particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.hero__particles span {
  position: absolute;
  bottom: 20%;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0;
  animation: heroParticle 8s ease-in infinite;
}
.hero__particles span:nth-child(1)  { left: 8%;  animation-delay: 0s;    animation-duration: 9s;   width: 3px; height: 3px; }
.hero__particles span:nth-child(2)  { left: 18%; animation-delay: 1.5s;  animation-duration: 7s;   }
.hero__particles span:nth-child(3)  { left: 32%; animation-delay: 3s;    animation-duration: 8.5s; width: 4px; height: 4px; }
.hero__particles span:nth-child(4)  { left: 48%; animation-delay: 0.7s;  animation-duration: 6.5s; }
.hero__particles span:nth-child(5)  { left: 62%; animation-delay: 2.2s;  animation-duration: 9.5s; width: 3px; height: 3px; }
.hero__particles span:nth-child(6)  { left: 75%; animation-delay: 4s;    animation-duration: 7.5s; }
.hero__particles span:nth-child(7)  { left: 88%; animation-delay: 1s;    animation-duration: 8s;   width: 4px; height: 4px; }
.hero__particles span:nth-child(8)  { left: 22%; animation-delay: 5s;    animation-duration: 6s;   }
.hero__particles span:nth-child(9)  { left: 55%; animation-delay: 3.5s;  animation-duration: 7.5s; width: 3px; height: 3px; }
.hero__particles span:nth-child(10) { left: 40%; animation-delay: 6s;    animation-duration: 9s;   }
@keyframes heroParticle {
  0%   { opacity: 0; transform: translateY(0) translateX(0); }
  8%   { opacity: 0.8; }
  90%  { opacity: 0.2; }
  100% { opacity: 0; transform: translateY(-200px) translateX(15px); }
}

/* Section separator for CTA sections */
.cta-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.5rem 0;
  overflow: hidden;
}
.cta-sep__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-mid) 50%);
}
.cta-sep__line--r {
  background: linear-gradient(90deg, var(--border-mid) 50%, transparent);
}
.cta-sep__diamond {
  width: 8px; height: 8px;
  background: var(--blue);
  transform: rotate(45deg);
  opacity: 0.5;
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--blue);
  animation: diamondPulse 3s ease-in-out infinite;
}
@keyframes diamondPulse {
  0%,100% { opacity: 0.4; box-shadow: 0 0 6px var(--blue); }
  50%     { opacity: 0.9; box-shadow: 0 0 16px var(--blue), 0 0 24px var(--blue-glow); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__compass-svg { animation: none; }
  .hero__particles span { animation: none; }
}

/* ─── BARCO NAVEGANTE ─── */
.hero__boat {
  position: absolute;
  bottom: 11%;         /* alineado sobre la ola superior (offset 0.86) */
  left: 0;
  width: 100%;
  z-index: 4;          /* encima de depth(1) grid(2) y horizon(3) */
  pointer-events: none;
}

/* Envoltorio que realiza el viaje horizontal */
.hero__boat-sail {
  position: absolute;
  animation: boatSail 70s linear -18s infinite;
  will-change: transform;
}

/* SVG del barco — realiza el balanceo */
.hero__boat-svg {
  display: block;
  width: clamp(54px, 7vw, 110px);
  height: auto;
  animation: boatBob 5s ease-in-out infinite;
  transform-origin: 50% 85%;
  filter: drop-shadow(0 4px 12px rgba(14,165,233,0.35))
          drop-shadow(0 0 24px rgba(14,165,233,0.18));
  will-change: transform;
}

@keyframes boatSail {
  from { transform: translateX(-130px); }
  to   { transform: translateX(calc(100vw + 130px)); }
}

@keyframes boatBob {
  0%,100% { transform: rotate(-1.8deg) translateY(0); }
  28%     { transform: rotate(1.2deg)  translateY(-10px); }
  55%     { transform: rotate(-0.8deg) translateY(-14px); }
  78%     { transform: rotate(1.5deg)  translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__boat-sail { animation: none; transform: translateX(22vw); }
  .hero__boat-svg  { animation: none; }
}


@media (max-width: 900px) {
  .products__grid     { grid-template-columns: repeat(2, 1fr); }
  .why__grid          { grid-template-columns: repeat(2, 1fr); }
  .products__header   { flex-direction: column; align-items: flex-start; }
  .testimonials__cols { max-height: 440px; }
}
@media (max-width: 640px) {
  .hero { padding-bottom: 11vh; }
  .hero__boat { bottom: 9%; }
  .hero__boat-svg { width: clamp(44px, 10vw, 70px); }
  .why__grid      { grid-template-columns: 1fr; }
  .hero__actions  { flex-direction: column; align-items: stretch; justify-content: center; gap: 0.75rem; max-width: 320px; margin: 0 auto; }
  .hero__actions .btn {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.875rem;
    padding: 0.85rem 1.25rem;
    width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }
  .btn-ghost {
    background: var(--blue-subtle);
    border-color: var(--blue-border);
    color: var(--text-primary);
  }
  .hero__scroll   { display: none; }
  .hero__content  { padding: 0 0.5rem; }
  .testimonials__cols {
    grid-template-columns: 1fr;
    max-height: 380px;
  }
  .tscroll-col:nth-child(2) { display: none; }
  .products__grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .why__grid      { gap: 0.75rem; }
}
@media (max-width: 480px) {
  .hero__sub { margin-bottom: 2rem; }
  .hero__actions { max-width: 100%; padding: 0 0.5rem; }
}
