/* ==========================================================================
   MYCLOUD.UNO — CSS CONTACTO / NOSOTROS
   Tema: Fondo claro y cálido; ámbar (#fbbf24) y rosa (#ec4899) dominantes.
   Composición vertical centrada en el equipo: acordeón horizontal interactivo,
   lista de integrantes con "Lo que viene" y bloque destacado de Agustín.
   ========================================================================== */

:root {
  --warm-bg: #fffdfa;
  --warm-grid: #f5ebe0;
  --warm-card: #ffffff;
  --blue-accent: var(--indigo);
  --blue-soft: var(--indigo-soft);
  --pink-accent: var(--indigo);
  --pink-soft: var(--indigo-soft);
  --amber-accent: #fbbf24;
  --amber-soft: #fde68a;
  --warm-border: #0f1033;
}

body.page-contacto {
  background-color: var(--warm-bg);
  background-image: 
    linear-gradient(var(--warm-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--warm-grid) 1px, transparent 1px);
  background-size: 80px 80px;
  color: var(--ink);
}

/* ==========================================================================
   1. INTRO / HERO EDITORIAL
   ========================================================================== */
.team-hero {
  padding-top: 44px;
  padding-bottom: 56px;
}

.team-hero .eyebrow {
  color: var(--indigo);
}

.team-hero .eyebrow::after {
  border-color: var(--ink);
}

.team-title {
  font-size: clamp(2.6rem, 5.8vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin-top: 26px;
  max-width: 17em;
}

.team-title .hl-blue,
.team-title .hl-pink {
  color: var(--indigo);
}

.team-title .hl-amber {
  background: linear-gradient(transparent 62%, var(--amber-soft) 62%, var(--amber-soft) 92%, transparent 92%);
}

.team-lead {
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--muted);
  max-width: 36em;
  line-height: 1.6;
}

/* ==========================================================================
   2. ACORDEÓN HORIZONTAL INTERACTIVO DE INTEGRANTES
   ========================================================================== */
.accordion-section {
  padding-bottom: 96px;
}

.accordion-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  height: 520px;
  margin-top: 36px;
  transition: grid-template-columns 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.accordion-grid[data-active="0"] {
  grid-template-columns: minmax(0, 5fr) minmax(0, 1fr) minmax(0, 1fr);
}

.accordion-grid[data-active="1"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 5fr) minmax(0, 1fr);
}

.accordion-grid[data-active="2"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 5fr);
}

.accordion-panel {
  position: relative;
  height: 100%;
  min-width: 0;
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 6px 6px 0 var(--panel-accent, var(--pink-accent));
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

/* Tira colapsada (vertical) */
.strip-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 12px;
  background: var(--panel-soft, var(--pink-soft));
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.3s ease, background 0.2s;
  user-select: none;
}

.strip-button:hover {
  background: var(--panel-accent, var(--pink-accent));
  color: #ffffff;
}

.strip-num {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  font-family: var(--font-mono);
}

.strip-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  overflow: hidden;
  box-shadow: 2px 2px 0 var(--ink);
}

.strip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strip-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: uppercase;
  margin-block: auto;
}

/* Contenido expandido */
.panel-expanded {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 36px 40px;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease 0.1s;
  z-index: 1;
}

.accordion-panel.is-open .strip-button {
  opacity: 0;
  pointer-events: none;
}

.accordion-panel.is-open .panel-expanded {
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
}

/* Foto Polaroids grande en panel expandido */
.expanded-photo-wrap {
  position: relative;
  height: 100%;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.expanded-photo {
  position: relative;
  width: 100%;
  max-width: 300px;
  padding: 12px 12px 38px;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 8px 8px 0 var(--panel-accent, var(--pink-accent));
  transform: rotate(-1.5deg);
  margin: 0 auto;
}

.expanded-photo-inner {
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #eee;
}

.expanded-photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.expanded-sticker {
  position: absolute;
  right: -6px;
  top: -10px;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--amber-accent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  transform: rotate(5deg);
  box-shadow: 2px 2px 0 var(--ink);
}

.expanded-caption {
  position: absolute;
  left: 14px;
  bottom: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Información del Integrante */
.expanded-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.expanded-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--panel-accent, var(--pink-accent));
}

