@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg: #080810;
  --bg-card: #0f0f1a;
  --accent: #7c6aff;
  --accent-soft: rgba(124,106,255,0.15);
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --border: rgba(255,255,255,0.08);
}

html {
  zoom: 1.33;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* Top Navigation */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-icon {
  animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(124, 106, 255, 0.4)); }
  50% { filter: drop-shadow(0 0 10px rgba(124, 106, 255, 0.7)); }
}

.wordmark {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #e8e8f0;
  margin-left: 10px;
}

.ambient-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(136, 136, 170, 0.6);
  text-transform: uppercase;
}

/* Background Canvas */
canvas#stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Layout Utilities */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

section {
  width: 100%;
  max-width: 1200px;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* SECTION 1: Hero */
.hero {
  min-height: 100vh;
  justify-content: flex-start;
  padding-top: 18vh;
  padding-bottom: 4vh;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  animation: fadeIn 1.8s ease-out;
  padding-top: 0;
}

.cinematic-glow {
  position: absolute;
  width: 130vw;
  height: 130vh;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle closest-side, rgba(90, 60, 220, 0.09) 0%, transparent 100%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  animation: cinematicFloat 12s ease-in-out infinite;
}

.cinematic-glow-inner {
  position: absolute;
  width: 70vw;
  height: 70vh;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle closest-side, rgba(140, 120, 255, 0.07) 0%, transparent 100%);
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
  animation: cinematicFloat 8s ease-in-out infinite reverse;
}

@keyframes cinematicFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -55%) scale(1.1); opacity: 1; }
}

.intro-line {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(180, 160, 255, 0.65);
  margin-bottom: 28px;
  text-align: center;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 820px;
  margin: 0 auto;
  background: linear-gradient(135deg, #ffffff 0%, #c4b4ff 60%, #9980ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.subheadline {
  font-size: 1.2rem;
  color: rgba(180, 170, 220, 0.75);
  margin-top: 20px;
  font-weight: 300;
  text-align: center;
  letter-spacing: 0.01em;
}

.cta-button {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 14px 36px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 36px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.cta-button:hover {
  background: #8b7bff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-soft);
}

.horizon-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 106, 255, 0.6), transparent);
  margin: 28px auto 0;
}

.closing-micro {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: rgba(180, 160, 255, 0.35);
  text-transform: uppercase;
  margin-top: 16px;
  text-align: center;
}

/* SECTION 2: Concept */
.concept {
  padding: 8rem 2rem;
}

.concept p {
  color: rgba(180, 170, 220, 0.6);
  font-size: 1.15rem;
  line-height: 1.9;
  max-width: 560px;
}

/* SECTION 3: Cards */
.cards-section {
  padding: 6rem 2rem;
  position: relative;
}

.mid-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle,
    rgba(124,106,255,0.08) 0%,
    transparent 65%
  );
  animation: moonBreath 6s ease-in-out infinite;
}

.fragments-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  height: 340px;
}

.fragment {
  background: rgba(15, 15, 26, 0.7);
  border: 1px solid rgba(124, 106, 255, 0.15);
  border-radius: 14px;
  padding: 20px 24px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(200, 190, 240, 0.65);
  font-style: italic;
  font-weight: 300;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: fit-content;
  max-width: 260px;
  cursor: default;
  transition: border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

.fragment:hover {
  border-color: rgba(124, 106, 255, 0.4);
  color: rgba(232, 232, 240, 0.95);
  box-shadow: 0 0 30px rgba(124, 106, 255, 0.1);
}

.frag-1 {
  position: absolute;
  top: 20px;
  left: 5%;
  transform: rotate(-2deg);
  animation: float1 7s ease-in-out infinite;
}

.frag-2 {
  position: absolute;
  top: 60px;
  left: 30%;
  transform: rotate(1.5deg);
  animation: float2 9s ease-in-out infinite;
  animation-delay: 1s;
}

.frag-3 {
  position: absolute;
  top: 140px;
  left: 55%;
  transform: rotate(-1deg);
  animation: float3 8s ease-in-out infinite;
  animation-delay: 2s;
}

.frag-4 {
  position: absolute;
  top: 200px;
  left: 18%;
  transform: rotate(2deg);
  animation: float4 10s ease-in-out infinite;
  animation-delay: 0.5s;
}

@keyframes float1 {
  0%, 100% { transform: rotate(-2deg) translateY(0px); }
  50% { transform: rotate(-2deg) translateY(-10px); }
}

@keyframes float2 {
  0%, 100% { transform: rotate(1.5deg) translateY(0px); }
  50% { transform: rotate(1.5deg) translateY(-8px); }
}

@keyframes float3 {
  0%, 100% { transform: rotate(-1deg) translateY(0px); }
  50% { transform: rotate(-1deg) translateY(-10px); }
}

@keyframes float4 {
  0%, 100% { transform: rotate(2deg) translateY(0px); }
  50% { transform: rotate(2deg) translateY(-8px); }
}

/* SECTION 4: Bottom CTA — cinematic refinement */
.cta-section {
  padding: 12rem 2rem 8rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Layered atmospheric halos behind the CTA */
.cta-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
  z-index: 0;
}

.cta-halo-outer {
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse,
    rgba(80, 60, 180, 0.18) 0%,
    rgba(124, 106, 255, 0.08) 35%,
    transparent 72%
  );
  filter: blur(40px);
}

