/* ═══════════════════════════════════════════════════════════════════════════
   PIDCS Public Website — Stylesheet
   Fonts: IRANSans (FA) / Inter via system-ui (EN)
   Theme: Dark  |  Bilingual: EN (LTR) / FA (RTL)
═══════════════════════════════════════════════════════════════════════════ */

/* ── IRANSans Font Faces ──────────────────────────────────────────────── */

@font-face {
  font-family: 'IRANSans';
  src: url('assets/fonts/IRANSans_UltraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSans';
  src: url('assets/fonts/IRANSans_Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSans';
  src: url('assets/fonts/IRANSans.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSans';
  src: url('assets/fonts/IRANSans_Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSans';
  src: url('assets/fonts/IRANSans_Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── CSS Variables ────────────────────────────────────────────────────── */

:root {
  --font-en: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-fa: 'IRANSans', 'Vazirmatn', Tahoma, Arial, sans-serif;

  --bg:            #0b0d14;
  --bg-card:       #111420;
  --bg-input:      #161926;
  --border:        rgba(255,255,255,0.08);
  --border-hover:  rgba(99,102,241,0.5);

  --text-primary:  #f1f5f9;
  --text-secondary:#cbd5e1;
  --text-muted:    #64748b;

  --accent:        #6366f1;
  --accent-hover:  #4f52c9;
  --accent-glow:   rgba(99,102,241,0.25);

  --gold:          #d4a843;
  --gold-glow:     rgba(212,168,67,0.2);

  --green:         #22c55e;
  --green-glow:    rgba(34,197,94,0.15);

  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     20px;

  --transition:    0.2s ease;
}

/* ── Reset & Base ─────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* English (LTR) base */
html[data-lang="en"] {
  direction: ltr;
  font-family: var(--font-en);
}

/* Farsi (RTL) base */
html[data-lang="fa"] {
  direction: rtl;
  font-family: var(--font-fa);
}

body {
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Apply IRANSans to ALL text elements in FA mode */
html[data-lang="fa"] * {
  font-family: var(--font-fa) !important;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; }
textarea, input { font-family: inherit; }

/* ── Layout helpers ───────────────────────────────────────────────────── */

.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; z-index: 1; }

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11,13,20,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--gold-glow));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.brand-tagline {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-lang="fa"] .brand-tagline {
  letter-spacing: 0;
  font-size: 0.75rem;
}

/* Language toggle */
/* Language toggle — always IRANSans so both 'فارسی' (in EN mode) and 'English' (in FA mode) render correctly */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font-fa) !important;  /* IRANSans supports Latin + Farsi */
  background: var(--bg-card);
  transition: var(--transition);
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--accent-glow);
}

html[data-lang="fa"] .lang-toggle {
  font-size: 0.9rem;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  padding: 140px 0 80px;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.hero-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px var(--gold-glow)) drop-shadow(0 0 80px rgba(212,168,67,0.1));
  animation: hero-logo-pulse 4s ease-in-out infinite;
}

@keyframes hero-logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 30px var(--gold-glow)) drop-shadow(0 0 60px rgba(212,168,67,0.08)); }
  50%       { filter: drop-shadow(0 0 60px rgba(212,168,67,0.5)) drop-shadow(0 0 100px rgba(212,168,67,0.2)); }
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

html[data-lang="fa"] .hero-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: 0;
  line-height: 1.5;
}

.hero-sub {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

html[data-lang="fa"] .hero-sub {
  font-size: 1rem;
  line-height: 2;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  letter-spacing: 0.01em;
}

html[data-lang="fa"] .btn {
  font-family: var(--font-fa);
  font-weight: 500;
  letter-spacing: 0;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 30px rgba(99,102,241,0.45);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--border-hover);
  color: var(--text-secondary);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--accent-glow);
  transform: translateY(-1px);
}

/* ── Section headers ──────────────────────────────────────────────────── */

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

html[data-lang="fa"] .section-header h2 {
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  line-height: 1.6;
}

.section-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

html[data-lang="fa"] .section-header p {
  font-size: 0.95rem;
  line-height: 2;
}

/* ── Stats Bar ───────────────────────────────────────────────────────── */

.stats-bar {
  padding: 32px 0 40px;
  background: var(--bg);
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 80px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.stat-num {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
  min-width: 3ch;
  text-align: center;
}

.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

html[data-lang="fa"] .stat-label {
  font-family: var(--font-fa);
  letter-spacing: 0;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .stats-grid { gap: 40px; }
  .stat-num   { font-size: 1.8rem; }
}

/* ── About section ────────────────────────────────────────────────────── */

.about {
  padding: 80px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
}

.about-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(99,102,241,0.1);
}

.about-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(212,168,67,0.08);
  border: 1px solid rgba(212,168,67,0.2);
  color: var(--gold);
}