.expanded-name {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.expanded-role {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 6px;
}

.expanded-bio {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 32em;
}

@media (max-width: 960px) {
  .accordion-grid {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .accordion-panel {
    min-height: auto;
  }
  .strip-button {
    position: relative;
    height: 72px;
    flex-direction: row;
    padding: 12px 20px;
  }
  .strip-name {
    writing-mode: horizontal-tb;
    transform: none;
    margin: 0;
  }
  .panel-expanded {
    position: relative;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 20px;
    display: none;
  }
  .accordion-panel.is-open .panel-expanded {
    display: flex;
    flex-direction: column;
  }
  .accordion-panel.is-open .strip-button {
    display: none;
  }
}

/* ==========================================================================
   3. ROSTER / LISTA DE INTEGRANTES CON "LO QUE VIENE"
   ========================================================================== */
.roster-section {
  padding-block: 84px;
  border-top: 2px solid var(--ink);
}

.roster-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.roster-title {
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  letter-spacing: -0.04em;
}

.roster-title .hl-blue,
.roster-title .hl-pink {
  color: var(--indigo);
}

.roster-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.roster-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 2px solid var(--ink);
}

.roster-num {
  font-size: 2.4rem;
  line-height: 0.9;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1.8px var(--item-accent, var(--ink));
}

.roster-item strong {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.1;
}

.roster-item span {
  color: var(--muted);
  font-size: 0.95rem;
}

.roster-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--item-accent, var(--indigo));
}

.roster-item.is-next {
  opacity: 0.8;
}

.roster-item.is-next .roster-dot {
  background: none;
  border: 2px dashed var(--ink);
}

@media (max-width: 820px) {
  .roster-grid-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ==========================================================================
   4. BLOQUE PROTAGONISTA: CONTACTO DIRECTO CON AGUSTÍN
   ========================================================================== */
.contact-agustin-section {
  padding-block: 84px 110px;
}

.agustin-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 40px;
  align-items: center;
  padding: 44px;
  background: #ffffff;
  border: 2.5px solid var(--ink);
  border-radius: 28px;
  box-shadow: 10px 10px 0 var(--amber-accent);
}

.agustin-media {
  position: relative;
  max-width: 340px;
  margin: 0 auto;
}

.agustin-photo-frame {
  position: relative;
  padding: 12px 12px 42px;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  transform: rotate(-2.5deg);
  box-shadow: 8px 8px 0 var(--indigo);
}

.agustin-photo-frame img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 8px;
}

.agustin-badge {
  position: absolute;
  right: -8px;
  top: 14px;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--amber-accent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  transform: rotate(6deg);
  box-shadow: 2px 2px 0 var(--ink);
}

.agustin-caption {
  position: absolute;
  left: 16px;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.agustin-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.agustin-kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--indigo);
}

.agustin-title {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.agustin-text {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.agustin-contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.agustin-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--warm-bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s;
  width: fit-content;
}

.agustin-contact-pill:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.agustin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 880px) {
  .agustin-card {
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }
  .agustin-media {
    max-width: 280px;
  }
  .agustin-photo-frame img {
    height: 260px;
  }
}

/* ==========================================================================
   2b. HISTORIA REAL + TRABAJO REAL (CÓMO EMPEZAMOS)
   ========================================================================== */
