/*
  Shared styles for the Existence landing pages.
  The stylesheet defines the cosmic visual system, floating bubble treatments,
  responsive hero layout, and the legal-card replacements for the removed Stitch
  lower section. The same palette is reused by the legal detail pages.
*/
:root {
  --bg: #050311;
  --bg-deep: #09051b;
  --surface: rgba(18, 15, 43, 0.72);
  --surface-strong: rgba(14, 11, 36, 0.92);
  --surface-border: rgba(255, 255, 255, 0.11);
  --text: #f7f5ff;
  --muted: #b8b2d2;
  --gold: #f0c96c;
  --gold-soft: rgba(240, 201, 108, 0.18);
  --blue: #6d66ff;
  --blue-soft: rgba(109, 102, 255, 0.24);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top center, rgba(76, 48, 184, 0.55), transparent 34%),
    radial-gradient(circle at 20% 20%, rgba(240, 201, 108, 0.09), transparent 20%),
    linear-gradient(180deg, #110b31 0%, #070311 48%, #04020c 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  overflow: clip;
  min-height: 100vh;
  isolation: isolate;
}

.stars {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

.star {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  animation: twinkle var(--twinkle-duration) ease-in-out infinite;
}

.orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.55;
  z-index: -2;
  pointer-events: none;
}

.orb-a {
  top: 4rem;
  right: -8rem;
  width: 20rem;
  height: 20rem;
  background: rgba(115, 88, 255, 0.32);
}

.orb-b {
  bottom: 2rem;
  left: -7rem;
  width: 18rem;
  height: 18rem;
  background: rgba(240, 201, 108, 0.14);
}