.about-icon svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.about-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

html[data-lang="fa"] .about-card h3 {
  font-size: 1rem;
  line-height: 1.8;
}

.about-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-weight: 300;
}

html[data-lang="fa"] .about-card p {
  font-size: 0.9rem;
  line-height: 2;
  font-weight: 400;
}

/* ── Submit section ───────────────────────────────────────────────────── */

.submit-section {
  padding: 80px 0 0;
}

.submit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 760px;
  margin: 0 auto;
}

/* Platform tabs */
.platform-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

html[data-lang="fa"] .tab-btn {
  font-family: var(--font-fa);
}

/* Input row */
.input-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.input-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-icon {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.input-row input[type="url"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 13px 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  min-width: 0;
}

html[data-lang="fa"] .input-row input[type="url"] {
  font-family: var(--font-fa);
  font-size: 0.9rem;
  direction: ltr; /* URLs are always LTR */
  text-align: left;
}

.input-row input::placeholder { color: var(--text-muted); font-size: 0.85rem; }

.collect-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 20px;
  background: var(--accent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  border-left: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}

html[data-lang="fa"] .collect-btn {
  font-family: var(--font-fa);
  border-left: none;
  border-right: 1px solid rgba(255,255,255,0.1);
  font-weight: 500;
}

.collect-btn:hover { background: var(--accent-hover); }
.collect-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Hints */
.input-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  padding: 0 4px;
}

.input-hints span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

html[data-lang="fa"] .input-hints span {
  font-family: var(--font-fa);
  font-size: 0.82rem;
}

/* Notes textarea */
.notes-row {
  margin-top: 16px;
}

.notes-row textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.88rem;
  resize: vertical;
  outline: none;
  transition: var(--transition);
  line-height: 1.6;
}

html[data-lang="fa"] .notes-row textarea {
  font-family: var(--font-fa);
  font-size: 0.9rem;
  line-height: 1.9;
}

.notes-row textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.notes-row textarea::placeholder { color: var(--text-muted); }

/* Form feedback message */
.form-message {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: none;
}

html[data-lang="fa"] .form-message {
  font-family: var(--font-fa);
  font-size: 0.9rem;
}

.form-message.success {
  display: block;
  background: var(--green-glow);
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--green);
}

.form-message.error {
  display: block;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  align-items: stretch;
}

.footer-info {
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px var(--gold-glow));
}

.footer-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

html[data-lang="fa"] .footer-info p {
  font-family: var(--font-fa);
  font-size: 0.9rem;
  line-height: 2;
}

.bmc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  align-self: flex-start;
  padding: 9px 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.bmc-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.bmc-btn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}
html[data-lang="fa"] .bmc-btn span {
  font-family: var(--font-fa);
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.footer-email:hover { border-color: var(--accent); }

.footer-form-wrap h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

html[data-lang="fa"] .footer-form-wrap h3 {
  font-family: var(--font-fa);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Collaboration form */
.collab-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.collab-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 500px) {
  .collab-row { grid-template-columns: 1fr; }
}

.collab-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.collab-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

html[data-lang="fa"] .collab-field label {
  font-family: var(--font-fa);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
  font-weight: 500;
}

.collab-field input,
.collab-field textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

html[data-lang="fa"] .collab-field input,
html[data-lang="fa"] .collab-field textarea {
  font-family: var(--font-fa);
  font-size: 0.9rem;
  line-height: 1.9;
}

.collab-field input:focus,
.collab-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.collab-field input::placeholder,
.collab-field textarea::placeholder { color: var(--text-muted); }

.collab-field textarea {
  resize: vertical;
  min-height: 96px;
}

.collab-submit-btn {
  align-self: flex-start;
  margin-top: 4px;
}

html[data-lang="fa"] .collab-submit-btn {
  font-family: var(--font-fa);
}

/* Footer bottom bar */
.footer-bottom {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

html[data-lang="fa"] .footer-bottom p {
  font-family: var(--font-fa);
  font-size: 0.85rem;
}

/* ── About note (secondary paragraph in cards) ───────────────────────── */

.about-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

html[data-lang="fa"] .about-note {
  font-family: var(--font-fa);
  font-size: 0.82rem;
  line-height: 1.9;
}

.about-algorithms {
  color: rgba(99,102,241,0.75);
  font-family: 'Inter', monospace;
  font-size: 0.76rem;
}

html[data-lang="fa"] .about-algorithms {
  font-family: var(--font-fa);
  font-size: 0.8rem;
  color: rgba(99,102,241,0.8);
}

/* ── In Memoriam — Torch-reveal gallery ─────────────────────────────────── */

.memoriam {
  background: #000;
  position: relative;
  z-index: 1;
  cursor: none;
}

/* Stage wraps only the grid — overlay stays off the header */
.mem-stage {
  position: relative;
}

/* Dark overlay with radial cutout — torch effect */
.mem-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  -webkit-mask-image: radial-gradient(
    circle var(--r, 130px) at var(--x, 50%) var(--y, 50%),
    transparent 0%,
    transparent 58%,
    black 100%
  );
  mask-image: radial-gradient(
    circle var(--r, 130px) at var(--x, 50%) var(--y, 50%),
    transparent 0%,
    transparent 58%,
    black 100%
  );
  pointer-events: auto;
  z-index: 6;
}

/* Custom torch cursor (candle icon) */
.mem-torch {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-9999px, -9999px);
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.35s ease;
  filter: drop-shadow(0 0 8px rgba(249,170,71,0.7));
}