.cta-halo-inner {
  width: 480px;
  height: 280px;
  background: radial-gradient(ellipse,
    rgba(160, 140, 255, 0.18) 0%,
    rgba(124, 106, 255, 0.08) 50%,
    transparent 78%
  );
  filter: blur(20px);
}

/* Tracked intro line above headline */
.cta-intro {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(170, 160, 210, 0.45);
  font-weight: 400;
  margin: 0 0 28px;
  text-align: center;
  line-height: 1.6;
}

/* Soft glowing horizon line — dimensional fracture */
.cta-horizon-line {
  width: 180px;
  height: 1px;
  margin: 0 auto 36px;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(160, 140, 255, 0.5) 50%,
    transparent 100%
  );
  box-shadow: 0 0 12px rgba(124, 106, 255, 0.25);
  opacity: 0.7;
}

/* Cinematic two-line headline */
.cta-section h2.cta-headline {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 200;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: #ffffff;
  text-align: center;
  margin: 0 0 2.5rem;
  position: relative;
  z-index: 2;
}

/* Floating wrapper isolates the gentle float from the button's hover transform */
.cta-button-wrap {
  position: relative;
  z-index: 2;
  animation: cta-float 5.5s ease-in-out infinite;
}

@keyframes cta-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* Refined button — soft outer glow, deeper diffusion, magnetic hover bloom */
.cta-section .cta-button {
  box-shadow:
    0 0 32px rgba(124, 106, 255, 0.35),
    0 0 80px rgba(124, 106, 255, 0.12),
    0 10px 32px rgba(0, 0, 0, 0.45);
  transition: background-color 0.3s, transform 0.3s ease, box-shadow 0.5s ease;
}

.cta-section .cta-button:hover {
  box-shadow:
    0 0 60px rgba(124, 106, 255, 0.6),
    0 0 140px rgba(124, 106, 255, 0.18),
    0 14px 40px rgba(0, 0, 0, 0.55);
}

