/* ═══════════════════════════════════════════════════════════════
   ADAPTIA — pages.css
   Estilos compartidos por metodología, nosotros, contacto
═══════════════════════════════════════════════════════════════ */

/* ─── PAGE HERO (compartido, sin canvas) ─── */
.page-hero {
  padding: 12rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(14,165,233,0.07), transparent 65%),
    linear-gradient(180deg, var(--bg-abyss) 0%, var(--bg-deep) 100%);
}
.page-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--blue-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--blue-border) 1px, transparent 1px);
  background-size: 55px 55px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 0%, transparent 70%);
  opacity: 0.4;
}
.page-hero__content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}
.page-hero h1  { margin: 0.75rem 0 1.25rem; }
.page-hero p   { color: var(--text-muted); max-width: 520px; }

/* ─── Nosotros hero split layout ─── */
.nosotros-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.nosotros-hero-inner .page-hero__content {
  max-width: none;
}
.nosotros-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qs-glow-bg {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(14,165,233,0.09) 0%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}
.qs-svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
}

/* ═══ METODOLOGÍA ═══════════════════════════════════════════ */
.metod-phases {
  padding: var(--space-xl) 0;
}
.metod-phase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
}
.metod-phase:last-child { border-bottom: none; }
.metod-phase:nth-child(even) .metod-phase__text { order: 2; }
.metod-phase:nth-child(even) .metod-phase__visual { order: 1; }

.metod-phase__label { margin-bottom: 1rem; }
.metod-phase__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}
.metod-phase__title {
  font-size: 2rem;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 1rem;
}
.metod-phase__desc {
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.metod-phase__deliverables {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.metod-deliverable-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.6rem 0.9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.22s;
}
.metod-deliverable-row:hover { border-color: var(--border-mid); color: var(--text-primary); }
.metod-deliverable-row .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Visual del proceso */
.metod-phase__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.metod-visual-box {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.metod-visual-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, var(--blue-glow), transparent 70%);
}
.metod-visual-icon {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 24px var(--blue-glow-lg));
  animation: floatIcon 4s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center;
}
@keyframes floatIcon {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-10px); }
}

/* Timeline conectora */
.metod-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding: 3rem 0;
  margin: 2rem 0;
}
.metod-timeline::before {
  content: '';
  position: absolute;
  left: 23px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--blue), transparent);
}

/* ═══ NOSOTROS ═══════════════════════════════════════════════ */

/* Separador sutil entre secciones */
hr.separator {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-mid) 20%, var(--border-mid) 80%, transparent);
  opacity: 0.55;
  margin: 0;
}

