/* ═══════════════════════════════════════════════════════════════════════
   STRK CORE — DIGITAL COMMAND INTERFACE
   Append this block to the BOTTOM of styles/components.css
   Do NOT place anywhere inside existing rules.
═══════════════════════════════════════════════════════════════════════ */

/* ─── SECTION BASE ────────────────────────────────────────────────── */

#team {
  background: #000;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: var(--section-pad);
}

/* ─── PARALLAX BG LAYERS ─────────────────────────────────────────── */

.team-bg-layer {
  position: absolute;
  inset: -60px;            /* oversized so parallax shift never reveals edge */
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.layer-back {
  background:
    radial-gradient(ellipse at 15% 25%, rgba(139,0,0,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 75%, rgba(177,18,38,0.12) 0%, transparent 50%);
}

.layer-mid {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(220,20,60,0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 30% 80%, rgba(139,0,0,0.10) 0%, transparent 45%);
}

.layer-front {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(220,20,60,0.04) 0%, transparent 60%);
}

/* ─── GRID OVERLAY ───────────────────────────────────────────────── */

.team-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(177,18,38,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(177,18,38,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ─── TACTICAL CORNER BRACKETS ───────────────────────────────────── */

.team-corner {
  position: absolute;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 3;
}

.team-corner.tl { top: 24px; left: 24px; border-top: 1px solid var(--crimson); border-left: 1px solid var(--crimson); box-shadow: -4px -4px 12px rgba(220,20,60,0.25); }
.team-corner.tr { top: 24px; right: 24px; border-top: 1px solid var(--crimson); border-right: 1px solid var(--crimson); box-shadow: 4px -4px 12px rgba(220,20,60,0.25); }
.team-corner.bl { bottom: 24px; left: 24px; border-bottom: 1px solid var(--crimson); border-left: 1px solid var(--crimson); box-shadow: -4px 4px 12px rgba(220,20,60,0.25); }
.team-corner.br { bottom: 24px; right: 24px; border-bottom: 1px solid var(--crimson); border-right: 1px solid var(--crimson); box-shadow: 4px 4px 12px rgba(220,20,60,0.25); }

/* ─── SECTION HEADER ─────────────────────────────────────────────── */

.team-header {
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
}

.command-subtitle {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.55em;
  color: rgba(177,18,38,0.7);
  text-transform: uppercase;
  margin-top: -40px;      /* pulls up under section-title margin-bottom */
  margin-bottom: 64px;
  position: relative;
}

.command-subtitle::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--crimson);
  border-radius: 50%;
  margin-right: 12px;
  box-shadow: 0 0 8px var(--glow);
  vertical-align: middle;
  animation: livePulse 1.8s ease-in-out infinite;
}

/* ─── SCAN LINE ──────────────────────────────────────────────────── */

@keyframes teamScan {
  0%   { left: -20%; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { left: 110%; opacity: 0; }
}

.team-scan-line {
  position: absolute;
  top: 0; bottom: 0;
  left: -20%;
  width: 120px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(220,20,60,0.025) 40%,
    rgba(220,20,60,0.05) 50%,
    rgba(220,20,60,0.025) 60%,
    transparent 100%
  );
  animation: teamScan 9s ease-in-out infinite;
  animation-delay: 1.5s;
}

/* ─── TEAM GRID ──────────────────────────────────────────────────── */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 28px;
  position: relative;
  z-index: 2;
}

/* Founder card takes up a wider slot on large screens */
.team-grid .team-card-wrap.is-founder {
  grid-column: span 1;
}

@media (min-width: 900px) {
  .team-grid .team-card-wrap.is-founder {
    grid-column: span 2;
    max-width: 560px;
    justify-self: center;
    width: 100%;
  }
}

/* ─── CARD FLIP WRAP ─────────────────────────────────────────────── */

.team-card-wrap {
  perspective: 1000px;
  height: 380px;
  cursor: pointer;
  position: relative;
}

.team-card-wrap.is-founder {
  height: 420px;
}

.team-card {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
  will-change: transform;
}

.team-card-wrap:hover .team-card,
.team-card-wrap.flipped .team-card {
  transform: rotateY(180deg);
}

.team-card-wrap:hover {
  z-index: 10;
}

/* ── Front face ── */
.team-card-front {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: rgba(8,0,0,0.85);
  border: 1px solid rgba(177,18,38,0.2);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  /* Front sits at 0deg — visible by default */
  transform: rotateY(0deg);
}

/* ── Back face ── */
.team-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Back starts pre-rotated — hidden until card flips */
  transform: rotateY(180deg);
  background: rgba(6,0,0,0.97);
  border: 1px solid rgba(177,18,38,0.2);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 28px;
  gap: 16px;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.team-card-wrap:hover .team-card-front,
.team-card-wrap:hover .team-card-back,
.team-card-wrap.flipped .team-card-front,
.team-card-wrap.flipped .team-card-back {
  border-color: rgba(220,20,60,0.5);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 30px rgba(139,0,0,0.25);
}

