/* ═══════════════════════════════════════════
   BTVfem Survey — Stylesheet
   Light Mode · Tactical Coaching Edition
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Sora:wght@600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Space+Grotesk:wght@500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg:           #F7F6F2;
  --surface:      #FFFFFF;
  --green:        #111827;
  --green-hover:  rgba(26,140,78,0.08);
  --success:      #1A8C4E;
  --warning:      #E8B949;
  --error:        #D95C5C;
  --info:         #185FA5;
  --text:         #1F2937;
  --text-dim:     #6B7280;
  --border:       #D6D9DD;
  --shadow-card:  0 4px 20px rgba(15,23,42,0.05);
  --shadow-hover: 0 8px 30px rgba(15,23,42,0.08);
  --paper:        #F7F6F2;
  --paper-dark:   #EAE9E4;
  --ink:          #1F2937;
  --ink-light:    #6B7280;

  --gk-fill:   transparent; --gk-accent:  #1F2937;
  --def-fill:  transparent; --def-accent: #1F2937;
  --mid-fill:  transparent; --mid-accent: #1F2937;
  --att-fill:  transparent; --att-accent: #1F2937;
  --done-fill: #E8F8EE;     --done-accent:#1A8C4E;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ═══ LOGIN / INTRO SCREEN ═══ */

#intro-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10;
  overflow: hidden;
}

#login-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Subtle tactical green flash on ball formation */
#stadium-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%,
  rgba(31, 41, 55, 0.07) 0%,
  transparent 65%);
  opacity: 0;
  pointer-events: none;
}

/* UI overlay — centred column above the canvas */
#login-ui {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  animation: loginEnter 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes loginEnter {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Form container ── */

#login-form-area {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  max-width: 360px;
  background: rgba(247, 246, 242, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 22px;
  padding: 32px 36px;
  box-shadow:
    0 2px 0 rgba(255,255,255,0.60) inset,
    0 12px 48px rgba(15,23,42,0.10),
    0 1px 2px rgba(15,23,42,0.06);
  /* Forzar GPU layer para que backdrop-filter funcione en iOS */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: backdrop-filter;
  isolation: isolate;
}

#login-form-area::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  z-index: -1;
  transform: translateZ(0);
  pointer-events: none;
}

@media (max-width: 600px) {
  #login-form-area {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
  }
}

.login-label {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 2px;
}

#team-password {
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(214, 217, 221, 0.7);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 1.0rem;
  font-family: 'Inter', inherit;
  color: var(--text);
  letter-spacing: 0.08em;
  outline: none;
  text-align: center;
  width: 100%;
  caret-color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

#team-password::placeholder {
  color: var(--border);
  letter-spacing: 0.04em;
}

#team-password:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(31,41,55,0.08);
}

#team-password.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(217,92,92,0.10);
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-6px); }
  30%       { transform: translateX(6px); }
  45%       { transform: translateX(-4px); }
  60%       { transform: translateX(4px); }
  75%       { transform: translateX(-2px); }
  90%       { transform: translateX(2px); }
}

#password-submit {
  background: var(--text);
  border: none;
  border-radius: 12px;
  color: #FFFFFF;
  padding: 13px;
  font-size: 0.82rem;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s ease, transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(15,23,42,0.18);
}

#password-submit:hover {
  background: #111827;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,23,42,0.26);
}

#password-submit:active {
  transform: translateY(0px);
  box-shadow: 0 2px 8px rgba(15,23,42,0.14);
}

#password-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.30);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

#password-error {
  color: var(--error);
  font-size: 0.74rem;
  text-align: center;
  letter-spacing: 0.03em;
  min-height: 1.1em;
  animation: fadeIn 0.3s ease;
}

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

/* Admin link */
#admin-link-area {
  margin-top: 18px;
  text-align: center;
}

#admin-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: rgba(107, 114, 128, 0.65);
  text-decoration: none;
  letter-spacing: 0.06em;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 500;
  transition: color 0.2s ease;
}

#admin-link:hover {
  color: var(--text-dim);
}

/* ═══ WHITEBOARD SCREEN ═══ */

#whiteboard-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.6s ease;
  overflow: hidden;
}

#whiteboard-screen.visible { opacity: 1; }

/* ── Header ── */

#whiteboard-header {
  width: 100%;
  padding: 10px 20px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 2;
  position: relative;
}

#header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

#back-to-login {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  width: 36px;
}
#back-to-login:hover { color: var(--text); background: rgba(31,41,55,0.06); }

#progress-area-spacer { width: 36px; flex-shrink: 0; }

/* ── Progress bar ── */
#progress-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  flex-direction: column;
}

#progress-bar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  overflow: hidden;
}

#progress-bar-fill {
  height: 100%;
  background: var(--green);
  width: 0%;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 0 2px 2px 0;
}

#progress-counter-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1;
}

#progress-number {
  font-family: 'Space Mono', monospace;
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

#progress-label {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.54rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* hide the old dots */
#progress-dots { display: none; }