/* Subconscious narrative fragments scattered around the section */
.cta-fragments {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.cta-frag {
  position: absolute;
  font-style: italic;
  font-weight: 300;
  color: rgba(180, 170, 220, 0.10);
  letter-spacing: 0.04em;
  filter: blur(0.6px);
  white-space: nowrap;
  animation: cta-frag-drift 14s ease-in-out infinite;
}

.cta-frag-1 { top: 18%;    left: 8%;   font-size: 1.05rem; animation-delay: 0s; }
.cta-frag-2 { top: 32%;    right: 9%;  font-size: 0.95rem; animation-delay: 3.2s; }
.cta-frag-3 { bottom: 22%; left: 11%;  font-size: 1.1rem;  animation-delay: 6.4s; }
.cta-frag-4 { bottom: 14%; right: 7%;  font-size: 0.95rem; animation-delay: 9.6s; }

@keyframes cta-frag-drift {
  0%, 100% { opacity: 0.06; transform: translateY(0); }
  50%      { opacity: 0.14; transform: translateY(-6px); }
}

@media (max-width: 720px) {
  .cta-section { padding: 8rem 1.5rem 5rem; }
  .cta-frag { display: none; }
  .cta-halo-outer { width: 95vw; height: 55vw; }
  .cta-halo-inner { width: 75vw; height: 38vw; }
  .cta-horizon-line { width: 120px; margin-bottom: 28px; }
}

.horizon {
  width: 40%;
  max-width: 500px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,106,255,0.5), transparent);
  margin: 0 auto;
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- INTAKE FORM STYLES --- */
.ambient-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(ellipse at 30% 50%, rgba(124, 106, 255, 0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.intake-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.progress-indicator {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.05em;
  z-index: 10;
}

.question-block {
  width: 100%;
  opacity: 1;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.question-block.fade-out {
  opacity: 0;
}

.question-text {
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 1.25rem; /* Tightened from 2rem */
  line-height: 1.3;
  color: var(--text-primary);
  text-align: left;
}

.intake-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  font-size: 1.2rem;
  color: var(--text-primary);
  padding: 8px 0; /* Tightened from 12px 0 */
  outline: none;
  transition: border-bottom-color 0.3s ease;
  font-family: inherit;
}

.intake-input:focus {
  border-bottom-color: var(--accent);
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.char-count {
  position: absolute;
  bottom: -20px;
  right: 0;
  font-size: 11px;
  color: var(--text-secondary);
}

.intake-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.continue-button.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.question-block .continue-button {
  margin-top: 1.8rem; /* Tightened from 2.5rem */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease, background-color 0.3s;
}

/* --- GENERATING SCREEN STYLES --- */
.generating-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.orb-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pulsing-orb {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 106, 255, 0.4), transparent);
  animation: pulse-orb 2s infinite ease-in-out;
}

.pulsing-orb-large {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 106, 255, 0.15), transparent);
  animation: pulse-orb 3s infinite ease-in-out;
}

.pulsing-orb-ring {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid rgba(124, 106, 255, 0.2);
  animation: spin-ring 8s linear infinite;
}

@keyframes spin-ring {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse-orb {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.generating-text {
  margin-top: 48px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.08em;
  opacity: 1;
  transition: opacity 0.5s ease, letter-spacing 0.5s ease;
  text-align: center;
}

.generating-text.fade-out {
  opacity: 0;
  letter-spacing: 0.05em;
}

/* --- SELVES SCREEN STYLES --- */
.selves-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 80px 48px;
  position: relative;
  z-index: 1;
}

.selves-orb {
  position: fixed;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(124, 106, 255, 0.07) 0%, transparent 65%);
  animation: moonBreath 8s ease-in-out infinite;
}

.selves-header {
  text-align: center;
}

.selves-header .label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.selves-header h2 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-top: 12px;
  color: var(--text-primary);
}

.selves-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.self-card {
  background: linear-gradient(135deg, #0f0f1a, #0d0d18);
  border: 1px solid var(--border);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  max-height: 78vh;
  transition: transform 0.35s ease, opacity 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  transform-origin: center;
}

.card-inner {
  height: 100%;
  overflow-y: auto;
  border-radius: 20px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 106, 255, 0.3) transparent;
  -webkit-overflow-scrolling: touch;
}

.card-inner::-webkit-scrollbar {
  width: 3px;
}

.card-inner::-webkit-scrollbar-track {
  background: transparent;
  margin: 12px 0;
}

.card-inner::-webkit-scrollbar-thumb {
  background: rgba(124, 106, 255, 0.3);
  border-radius: 2px;
}

.self-card.focused {
  transform: scale(1.02) !important;
  border-color: rgba(124, 106, 255, 0.5);
  box-shadow: 0 0 60px rgba(124, 106, 255, 0.15);
  opacity: 1 !important;
}

.self-card.dimmed {
  opacity: 0.6 !important;
  transform: scale(0.98) !important;
}

.self-card:hover:not(.focused) {
  border-color: rgba(124, 106, 255, 0.3);
  box-shadow: 0 0 40px rgba(124, 106, 255, 0.12);
}

/* Per-card accent top borders */
.self-card[data-self="0"] {
  border-top: 2px solid rgba(100, 180, 255, 0.4);
}
.self-card[data-self="1"] {
  border-top: 2px solid rgba(255, 120, 80, 0.4);
}
.self-card[data-self="2"] {
  border-top: 2px solid rgba(180, 100, 255, 0.4);
}

