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

:root {
  --neon-green:    #00ff88;
  --green-soft:    #44ffaa;
  --green-ghost:   #00ff8812;
  --green-border:  #00ff8828;
  --green-border2: #00ff8845;
  --glass-bg:      rgba(10, 18, 12, 0.45);
  --red:           #ff2244;
  --bg:            #0e0e0e;
  --surface:       #131313;
  --surface2:      #1a1a1a;
  --text:          #c8ffe4;
  --text-dim:      #7dcca0;
  --text-ghost:    #3a6e52;
  --mono:          'IBM Plex Mono', monospace;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  cursor: default;
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ORIGINAL GRID CSS — verbatim from uploaded styles.css
   Special-text classes kept in CSS but grid JS no longer assigns them.
   ═══════════════════════════════════════════════════════════════════════════ */

.hover-img {
  position: relative;
  overflow: visible;
}

.grid-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 10;
}

.grid-block {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: black;
  color: #c8ffe4;
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.grid-block.active { opacity: 1; }

/* reveal-green kept for bg card hover effect */
.grid-block.reveal-green {
  color: #00ff88 !important;
  opacity: 1 !important;
  transform: scale(2.2);
  z-index: 20;
  font-weight: bold;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.7);
}

/* ═══════════════════════════════════════════════════════════════════════════
   END ORIGINAL GRID CSS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Background card layer ─────────────────────────────────────────────── */
.bg-cards {
  position: fixed; inset: 0;
  isolation: isolate;
  pointer-events: none;
}
.bg-cards .card { pointer-events: all; }

.card {
  position: fixed;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
  animation: float 6s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.card::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid transparent; border-radius: inherit;
  background: linear-gradient(135deg, var(--neon-green), var(--green-soft)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0.28; pointer-events: none;
}

.card--lg { width: 18vw; height: 25vh; }
.card--md { width: 12vw; height: 18vh; }
.card--sm { width:  8vw; height: 12vh; }

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

.card-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,0.25);
  background: linear-gradient(45deg, rgba(0,255,136,0.06), rgba(68,255,170,0.06));
}
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── Centre stage ──────────────────────────────────────────────────────── */
.stage {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding-bottom: 5vh;
  z-index: 10; pointer-events: none;
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */
#mainHero {
  position: relative;
  width: clamp(280px, 35vw, 520px);
  aspect-ratio: 5 / 3;
  pointer-events: all;
  flex-shrink: 0;
  /* Grid layout stacks all children in the same cell reliably */
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 1fr;
}

/* All direct children share the same grid cell */
#mainHero > * {
  grid-row: 1;
  grid-column: 1;
}

.hero-img {
  width: 100%; height: 100%;
  z-index: 0;
}
.hero-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.hero-ph {
  width: 100%; height: 100%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
}
.hero-ph span { font-size: 10px; letter-spacing: 0.18em; color: var(--text-ghost); }

/* ─── REGISTER NOW overlays ─────────────────────────────────────────────── */
/* hero-register defined in the REGISTER NOW section below */

/* ─── Dock ──────────────────────────────────────────────────────────────── */
.dock {
  margin-top: calc(clamp(24px, 4vh, 48px) + 70px);
  width: clamp(280px, 35vw, 520px);
  display: flex;
  background: var(--surface);
  border: 1px solid var(--green-border2);
  border-radius: 0 0 4px 4px;
  pointer-events: all;
  position: relative; z-index: 2;
}

.dock-btn {
  flex: 1; padding: 0; background: transparent; border: none;
  border-right: 1px solid var(--green-border);
  color: var(--text-dim); font-family: var(--mono);
  font-size: 9px; font-weight: 500; letter-spacing: 0.1em;
  cursor: pointer; overflow: hidden; position: relative;
  transition: background 0.15s, color 0.15s;
}
.dock-btn:last-child { border-right: none; }
.dock-btn:hover, .dock-btn.is-open { background: var(--green-ghost); color: var(--neon-green); }