.story-section {
  position: relative;
  padding-block: 96px 120px;
  border-top: 2px solid var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.story-wrap {
  position: relative;
  z-index: 1;
}

/* Manchas orgánicas de fondo que flotan */
.story-blob {
  position: absolute;
  z-index: 0;
  filter: blur(40px);
  opacity: 0.28;
  border-radius: 62% 38% 55% 45% / 48% 58% 42% 52%;
  animation: storyMorph 16s ease-in-out infinite, storyDrift 22s ease-in-out infinite;
  pointer-events: none;
}
.story-blob.a {
  width: 380px;
  height: 380px;
  background: var(--indigo);
  top: 40px;
  right: -60px;
}
.story-blob.b {
  width: 300px;
  height: 300px;
  background: var(--mint);
  bottom: 40px;
  left: 25%;
  animation-delay: -6s;
}
.story-blob.c {
  width: 260px;
  height: 260px;
  background: var(--amber);
  bottom: 120px;
  right: 5%;
  animation-delay: -11s;
}

@keyframes storyMorph {
  0%, 100% { border-radius: 62% 38% 55% 45% / 48% 58% 42% 52%; }
  33% { border-radius: 40% 60% 38% 62% / 58% 40% 60% 42%; }
  66% { border-radius: 55% 45% 62% 38% / 40% 62% 38% 60%; }
}
@keyframes storyDrift {
  0%, 100% { translate: 0 0; }
  50% { translate: -25px 35px; }
}

/* Eyebrow con línea expansible */
.story-eyebrow {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.28em;
  font-size: 0.85rem;
  color: var(--indigo);
}
.story-eyebrow .story-eyebrow-line {
  flex: 1;
  height: 2px;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.story-eyebrow .story-eyebrow-yr {
  color: var(--ink);
  letter-spacing: 0.1em;
}
.story-section.in .story-eyebrow .story-eyebrow-line {
  transform: scaleX(1);
}

/* Título con revelado línea por línea y subrayado ondulado */
.story-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6.5vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 34px 0 56px;
  color: var(--ink);
}
.story-heading-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.story-heading-line span {
  display: inline-block;
  transform: translateY(110%) rotate(3deg);
  transition: transform 0.9s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.story-heading-line:nth-child(2) span {
  transition-delay: 0.15s;
}
.story-section.in .story-heading-line span {
  transform: none;
}
.story-heading-accent {
  color: var(--indigo);
  position: relative;
}
.story-squiggle {
  position: absolute;
  left: 0;
  bottom: -0.12em;
  width: 100%;
  height: 0.26em;
  overflow: visible;
  pointer-events: none;
}
.story-squiggle path {
  stroke: var(--amber);
  stroke-width: 7;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1.4s 0.9s ease-out;
}
.story-section.in .story-squiggle path {
  stroke-dashoffset: 0;
}

/* Tarjetas y Conector Punteado */
.story-cards {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
}
.story-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.story-path path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-dasharray: 3 9;
  stroke-linecap: round;
  opacity: 0.65;
}

.story-card {
  --c: var(--indigo);
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 3px solid var(--ink);
  border-radius: 30px 26px 34px 24px / 26px 34px 24px 30px;
  padding: 30px 30px 34px;
  box-shadow: 9px 9px 0 var(--c);
  opacity: 0;
  transform: translateY(60px) rotate(var(--r0, -2deg)) scale(0.96);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 1.1, 0.3, 1), box-shadow 0.35s ease, border-radius 0.6s ease;
}
.story-card:nth-child(2) {
  --c: var(--mint);
  --r0: 2deg;
  transition-delay: 0.15s, 0.15s, 0s, 0s;
}
.story-card:nth-child(3) {
  --c: var(--amber);
  --r0: -1.5deg;
  transition-delay: 0.3s, 0.3s, 0s, 0s;
}

.story-section.in .story-card {
  opacity: 1;
  transform: rotate(var(--r, 0deg));
}
.story-section.in .story-card:nth-child(1) {
  --r: -0.8deg;
}
.story-section.in .story-card:nth-child(2) {
  --r: 0.7deg;
  margin-top: 26px;
}
.story-section.in .story-card:nth-child(3) {
  --r: -0.5deg;
}

.story-card:hover {
  transform: translateY(-8px) rotate(0deg) scale(1.02);
  box-shadow: 15px 15px 0 var(--c);
  border-radius: 26px 34px 24px 32px / 34px 24px 32px 26px;
}
.story-card:hover .story-card-num {
  animation: storyWiggle 0.6s ease;
}

.story-card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 15px;
  color: var(--c);
  margin-bottom: 14px;
}
.story-card-num::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--c);
  border-radius: 50%;
  margin-right: 10px;
  animation: storyPulse 2.4s ease-in-out infinite;
}
@keyframes storyPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.5; }
}
@keyframes storyWiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg) translateX(-3px); }
  75% { transform: rotate(6deg) translateX(3px); }
}

.story-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 27px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  color: var(--ink);
}
.story-card p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}
.story-card p b {
  color: var(--ink);
  font-weight: 600;
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--c) 35%, transparent) 62%);
  background-size: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 1s 0.8s ease;
}
.story-section.in .story-card p b {
  background-size: 100% 100%;
}

/* Responsividad para móviles y tablets */
@media (max-width: 900px) {
  .story-cards {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .story-section.in .story-card:nth-child(2) {
    margin-top: 0;
  }
  .story-path {
    display: none;
  }
  .story-section {
    padding-block: 60px 80px;
  }
  .story-heading {
    margin: 24px 0 40px;
  }
}

/* Accesibilidad: Reducción de Movimiento */
@media (prefers-reduced-motion: reduce) {
  .story-section * {
    animation: none !important;
    transition: none !important;
  }
  .story-blob {
    display: none;
  }
  .story-card {
    opacity: 1 !important;
    transform: none !important;
  }
  .story-heading-line span {
    transform: none !important;
  }
  .story-eyebrow .story-eyebrow-line {
    transform: none !important;
  }
  .story-squiggle path {
    stroke-dashoffset: 0 !important;
  }
  .story-card p b {
    background-size: 100% 100% !important;
  }
}