/* Per-card inner glow on hover */
.self-card[data-self="0"]:hover {
  box-shadow: 0 0 40px rgba(100, 180, 255, 0.06) inset;
}
.self-card[data-self="1"]:hover {
  box-shadow: 0 0 40px rgba(255, 120, 80, 0.06) inset;
}
.self-card[data-self="2"]:hover {
  box-shadow: 0 0 40px rgba(180, 100, 255, 0.06) inset;
}

.card-indicators {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
}

.card-indicators .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: transform 0.35s ease, background-color 0.35s ease;
}

.card-indicators .dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

.path-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
  text-transform: uppercase;
  font-weight: 600;
  text-shadow: 0 0 20px rgba(124, 106, 255, 0.5);
}

.identity-title {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.identity-year {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.card-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.section-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.meter-group {
  margin-bottom: 12px;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.meter-track {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 1.2s ease-out;
}

.diary-text {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(210, 200, 240, 0.85);
  border-left: 2px solid rgba(124, 106, 255, 0.2);
  padding-left: 16px;
}

.closing-quote {
  font-style: italic;
  font-size: 1rem;
  color: rgba(220, 210, 255, 0.9);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(124, 106, 255, 0.12);
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .selves-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .selves-grid {
    grid-template-columns: 1fr;
  }
  .selves-container {
    padding: 60px 24px;
  }
}

@keyframes quoteDrift {
  0%, 100% { opacity: 0.6; transform: translateY(0px) rotate(var(--r, 0deg)); }
  50% { opacity: 1; transform: translateY(-8px) rotate(var(--r, 0deg)); }
}

.action-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 48px;
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}

.ghost-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.text-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.3s;
  padding: 0;
}

.text-btn:hover {
  opacity: 1;
}

.cosmic-moon {
  position: fixed;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  top: 42vh;
  left: 50vw;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 50% 50%,
    rgba(80,60,180,0.45) 0%,
    rgba(124,106,255,0.3) 25%,
    rgba(60,40,140,0.15) 50%,
    transparent 70%
  );
  animation: moonBreath 8s ease-in-out infinite;
}

.cosmic-moon-2 {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  bottom: -10%;
  right: -5%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle,
    rgba(100,60,200,0.25),
    transparent 65%
  );
  animation: moonBreath2 12s ease-in-out infinite;
}

@keyframes moonBreath {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -52%) scale(1.03); }
}

@keyframes moonBreath2 {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

/* Share Future Button */
.share-future-btn {
  margin-top: 24px;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(124, 106, 255, 0.25);
  color: rgba(124, 106, 255, 0.8);
  padding: 11px 0;
  border-radius: 100px;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s, box-shadow 0.3s;
}

.share-future-btn:hover {
  border-color: rgba(124, 106, 255, 0.7);
  color: #b0a4ff;
  background: rgba(124, 106, 255, 0.06);
  box-shadow: 0 0 20px rgba(124, 106, 255, 0.1);
}

/* Share modal visible state */
.share-modal-open {
  display: flex !important;
}

@keyframes shareCardIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.share-modal-open #share-card {
  animation: shareCardIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Life Trajectory horizontal timeline strip */
.trajectory-label {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: rgba(136, 136, 170, 0.5);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.timeline-strip {
  position: relative;
  margin-top: 28px;
  padding-top: 8px;
}

.timeline-track {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 106, 255, 0.3), transparent);
}

.timeline-points {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.t-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.t-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(124, 106, 255, 0.6);
  border: 1px solid rgba(124, 106, 255, 0.4);
  transition: all 0.3s;
}

.t-point:hover .t-dot {
  background: #7c6aff;
  box-shadow: 0 0 10px rgba(124, 106, 255, 0.6);
}

.t-year {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: rgba(124, 106, 255, 0.6);
  text-transform: uppercase;
  margin-top: 4px;
}

.t-text {
  font-size: 0.72rem;
  color: rgba(180, 170, 220, 0.6);
  text-align: center;
  line-height: 1.4;
  max-width: 90px;
  margin-top: 4px;
}

