/* ============================================================
   style.css — The Game of Ashiq
   Personal Branding Site — Board Game Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:ital,wght@0,400;0,600;0,700;0,800;1,700&display=swap');

/* ── RESET & ROOT ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold:        #c8960a;
  --gold-light:  #f5c842;
  --gold-dark:   #8B6800;
  --green-board: #1a5c2e;
  --cream:       #fdf8ec;

  --col-origin:    #0891b2;
  --col-career:    #e87800;
  --col-education: #1e7acc;
  --col-personal:  #e03030;
  --col-venture:   #7a20cc;
  --col-future:    #888888;

  --font-head: 'Fredoka One', cursive;
  --font-body: 'Nunito', sans-serif;

  --shadow-board: 0 0 0 4px var(--gold), 0 0 0 8px var(--gold-dark), 0 12px 60px rgba(0,0,0,0.7);
  --shadow-panel: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-block: 0 2px 10px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.3);
  --shadow-block-hover: 0 6px 24px rgba(0,0,0,0.55), 0 0 0 3px var(--gold-light), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* ── BODY ─────────────────────────────────────────────────── */
html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--green-board);
  font-family: var(--font-body);
  color: #2d1a00;
  overflow-x: hidden;
}

/* ── HEADER ───────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(135deg, #2d1a00 0%, #5a3800 50%, #2d1a00 100%);
  border-bottom: 4px solid var(--gold);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  position: relative;
  z-index: 10;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  pointer-events: none;
}

.header-brand h1 {
  font-family: var(--font-head);
  font-size: 26px;
  color: var(--gold-light);
  letter-spacing: 2px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  line-height: 1;
}

.header-brand p {
  font-size: 10px;
  color: #c8a050;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 3px;
}

.header-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-btn {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--cream);
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(200,150,10,0.35);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  /* Reset button defaults */
  appearance: none;
  -webkit-appearance: none;
  line-height: normal;
}

.nav-btn:hover {
  background: var(--gold-dark);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* ── MAIN LAYOUT ──────────────────────────────────────────── */
.main-layout {
  display: flex;
  gap: 14px;
  padding: 26px 14px 14px;
  align-items: flex-start;
  max-width: 1500px;
  margin: 0 auto;
}

/* ── BOARD ────────────────────────────────────────────────── */
.board-frame {
  flex: 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-board);
  position: relative;
  background: #000;
  min-width: 0;
}

.board-relative {
  position: relative;
  width: 100%;
  line-height: 0;
}

.board-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

/* ── BLOCK OVERLAYS — CIRCLE BUTTONS ─────────────────────── */
.block {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  /* center the circle on its position point */
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 2.5px solid rgba(255,255,255,0.45);
  box-shadow: var(--shadow-block);
  overflow: hidden;
  user-select: none;
  z-index: 10;
}

/* Sheen highlight */
.block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}

/* Bottom shadow strip */
.block::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30%;
  background: rgba(0,0,0,0.18);
  border-radius: 0 0 50% 50%;
  pointer-events: none;
}

.block:hover {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: var(--shadow-block-hover);
  z-index: 20;
  border-color: rgba(255,255,255,0.75);
}

.block:active {
  transform: translate(-50%, -50%) scale(1.05);
}

/* Future blocks */
.block.future {
  background: rgba(80,80,80,0.55) !important;
  border: 2px dashed rgba(180,180,180,0.5) !important;
  box-shadow: none !important;
  filter: grayscale(0.5) brightness(0.85);
}

.block.future::before,
.block.future::after {
  display: none;
}

.block.future:hover {
  transform: translate(-50%, -50%) scale(1.12);
  filter: grayscale(0.3) brightness(0.95);
}

/* Visited blocks — subtly dimmed after exploring */
.block.visited {
  filter: brightness(0.78) saturate(0.8);
  border-color: rgba(255,255,255,0.28);
}

/* Filtered-out blocks — hidden from view when a legend filter is active */
.block.filtered-out {
  opacity: 0.08;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Active block — glowing ring while modal is open; overrides visited dimming */
.block.active {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.88), 0 0 22px rgba(255,255,255,0.35), 0 6px 24px rgba(0,0,0,0.55);
  z-index: 25;
  filter: none;
  border-color: rgba(255,255,255,0.8);
}