/* Counter */
#progress-counter-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

#progress-number {
  font-family: 'Space Mono', monospace;
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

#progress-label {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.54rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── Onboarding Hint ── */

#onboarding-hint {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 6px 16px 0;
  flex-shrink: 0;
  animation: fadeIn 0.5s ease;
}

#onboarding-hint-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(31,41,55,0.04);
  border: 1px solid rgba(31,41,55,0.12);
  border-radius: 8px;
  padding: 7px 12px 7px 14px;
  max-width: 420px;
  width: 100%;
}

#hint-text {
  flex: 1;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

#hint-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 1rem;
  padding: 0 3px;
  line-height: 1;
  opacity: 0.55;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

#hint-dismiss:hover { opacity: 1; }

/* ── Pitch Container ── */

#pitch-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  padding: 8px 12px;
}

#pitch-svg {
  max-height: calc(100vh - 110px);
  width: auto;
  height: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(15,23,42,0.08), 0 0 0 1px var(--border);
}

/* ── Player Tokens ── */

.token-group {
  cursor: pointer;
  outline: none;
}

/* token-inner only carries the SVG translate — no CSS transform here */

/* token-scale is a child of token-inner; all CSS transforms live here */
.token-scale {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.18s ease;
}

.token-group:hover .token-scale {
  transform: scale(1.09);
  filter: drop-shadow(0 4px 10px rgba(31,41,55,0.20));
}

.token-group:active .token-scale {
  transform: scale(0.94);
}

/* Focus ring: drawn in SVG, made visible via CSS */
.token-ring {
  stroke-width: 0;
  transition: stroke-width 0.15s ease;
}

.token-group:focus-visible .token-ring {
  stroke-width: 2.5;
}

/* ── Footer ── */

#whiteboard-footer {
  padding: 10px 20px 14px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  min-height: 52px;
}

#submit-survey {
  background: var(--green);
  border: none;
  border-radius: 12px;
  color: white;
  padding: 13px 44px;
  font-size: 0.84rem;
  font-family: 'Sora', inherit;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(15,23,42,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  animation: fadeIn 0.4s ease;
}

#submit-survey:hover {
  background: #111827;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,23,42,0.24);
}

#submit-survey:active { transform: translateY(0); }

/* ═══ QUESTION CARD OVERLAY ═══ */

#card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31,41,55,0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: overlayFadeIn 0.25s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(15,23,42,0.12);
  animation: cardSlideIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes cardSlideIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Card Header ── */

#card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

#card-badge-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: bold;
  letter-spacing: 0.04em;
}

#card-header-text { flex: 1; }

#card-position-name {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

#card-question-count {
  font-size: 0.74rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-top: 3px;
}

#card-close-x {
  background: rgba(31,41,55,0.06);
  border: none;
  font-size: 1.4rem;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

#card-close-x:hover {
  color: var(--text);
  background: var(--green-hover);
}

/* ── Card Questions ── */

#card-questions {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#card-questions::-webkit-scrollbar { width: 4px; }
#card-questions::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.question-block { display: flex; flex-direction: column; gap: 10px; }

.question-label {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.question-text {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.65;
  letter-spacing: 0.01em;
  font-weight: 400;
}

.question-textarea {
  background: #FAFAF9;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.90rem;
  font-family: 'Inter', inherit;
  color: var(--text);
  line-height: 1.55;
  resize: none;
  outline: none;
  width: 100%;
  min-height: 76px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  letter-spacing: 0.01em;
  caret-color: var(--green);
}

.question-textarea::placeholder {
  color: var(--border);
  font-style: italic;
}

.question-textarea:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(31,41,55,0.08);
  background: #FFFFFF;
}

/* ── Card Footer ── */

#card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

#card-back {
  background: transparent;
  border: 1.5px solid var(--text);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.84rem;
  font-family: 'Sora', inherit;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 12px 36px;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: none;
}

#card-back:hover {
  background: rgba(31,41,55,0.05);
  transform: translateY(-1px);
}

#card-back:active { transform: translateY(0); }

/* ═══ WELCOME POPUP ═══ */

#welcome-popup {
  position: fixed;
  inset: 0;
  background: rgba(31,41,55,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: overlayFadeIn 0.3s ease;
}

#welcome-popup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 460px;
  padding: 36px 40px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.12);
  animation: cardSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#welcome-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

#welcome-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#welcome-body p {
  font-size: 0.90rem;
  color: var(--text-dim);
  line-height: 1.65;
}

#welcome-start {
  background: var(--text);
  border: none;
  border-radius: 12px;
  color: #fff;
  padding: 13px;
  font-size: 0.84rem;
  font-family: 'Sora', inherit;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15,23,42,0.18);
  transition: background 0.2s ease, transform 0.15s ease;
  margin-top: 4px;
}
#welcome-start:hover  { background: #111827; transform: translateY(-2px); }
#welcome-start:active { transform: translateY(0); }