.dock-btn-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px; padding: 10px 6px 8px;
}
.dock-btn-icon  { font-size: 14px; opacity: 0.55; transition: opacity 0.15s; }
.dock-btn:hover .dock-btn-icon, .dock-btn.is-open .dock-btn-icon { opacity: 1; }
.dock-btn-label { font-size: 9px; white-space: nowrap; line-height: 1; }
.dock-btn-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--neon-green); opacity: 0; transition: opacity 0.2s;
}
.dock-btn.is-open .dock-btn-dot { opacity: 1; }
.dock-btn::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--neon-green); transition: width 0.25s ease;
}
.dock-btn:hover::after, .dock-btn.is-open::after { width: 100%; }

/* ─── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 18px;
  width: clamp(280px, 35vw, 520px);
  pointer-events: all;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--green-border);
  border-top: none;
  background: var(--surface);
}

/* TEDxYouthPTNK logo slot */
.footer-brand {
  display: flex;
  align-items: center;
}
/* Real logo: swap .footer-logo-ph for <img src="tedxyouthptnk-logo.png" alt="TEDxYouthPTNK" class="footer-logo-img" /> */
.footer-logo-ph {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--red);
}
.footer-logo-img {
  height: 22px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Social icons */
.footer-socials {
  display: flex;
  gap: 14px;
  align-items: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-ghost);
  text-decoration: none;
  transition: color 0.2s ease;
}
.social-link:hover { color: var(--neon-green); }

.social-icon {
  width: 16px;
  height: 16px;
  display: block;
}

/* ─── Window layer ──────────────────────────────────────────────────────── */
.window-layer { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

/* ─── Terminal window ───────────────────────────────────────────────────── */
.term-window {
  position: absolute; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--green-border2);
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--green-ghost), 0 20px 60px rgba(0,0,0,0.65);
  pointer-events: all; min-width: 340px; min-height: 220px;
  overflow: hidden;
  animation: winOpen 0.2s cubic-bezier(0.16,1,0.3,1) forwards;
  transform-origin: top center;
}
@keyframes winOpen {
  from { opacity:0; transform:scale(0.94) translateY(8px); }
  to   { opacity:1; transform:scale(1)    translateY(0); }
}
.term-window.closing { animation: winClose 0.15s ease forwards; }
@keyframes winClose {
  from { opacity:1; transform:scale(1); }
  to   { opacity:0; transform:scale(0.93) translateY(5px); }
}