/* Top accent line */
.team-card-front::before,
.team-card-back::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--crimson) 40%, var(--red) 60%, transparent);
  box-shadow: 0 0 12px rgba(220,20,60,0.4);
}

/* Founder card — glowing top border upgrade */
.team-card-wrap.is-founder .team-card-front::before,
.team-card-wrap.is-founder .team-card-back::before {
  background: linear-gradient(90deg, transparent, var(--crimson), #fff 50%, var(--crimson), transparent);
  box-shadow: 0 0 20px rgba(220,20,60,0.7);
  height: 2px;
}

/* ─── CARD FRONT ─────────────────────────────────────────────────── */

.card-front-inner {
  padding: 28px 28px 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

/* ── Avatar container ── */
.card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 88px; height: 88px;
  margin-bottom: 4px;
}

.is-founder .card-avatar-wrap {
  width: 104px; height: 104px;
}

.card-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(220,20,60,0.5);
  box-shadow: 0 0 24px rgba(139,0,0,0.6);
  position: relative;
  z-index: 2;
}

/* Default avatar placeholder */
.card-avatar-placeholder {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: rgba(139,0,0,0.15);
  border: 2px solid rgba(177,18,38,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--crimson);
  position: relative;
  z-index: 2;
}

/* ── Founder particle aura canvas ── */
.founder-aura {
  position: absolute;
  inset: -32px;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
}

.founder-particles {
  width: 100%;
  height: 100%;
}

/* Founder ring pulse behind avatar */
@keyframes founderRingPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.9; transform: scale(1.05); }
}

.founder-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(220,20,60,0.5);
  box-shadow:
    0 0 20px rgba(220,20,60,0.3),
    inset 0 0 20px rgba(220,20,60,0.08);
  z-index: 1;
  animation: founderRingPulse 2.5s ease-in-out infinite;
  pointer-events: none;
}

.founder-ring-outer {
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 1px dashed rgba(177,18,38,0.25);
  z-index: 1;
  animation: founderRingPulse 3.5s ease-in-out infinite reverse;
  pointer-events: none;
}

/* ── Card text ── */
.card-division {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.5em;
  color: rgba(177,18,38,0.8);
  text-transform: uppercase;
  margin-bottom: -4px;
}

.card-alias {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--crimson);
  letter-spacing: 0.2em;
  text-shadow: 0 0 20px rgba(220,20,60,0.7);
  line-height: 1.2;
}

.card-name {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.card-role {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 14px;
  border: 1px solid rgba(177,18,38,0.2);
  border-radius: 2px;
  background: rgba(139,0,0,0.1);
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.35em;
  color: rgba(50,200,80,0.85);
  margin-top: auto;
}

.card-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(50,200,80,0.85);
  box-shadow: 0 0 8px rgba(50,200,80,0.6);
  animation: livePulse 1.6s ease-in-out infinite;
}

.card-flip-hint {
  font-family: var(--font-mono);
  font-size: 0.45rem;
  letter-spacing: 0.3em;
  color: rgba(177,18,38,0.4);
  margin-top: 4px;
}

/* ─── CARD BACK ──────────────────────────────────────────────────── */

.back-alias {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--crimson);
  letter-spacing: 0.2em;
  text-shadow: 0 0 15px rgba(220,20,60,0.5);
}

.back-bio {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 0 1 auto;
}

.back-skills-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.4em;
  color: rgba(177,18,38,0.7);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.back-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.back-skill-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--text);
  padding: 5px 10px;
  background: rgba(139,0,0,0.15);
  border: 1px solid rgba(177,18,38,0.25);
  border-radius: 2px;
}

.back-socials {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.back-social-link {
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(177,18,38,0.3);
  border-radius: 2px;
  background: rgba(139,0,0,0.1);
  transition: var(--transition);
  text-decoration: none;
}

.back-social-link:hover {
  border-color: var(--crimson);
  background: rgba(220,20,60,0.15);
  box-shadow: 0 0 12px rgba(220,20,60,0.3);
  transform: translateY(-2px);
}

.back-social-link img {
  width: 16px; height: 16px;
  object-fit: contain;
  filter: brightness(0.8);
  transition: filter 0.3s;
}

.back-social-link:hover img {
  filter: brightness(1.4);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
  #team { padding: var(--section-pad-sm); }

  .team-corner { display: none; }
  .team-scan-line { display: none; }

  .team-card-wrap { height: 340px; }
  .team-card-wrap.is-founder { height: 380px; }

  @media (min-width: 900px) {
    .team-grid .team-card-wrap.is-founder {
      grid-column: span 1;
      max-width: none;
    }
  }
}

/* ─── REDUCED MOTION ─────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .team-bg-layer { transform: none !important; transition: none !important; }
  .team-scan-line { animation: none !important; }
  .founder-ring, .founder-ring-outer { animation: none !important; }
  .card-status-dot { animation: none !important; }
}