.nosotros-intro {
  padding: var(--space-xl) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.nosotros-essence {
  padding: var(--space-xl) 0;
}
.nosotros-mv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
.nosotros-mv--full {
  grid-template-columns: repeat(4, 1fr);
}
.mv-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.3s;
}
.mv-card:hover {
  border-color: var(--border-mid);
  box-shadow: var(--shadow-glow);
}
.mv-card h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--blue);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.mv-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Visual Nosotros — brand circle */
.brand-visual {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-circle {
  width: 340px; height: 340px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(ellipse at center, var(--bg-surface), var(--bg-deep));
  box-shadow: var(--shadow-glow-lg);
}
.brand-circle__inner {
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-orbit {
  position: absolute;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 1px dashed var(--blue-border);
  animation: spin 16s linear infinite;
}
.brand-orbit:nth-child(2) {
  width: 75%; height: 75%;
  animation: spin 10s linear infinite reverse;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.brand-dot {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--blue);
  top: 4%; left: 50%;
  box-shadow: 0 0 12px var(--blue);
}

/* ─── BOAT ANIMATION (reemplaza el radar en Nosotros) ─── */
.nosotros-boat-visual {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nosotros-boat-scene {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    var(--bg-abyss) 0%,
    var(--bg-deep) 40%,
    rgba(0, 30, 60, 0.8) 70%,
    rgba(0, 50, 100, 0.6) 100%
  );
  box-shadow: var(--shadow-glow-lg);
}

.nosotros-boat-sky {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 20%,
    rgba(14, 165, 233, 0.06) 0%,
    transparent 70%
  );
}

/* Wrapper con overflow:hidden para clip de la animación */
.nosotros-boat-wrapper {
  position: absolute;
  inset: 0;
  bottom: 56px; /* above water layer */
}

/* Sail container — realiza el viaje horizontal */
.nosotros-boat-sail {
  position: absolute;
  bottom: 0;
  animation: nbBoatSail 18s linear 0s infinite;
  will-change: transform;
}

/* SVG del barco — realiza el balanceo */
.nosotros-boat-svg {
  display: block;
  width: clamp(60px, 10vw, 90px);
  height: auto;
  animation: nbBoatBob 5s ease-in-out infinite;
  transform-origin: 50% 85%;
  filter: drop-shadow(0 4px 10px rgba(14, 165, 233, 0.4))
          drop-shadow(0 0 20px rgba(14, 165, 233, 0.2));
  will-change: transform;
}

@keyframes nbBoatSail {
  from { transform: translateX(-110px); }
  to   { transform: translateX(800px); }
}

@keyframes nbBoatBob {
  0%,100% { transform: rotate(-1.5deg) translateY(0); }
  28%     { transform: rotate(1.0deg)  translateY(-6px); }
  55%     { transform: rotate(-0.8deg) translateY(-9px); }
  78%     { transform: rotate(1.3deg)  translateY(-4px); }
}

/* Water / waves */
.nosotros-boat-water {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
}

.nosotros-wave-svg {
  width: 200%;
  height: 100%;
  display: block;
  animation: nbWaveScroll 9s linear infinite;
}

@keyframes nbWaveScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .nosotros-boat-sail { animation: none; transform: translateX(200px); }
  .nosotros-boat-svg  { animation: none; }
  .nosotros-wave-svg  { animation: none; }
}

/* ─── TEAM GRID ─── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.team-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.team-card:hover {
  border-color: var(--blue-border);
  box-shadow: var(--shadow-glow);
}
.team-card__avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(14,165,233,0.12);
  border: 2px 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: 1.1rem;
  color: var(--blue);
  margin: 0 auto 1.25rem;
}
.team-card__avatar::after {
  content: attr(data-initials);
}
.team-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
}
.team-card__role {
  display: block;
  font-size: 0.72rem;
  color: var(--blue);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.85rem;
}
.team-card__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

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

/* ═══ HERO SPLIT LAYOUT (Metodología + Contacto) ═══════════ */
.page-hero__row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}
.page-hero__row .page-hero__content { max-width: none; }

.page-hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual-box {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 65% at 50% 50%, rgba(14,165,233,0.06), transparent 70%);
}

/* ─── ENGRANAJES — Animaciones de rotación ─── */
.hero-gears-svg {
  width: 88%;
  height: 88%;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 12px rgba(14,165,233,0.18));
}
.gear-a-rot {
  transform-origin: 0px 0px;
  animation: gearCW 18s linear infinite;
  will-change: transform;
}
.gear-b-rot {
  transform-origin: 0px 0px;
  /* CCW, speed proportional: 18 * (28/44) ≈ 11.5s */
  animation: gearCCW 11.5s linear infinite;
  will-change: transform;
}
.gear-c-rot {
  transform-origin: 0px 0px;
  /* CW, speed proportional: 11.5 * (18/28) ≈ 7.4s */
  animation: gearCW 7.4s linear infinite;
  will-change: transform;
}
@keyframes gearCW  { to { transform: rotate(360deg);  } }
@keyframes gearCCW { to { transform: rotate(-360deg); } }