.mem-torch.visible {
  opacity: 1;
}
}

.memoriam-header {
  text-align: center;
  padding: 52px 24px 36px;
}

.memoriam-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.memoriam-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212,168,67,0.5), transparent);
}

.memoriam-title {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(212,168,67,0.85);
  white-space: nowrap;
}

html[data-lang="fa"] .memoriam-title {
  font-family: var(--font-fa);
  letter-spacing: 0;
  font-size: 1rem;
  font-weight: 300;
}

.memoriam-subtitle {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.08em;
  text-align: center;
}

html[data-lang="fa"] .memoriam-subtitle {
  font-family: var(--font-fa);
  letter-spacing: 0;
  font-size: 0.88rem;
}

/* ── 6-column photo grid ─────────────────────────────────────────────── */

.mem-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  padding-bottom: 64px;
}

.mem-cell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #08090d;
  cursor: pointer;
}

/* Photo */
.mem-cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: transform 0.55s ease, opacity 0.42s ease;
}

.mem-cell img.loaded { opacity: 1; }

/* Fade-out state during torch-swap */
.mem-cell img.mem-swap-out {
  opacity: 0 !important;
  transform: scale(0.97);
}

/* Cell-level swap — briefly dim the whole cell before new image arrives */
.mem-cell--swap {
  transition: opacity 0.3s ease;
  opacity: 0.15;
}

.mem-cell:hover img { transform: scale(1.07); }

/* Dark gradient overlay — deepens on hover */
.mem-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    transparent 45%,
    rgba(0,0,0,0.55) 100%);
  transition: background 0.4s ease;
  pointer-events: none;
}

.mem-cell:hover::after {
  background: linear-gradient(to bottom,
    transparent 30%,
    rgba(150,100,10,0.38) 100%);
}

/* Golden border flash on hover */
.mem-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color 0.4s ease;
  pointer-events: none;
  z-index: 2;
}

.mem-cell:hover::before {
  border-color: rgba(212,168,67,0.35);
}

/* Loading placeholder with candle flame */
.mem-cell--loading {
  background: radial-gradient(ellipse at 50% 40%,
    rgba(212,168,67,0.09) 0%,
    #06070b 70%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Candle flame (loading state) ─────────────────────────────────────── */

.mem-flame {
  width: 28px;
  height: 44px;
  position: relative;
  animation: mem-flicker 2.4s ease-in-out infinite;
}

.mem-flame::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 14px;
  background: rgba(212,168,67,0.9);
  border-radius: 50% 50% 30% 30% / 60% 60% 40% 40%;
}

.mem-flame::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 26px;
  background: radial-gradient(ellipse at 50% 80%,
    rgba(255,240,180,0.95) 0%,
    rgba(255,180,40,0.7)   40%,
    rgba(220,100,10,0.3)   80%,
    transparent 100%);
  border-radius: 50% 50% 30% 30% / 60% 60% 35% 35%;
  filter: blur(1px);
}

@keyframes mem-flicker {
  0%, 100% { transform: scaleX(1)    scaleY(1)    rotate(0deg); }
  25%       { transform: scaleX(0.9)  scaleY(1.04) rotate(-1deg); }
  50%       { transform: scaleX(1.05) scaleY(0.97) rotate(0.5deg); }
  75%       { transform: scaleX(0.95) scaleY(1.02) rotate(-0.5deg); }
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .mem-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 650px) {
  .mem-grid { grid-template-columns: repeat(3, 1fr); gap: 1px; }
}
@media (max-width: 380px) {
  .mem-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .hero { padding: 100px 0 60px; }
  .hero-logo { width: 90px; height: 90px; }
  .about { padding: 60px 0; }
  .submit-section { padding: 60px 0; }
  .submit-card { padding: 24px 16px; }
  .platform-tabs { gap: 4px; }
  .tab-btn { padding: 5px 10px; font-size: 0.78rem; }
  .brand-tagline { display: none; }
}

/* ── Scrollbar ────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1e2235; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #2a3050; }