.term-titlebar {
  display: flex; align-items: center;
  padding: 0 12px; height: 36px;
  background: var(--surface2); border-bottom: 1px solid var(--green-border);
  cursor: grab; flex-shrink: 0; gap: 10px;
}
.term-titlebar:active { cursor: grabbing; }
.term-lights { display: flex; flex-shrink: 0; }
.term-light {
  width: 12px; height: 12px; border-radius: 50%;
  border: none; cursor: pointer; position: relative;
  transition: filter 0.15s; flex-shrink: 0;
}
.term-light:hover { filter: brightness(1.2); }
.term-light--close { background: #ff5f57; }
.term-light--close::after {
  content: '×'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 900; color: rgba(0,0,0,0.45);
  opacity: 0; transition: opacity 0.1s;
}
.term-light--close:hover::after { opacity: 1; }

.term-title-group {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
}
.term-title-icon { font-size: 13px; opacity: 0.7; }
.term-title { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; color: var(--text-dim); pointer-events: none; }

/* ─── Window body ───────────────────────────────────────────────────────── */
.term-body {
  flex: 1; padding: 16px 18px; overflow-y: auto;
  font-size: 12px; line-height: 1.9; color: var(--text-dim); background: var(--surface);
}
.term-prompt { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 2px; }
.term-prompt-symbol { color: var(--neon-green); flex-shrink: 0; }
.term-prompt-cmd    { color: var(--neon-green); font-weight: 500; }
.term-output-line      { display: block; color: var(--text-dim); }
.term-output-line.hi   { color: #aaffdd; }
.term-output-line.acc  { color: var(--neon-green); }
.term-output-line.warn { color: var(--red); }
.term-output-line.dim  { color: var(--text-ghost); }

.term-cursor {
  display: inline-block; width: 7px; height: 13px;
  background: var(--neon-green); vertical-align: middle; margin-left: 3px;
  animation: cursorBlink 1.1s step-end infinite;
}
@keyframes cursorBlink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── Window image blocks ────────────────────────────────────────────────── */
.term-img-wrap {
  margin: 10px 0 14px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.term-img {
  width: 100%; max-height: 200px;
  object-fit: cover; display: block;
  border-radius: 4px; border: 1px solid var(--green-border2);
  filter: saturate(0.8) brightness(0.85);
  transition: filter 0.5s ease;
  animation: imgReveal 0.5s ease forwards;
}
.term-img:hover {
  filter: saturate(1.1) brightness(1.05);
  border-color: var(--neon-green);
}
@keyframes imgReveal {
  from { opacity: 0; filter: brightness(0.3) saturate(0); transform: scaleY(0.97); }
  to   { opacity: 1; filter: saturate(0.8) brightness(0.85); transform: scaleY(1); }
}
.term-img-caption { font-size: 10px; letter-spacing: 0.12em; color: var(--text-ghost); padding-left: 2px; }
.term-img-wrap::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: calc(100% - 22px);
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.08) 3px, rgba(0,0,0,0.08) 4px);
  border-radius: 4px; pointer-events: none;
}
.term-img-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 14px;
}
.term-img-grid .term-img-wrap { margin: 0; }
.term-img-grid .term-img      { max-height: 130px; }
.term-speaker-card {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--green-border2); border-radius: 4px;
  overflow: hidden; background: var(--surface2);
  transition: border-color 0.2s ease;
}
.term-speaker-card:hover { border-color: var(--neon-green); }
.term-speaker-card .term-img { border-radius: 0; border: none; max-height: 140px; margin: 0; }
.term-speaker-name { padding: 6px 10px 7px; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; color: var(--neon-green); border-top: 1px solid var(--green-border); background: var(--surface2); }
.term-speaker-role { padding: 0 10px 7px; font-size: 9px; letter-spacing: 0.1em; color: var(--text-ghost); }
.term-logo-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 14px; align-items: center; }
.term-logo { height: 38px; width: auto; max-width: 110px; object-fit: contain; border: 1px solid var(--green-border); border-radius: 3px; padding: 5px 8px; background: rgba(0,0,0,0.4); filter: grayscale(0.5) brightness(0.85); transition: filter 0.25s ease, border-color 0.25s ease; }
.term-logo:hover { filter: grayscale(0) brightness(1.05); border-color: var(--neon-green); }
.term-section { font-size: 9px; font-weight: 600; letter-spacing: 0.2em; color: var(--text-ghost); text-transform: uppercase; margin: 14px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--green-border); }
.term-img-missing { padding: 10px 0; font-size: 11px; color: var(--red); font-style: italic; }

/* Resize handle */
.term-resize { position: absolute; bottom:0; right:0; width:16px; height:16px; cursor:nwse-resize; }
.term-resize::before { content:''; position:absolute; bottom:3px; right:3px; width:6px; height:6px; border-right: 1.5px solid var(--green-border2); border-bottom: 1.5px solid var(--green-border2); }
.term-body::-webkit-scrollbar { width: 3px; }
.term-body::-webkit-scrollbar-track { background: transparent; }
.term-body::-webkit-scrollbar-thumb { background: var(--green-border2); border-radius: 2px; }


/* ═══════════════════════════════════════════════════════════════════════════
   REGISTER NOW — single centred overlay (replaces left/right variants)
   justify-self: center + align-self: center places it dead-centre in the
   CSS grid cell that #mainHero uses to stack its children.
   ═══════════════════════════════════════════════════════════════════════════ */
