/* =========================================================
   SOUVENRA NEXUS — DIGITAL WAVE FOOTER
   ========================================================= */

souvenra-footer,
:host {
  display: block;
  width: 100%;
}

/* =========================================================
   MAIN FOOTER CONTAINER
   ========================================================= */

.footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(37, 99, 235, 0.08),
      transparent 42%
    ),
    var(--sn-bg-surface, #ffffff);

  border-top: 1px solid var(
    --sn-border-default,
    rgba(0, 0, 0, 0.08)
  );

  padding: 1.75rem 0 1.25rem;

  color: var(
    --sn-text-primary,
    #0f172a
  );
}

@media (min-width: 768px) {
  .footer {
    padding: 2.25rem 0 1.5rem;
  }
}

.footer .container {
  position: relative;
  z-index: 2;

  max-width: var(--content-max-width, 1280px);
  margin: 0 auto;

  padding: 0 var(--content-padding, 24px);

  box-sizing: border-box;
}

/* =========================================================
   FULL-BLEED & EDGE-BLENDED DIGITAL WAVE VISUAL
   ========================================================= */

.footer-visual {
  position: absolute;
  top: -250px; /* Pulls graphic up into upper empty header area */

  /* Spans true full-viewport width beyond container borders */
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 100vw;
  height: 480px;

  z-index: 0;

  pointer-events: none;

  overflow: hidden;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  opacity: 1;

  /* Smooth mask fade out for left/right side edges + top/bottom */
  mask-image: 
    radial-gradient(ellipse 70% 70% at 50% 35%, #000 40%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 15%, #000 65%, transparent 100%);
  mask-composite: intersect;

  -webkit-mask-image: 
    radial-gradient(ellipse 70% 70% at 50% 35%, #000 40%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 15%, #000 65%, transparent 100%);
  -webkit-mask-composite: source-in;
}

.footer-visual-image {
  display: block;

  width: 100%;
  height: 100%;

  /* Eliminates horizontal cut lines and centers graphic high behind text */
  object-fit: cover;
  object-position: center 20%;

  pointer-events: none;
  user-select: none;

  opacity: 0.1;

  mix-blend-mode: screen;

  /* Safety net: if the src is ever swapped for a theme change,
     fade smoothly instead of flashing/snapping instantly. */
  transition: opacity 200ms ease;
}

/* =========================================================
   TOP HEADER BAR
   ========================================================= */

.footer-top-bar {
  position: relative;

  display: flex;
  flex-direction: column;

  gap: 1.25rem;

  justify-content: space-between;
  align-items: flex-start;

  padding-bottom: 1.25rem;

  border-bottom: 1px solid var(
    --sn-border-default,
    rgba(0, 0, 0, 0.08)
  );

  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .footer-top-bar {
    flex-direction: row;

    align-items: center;

    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* =========================================================
   BRAND
   ========================================================= */

.brand-block {
  position: relative;
  z-index: 3;
}

.brand-title {
  margin: 0 0 0.2rem;

  font-size: 1.5rem;
  line-height: 1.15;

  font-weight: 800;

  background: linear-gradient(
    135deg,
    var(--sn-text-primary, #0f172a),
    var(--sn-accent-primary, #2563eb)
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  background-clip: text;
}

@media (min-width: 768px) {
  .brand-title {
    font-size: 1.75rem;
  }
}

.company-tagline {
  margin: 0;

  color: var(
    --sn-accent-primary,
    #2563eb
  );

  font-size: 0.85rem;
  font-weight: 600;

  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =========================================================
   SYSTEM STATUS
   ========================================================= */

.system-status {
  position: relative;
  z-index: 3;

  display: inline-flex;

  align-items: center;
  gap: 0.5rem;

  background: rgba(16, 185, 129, 0.08);

  border: 1px solid rgba(16, 185, 129, 0.25);

  padding: 0.4rem 0.85rem;

  border-radius: 9999px;

  font-size: 0.8rem;
  font-weight: 500;

  color: #059669;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.status-indicator {
  width: 8px;
  height: 8px;

  flex-shrink: 0;

  background-color: #10b981;

  border-radius: 50%;

  box-shadow: 0 0 8px #10b981;

  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }

  100% {
    opacity: 1;
  }
}

/* =========================================================
   MAIN GRID
   ========================================================= */

.footer-grid {
  display: grid;

  grid-template-columns: 1fr;

  gap: 2rem;

  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns:
      1.8fr
      1fr
      1fr
      1.5fr;

    gap: 2rem;

    margin-bottom: 3rem;
  }
}

/* =========================================================
   SECTION TITLES
   ========================================================= */

.footer-section .section-title {
  margin: 0 0 1rem;

  font-size: 0.95rem;
  font-weight: 700;

  color: var(
    --sn-text-primary,
    #0f172a
  );

  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =========================================================
   COMPANY DESCRIPTION
   ========================================================= */

.company-desc {
  margin: 0 0 1.5rem;

  color: var(
    --sn-text-muted,
    #475569
  );

  font-size: 0.9rem;
  line-height: 1.6;

  max-width: 460px;
}

/* =========================================================
   CONTACT
   ========================================================= */

.contact-info {
  display: flex;
  flex-direction: column;

  gap: 0.75rem;
}

.contact-item {
  display: flex;

  align-items: center;

  gap: 0.75rem;

  color: var(
    --sn-text-muted,
    #475569
  );

  font-size: 0.875rem;
}

.contact-item svg {
  width: 16px;
  height: 16px;

  flex-shrink: 0;

  color: var(
    --sn-accent-primary,
    #2563eb
  );
}

.contact-link {
  color: inherit;

  text-decoration: none;

  transition: color 150ms ease;
}

.contact-link:hover {
  color: var(
    --sn-accent-primary,
    #2563eb
  );
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.nav-list {
  list-style: none;

  padding: 0;
  margin: 0;
}

.nav-item {
  margin-bottom: 0.6rem;
}

.nav-link {
  display: inline-flex;

  align-items: center;

  gap: 0.5rem;

  padding: 0.2rem 0;

  color: var(
    --sn-text-muted,
    #475569
  );

  text-decoration: none;

  font-size: 0.875rem;

  transition:
    color 150ms ease,
    transform 150ms ease;
}

.nav-link:hover {
  color: var(
    --sn-accent-primary,
    #2563eb
  );

  transform: translateX(2px);
}

.nav-link svg {
  width: 15px;
  height: 15px;

  opacity: 0.75;
}

/* =========================================================
   ECOSYSTEM
   ========================================================= */

.section-desc {
  margin: 0 0 1rem;

  color: var(
    --sn-text-muted,
    #475569
  );

  font-size: 0.85rem;

  line-height: 1.5;
}

.social-grid {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 0.6rem;
}

.social-link {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  gap: 0.5rem;

  min-height: 40px;

  padding: 0.6rem 0.75rem;

  background: var(
    --sn-bg-card,
    rgba(0, 0, 0, 0.03)
  );

  border: 1px solid var(
    --sn-border-default,
    rgba(0, 0, 0, 0.08)
  );

  border-radius: 8px;

  color: var(
    --sn-text-muted,
    #475569
  );

  text-decoration: none;

  font-size: 0.8rem;
  font-weight: 500;

  transition:
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.social-link:hover {
  background: var(
    --sn-accent-primary,
    #2563eb
  );

  color: #ffffff;

  border-color: var(
    --sn-accent-primary,
    #2563eb
  );

  transform: translateY(-2px);
}

.social-link svg {
  width: 16px;
  height: 16px;

  flex-shrink: 0;
}

/* =========================================================
   NEWSLETTER
   ========================================================= */

.newsletter-card {
  position: relative;

  display: flex;
  flex-direction: column;

  gap: 1.25rem;

  margin-bottom: 2.5rem;

  padding: 1.5rem;

  background:
    radial-gradient(
      circle at 0% 50%,
      rgba(37, 99, 235, 0.10),
      transparent 35%
    ),
    var(
      --sn-bg-card,
      rgba(37, 99, 235, 0.04)
    );

  border: 1px solid var(
    --sn-border-default,
    rgba(0, 0, 0, 0.08)
  );

  border-radius: 16px;

  overflow: hidden;

  box-sizing: border-box;
}

@media (min-width: 900px) {
  .newsletter-card {
    padding: 2rem;

    flex-direction: row;

    align-items: center;
    justify-content: space-between;

    gap: 1.5rem;
  }

  .newsletter-content {
    max-width: 500px;
  }
}

.newsletter-visual {
  position: relative;

  width: 58px;
  height: 58px;

  flex-shrink: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  color: var(
    --sn-accent-primary,
    #2563eb
  );

  border-radius: 14px;

  background: rgba(37, 99, 235, 0.07);

  border: 1px solid rgba(37, 99, 235, 0.18);

  overflow: hidden;
}

.newsletter-visual svg {
  position: relative;
  z-index: 2;

  width: 28px;
  height: 28px;

  stroke-width: 1.5;
}

.newsletter-visual-glow {
  position: absolute;

  width: 70px;
  height: 70px;

  border-radius: 50%;

  background: rgba(37, 99, 235, 0.16);

  filter: blur(18px);
}

@media (max-width: 480px) {
  .newsletter-visual {
    width: 50px;
    height: 50px;
  }
}

.newsletter-heading {
  margin: 0 0 0.25rem;

  font-size: 1.15rem;
  font-weight: 700;

  color: var(
    --sn-text-primary,
    #0f172a
  );
}

.newsletter-text {
  margin: 0;

  color: var(
    --sn-text-muted,
    #475569
  );

  font-size: 0.875rem;

  line-height: 1.5;
}

/* =========================================================
   NEWSLETTER FORM
   ========================================================= */

.newsletter-form {
  display: flex;
  flex-direction: column;

  gap: 0.5rem;

  width: 100%;

  max-width: 450px;

  margin-left: auto;
}

.input-group {
  display: flex;

  flex-direction: column;

  gap: 0.5rem;

  width: 100%;
}

@media (min-width: 480px) {
  .input-group {
    flex-direction: row;
  }
}

.newsletter-input {
  flex: 1;

  width: 100%;
  min-width: 0;

  padding: 0.75rem 1rem;

  background: var(
    --sn-bg-input,
    #ffffff
  );

  border: 1px solid var(
    --sn-border-default,
    #cbd5e1
  );

  border-radius: 8px;

  color: var(
    --sn-text-primary,
    #0f172a
  );

  font-size: 0.875rem;

  outline: none;

  box-sizing: border-box;

  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.newsletter-input::placeholder {
  color: var(
    --sn-text-placeholder,
    #94a3b8
  );
}

.newsletter-input:focus {
  outline: none;

  border-color: var(
    --sn-accent-primary,
    #2563eb
  );

  box-shadow:
    0 0 0 3px
    rgba(37, 99, 235, 0.15);
}

/* =========================================================
   SUBSCRIBE BUTTON
   ========================================================= */

.newsletter-btn {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  gap: 0.5rem;

  padding: 0.75rem 1.25rem;

  background: var(
    --sn-accent-primary,
    #2563eb
  );

  color: #ffffff;

  border: none;

  border-radius: 8px;

  font-weight: 600;
  font-size: 0.875rem;

  cursor: pointer;

  transition:
    background 150ms ease,
    transform 150ms ease;
}

.newsletter-btn:hover {
  background: var(
    --sn-accent-hover,
    #1d4ed8
  );

  transform: translateY(-1px);
}

.newsletter-btn:active {
  transform: translateY(0);
}

.newsletter-btn svg {
  width: 16px;
  height: 16px;
}

/* =========================================================
   RESPONSE
   ========================================================= */

.newsletter-response {
  display: none;
}

.newsletter-response.success {
  display: block;

  color: #059669;

  font-size: 0.8rem;

  margin-top: 0.25rem;
}

/* =========================================================
   FOOTER BOTTOM
   ========================================================= */

.footer-bottom {
  border-top: 1px solid var(
    --sn-border-default,
    rgba(0, 0, 0, 0.08)
  );

  padding-top: 1.5rem;

  display: flex;

  flex-direction: column;

  gap: 1rem;

  align-items: center;

  text-align: center;

  font-size: 0.8rem;

  color: var(
    --sn-text-muted,
    #475569
  );
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;

    justify-content: space-between;

    text-align: left;
  }
}

.legal-links {
  display: flex;

  align-items: center;

  gap: 0.75rem;

  flex-wrap: wrap;

  justify-content: center;
}

.legal-link {
  color: inherit;

  text-decoration: none;

  transition: color 150ms ease;
}

.legal-link:hover {
  color: var(
    --sn-accent-primary,
    #2563eb
  );
}

.dot-separator {
  opacity: 0.4;
}

/* =========================================================
   THEME STYLES (LIGHT / DARK)
   ========================================================= */

html[data-theme="light"] .footer {
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(37, 99, 235, 0.045),
      transparent 40%
    ),
    #ffffff;
}

html[data-theme="light"] .footer-visual {
  opacity: 0.3;
}

html[data-theme="light"] .footer-visual-image {
  mix-blend-mode: multiply;
  opacity: 0.5;
}

html[data-theme="light"] .newsletter-card {
  background:
    radial-gradient(
      circle at 0% 50%,
      rgba(37, 99, 235, 0.06),
      transparent 40%
    ),
    #f8fafc;
}

html[data-theme="dark"] .footer {
  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(37, 99, 235, 0.10),
      transparent 45%
    ),
    var(--sn-bg-surface, #080d17);
}

html[data-theme="dark"] .footer-visual {
  opacity: 1;
}

html[data-theme="dark"] .footer-visual-image {
  mix-blend-mode: screen;
}

html[data-theme="dark"] .newsletter-card {
  background:
    radial-gradient(
      circle at 0% 50%,
      rgba(37, 99, 235, 0.12),
      transparent 38%
    ),
    rgba(15, 23, 42, 0.55);
}

/* =========================================================
   RESPONSIVE OVERRIDES
   ========================================================= */

@media (max-width: 768px) {
  .footer-visual {
    height: 320px;
    top: -40px;
  }
}

@media (max-width: 640px) {
  .footer {
    padding-top: 2rem;
  }

  .footer-visual {
    height: 260px;
    top: -20px;
  }

  .social-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .footer-visual-image {
    width: 140%;
    max-width: none;
  }

  .newsletter-card {
    padding: 1.25rem;
  }

  .newsletter-form {
    max-width: 100%;
  }

  .input-group {
    flex-direction: column;
  }

  .newsletter-btn {
    width: 100%;
  }
}


/* =========================================================
   SOUVENRA NEXUS 3D COIN
   ========================================================= */

.footer-coin-wrapper {
  position: relative;
  z-index: 5; /* FIX: keeps coin above .footer-visual background so it never hides */

  width: 130px;
  height: 130px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  isolation: isolate;
}

/* NOTE: removed the old #coin-container rule — it targeted an ID that
   doesn't exist anywhere in the HTML (the real element is
   .footer-coin-wrapper), so it was dead code doing nothing except
   causing confusion. All sizing now lives in .footer-coin-wrapper
   and .footer-coin below. */


/* Soft blue/white cinematic glow behind the coin */

.footer-coin-glow {
  position: absolute;

  width: 115px;
  height: 115px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(40, 130, 255, 0.30) 0%,
      rgba(40, 130, 255, 0.12) 38%,
      rgba(40, 130, 255, 0.03) 65%,
      transparent 75%
    );

  filter: blur(18px);

  opacity: 0.9;

  z-index: -1;

  pointer-events: none;
}


/* GLB itself */

.footer-coin {
  width: 130px;
  height: 130px;

  display: block;

  background: transparent;

  --poster-color: transparent;

  outline: none;

  border: none;

  /* FIX: was "none" before, which blocked ALL mouse interaction.
     Must be "auto" so drag-to-rotate / model-viewer controls work. */
  pointer-events: auto;

  cursor: grab;

  transform: translateZ(0);
}

.footer-coin:active {
  cursor: grabbing;
}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 768px) {

  .footer-coin-wrapper {
    width: 150px;
    height: 150px;
  }

  .footer-coin {
    width: 150px;
    height: 150px;
  }

  .footer-coin-glow {
    width: 105px;
    height: 105px;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

  .footer-coin-wrapper {
    width: 95px;
    height: 95px;

    margin-top: 10px;
  }

  .footer-coin {
    width: 95px;
    height: 95px;
  }

  .footer-coin-glow {
    width: 68px;
    height: 68px;

    filter: blur(14px);
  }
}