/* ========== GLOBAL ========== */

:root {
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-s: 12px;
  --space-m: 16px;
  --space-l: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;

  --color-bg: #050509;
  --color-surface: #101018;
  --color-surface-soft: #151522;
  --color-border-soft: #26263a;
  --color-text: #f5f5ff;
  --color-text-muted: #a0a0c0;
  --color-overlay: rgba(0, 0, 0, 0.7);

  --color-purple: #49007F;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

/* ========== HEADER ========== */

.site-header {
  padding: var(--space-xl) var(--space-l) var(--space-m);
  text-align: center;
}

.site-header__logo {
  max-width: 416px; /* 60% larger */
  margin: 0 auto;
}

.site-header__subtitle {
  margin-top: 18px;
  font-size: 2.2rem; /* doubled */
  font-weight: 700;
  color: var(--color-text-muted);
}

/* ========== PURPLE DIVIDER ========== */

.purple-divider {
  height: 20px;
  width: 100%;
  background: linear-gradient(to bottom, #49007F, #000000);
}

/* ========== PRISM SECTION ========== */

.site-main {
  padding: var(--space-xl) var(--space-l) var(--space-xxl);
}

.prism-section {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
}

.prism-section__background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.prism-section__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center; /* origin on right, aligned to Sentinel */
  opacity: 0.9;
  filter: brightness(0.75) saturate(0.7);
}

@media (max-width: 767px) {
  .prism-section__image {
    object-position: center top; /* mobile origin at top */
  }
}

/* ========== ECOSYSTEM GRID ========== */

.ecosystem {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: max-content max-content max-content;
  justify-content: center;
  gap: var(--space-xl);
  padding: var(--space-xl);
  align-items: center;
}

.ecosystem__column {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.ecosystem__column--left {
  justify-content: space-between;
}

.ecosystem__column--middle {
  justify-content: center;
}

.ecosystem__column--right {
  justify-content: center;
}

/* logos only, no boxes */

.card {
  background: none;
  border: none;
  box-shadow: none;
}

.card__inner {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* logo sizes */

.ecosystem__column--left .card__logo,
.ecosystem__column--right .card__logo {
  max-width: 300px;
}

.ecosystem__column--middle .card__logo {
  max-width: 210px;
}

.card__inner:hover .card__logo {
  transform: scale(1.04);
  transition: transform 160ms ease-out;
}

/* ========== MODALS ========== */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-l);
  opacity: 0;
  pointer-events: none;
  transition: 160ms ease-out;
  z-index: 50;
}

.modal[data-modal-open="true"] {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: 160ms ease-out;
  z-index: 40;
}

.modal-backdrop[data-modal-visible="true"] {
  opacity: 1;
}

.modal__dialog {
  max-width: 520px;
  width: 100%;
  background: #0b0b14;
  border-radius: 16px;
  border: 1px solid var(--color-border-soft);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.modal__header {
  padding: var(--space-m) var(--space-l);
  border-bottom: 1px solid var(--color-border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;     /* keeps logo + X aligned */
  flex: 0 0 auto;          /* prevents collapsing */
}


.modal__title {
  font-size: 1.25rem;
}

.modal__body {
  padding: var(--space-m) var(--space-l) var(--space-l);
  color: var(--color-text-muted);
}

/* Ensure modal body scrolls when content is long */
.modal__body {
  overflow-y: auto;
  flex: 1 1 auto;
}

/* Close button styling */
.modal__close {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.modal__close:hover {
  color: var(--color-purple);
}

/* ========== FOOTER ========== */

.site-footer {
  padding: var(--space-xxl) var(--space-l);
  background: radial-gradient(circle at bottom right, #18182a 0, #050509 55%);
  text-align: center;
  border-top: 1px solid var(--color-border-soft);
}

.site-footer__logo {
  max-width: 352px; /* 60% larger */
  margin: 0 auto;
}

.site-footer__subtitle {
  margin-top: 12px;
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

.site-footer__grid {
  margin-top: var(--space-xxl);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

.footer-col__logo {
  max-width: 180px;
  margin: 0 auto var(--space-m);
}

.footer-col__text {
  white-space: pre-wrap;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.site-footer__bottom {
  margin-top: var(--space-xxl);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.footer-link {
  color: var(--color-purple);
  text-decoration: none;
  font-weight: bold;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 767px) {
  .ecosystem {
    grid-template-columns: 1fr;
    gap: var(--space-l);
    padding: var(--space-l) var(--space-m);
  }

  .ecosystem__column {
    gap: var(--space-l);
  }

  .ecosystem__column--left .card__logo,
  .ecosystem__column--right .card__logo {
    max-width: 225px;
  }

  .ecosystem__column--middle .card__logo {
    max-width: 160px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* Modal logo */
.modal__logo {
  height: 80px;
  width: auto;
  display: block;
  margin: 0 auto;
}

/* Headings inside modal */
.modal__heading {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 16px 0 8px;
  color: var(--color-text);
}

.modal__subheading {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 12px 0 6px;
  color: var(--color-text-muted);
}

/* Links section */
.modal__links {
  margin-top: 24px;
  font-size: 1rem;
}

.modal__links a {
  color: var(--color-purple);
  text-decoration: none;
  font-weight: 600;
}

.modal__links a:hover {
  text-decoration: underline;
}
/* Sleek Glassy Scrollbar */
.modal__body::-webkit-scrollbar {
  width: 10px;
}

.modal__body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.modal__body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  backdrop-filter: blur(4px);
}

.modal__body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Temporarily hide unused service cards */
.card--hidden {
  visibility: hidden;
}