/* Block text */
.blk-label {
  font-family: var(--font-head);
  font-size: 8px;
  color: #fff;
  line-height: 1.1;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  letter-spacing: 0.2px;
  word-break: break-word;
  max-width: 42px;
}

/* Sub-label hidden on circles — info is in the modal */
.blk-sub {
  display: none;
}

.block.future .blk-label { color: #ccc; text-shadow: none; }

/* Calibration mode — press C to toggle */
body.calibrate .block {
  outline: 2px solid rgba(255, 255, 0, 0.9);
  outline-offset: 3px;
}

body.calibrate .block::after {
  display: flex;
  content: attr(data-id);
  position: absolute;
  inset: 0;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3px;
  font-size: 6px;
  color: yellow;
  background: none;
  height: auto;
  font-family: monospace;
  text-shadow: 0 0 4px #000;
  border-radius: 0;
}

/* ── CAR PIECE ────────────────────────────────────────────── */
.car-piece {
  position: absolute;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.7));
  transition:
    left  0.75s cubic-bezier(0.34, 1.56, 0.64, 1),
    top   0.75s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 30;
  pointer-events: none;
}

/* Replace with image when car.png is available */
.car-piece img {
  width: 36px;
  height: auto;
  display: block;
}

/* ── SIDE PANEL ───────────────────────────────────────────── */
.side-panel {
  width: 170px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-card {
  background: var(--cream);
  border: 3px solid var(--gold-dark);
  border-radius: 12px;
  padding: 11px 12px;
  box-shadow: var(--shadow-panel);
  position: relative;
  overflow: hidden;
}

.panel-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
}

.panel-title {
  font-family: var(--font-head);
  font-size: 11.5px;
  color: #2d1a00;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 9px;
  padding-bottom: 6px;
  border-bottom: 2px dashed var(--gold);
}

/* Legend */
.legend-hint {
  font-size: 8.5px;
  color: #8a6000;
  font-style: italic;
  margin-bottom: 6px;
  text-align: center;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #2d1800;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  transition: background 0.15s, opacity 0.15s, border-color 0.15s;
  user-select: none;
}

.leg-item:hover {
  background: rgba(0,0,0,0.06);
}

.leg-item.filter-active {
  background: rgba(0,0,0,0.09);
  border-color: rgba(0,0,0,0.22);
}

.leg-item.filter-dim {
  opacity: 0.35;
}

