/* card.css — Baseball card styles (flip, front, back) */

.baseball-card {
  width: 280px;
  height: 490px;
  perspective: 1200px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.baseball-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  /* clip-path instead of overflow:hidden — overflow:hidden on a preserve-3d child
     flattens the 3D stacking context on Safari/iOS, breaking the flip animation */
  clip-path: inset(0 round 16px);
  background: linear-gradient(170deg, #1a2418 0%, #0f1a0d 40%, #0a120a 100%);
  border: 0.5px solid rgba(201, 153, 42, 0.1);
}

.card-back {
  transform: rotateY(180deg);
}

.card-content {
  padding: 22px 24px;
  height: calc(100% - 32px); /* minus stitches + hint */
  display: flex;
  flex-direction: column;
}

/* Loro Piana stitching lines */
.card-stitch-top,
.card-stitch-bottom {
  height: 1.5px;
  background: linear-gradient(90deg, transparent 8%, rgba(201, 153, 42, 0.12) 50%, transparent 92%);
}

.card-flip-hint {
  text-align: center;
  padding: 6px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 7px;
  font-style: italic;
  color: var(--text-invisible, #27272a);
  letter-spacing: 0.12em;
}

/* ── Front face ── */

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 9px;
  color: var(--text-ghost, #3f3f46);
  letter-spacing: 0.2em;
  font-style: italic;
}

.card-subtitle {
  font-size: 7px;
  color: var(--text-invisible, #27272a);
  letter-spacing: 0.1em;
  margin-top: 1px;
}

.card-score {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 72px;
  font-weight: 300;
  color: var(--text-primary, #e5e7eb);
  line-height: 0.8;
  letter-spacing: -0.03em;
  margin-top: 10px;
}

.card-band {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 9px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-top: 6px;
}

.card-crest {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 14px;
}

.card-percentile {
  position: absolute;
  bottom: 0;
  right: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 7px;
  font-style: italic;
  color: var(--text-invisible, #27272a);
  letter-spacing: 0.03em;
}

.card-divider {
  width: 100%;
  height: 0.5px;
  background: linear-gradient(90deg, transparent, rgba(201, 153, 42, 0.15), transparent);
  margin: 14px 0 12px;
}

.card-archetype {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--text-primary, #e5e7eb);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.card-season {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 7px;
  font-style: italic;
  color: var(--text-invisible, #27272a);
  margin-top: 4px;
  letter-spacing: 0.08em;
}

/* Pillar strip — Céline treatment */
.card-pillar-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 8px;
}

.card-pillar-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.card-pillar-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 10px;
  font-style: italic;
  font-weight: 300;
}

.card-pillar-bar {
  width: 28px;
  height: 1.5px;
  border-radius: 1px;
}

.card-pillar-score {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 8px;
  font-style: italic;
}

/* ── Back face ── */

.card-back-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-back-archetype {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-primary, #e5e7eb);
}

.card-back-label {
  font-size: 7px;
  color: var(--text-invisible, #27272a);
  letter-spacing: 0.12em;
  margin-top: 3px;
}

.card-back-overall {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 300;
}

.card-back-pillar {
  margin-bottom: 14px;
}

.card-back-pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.card-back-pillar-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 11px;
  font-style: italic;
}

.card-back-pillar-score {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 300;
  color: var(--text-primary, #e5e7eb);
  line-height: 1;
}

.card-back-bar-track {
  width: 100%;
  height: 2px;
  background: rgba(138, 184, 112, 0.06);
  border-radius: 1px;
  overflow: visible;
  position: relative;
}

.card-back-bar-fill {
  height: 100%;
  border-radius: 1px;
}

.pillar-ghost-bar {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 0 1px 1px 0;
}

.card-back-pillar-meta {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 7px;
  font-style: italic;
  color: var(--text-ghost, #3f3f46);
  margin-top: 3px;
}

/* Season dots */
.card-back-season {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 8px;
}

.season-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 0.5px solid var(--text-invisible, #27272a);
  background: transparent;
}

.season-dot.filled {
  background: var(--health-thriving, #2D6A4F);
  border-color: #3d8a65;
}

.season-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 7px;
  font-style: italic;
  color: var(--text-invisible, #27272a);
  margin-left: 3px;
}
