/* ============================================
   PREMIUM LANDING PAGE STYLES
   ============================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-6); }
body { background: var(--bg-primary); }

/* Fixed Logo */
.fixed-logo {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}
.fixed-logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Invert logo in light theme */
[data-theme="light"] .fixed-logo img {
  filter: invert(1);
}

/* Buttons */
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--fs-sm); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--fs-md); }
.btn-primary, .btn-secondary {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-decoration: none;
}
.btn-primary { background: var(--brand-primary); color: var(--text-inverse); }
.btn-primary:hover { background: var(--brand-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hover); }
.w-full { width: 100%; margin-top: var(--space-2); }

/* Hero Section */
.hero-video-section { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; min-height: 620px; display: flex; align-items: flex-end; padding-bottom: 80px; overflow: hidden; z-index: 0; }
.hero-spacer { height: 100vh; min-height: 620px; }
.bottom-hero-spacer { height: 100vh; min-height: 620px; }
.hero-background-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-video-overlay { position: absolute; inset: 0; background: rgba(10, 15, 30, 0.5); z-index: -1; }

.hero-container { width: 100%; }
.hero-content { max-width: 700px; }
.hero-title { font-size: var(--fs-base); font-weight: var(--fw-bold); line-height: 1.5; color: white; margin-bottom: var(--space-2); letter-spacing: var(--ls-normal); }
.highlight { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { font-size: var(--fs-base); color: rgba(255,255,255,0.8); line-height: 1.5; margin-bottom: var(--space-8); max-width: 600px; }
.hero-actions { display: flex; gap: var(--space-4); }

/* Sections */
section { padding: 100px 0; }
section:not(.hero-video-section):not(.contact-faq-section) { position: relative; z-index: 20; }
.section-title { font-size: var(--fs-4xl); font-weight: var(--fw-extrabold); letter-spacing: var(--ls-tight); margin-bottom: var(--space-4); text-align: center; }
.section-subtitle { font-size: var(--fs-md); color: var(--text-secondary); max-width: 600px; margin: 0 auto; text-align: center; }
.pillars-header { text-align: center; margin-bottom: var(--space-16); }

/* What We Do */
.what-we-do-section { background: var(--bg-primary); }
.what-we-do-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-16); align-items: center; }
.what-we-do-content { max-width: 700px; }
.what-we-do-lines { display: flex; flex-direction: column; gap: var(--space-8); margin-top: var(--space-10); }
.wwd-line { display: flex; align-items: flex-start; gap: var(--space-6); }
.wwd-num { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--brand-primary); background: var(--brand-primary-light); width: 44px; height: 44px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wwd-line h3 { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin-bottom: var(--space-1); }
.wwd-line p { color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.6; margin: 0; }

/* Pillars Grid */
.pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--space-6); }
.pillar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-8); text-align: center; transition: transform var(--transition-fast); }
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-primary-soft); }
.pillar-icon { width: 60px; height: 60px; background: var(--brand-primary-light); color: var(--brand-primary); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; font-size: var(--fs-2xl); margin: 0 auto var(--space-6); }
.pillar-card h3 { font-size: var(--fs-xl); font-weight: var(--fw-bold); margin-bottom: var(--space-3); }
.pillar-card p { color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.6; }

/* Squad Section (Background Image) */
.squad-section {
  background: linear-gradient(to right, rgba(10, 15, 30, 0.95), rgba(10, 15, 30, 0.85)), url('/pictures/triad.png');
  background-size: cover;
  background-position: center;
  color: white;
}
.squad-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-16); align-items: center; }
.squad-content { max-width: 600px; }
.squad-content h2, .squad-content p { color: white; }
.squad-content p { opacity: 0.9; }
.squad-features { list-style: none; margin-top: var(--space-8); }
.squad-features li { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); color: rgba(255,255,255,0.9); font-size: var(--fs-md); }
.squad-features i { color: var(--brand-primary); width: 24px; }

/* Accordion */
.accordion-container { max-width: 800px; margin: 0 auto; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-header { display: flex; align-items: center; padding: var(--space-6) 0; cursor: pointer; gap: var(--space-4); }
.accordion-number { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text-muted); font-family: var(--font-mono); }
.accordion-icon { width: 40px; height: 40px; background: var(--brand-primary-light); color: var(--brand-primary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.accordion-header h3 { flex: 1; font-size: var(--fs-xl); font-weight: var(--fw-semibold); }
.accordion-arrow { color: var(--text-muted); transition: transform var(--transition-fast); }
.accordion-item.active .accordion-arrow { transform: rotate(180deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding-left: 64px; }
.accordion-item.active .accordion-content { max-height: 500px; padding-bottom: var(--space-6); }
.accordion-content p { color: var(--text-secondary); line-height: 1.6; margin-bottom: var(--space-4); }
.accordion-content ul { list-style: none; padding: 0; }
.accordion-content li { padding: var(--space-2) 0; color: var(--text-secondary); display: flex; align-items: center; gap: var(--space-2); }
.accordion-content li::before { content: "→"; color: var(--brand-primary); font-weight: bold; }

/* Contact / FAQ Section */
.contact-faq-section { background: var(--bg-primary); padding: 104px 0; position: relative; z-index: 1; }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); max-width: 800px; margin: 0 auto; }
.cf-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-10); text-align: center; cursor: pointer; transition: transform var(--transition-fast); display: flex; flex-direction: column; align-items: center; }
.cf-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-primary-soft); }
.cf-card i { font-size: 40px; color: var(--brand-primary); margin-bottom: var(--space-4); }
.cf-card h3 { font-size: var(--fs-xl); font-weight: var(--fw-bold); margin-bottom: var(--space-2); color: var(--text-primary); }
.cf-card p { color: var(--text-secondary); font-size: var(--fs-sm); }