/* ---------- Mobile responsive (<= 900px) ---------- */
@media (max-width: 900px) {

  /* selves.html — stack cards vertically on mobile */
  .cards-grid,
  .selves-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
    padding: 40px 20px;
  }

  /* index.html — hero text smaller on mobile */
  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    max-width: 100% !important;
  }

  /* nav bar — hide right label on mobile */
  .nav-right,
  .ambient-label {
    display: none;
  }

  /* fragments — disable absolute positioning on mobile, stack them */
  .fragments-container {
    position: relative !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 20px !important;
  }

  .fragments-container > div {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    animation: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* share card — full width on mobile */
  #share-card {
    width: 90vw !important;
    padding: 28px 20px !important;
  }

  /* timeline — smaller text on mobile */
  .t-text {
    font-size: 0.65rem !important;
    max-width: 70px !important;
  }
}

/* ---------- Expand "Read fully" button + Modal ---------- */
.expand-btn {
  display: block;
  margin: 12px auto 16px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  border: 1px solid rgba(124, 106, 255, 0.25);
  padding: 8px 20px;
  border-radius: 100px;
  color: rgba(180, 170, 220, 0.7);
  background: transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.expand-btn:hover {
  border-color: rgba(124, 106, 255, 0.6);
  color: rgba(220, 210, 255, 0.95);
}

.expand-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #080810;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.expand-modal.open {
  display: block;
  opacity: 1;
}

.expand-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 40px;
  position: relative;
  transition: opacity 0.2s ease;
}

.expand-content.fading {
  opacity: 0;
}

.expand-close,
.expand-nav-arrow {
  position: fixed;
  top: 28px;
  background: transparent;
  border: 1px solid rgba(124, 106, 255, 0.2);
  color: rgba(200, 190, 240, 0.7);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
  z-index: 1;
}

.expand-close { right: 32px; }
.expand-prev  { left: 32px; top: 50%; transform: translateY(-50%); }
.expand-next  { right: 32px; top: 50%; transform: translateY(-50%); left: auto; }
.expand-prev,
.expand-next { top: 50%; }

.expand-close:hover,
.expand-nav-arrow:hover {
  border-color: rgba(124, 106, 255, 0.6);
  color: rgba(220, 210, 255, 0.95);
  background: rgba(124, 106, 255, 0.06);
}

.expand-path {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(124, 106, 255, 0.8);
  text-transform: uppercase;
  font-weight: 500;
}

.expand-title {
  font-size: 2rem;
  font-weight: 300;
  color: #ffffff;
  line-height: 1.3;
  margin: 12px 0 6px;
}

.expand-year {
  font-size: 0.95rem;
  color: rgba(180, 170, 220, 0.6);
}

.expand-divider {
  border: none;
  border-top: 1px solid rgba(124, 106, 255, 0.15);
  margin: 32px 0;
}

.expand-meters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.ex-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(180, 170, 220, 0.7);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ex-meter-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  overflow: hidden;
}

.ex-meter-fill {
  height: 100%;
  background: rgba(124, 106, 255, 0.85);
  border-radius: 1px;
  width: 0%;
  transition: width 0.9s ease-out;
}

.expand-section-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(136, 136, 170, 0.6);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.expand-diary {
  font-size: 1rem;
  line-height: 2;
  color: rgba(210, 200, 240, 0.85);
  font-weight: 300;
  margin: 0;
}

.expand-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 20px;
  border-left: 1px solid rgba(124, 106, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.expand-timeline li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  align-items: baseline;
}

.ex-tl-year {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(124, 106, 255, 0.7);
  text-transform: uppercase;
}

.ex-tl-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(210, 200, 240, 0.85);
  font-weight: 300;
}

.expand-quote {
  font-size: 1.2rem;
  font-style: italic;
  color: rgba(220, 210, 255, 0.95);
  text-align: center;
  line-height: 1.6;
  font-weight: 300;
  padding: 0 20px;
}

.expand-share-btn {
  display: block;
  margin: 36px auto 0;
  background: transparent;
  border: 1px solid rgba(124, 106, 255, 0.4);
  color: rgba(220, 210, 255, 0.9);
  padding: 12px 32px;
  border-radius: 100px;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.expand-share-btn:hover {
  border-color: rgba(124, 106, 255, 0.8);
  background: rgba(124, 106, 255, 0.08);
  color: #ffffff;
}

@media (max-width: 720px) {
  .expand-content { padding: 80px 24px 60px; }
  .expand-title   { font-size: 1.5rem; }
  .expand-meters  { grid-template-columns: repeat(2, 1fr); }
  .expand-prev    { left: 12px; }
  .expand-next    { right: 12px; }
  .expand-close   { right: 16px; top: 16px; }
}