@media (max-width: 600px) {
  #welcome-popup { align-items: flex-end; padding: 0; }
  #welcome-popup-card {
    padding: 24px 20px 28px;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    gap: 14px;
  }
  #welcome-title { font-size: 1.05rem; }
  #welcome-body { gap: 8px; }
  #welcome-body p { font-size: 0.82rem; line-height: 1.55; }
  #welcome-start { padding: 11px; font-size: 0.80rem; }
}

/* ═══ CONFIRMATION SCREEN ═══ */

#confirmation-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#confirmation-screen.visible { opacity: 1; }

.confirmation-content {
  text-align: center;
  padding: 40px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(15,23,42,0.08);
  animation: cardSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 400px;
  width: 90%;
}

.confirmation-check {
  font-size: 3.5rem;
  color: var(--success);
  margin-bottom: 20px;
  animation: checkPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes checkPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.confirmation-main {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

.confirmation-sub {
  font-size: 0.94rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* ═══ MOBILE / RESPONSIVE ═══ */

@media (max-width: 600px) {
  #login-form-area { max-width: 88vw; padding: 24px 22px;}

  #pitch-container { padding: 4px 4px; }
  #pitch-svg { max-height: calc(100vh - 108px); }

  #whiteboard-header { padding: 8px 14px; }

  #card-questions { padding: 16px 18px; }
  #card-header     { padding: 14px 16px 12px; }
  #card-footer     { padding: 12px 16px 14px; }

  .progress-dot { width: 7px; height: 7px; }
  #progress-dots { gap: 5px; }

  #progress-number { font-size: 0.95rem; }
  #progress-label  { font-size: 0.50rem; }

  #onboarding-hint { padding: 5px 10px 0; }
  #hint-text { font-size: 0.72rem; }

  #submit-survey { padding: 12px 28px; font-size: 0.84rem; }

  #card-save { padding: 11px 20px; }
}

@media (min-width: 768px) {
  /* Desktop: pitch fills horizontal space via landscape SVG viewBox */
  #whiteboard-screen {
    flex-direction: column;
  }

  #whiteboard-header {
    padding: 12px 32px 10px;
  }

  #progress-area {
    gap: 20px;
  }

  #progress-dots {
    flex-wrap: wrap;
    max-width: 480px;
    gap: 6px;
  }

  #pitch-container {
    padding: 12px 24px 4px;
  }

  /* Landscape SVG (viewBox 540x480) — constrain by height, fill width */
  #pitch-svg {
    max-height: calc(100vh - 120px);
    max-width: 100%;
    width: auto;
    height: auto;
  }

  #whiteboard-footer {
    padding: 8px 24px 16px;
  }

  #onboarding-hint {
    padding: 6px 24px 0;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  #pitch-container { padding: 4px; }
  #pitch-svg { max-height: calc(100vh - 88px); }
  #onboarding-hint { display: none; }
}

/* ═══ STAGGER ANIMATION FOR TOKENS ═══ */

/* Animation on token-scale so it uses the correct transform-origin (fill-box center).
   Delay is passed via --enter-delay CSS custom property set on the parent .token-group. */
.token-group.token-enter .token-scale {
  animation: tokenAppear 0.50s cubic-bezier(0.34, 1.56, 0.64, 1) var(--enter-delay, 0ms) both;
}

@keyframes tokenAppear {
  from { opacity: 0; transform: scale(0.3); }
  to   { opacity: 1; transform: scale(1); }
}

/* ═══ EASTER EGG — el campo respira ═══ */

@keyframes pitchBreathe {
  0%   { stroke-dashoffset: 0;   stroke-opacity: 0.85; }
  50%  { stroke-dashoffset: 6;   stroke-opacity: 1;    }
  100% { stroke-dashoffset: 0;   stroke-opacity: 0.85; }
}

#pitch-svg:hover .pitch-line {
  animation: pitchBreathe 12s ease-in-out infinite;
}

/* Escalonar ligeramente cada línea para que no respiren todas a la vez */
#pitch-svg:hover .pitch-line:nth-child(2)  { animation-delay: -2s; }
#pitch-svg:hover .pitch-line:nth-child(3)  { animation-delay: -4s; }
#pitch-svg:hover .pitch-line:nth-child(4)  { animation-delay: -1s; }
#pitch-svg:hover .pitch-line:nth-child(5)  { animation-delay: -6s; }
#pitch-svg:hover .pitch-line:nth-child(6)  { animation-delay: -3s; }
#pitch-svg:hover .pitch-line:nth-child(7)  { animation-delay: -8s; }
#pitch-svg:hover .pitch-line:nth-child(8)  { animation-delay: -5s; }
#pitch-svg:hover .pitch-line:nth-child(9)  { animation-delay: -9s; }
#pitch-svg:hover .pitch-line:nth-child(10) { animation-delay: -7s; }

/* Respetar preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  #pitch-svg:hover .pitch-line {
    animation: none;
  }
}