/*
 * homepage.css - Memzur Three.js homepage styles
 * /var/www/memzur.com/public/assets/css/homepage.css
 * v1.1.0 - Fix paragraph colour, card styles, grid gap, CTA alignment, body background, footer colour.
 *
 * Loaded only on index.php. www.css and fonts.css load first.
 * All colour values use the dark blue palette: #010312 bg, #5298F0 accent, #fff text.
 */

/* ============================================================
   GLOBAL PAGE OVERRIDES FOR HOMEPAGE
   ============================================================ */
html,
body {
  background: #010312 !important;
  color: #ffffff;
  overflow-x: hidden;
  scroll-behavior: auto; /* prevent browser smooth-scroll conflicting with custom JS scroll */
}

/* Footer must sit above the fixed canvas (#c z-index: 0) */
.site-footer {
  position: relative;
  z-index: 5;
}

a {
  color: #ffffff;
}

a:hover {
  color: #8AB8F8;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#c {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
}

#fade-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20%;
  background: linear-gradient(to bottom,
    #010312 0%,
    rgba(1,3,18,0.70) 50%,
    rgba(1,3,18,0.00) 100%
  );
  z-index: 2;
  pointer-events: none;
}

#fade-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to top,
    #010312 0%,
    rgba(1,3,18,0.85) 38%,
    rgba(1,3,18,0.00) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Hero explore button */
#hero-explore-btn {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 44px;
  border: 1px solid #5298F0;
  border-radius: 2px;
  background: rgba(1,3,18,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #5298F0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.8s ease, background 0.18s, color 0.18s, border-color 0.18s;
}

#hero-explore-btn.visible {
  opacity: 1;
  pointer-events: all;
}

#hero-explore-btn.hidden {
  opacity: 0 !important;
  pointer-events: none;
}

#hero-explore-btn:hover {
  background: rgba(82,152,240,0.12);
  color: #8AB8F8;
  border-color: #8AB8F8;
}

#hero-explore-btn .arrow {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
}

/* Scroll hint */
#scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  transition: opacity 0.4s;
}

#scroll-hint span {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.22);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#scroll-hint .chevron {
  width: 18px;
  height: 18px;
  border-right: 1px solid rgba(255,255,255,0.22);
  border-bottom: 1px solid rgba(255,255,255,0.22);
  transform: rotate(45deg);
  animation: chevBob 2s ease-in-out infinite;
}

@keyframes chevBob {
  0%, 100% { opacity: 0.22; transform: rotate(45deg) translateY(0); }
  50%       { opacity: 0.50; transform: rotate(45deg) translateY(4px); }
}


/* ============================================================
   PAGE CONTENT WRAPPER
   ============================================================ */
#page-content {
  position: relative;
  z-index: 5;
  background: #010312;
}

.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(82,152,240,0.20), transparent);
}

.content-section {
  padding: 90px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 0.70rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5298F0;
  display: block;
  margin-bottom: 20px;
}

.content-section h2 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 18px;
  line-height: 1.1;
}

.content-section > p {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255,255,255,0.50);
  max-width: 560px;
}


/* ============================================================
   HOW IT WORKS - split layout
   ============================================================ */
.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-bottom: 40px;
}

.section-split-left {}

.section-split-left p {
  color: #8c9289;
}

.section-split-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mini orb canvas */
#mini-orb-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}

#mini-c {
  display: block;
  width: 100%;
  height: 100%;
}

#mini-orb-wrap::before,
#mini-orb-wrap::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  pointer-events: none;
  z-index: 1;
}

#mini-orb-wrap::before {
  top: 0;
  background: linear-gradient(to bottom, #010312 0%, transparent 100%);
}

#mini-orb-wrap::after {
  bottom: 0;
  background: linear-gradient(to top, #010312 0%, transparent 100%);
}

/* Feature cards grid */
#how-it-works .feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: transparent !important;
  border: none !important;
  margin-top: 0;
}

#how-it-works .feature-card {
  background: #13131b !important;
  border: 1px solid #313b4b !important;
  border-radius: 6px;
  padding: 36px 28px;
  transition: background 0.2s;
}

#how-it-works .feature-card:hover {
  background: #1a1a28 !important;
}

.feature-num {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #5298F0;
  margin-bottom: 16px;
  display: block;
}

#how-it-works .feature-card h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

#how-it-works .feature-card p {
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(255,255,255,0.42);
  line-height: 1.7;
  margin: 0;
}


/* ============================================================
   MAIN CTA SECTION
   ============================================================ */
#main-cta {
  text-align: center;
  padding: 80px 32px;
}

.main-cta-headline {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.05;
  margin-bottom: 20px;
}

.main-cta-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 300;
  color: rgba(255,255,255,0.50);
  margin-bottom: 40px;
  letter-spacing: 0.01em;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.main-cta-wrap {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons for this page context */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 13px 32px;
  border-radius: 3px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: #ffffff;
  color: #010312;
  border: none;
  text-decoration: none;
  transition: background 0.18s, transform 0.15s;
}

.btn-primary:hover {
  background: #d8e8ff;
  color: #010312;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 13px 32px;
  border-radius: 3px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: transparent;
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.22);
  text-decoration: none;
  transition: border-color 0.18s, color 0.18s;
}

.btn-outline:hover {
  border-color: rgba(255,255,255,0.55);
  color: #ffffff;
}


/* ============================================================
   DATA RESIDENCY SECTION
   ============================================================ */
.section--black {
  background: #000000;
}

.section--black .content-section {
  max-width: 860px;
  text-align: center;
  margin: 0 auto;
  padding: 90px 32px;
}

.section--black h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.15;
}

.section--black p {
  font-size: 0.95rem;
  font-weight: 300;
  color: rgba(255,255,255,0.42);
  line-height: 1.8;
  max-width: 540px;
  margin: 0 auto 36px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .section-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  #mini-orb-wrap {
    max-width: 320px;
    margin: 0 auto;
  }

  #how-it-works .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .content-section {
    padding: 64px 20px;
  }

  #main-cta {
    padding: 64px 20px;
  }

  .main-cta-wrap {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    justify-content: center;
  }

}