/* Modal Styles & Content */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: var(--space-4); }
.modal-content { background: var(--surface); border-radius: var(--radius-xl); padding: var(--space-8); width: 100%; max-width: 500px; position: relative; box-shadow: var(--shadow-2xl); max-height: 90vh; overflow-y: auto; }
.modal-lg { max-width: 700px; }
.modal-close { position: absolute; top: var(--space-4); right: var(--space-4); background: none; border: none; font-size: var(--fs-2xl); cursor: pointer; color: var(--text-muted); }
.modal-title { font-size: var(--fs-2xl); font-weight: var(--fw-bold); text-align: center; margin-bottom: var(--space-2); }
.modal-subtitle { color: var(--text-secondary); text-align: center; margin-bottom: var(--space-8); }

.contact-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: var(--space-6); margin-bottom: var(--space-8); }
.contact-info-item { text-align: center; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); }
.contact-address { max-width: 400px; margin: 0 auto var(--space-8); }
.contact-info-item i { font-size: 24px; color: var(--brand-primary); margin-bottom: var(--space-2); }
.contact-info-item h4 { font-size: var(--fs-md); font-weight: var(--fw-bold); margin-bottom: var(--space-2); }
.contact-info-item p { font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.5; }
.contact-info-item a { color: var(--brand-primary); text-decoration: none; }
.contact-info-item .meta { font-size: var(--fs-xs); color: var(--text-muted); display: block; margin-top: 8px; }

.social-section-modal { text-align: center; border-top: 1px solid var(--border); padding-top: var(--space-6); }
.social-section-modal p { font-size: var(--fs-sm); color: var(--text-secondary); margin-bottom: var(--space-4); }
.social-icons-modal { display: flex; justify-content: center; gap: var(--space-4); }
.social-icons-modal a { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.social-icons-modal a img { width: 24px; height: 24px; border-radius: 4px; }

.faq-accordion-container { margin-top: 24px; }
.faq-acc-item { border-bottom: 1px solid var(--border); }
.faq-acc-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; cursor: pointer; }
.faq-acc-header h4 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 0; }
.faq-acc-header i { color: var(--text-muted); transition: transform 0.2s ease; }
.faq-acc-item.active .faq-acc-header i { transform: rotate(180deg); }
.faq-acc-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.faq-acc-item.active .faq-acc-content { max-height: 300px; padding-bottom: 16px; }
.faq-acc-content p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* Hub Highlights */
.hub-highlights-section { background: rgba(248, 250, 252, 0.9); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 104px 0; }
@media (min-width: 1440px) {
  .hub-highlights-section { padding: 115px 0; }
}

[data-theme="dark"] .hub-highlights-section {
  background: rgba(17, 24, 39, 0.9);
}
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--space-6); }
.hub-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.hub-card-meta { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); }
.hub-card-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--gradient-primary); }
.hub-card-author { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.hub-card-text { color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.5; }
.uploader-avatar-empty { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--gradient-primary); }
.lib-highlight-thumb { background: var(--bg-tertiary); border: 1px solid var(--border); }
.clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Daily top list rows */
.lh-daily-list { display: flex; flex-direction: column; gap: 10px; }
.lh-daily-row { display: flex; align-items: center; gap: 10px; }
.lh-daily-rank { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--text-muted); width: 18px; text-align: center; flex-shrink: 0; }
.lh-daily-ava { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; }
.lh-daily-ava-empty { background: var(--gradient-primary); }
.lh-daily-name { flex: 1; font-size: var(--fs-sm); font-weight: var(--fw-semibold); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-daily-gp { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--brand-primary); flex-shrink: 0; }

