/* ============================================================
   COLLECTOR'S EDITION PORTFOLIO — style.css
   Theme: Foil card pack · holographic trading cards
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --yellow:  #FFD600;
  --red:     #E8001D;
  --dark:    #08080F;
  --mid:     #0E0E1E;
  --card-bg: #10101E;
  --text:    #F0F0F0;
  --muted:   #777;

  /* Card type colours */
  --web:   #2979FF;
  --game:  #FFD600;
  --xr:    #9C27B0;
  --td:    #FF5722;
  --ux:    #00BFA5;

  --font-main: 'Arial Black', 'Arial Bold', Arial, sans-serif;
  --font-body: 'Arial', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-body);
  padding-bottom: 64px;
}

/* ============================================================
   PACK SECTION
   ============================================================ */

.pack-section {
  height: 650vh;
  position: relative;
}

.pack-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(120,60,255,0.15) 0%, transparent 65%),
    radial-gradient(ellipse at 30% 70%, rgba(0,87,255,0.10) 0%, transparent 55%),
    var(--dark);
}

/* Scene wrapper */
.pack-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Scroll hint ---- */
.pack-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  animation: hintBob 2s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.5s;
  white-space: nowrap;
}
@keyframes hintBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   FOIL PACK
   ============================================================ */

.foil-pack {
  position: relative;  /* in flex flow so pack-scene centres it */
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 320px;
  /* Initial float animation; scroll JS will override transform */
  animation: packFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.7))
          drop-shadow(0 0 40px rgba(120,60,255,0.35));
  transform-origin: center center;
}

@keyframes packFloat {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50%       { transform: translateY(-10px) rotate(1deg); }
}

/* ---------- Pack top (tear-off seal) ---------- */
.pack-top {
  width: 100%;
  height: 70px;
  background: linear-gradient(
    135deg,
    #c8a000 0%, #ffe066 30%, #b8900a 55%, #ffd700 75%, #a07800 100%
  );
  position: relative;
  overflow: hidden;
  /* Serrated bottom edge */
  clip-path: polygon(
    0 0, 100% 0, 100% 100%,
    96% 70%, 92% 100%, 88% 70%, 84% 100%, 80% 70%,
    76% 100%, 72% 70%, 68% 100%, 64% 70%, 60% 100%,
    56% 70%, 52% 100%, 48% 70%, 44% 100%, 40% 70%,
    36% 100%, 32% 70%, 28% 100%, 24% 70%, 20% 100%,
    16% 70%, 12% 100%, 8%  70%, 4%  100%, 0  70%
  );
  transform-origin: top center;
  /* Pull the body up so teeth sit against the plastic, not the page bg */
  margin-bottom: -21px;
  z-index: 2;
}

.pack-top-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 20%, rgba(255,255,255,0.45) 40%,
    rgba(255,255,255,0.15) 50%, transparent 65%
  );
  animation: topShine 3s ease-in-out infinite;
  background-size: 200% 100%;
}
@keyframes topShine {
  0%   { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}

/* ---------- Pack body ---------- */
.pack-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      -55deg,
      transparent 0px, transparent 18px,
      rgba(255,255,255,0.025) 18px, rgba(255,255,255,0.025) 19px
    ),
    linear-gradient(170deg,
      #1a0533 0%,
      #16213e 20%,
      #0a1628 40%,
      #1b0840 60%,
      #0d1f3c 80%,
      #120a2e 100%
    );
  min-height: 430px;
}