.hero-register {
  /* Button reset */
  appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  /* Positioning — centred in CSS grid cell */
  justify-self: center;
  align-self: center;
  z-index: 50;              /* always on top of grid (z:10), image (z:0) */
  /* Visual */
  padding: 7px 22px 9px;
  background: rgba(0, 0, 0, 0.88);
  color: #00ff88;
  font-family: var(--mono);
  font-size: clamp(11px, 1.6vw, 18px);
  font-weight: 700;
  letter-spacing: 0.28em;
  white-space: nowrap;
  text-shadow:
    0 0 8px  rgba(0, 255, 136, 0.95),
    0 0 24px rgba(0, 255, 136, 0.45);
  outline: 1px solid rgba(0, 255, 136, 0.3);
  /* Interaction */
  pointer-events: all;
  user-select: none;
  transition:
    opacity 1.2s ease,
    background 0.2s ease,
    outline-color 0.2s ease,
    text-shadow 0.2s ease;
  /* Hidden until JS adds .visible */
  opacity: 0;
}
.hero-register:hover {
  background: rgba(0, 255, 136, 0.12);
  outline-color: rgba(0, 255, 136, 0.8);
  text-shadow:
    0 0 12px rgba(0, 255, 136, 1),
    0 0 32px rgba(0, 255, 136, 0.6);
}
.hero-register:active {
  background: rgba(0, 255, 136, 0.22);
  transform: scale(0.97);
}
.hero-register.visible { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE — breakpoint ≤ 600px
   Shows: hero (full width), dock, footer social bar.
   Hides: bg-cards, windows (too small to be useful).
   ═══════════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE REFACTOR — Optimized for Tickets & Socials
   ═══════════════════════════════════════════════════════════════════════════ */


.media-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.media-slot.has-image img,
.media-slot img[src]:not([src=""]) {
  display: block;
}

.media-slot.has-image .card-ph,
.media-slot img[src]:not([src=""]) + .card-ph {
  display: none;
}

@media (max-width: 600px) {
  html, body {
    overflow: hidden;
  }

  .stage {
    justify-content: center;
    padding: 0;
  }

  .bg-cards {
    pointer-events: none;
  }

  .bg-cards .card {
    animation-duration: 7.5s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.38), inset 0 1px 0 rgba(255,255,255,0.04);
  }

  .bg-cards .card::after {
    opacity: 0.18;
  }

  .grid-overlay,
  .window-layer,
  .dock,
  .footer-brand {
    display: none !important;
  }

  #mainHero {
    width: min(76vw, 320px);
    aspect-ratio: 1 / 1;
    z-index: 20;
  }

  #mainHero::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid var(--green-border2);
    background:
      radial-gradient(circle at center, rgba(0,255,136,0.08), transparent 62%),
      rgba(10, 18, 12, 0.52);
    box-shadow:
      0 0 0 1px var(--green-ghost),
      0 20px 40px rgba(0,0,0,0.42);
    z-index: 0;
  }

  .hero-register {
    padding: 10px 18px 12px;
    font-size: clamp(13px, 4vw, 17px);
    letter-spacing: 0.22em;
    text-align: center;
    max-width: calc(100% - 32px);
    white-space: normal;
    line-height: 1.35;
    opacity: 1;
    pointer-events: all;
    z-index: 50;
  }

  .site-footer {
    position: fixed;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: auto;
    margin-top: 0;
    z-index: 25;
  }

  .footer-inner {
    justify-content: center;
    gap: 0;
    padding: 10px 16px;
    border-top: 1px solid var(--green-border);
    background: rgba(19,19,19,0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .footer-socials {
    gap: 18px;
  }

  .social-icon {
    width: 18px;
    height: 18px;
  }

  .card--lg {
    width: 25vw;
    height: 16vh;
  }

  .card--md {
    width: 21vw;
    height: 13vh;
  }

  .card--sm {
    width: 18vw;
    height: 10.5vh;
  }

  .bg-cards .card:nth-child(1)  { left: 2vw !important;  top: 6vh !important; }
  .bg-cards .card:nth-child(2)  { left: 18vw !important; top: 18vh !important; }
  .bg-cards .card:nth-child(3)  { left: 4vw !important;  top: 38vh !important; }
  .bg-cards .card:nth-child(4)  { left: 10vw !important; top: 58vh !important; }
  .bg-cards .card:nth-child(5)  { left: 6vw !important;  top: 74vh !important; }
  .bg-cards .card:nth-child(6)  { left: 22vw !important; top: 84vh !important; }

  .bg-cards .card:nth-child(7)  { right: 2vw !important;  top: 7vh !important; }
  .bg-cards .card:nth-child(8)  { right: 18vw !important; top: 20vh !important; }
  .bg-cards .card:nth-child(9)  { right: 5vw !important;  top: 39vh !important; }
  .bg-cards .card:nth-child(10) { right: 10vw !important; top: 57vh !important; }
  .bg-cards .card:nth-child(11) { right: 6vw !important;  top: 73vh !important; }
  .bg-cards .card:nth-child(12) { right: 21vw !important; top: 83vh !important; }
}