@charset "UTF-8";
/**
 * @file
 * Phase card styles — desktop only (hidden <992px via stepper parent).
 * Figma: Normal 326×326 (26:1836), Expanded 579×543 (26:1871).
 *
 * Animation uses transform:scale on the outer card and counter-scale
 * on .vel-phase-card__content so text stays crisp during transition.
 */
/* ==========================================================================
   Base card — Figma 26:1836 (326×326)
   ========================================================================== */
.vel-stepper__grid:has(> .vel-phase-card) {
  align-items: stretch;
}

.vel-phase-card {
  /* Ratios expanded ÷ collapsed (read by phase-card.js).
     Default (Desktop xxl): 579/326 width, 543/326 height. Tier laptop
     overrides these in its @media block. */
  --vel-phase-exp-w-ratio: 1.776;
  --vel-phase-exp-h-ratio: 1.666;
  position: relative;
  width: 326px;
  min-height: 326px;
  border-radius: var(--vel-card-radius-lg); /* 40px */
  border: 1px solid var(--vel-border);
  box-shadow: var(--vel-shadow-sm);
  background: var(--vel-gradient-card-subtle), var(--vel-bg-white);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform-origin: center center;
}

.vel-phase-card:hover {
  box-shadow: var(--vel-shadow-deep);
}

/* Content wrapper — counter-scales during animation, anchored top-left */
.vel-phase-card__content {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 54px 40px 40px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: transform 0.4s ease;
  transform-origin: top left;
}

/* Chevron button — top-right corner */
.vel-phase-card__chevron {
  position: absolute;
  top: 27px;
  right: 27px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  color: var(--vel-accent);
  cursor: pointer;
  transition: transform 0.4s ease;
  z-index: 2;
}

.vel-phase-card__chevron-icon {
  width: 24px;
  height: 24px;
  display: block;
  overflow: visible;
}

/* Icon */
.vel-phase-card__icon {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  transition: all 0.4s ease;
}

/* Phase + Title wrapper — mimics single text block from Figma */
.vel-phase-card__text {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.4s ease;
}

/* Phase number: "Fase X:" */
.vel-phase-card__phase {
  font-family: var(--vel-font-heading);
  font-size: var(--vel-text-4xl); /* 48px */
  font-weight: 700;
  color: var(--vel-primary);
  line-height: 1; /* 48px — matches font-size so box fits text */
  transition: font-size 0.4s ease, line-height 0.4s ease;
}

/* Title: "Adhesión", "Análisis técnico", etc. */
.vel-phase-card__title {
  font-family: var(--vel-font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--vel-secondary); /* #0085AC */
  line-height: var(--vel-leading-heading-sm); /* 36px */
  margin: 0;
  transition: all 0.4s ease;
}

/* Body text — truncated with ellipsis in collapsed state, fade-in on expand */
.vel-phase-card__body {
  font-family: var(--vel-font-body);
  font-size: var(--vel-text-lg); /* 18px */
  font-weight: 500;
  color: #6a7282;
  line-height: var(--vel-leading-snug); /* 24px */
  margin: 0;
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0.7;
  transition: opacity 0.4s ease, max-height 0.4s ease, margin-top 0.4s ease;
  max-height: 48px; /* 2 lines × 24px line-height */
  margin-top: auto;
}

/* ==========================================================================
   Expanded state — Figma 26:1871 (579×543)
   ========================================================================== */
.vel-phase-card--expanded {
  position: absolute;
  width: 579px;
  height: 543px;
  box-shadow: var(--vel-shadow-deep);
  z-index: 10;
}

/* Content fills expanded card */
.vel-phase-card--expanded .vel-phase-card__content {
  width: 579px;
  height: 543px;
  padding: 54px 40px 40px;
  gap: 15px; /* Same as collapsed */
}

/* Chevron rotated 180° when expanded */
.vel-phase-card--expanded .vel-phase-card__chevron {
  transform: rotate(180deg);
}

/* Phase number larger when expanded */
.vel-phase-card--expanded .vel-phase-card__phase {
  font-size: 64px;
  line-height: 1.1;
}

/* Body fully visible when expanded — fade in with delay */
.vel-phase-card--expanded .vel-phase-card__body {
  display: block;
  -webkit-line-clamp: unset;
  overflow-y: auto;
  opacity: 1;
  max-height: 500px;
  margin-top: 0;
}

/* Placeholder keeps space in the flex row while card is absolute */
.vel-phase-card__placeholder {
  width: 326px;
  height: 326px;
  flex-shrink: 0;
}

/* ==========================================================================
   Laptop tier (1366–1599px) — Figma "Producción - Pantallas Laptop"
   Frame 272:3287 (collapsed) 214×308. Frame 272:3322 (expanded) 458×521.
   Audit docs/card-99-laptop-audit-figma.md.
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1599px) {
  .vel-phase-card {
    /* Override ratios so JS expands to Figma laptop 458×521, not desktop 579×543. */
    --vel-phase-exp-w-ratio: 2.140; /* 458 / 214 */
    --vel-phase-exp-h-ratio: 1.692; /* 521 / 308 */
    /* Cap collapsed height to Figma 308. Body wraps to fewer lines via
       webkit-line-clamp; overflow:hidden on the card guarantees no
       half-line text bleed. */
    height: 308px;
    min-height: 0;
  }
  .vel-phase-card__content {
    /* Figma laptop: step info at left 32, top 54, gap 15, padding-bottom 40.
       Inner height matches the card cap so the body can flex within. */
    padding: 54px 32px 40px;
    height: 308px;
  }
  .vel-phase-card__chevron {
    /* Figma laptop chevron at left 155, top 30 of a 214-wide card. */
    top: 30px;
    right: 33px;
  }
  .vel-phase-card__icon {
    width: 48px;
    height: 48px;
  }
  .vel-phase-card__phase {
    font-size: 32px;
    line-height: 30px;
  }
  .vel-phase-card__title {
    font-size: 24px;
    line-height: 36px;
  }
  .vel-phase-card__body {
    /* Body flows immediately after the title block (no `margin-top: auto`
       pushing it to the bottom). The JS behavior computes how many lines
       of body text fit in the remaining vertical space and truncates the
       text word-by-word with an ellipsis — never mid-word. */
    margin-top: initial;
    max-height: none;
  }
  /* Expanded — Figma 458×521, step info left 49, top 37. The expanded card
     opts back out of the collapsed height cap so all body text shows. */
  .vel-phase-card--expanded {
    width: 458px;
    height: 521px;
  }
  .vel-phase-card--expanded .vel-phase-card__content {
    width: 458px;
    height: 521px;
    padding: 37px 49px 39px;
  }
  .vel-phase-card--expanded .vel-phase-card__phase {
    font-size: 48px;
    line-height: 30px;
  }
  .vel-phase-card--expanded .vel-phase-card__title {
    font-size: 32px;
    line-height: 36px;
  }
}
/*# sourceMappingURL=phase-card.css.map */