.leg-dot {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1.5px solid rgba(0,0,0,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

/* Stats */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #4a2800;
  padding: 4px 0;
  border-bottom: 1px dashed #d4a840;
}

.stat-row:last-child { border-bottom: none; }

.stat-val {
  font-family: var(--font-head);
  font-size: 16px;
  color: #8B3000;
}

/* Skills */
.chip {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  margin: 2px;
  background: #e0f0d0;
  border: 1.5px solid #4a8a3a;
  color: #1a4010;
}

/* How to play */
.how-text {
  font-size: 10px;
  color: #4a2800;
  line-height: 1.6;
  text-align: center;
}

.calibrate-hint {
  font-size: 9px;
  color: #8a6000;
  text-align: center;
  margin-top: 6px;
  font-style: italic;
}

/* ── MODAL OVERLAY ────────────────────────────────────────── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.modal-bg.open {
  display: flex;
}

/* Card uses the card.png as background */
.modal-card {
  position: relative;
  width: 320px;
  min-height: 440px;
  background-image: url('../assets/card.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding: 148px 38px 44px;
  display: flex;
  flex-direction: column;
  animation: cardFlip 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

/* Absolutely positioned over the green header zone of card.png */
.card-header {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 36px;
}

@keyframes cardFlip {
  from { transform: rotateY(90deg) scale(0.85); opacity: 0; }
  to   { transform: rotateY(0deg)  scale(1);    opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px; right: 18px;
  background: var(--gold-dark);
  color: var(--cream);
  border: none;
  border-radius: 50%;
  width: 28px; height: 28px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: background 0.2s;
}

.modal-close:hover { background: #5a3800; }

/* Card content */
.m-type {
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
  border: 1.5px solid transparent;
  text-align: center;
}

.m-title {
  font-family: var(--font-head);
  font-size: 18px;
  color: #1a0e00;
  line-height: 1.2;
  margin-bottom: 10px;
  text-align: center;
  width: 100%;
}

.m-tagline {
  font-size: 11px;
  font-style: italic;
  font-weight: 700;
  color: #7a3a00;
  background: rgba(245,200,66,0.22);
  border: 1.5px solid rgba(200,150,10,0.4);
  padding: 7px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  line-height: 1.5;
  text-align: center;
  width: 100%;
}

.m-desc {
  font-size: 11px;
  color: #2a1800;
  line-height: 1.7;
  margin-bottom: 14px;
  flex: 1;
  width: 100%;
  text-align: left;
}

.m-stats {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  justify-content: center;
  width: 100%;
}

.m-stat {
  background: rgba(255,255,255,0.65);
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
  color: #1a0e00;
  text-align: center;
  min-width: 58px;
}

.m-stat span {
  display: block;
  font-size: 8px;
  font-weight: 600;
  color: #6a4000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.m-note {
  font-size: 9px;
  color: #9a7000;
  text-align: center;
  font-style: italic;
  width: 100%;
}

/* ── CHIP / STAT POPOVERS ─────────────────────────────────── */
.chip-popover,
.stat-popover {
  position: absolute;
  z-index: 9999;
  background: var(--cream);
  border: 2px solid var(--gold-dark);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 170px;
  animation: popoverIn 0.15s cubic-bezier(0.34,1.56,0.64,1);
}

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

.chip-popover a,
.stat-popover a {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: #2d1800;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background 0.15s;
  white-space: nowrap;
}

.chip-popover a:hover,
.stat-popover a:hover {
  background: rgba(200,150,10,0.15);
  color: var(--gold-dark);
}

/* Stat value links */
.stat-link {
  color: #8B3000;
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 16px;
  transition: color 0.2s;
  cursor: pointer;
}

.stat-link:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: linear-gradient(135deg, #2d1a00 0%, #5a3800 50%, #2d1a00 100%);
  border-top: 3px solid var(--gold);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 10;
}

.footer-copy {
  font-size: 10px;
  color: #c8a050;
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-link {
  font-family: var(--font-head);
  font-size: 11px;
  color: var(--cream);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-link:hover { opacity: 1; color: var(--gold-light); }

/* ── HERO OVERLAY ─────────────────────────────────────────── */
@keyframes heroGradient {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

.hero-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow: hidden;
  background: linear-gradient(135deg, #0d0a05, #2d1a00, #1a0e00, #0d0a05);
  background-size: 400% 400%;
  animation: heroGradient 10s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Video fills the hero, letterboxed/centred */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

/* ── BUTTON ── */
.hero-btn-wrap {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

.hero-btn {
  font-family: var(--font-head);
  font-size: 18px;
  letter-spacing: 2.5px;
  color: #1a0e00;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  border: none;
  border-radius: 40px;
  padding: 16px 42px;
  cursor: pointer;
  box-shadow: 0 0 0 3px var(--gold-dark), 0 8px 32px rgba(0,0,0,0.8);
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px var(--gold-light), 0 12px 40px rgba(0,0,0,0.9);
}

/* Board hidden initially — GSAP animates it in */
.main-layout {
  opacity: 0;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .main-layout {
    flex-direction: column;
    padding: 10px;
  }
  .side-panel {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .panel-card {
    flex: 1;
    min-width: 130px;
  }
  .header-brand h1 { font-size: 20px; }
}

@media (max-width: 600px) {
  .site-header { flex-direction: column; gap: 8px; text-align: center; }
  .modal-card { width: 290px; padding: 140px 28px 36px; }
  .block { width: 24px; height: 24px; }
  .blk-label { display: none; }
  .blk-sub   { display: none; }
}