/* ─── CARTA EN EL MAR — Animaciones ─── */
.hero-env-svg {
  width: 88%;
  height: 88%;
  position: relative;
  z-index: 1;
  overflow: visible;
}
.hero-env-float {
  animation: envFloat 3.8s ease-in-out infinite;
  will-change: transform;
}
@keyframes envFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-11px); }
}
.hero-env-wave1 {
  animation: envWave 7s linear infinite;
  will-change: transform;
}
.hero-env-wave2 {
  animation: envWave 11s linear infinite reverse;
  will-change: transform;
}
@keyframes envWave {
  from { transform: translateX(0); }
  to   { transform: translateX(-130px); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gear-a-rot, .gear-b-rot, .gear-c-rot { animation: none !important; }
  .hero-env-float { animation: none !important; }
  .hero-env-wave1, .hero-env-wave2 { animation: none !important; }
}

/* Responsive hero split */
@media (max-width: 1024px) {
  .page-hero__row { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual-box { max-width: 340px; }
}
@media (max-width: 640px) {
  .page-hero__row { gap: 2rem; }
  .hero-visual-box { max-width: 280px; }
}

/* ═══ CONTACTO ═══════════════════════════════════════════════ */
.contact-section {
  padding: var(--space-xl) 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 600px;
  margin: 0 auto;
  gap: 3rem;
  align-items: flex-start;
}
.contact-info { }
.contact-info h2 { margin: 0.75rem 0 1.25rem; }
.contact-info > p { color: var(--text-muted); line-height: 1.75; margin-bottom: 2.5rem; }

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
}
.contact-method:hover {
  border-color: var(--border-mid);
  background: var(--bg-card);
  transform: translateX(4px);
}
.contact-method__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-method__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
  margin-bottom: 0.2rem;
}
.contact-method__val {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Formulario */
.contact-form {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-group { margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.22s, box-shadow 0.22s;
  appearance: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-faint); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--blue-border);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.08);
}
.form-textarea {
  resize: vertical;
  min-height: 110px;
}
.form-select { cursor: pointer; }
.form-select option {
  background: var(--bg-mid);
  color: var(--text-primary);
}
.form-submit {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--blue);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.25s;
}
.form-submit:hover {
  background: var(--blue-dim);
  box-shadow: 0 8px 30px rgba(14,165,233,0.35);
  transform: translateY(-2px);
}
.form-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 1rem;
}

/* Map area */
.contact-map {
  padding: var(--space-xl) 0;
  background: var(--bg-mid);
}
.map-wrapper {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 21/9;
  filter: brightness(0.8) saturate(0.5) hue-rotate(185deg);
}
.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ─── RESPONSIVE PAGES ─── */
@media (max-width: 1024px) {
  .metod-phase       { grid-template-columns: 1fr; gap: 2.5rem; }
  .metod-phase:nth-child(even) .metod-phase__text   { order: 1; }
  .metod-phase:nth-child(even) .metod-phase__visual { order: 2; }
  .nosotros-intro    { grid-template-columns: 1fr; gap: 3rem; }
  .nosotros-hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .contact-grid      { grid-template-columns: 1fr; gap: 3rem; }
  .nosotros-mv       { grid-template-columns: 1fr 1fr; }
  .nosotros-mv--full { grid-template-columns: repeat(2, 1fr); }
  .nosotros-boat-scene { height: 220px; }
}
@media (max-width: 768px) {
  /* Nosotros values grid: 3-col → 2-col */
  .nosotros-diff > .container > div[style*="repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .nosotros-intro { padding: var(--space-lg) 0; }
  .nosotros-hero-visual { display: none; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .nosotros-mv { grid-template-columns: 1fr; }
  .nosotros-mv--full { grid-template-columns: repeat(2, 1fr); }
  /* Nosotros values grid: 2-col → 1-col */
  .nosotros-diff > .container > div[style*="repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  /* Presence grid */
  .nosotros-diff ~ section [style*="repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  .nosotros-boat-scene { height: 180px; }
  .page-hero { padding: 8rem 0 4rem; }
  .page-hero__content { padding: 0 0.5rem; }
  .nosotros-intro     { gap: 2rem; }
  .mv-card            { padding: 1.25rem; }
  .team-grid          { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 480px) {
  /* Presence cards */
  [style*="repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  .page-hero { padding: 7.5rem 0 3.5rem; }
}

/* ═══ LEGAL PAGES (Política de Privacidad, Términos) ════════ */
.legal-content {
  padding: var(--space-xl) 0;
}
.legal-body {
  max-width: 780px;
}
.legal-body h2 {
  font-size: 1.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 0.75rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.legal-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.legal-body p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.legal-body ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal-body ul li {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.legal-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
  margin-bottom: 2rem;
}
@media (max-width: 640px) {
  .legal-content { padding: var(--space-lg) 0; }
  .legal-body h2 { font-size: 1.15rem; }
}