/* Moving rainbow sheen sweep */
.pack-shine-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 25%,
    rgba(255,100,200,0.12) 35%,
    rgba(100,200,255,0.18) 45%,
    rgba(200,255,100,0.12) 55%,
    rgba(255,200,100,0.10) 65%,
    transparent 75%,
    transparent 100%
  );
  background-size: 300% 100%;
  animation: shineSweep 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shineSweep {
  0%   { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}

/* Pack label content */
.pack-label {
  position: relative;
  z-index: 2;
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.pack-edition {
  font-size: 11px;
  letter-spacing: 4px;
  color: rgba(255,214,0,0.7);
  text-transform: uppercase;
}

.pack-name {
  font-family: var(--font-main);
  font-size: 34px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1;
  text-shadow: 0 0 20px rgba(160,100,255,0.8);
}

.pack-series {
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}

.pack-hologram-badge {
  width: 56px;
  height: 56px;
  margin: 10px 0;
  border-radius: 50%;
  background: conic-gradient(
    #ff0080, #ff8800, #ffe000, #00e400, #00c8ff, #0040ff, #8000ff, #ff0080
  );
  display: flex;
  align-items: center;
  justify-content: center;
  animation: holoBadgeSpin 6s linear infinite;
  box-shadow: 0 0 16px rgba(160,100,255,0.6);
}
@keyframes holoBadgeSpin {
  from { filter: hue-rotate(0deg); }
  to   { filter: hue-rotate(360deg); }
}

.hologram-inner {
  font-size: 24px;
  color: #fff;
  text-shadow: 0 0 8px #fff;
}

.pack-meta-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 6px;
}

.pack-meta-item {
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}

.pack-meta-item.gold { color: var(--yellow); }

.pack-meta-divider { color: rgba(255,255,255,0.2); }

/* ---------- Pack base ---------- */
.pack-base {
  width: 100%;
  height: 24px;
  margin-top: -10px;
  z-index: 2;
  background: linear-gradient(
    135deg,
    #c8a000 0%, #ffe066 30%, #b8900a 55%, #ffd700 75%, #a07800 100%
  );
  clip-path: polygon(
    0 0, 4% 40%, 8% 0, 12% 40%, 16% 0, 20% 40%, 24% 0, 28% 40%,
    32% 0, 36% 40%, 40% 0, 44% 40%, 48% 0, 52% 40%, 56% 0, 60% 40%,
    64% 0, 68% 40%, 72% 0, 76% 40%, 80% 0, 84% 40%, 88% 0, 92% 40%,
    96% 0, 100% 40%, 100% 100%, 0 100%
  );
}

/* ============================================================
   CARDS
   ============================================================ */

/* Covers the full scene; card (0,0) = scene centre */
.cards-stage {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.card {
  position: absolute;
  /* Centre each card on the scene origin so JS translate is from centre */
  top: 50%;
  left: 50%;
  margin-left: -150px;
  margin-top: -210px;
  width: 300px;
  height: 420px;
  border-radius: 14px;
  cursor: pointer;
  pointer-events: all;
  transform-origin: center center;
  will-change: transform, opacity;
  transition: box-shadow 0.2s;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
}

/* Holographic foil overlay — subtle, activated on hover */
.card-foil-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  border-radius: 10px;
  /* Rainbow shifts with cursor position */
  background: conic-gradient(
    from calc(var(--foil-angle, 45deg)) at var(--mx, 50%) var(--my, 50%),
    rgba(255,0,128,0.18),
    rgba(255,136,0,0.18),
    rgba(255,230,0,0.18),
    rgba(0,230,0,0.18),
    rgba(0,200,255,0.18),
    rgba(0,64,255,0.18),
    rgba(128,0,255,0.18),
    rgba(255,0,128,0.18)
  );
  /* Shimmer band on top */
  background-image:
    linear-gradient(
      calc(var(--foil-angle, 45deg)),
      transparent 30%,
      rgba(255,255,255,0.12) 48%,
      rgba(255,255,255,0.22) 50%,
      rgba(255,255,255,0.12) 52%,
      transparent 70%
    ),
    conic-gradient(
      from calc(var(--foil-angle, 45deg)) at var(--mx, 50%) var(--my, 50%),
      rgba(255,0,128,0.18),
      rgba(255,136,0,0.18),
      rgba(255,230,0,0.18),
      rgba(0,230,0,0.18),
      rgba(0,200,255,0.18),
      rgba(0,64,255,0.18),
      rgba(128,0,255,0.18),
      rgba(255,0,128,0.18)
    );
  mix-blend-mode: overlay;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.card:hover .card-foil-layer,
.gyro-active .card-foil-layer { opacity: 1; }

/* Card frame base */
.card-frame {
  width: 100%;
  height: 100%;
  padding: 13px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-radius: 14px;
  position: relative;
}

/* Type-specific frame colours */
.card-frame.web  { background: linear-gradient(160deg, #0d1b4a 0%, #061228 100%); border: 2px solid #2979FF; box-shadow: inset 0 0 20px rgba(41,121,255,0.2); }
.card-frame.game { background: linear-gradient(160deg, #2a1e00 0%, #1a1200 100%); border: 2px solid #FFD600; box-shadow: inset 0 0 20px rgba(255,214,0,0.2);   }
.card-frame.xr   { background: linear-gradient(160deg, #1e0a2e 0%, #110618 100%); border: 2px solid #9C27B0; box-shadow: inset 0 0 20px rgba(156,39,176,0.2);  }
.card-frame.td   { background: linear-gradient(160deg, #2a0e00 0%, #1a0800 100%); border: 2px solid #FF5722; box-shadow: inset 0 0 20px rgba(255,87,34,0.2);   }
.card-frame.ux   { background: linear-gradient(160deg, #001e1a 0%, #001210 100%); border: 2px solid #00BFA5; box-shadow: inset 0 0 20px rgba(0,191,165,0.2);   }

/* Card header row */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-rarity {
  font-size: 11px;
  color: var(--yellow);
  letter-spacing: 1px;
}

.card-type-badge {
  font-family: var(--font-main);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
}
.card-type-badge.web  { background: rgba(41,121,255,0.25); color: #5090ff; }
.card-type-badge.game { background: rgba(255,214,0,0.20);  color: #ffd600; }
.card-type-badge.xr   { background: rgba(156,39,176,0.25); color: #ce6eff; }
.card-type-badge.td   { background: rgba(255,87,34,0.25);  color: #ff8a65; }
.card-type-badge.ux   { background: rgba(0,191,165,0.25);  color: #4dd0c4; }

/* Card name */
.card-title {
  font-family: var(--font-main);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(255,255,255,0.3);
  line-height: 1;
}

/* Art area */
.card-art {
  flex: 1;
  border-radius: 8px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-direction: column;
  gap: 6px;
}

.art-bg {
  position: absolute;
  inset: 0;
  opacity: 0.6;
}

.card-art.web-art  .art-bg { background: radial-gradient(ellipse at center, #1a3a8a 0%, #060e1e 100%); }
.card-art.game-art .art-bg { background: radial-gradient(ellipse at center, #5a3800 0%, #1a0e00 100%); }
.card-art.xr-art   .art-bg { background: radial-gradient(ellipse at center, #3a0a5a 0%, #110618 100%); }
.card-art.td-art   .art-bg { background: radial-gradient(ellipse at center, #5a1a00 0%, #1a0800 100%); }
.card-art.ux-art   .art-bg { background: radial-gradient(ellipse at center, #003a34 0%, #001210 100%); }

.art-icon {
  font-size: 48px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 8px currentColor);
}

.art-label {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  font-style: italic;
  position: relative;
  z-index: 1;
}

/* Power bar */
.card-power-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.power-label {
  font-family: var(--font-main);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  flex-shrink: 0;
}

.power-pip-row {
  display: flex;
  gap: 3px;
  flex: 1;
}

.pip {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.pip.filled {
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 0 4px rgba(255,214,0,0.6);
}

.power-num {
  font-family: var(--font-main);
  font-size: 16px;
  color: var(--yellow);
  flex-shrink: 0;
}

/* Divider */
.card-rule-line {
  height: 1px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

/* Abilities */
.card-ability {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ability-name {
  font-family: var(--font-main);
  font-size: 12px;
  color: #fff;
  letter-spacing: 0.5px;
}

.ability-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  line-height: 1.35;
}

/* Flavor text */
.card-flavor {
  font-size: 10px;
  font-style: italic;
  color: rgba(255,255,255,0.3);
  text-align: center;
  padding-top: 1px;
}

/* ============================================================
   WORKS (unchanged)
   ============================================================ */

.works-section { padding: 80px 40px; }

.section-title {
  font-family: var(--font-main);
  font-size: clamp(28px, 4vw, 48px);
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
}

.section-tag {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--yellow);
  font-family: var(--font-body);
  font-weight: normal;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.filter-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 18px;
  border-radius: 3px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-main);
}
.filter-btn:hover  { border-color: var(--yellow); color: var(--yellow); }
.filter-btn.active { background: var(--yellow); color: var(--dark); border-color: var(--yellow); }

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.work-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
}
.work-card:hover      { transform: translateY(-4px); border-color: var(--yellow); }
.work-card.hidden     { display: none; }

.work-card-img {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, #1a1a3e 0%, #0d0d1e 100%);
}
.work-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.15);
  font-size: 13px; letter-spacing: 2px;
  font-family: var(--font-main);
  border: 1px dashed rgba(255,255,255,0.08);
}
.work-category-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--yellow); color: var(--dark);
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  font-family: var(--font-main); padding: 3px 8px; border-radius: 2px;
}
.work-card-body { padding: 20px; }
.work-title { font-family: var(--font-main); font-size: 16px; color: #fff; margin-bottom: 8px; text-transform: uppercase; }
.work-desc  { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.work-link  { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--yellow); text-decoration: none; font-family: var(--font-main); transition: letter-spacing 0.2s; }
.work-link:hover { letter-spacing: 2px; }

/* ============================================================
   CONTACT
   ============================================================ */

.contact-section {
  padding: 100px 40px;
  background: var(--mid);
  display: flex;
  justify-content: center;
}
.contact-inner   { max-width: 560px; text-align: center; }
.contact-tag     { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--yellow); display: block; margin-bottom: 20px; }
.contact-headline { font-family: var(--font-main); font-size: clamp(32px, 4vw, 56px); text-transform: uppercase; color: #fff; line-height: 1.05; margin-bottom: 40px; }
.contact-links   { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.contact-btn {
  display: inline-block; background: var(--yellow); color: var(--dark);
  font-family: var(--font-main); font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase; text-decoration: none;
  padding: 12px 28px; border-radius: 3px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.contact-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,214,0,0.25); }
.contact-btn.outline { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.25); }
.contact-btn.outline:hover { border-color: var(--yellow); color: var(--yellow); box-shadow: none; }

/* ============================================================
   BOTTOM NAV
   ============================================================ */

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: 56px;
  background: rgba(8,8,15,0.95); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,214,0,0.15);
  display: flex; align-items: center; justify-content: center; gap: 40px;
  z-index: 100;
}
.nav-link { font-family: var(--font-main); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: var(--yellow); }


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
  .foil-pack { width: 90vw; }

  .card {
    width: 80vw;
    height: calc(80vw * 1.4);
    margin-left: -40vw;
    margin-top: calc(-40vw * 1.4);
    /* Cards are display-only on mobile — gyro drives the effect */
    cursor: default;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    user-select: none;
  }

  /* Scale card internals relative to the narrower card width.
     80vw card vs 300px desktop = 80vw/300px ratio.
     Setting font-size on card-frame lets em-like proportions
     work, but since we use px throughout, scale the whole frame. */
  .card-frame {
    transform: scale(calc(80vw / 300px));
    transform-origin: top left;
    width: 300px;
    height: calc(300px * 1.4);
    margin: 0;
  }

.works-section, .contact-section { padding: 60px 24px; }
  .bottom-nav { gap: 24px; }
}