.topbar,
.hero-layout,
.footer,
.legal-page {
  width: min(1160px, calc(100vw - 2rem));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0 0;
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.topnav {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 15rem;
  display: none;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(10, 7, 27, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  z-index: 5;
}

.topnav.is-open {
  display: grid;
  gap: 0.2rem;
}

.menu-wrap {
  position: relative;
}

.menu-toggle {
  display: inline-grid;
  gap: 0.28rem;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(16px);
}

.menu-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.topnav a,
.back-link {
  color: var(--muted);
  transition: color 180ms ease, border-color 180ms ease;
}

.topnav a {
  display: block;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
}

.topnav a:hover {
  background: rgba(255, 255, 255, 0.05);
}

.topnav a:hover,
.footer-links a:hover,
.back-link:hover {
  color: var(--text);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 3rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow,
.legal-kicker,
.section-kicker {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-copy h1,
.legal-page h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3.7rem, 8vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero-copy h1 span,
.legal-page h1 span {
  display: block;
  color: var(--gold);
  font-style: italic;
}

.lede {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta {
  min-width: 14rem;
  padding: 1rem 1.35rem;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.cta:hover {
  transform: translateY(-2px);
}

.cta-primary {
  background: linear-gradient(135deg, #ffffff 0%, #ece7ff 100%);
  color: #140f2d;
  box-shadow: 0 18px 44px rgba(255, 255, 255, 0.18);
}

.cta-secondary {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.cta-note {
  margin: 0.95rem 0 0;
  color: rgba(184, 178, 210, 0.82);
  font-size: 0.88rem;
}

.legal-body,
.legal-summary {
  margin-top: 2rem;
  border: 1px solid var(--surface-border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(17, 12, 42, 0.84), rgba(11, 8, 26, 0.9));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 40rem;
}

.hero-cluster {
  position: relative;
  width: min(100%, 34rem);
  aspect-ratio: 1.02;
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(46px);
  pointer-events: none;
}

.glow-left {
  top: 11%;
  left: 8%;
  width: 18%;
  height: 18%;
  background: rgba(110, 101, 255, 0.18);
}

.glow-right {
  right: 12%;
  bottom: 14%;
  width: 21%;
  height: 21%;
  background: rgba(240, 201, 108, 0.12);
}

.bubble {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  z-index: 2;
}

.bubble-main {
  left: 16%;
  top: 14%;
  width: 72%;
  aspect-ratio: 1;
  z-index: 3;
  border-color: rgba(240, 201, 108, 0.22);
  box-shadow:
    0 0 0 1px rgba(240, 201, 108, 0.14),
    0 28px 100px rgba(0, 0, 0, 0.45),
    0 0 42px rgba(240, 201, 108, 0.18);
}

.bubble-main__inner {
  width: calc(100% - 1.5rem);
  height: calc(100% - 1.5rem);
  margin: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 2.2rem 2.9rem;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 40%),
    rgba(255, 255, 255, 0.025);
}

.bubble-quote {
  max-width: 14rem;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.65rem, 2.5vw, 2rem);
  font-style: italic;
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-align: center;
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  color: rgba(247, 245, 255, 0.82);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bubble-meta span:last-child {
  color: var(--gold);
}

.bubble-avatar {
  right: 15%;
  bottom: 15%;
  width: 22%;
  height: 22%;
  z-index: 4;
  padding: 0.18rem;
  border-color: rgba(240, 201, 108, 0.24);
  background: linear-gradient(135deg, rgba(240, 201, 108, 0.36), rgba(255, 255, 255, 0.04));
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    0 0 26px rgba(240, 201, 108, 0.14);
}

.bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.14);
}

.bubble p {
  margin: 0;
}

.bubble-interest {
  display: grid;
  place-items: center;
  padding: 1rem;
  color: rgba(247, 245, 255, 0.78);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.05;
  text-align: center;
  border-color: rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.03);
}

.bubble-interest-left {
  left: 4%;
  top: 8%;
  width: 22%;
  height: 22%;
}

.bubble-interest-right {
  right: 8%;
  top: 10%;
  width: 23%;
  height: 23%;
  z-index: 3;
}

.bubble-mini-a {
  right: 20%;
  bottom: 18%;
  width: 10%;
  height: 10%;  
}

.bubble-mini-b {
  right: 24%;
  top: 16%;
  width: 6%;
  height: 6%;
}

.bubble-mini-c {
  left: 10%;
  bottom: 18%;
  width: 8%;
  height: 8%;
}

.bubble-mini {
  background: rgba(120, 112, 255, 0.1);
  opacity: 0.72;
  z-index: 1;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.legal-page {
  padding: 2.25rem 0 4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 2.2rem;
}

.legal-intro {
  max-width: 48rem;
}

.legal-intro p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

.legal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

.summary-item {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-item span {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--gold);
  font-size: 0.77rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.summary-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.legal-body {
  padding: 1.5rem;
}

.legal-section + .legal-section {
  margin-top: 1.4rem;
}

.legal-section {
  padding: 1.2rem 1.25rem;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-section h2 {
  margin: 0 0 0.75rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.legal-section p,
.legal-section li {
  color: var(--muted);
  line-height: 1.8;
}

.legal-section ul {
  margin: 0;
  padding-left: 1.1rem;
}

.legal-section ol {
  margin: 0;
  padding-left: 1.35rem;
}

.float-slow {
  animation: float 8s ease-in-out infinite;
}

.float-mid {
  animation: float 6.5s ease-in-out infinite;
}

.float-fast {
  animation: float 5.2s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-18px) rotate(1.6deg);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.24;
    transform: scale(1);
  }
  50% {
    opacity: 0.92;
    transform: scale(1.25);
  }
}

@media (max-width: 980px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2.5rem;
  }

  .hero-art {
    order: -1;
    min-height: 29rem;
  }

  .hero-cluster {
    width: min(100%, 30rem);
  }

  .footer,
  .legal-summary {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding-top: 0.9rem;
    align-items: center;
    flex-direction: row;
  }

  .menu-toggle {
    padding: 0.78rem;
  }

  .hero-copy h1,
  .legal-page h1 {
    font-size: clamp(3rem, 16vw, 4.4rem);
  }

  .hero-layout {
    gap: 1rem;
    padding-top: 1.25rem;
  }

  .hero-art {
    order: -1;
    min-height: 20rem;
    margin-bottom: 0.5rem;
  }

  .hero-copy {
    text-align: center;
  }

  .lede {
    margin-left: auto;
    margin-right: auto;
    font-size: 0.98rem;
  }

  .cta-row,
  .legal-summary {
    grid-template-columns: 1fr;
    display: grid;
  }

  .cta {
    min-width: 0;
  }

  .hero-art {
    min-height: 20rem;
  }

  .hero-cluster {
    width: min(100%, 21rem);
  }

  .bubble-main__inner {
    padding: 1.4rem 1.4rem 2rem;
  }

  .bubble-quote {
    max-width: 10rem;
    font-size: 1.22rem;
  }

  .bubble-meta {
    gap: 0.45rem;
    font-size: 0.53rem;
  }

  .bubble-interest {
    font-size: 0.78rem;
    padding: 0.55rem;
  }

  .glow-left {
    top: 9%;
    left: 5%;
    width: 16%;
    height: 16%;
  }

  .glow-right {
    right: 10%;
    bottom: 11%;
    width: 18%;
    height: 18%;
  }
}