/* Contest tag pills */
.lh-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* XpLoRe pillar cards */
.xplore-pillars { display: grid; grid-template-columns: repeat(3, 220px); gap: var(--space-6); margin-top: 48px; justify-content: center; align-items: end; }
.xplore-card-audio { margin-top: 20px; }
.xplore-card { text-align: center; text-decoration: none; color: inherit; cursor: pointer; transition: transform 0.2s; }
.xplore-card:hover { transform: translateY(-4px); }
.xplore-card-cover { width: 120px; height: 120px; margin: 0 auto var(--space-4); position: relative; border-radius: var(--radius-md); overflow: hidden; }
.xplore-card-book .xplore-card-cover { height: 160px; }
.xplore-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xplore-card-cover-empty { width: 100%; height: 100%; background: var(--gradient-primary); opacity: 0.15; }
.xplore-center-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-primary); opacity: 0.85; pointer-events: none; }
.xplore-card h3 { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin: 0 0 var(--space-2); }
.xplore-card p { color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.5; margin: 0; }
.xplore-events-avatars { display: flex; justify-content: center; margin-bottom: var(--space-4); height: 120px; align-items: center; }
.xplore-events-ava { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg-primary); margin-left: -10px; }
.xplore-events-ava:first-child { margin-left: 0; }
.xplore-events-ava-empty { background: var(--bg-tertiary); }
@media (max-width: 768px) {
  .xplore-pillars { grid-template-columns: 1fr; }
}

/* CTA Section */
.contact-faq-section .cta-content { text-align: center; margin-top: 40px; }

/* Scroll Reveal Animations */
.reveal, .reveal-left, .reveal-right { opacity: 0; transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.visible { opacity: 1 !important; transform: translateY(0) translateX(0) !important; }

@media (max-width: 768px) {
  .reveal { transform: translateY(24px); }
  .reveal-left, .reveal-right { transform: none; }
}

/* ============================================
   PARTNERS STRIP (inside Get in Touch)
   ============================================ */
.partners-strip {
  margin-bottom: 40px;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  align-items: center;
  justify-items: center;
}

.partners-grid .partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.partners-grid .partner-logo img {
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
  filter: grayscale(100%);
  opacity: 0.5;
}

@media (max-width: 768px) {
  .partners-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .partners-grid .partner-logo img { height: 32px; max-width: 90px; }
}

/* ============================================
   DOWNLOAD APP SECTION
   ============================================ */
.download-section {
  background: var(--bg-secondary);
  padding: 35px 0;
  border-top: 1px solid var(--border);
  min-height: 50vh;
}

.download-section.has-bg {
  color: #fff;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.download-section.has-bg .section-title {
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

.download-section.has-bg .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}

.download-head {
  width: 100%;
  margin: 0 auto var(--space-16);
  padding: 10px 28px;
  border-radius: var(--radius-xl);
  text-align: center;
}

.download-panel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}

.download-panel-body {
  position: relative;
  background: rgba(10, 15, 30, 0.5);
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.download-version { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }

.download-version-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.download-version-notes {
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-sm);
  line-height: 1.6;
  max-width: 520px;
}

.download-block { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.download-block-label { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.download-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; width: 100%; }

.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 150px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

.dl-btn:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.4); transform: translateY(-2px); }
.dl-btn i { font-size: 18px; }
.dl-btn.is-off { opacity: 0.4; pointer-events: none; }

.download-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 8px; }
.download-qr-code { width: 148px; height: 148px; padding: 10px; background: #fff; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.download-qr-code img { width: 100%; height: 100%; display: block; }
.download-qr-hint { font-size: var(--fs-xs); color: rgba(255, 255, 255, 0.6); text-align: center; }

/* Landing QR with the Gliimu icon in the center (same look as profile page) */
.landing-qr-img { position: relative; width: 100%; height: 100%; }
.landing-qr-img img.qr { width: 100%; height: 100%; border-radius: 6px; background: #fff; object-fit: contain; }
.landing-qr-img .qr-logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; background: #fff; border-radius: 50%; padding: 3px; object-fit: contain; }

/* The mobile-only block stays hidden until the phone breakpoint */
.download-mobile { display: none; }

/* Partners empty state */
.partners-empty { text-align: center; color: var(--text-muted); font-size: var(--fs-sm); margin: 40px 0; }

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .download-section { padding: 72px 0; }
  .download-panel-body { padding: 40px 20px; gap: 24px; }
  .download-desktop { display: none; }
  .download-mobile { display: flex; }
  .dl-btn { flex: 1 1 0; min-width: 0; padding: 14px 12px; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title { font-size: var(--fs-base); }
  .hero-stats { flex-wrap: wrap; gap: var(--space-6); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-lg { width: 100%; }
  .cf-grid { grid-template-columns: 1fr; gap: var(--space-12); }
  .partner-logo { margin: 0 20px; font-size: 18px; }
}

/* Landscape mode on mobile: reduce hero height so content fits */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-video-section { min-height: 100vh; padding-bottom: 40px; }
  .hero-spacer { min-height: 100vh; }
  .bottom-hero-spacer { min-height: 100vh; }
  .hero-desc { margin-bottom: var(--space-4); }
}

/* Hide native iOS video controls overlay */
.hero-background-video::-webkit-media-controls-panel,
.hero-background-video::-webkit-media-controls-play-button,
.hero-background-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none !important;
}

/* Ensure video ignores pointer events so iOS doesn't make it clickable */
.hero-background-video {
  pointer-events: none !important;
}

/* 404 Error Page */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: url('/pictures/404.png') center center / cover no-repeat;
}
.error-container {
  text-align: center;
}
.error-page .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 16px 32px;
  font-size: var(--fs-lg);
}
