/* ═══════════════════════════════════════════════════════════════
   COSMIRE — main.css
   Aesthetic: void-black · sacred geometry · JWST diffraction stars
              prismatic spectral moments · technical monospace
═══════════════════════════════════════════════════════════════ */

/* ─── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── TOKENS ──────────────────────────────────────────────────── */
:root {
  --void:        #07070d;
  --void-raised: #0e0e1c;

  --text:        #dcdcec;
  --text-dim:    #8888a8;
  --text-muted:  #5c5c80;   /* bumped up — was too dark to read */

  --border:        rgba(255, 255, 255, 0.07);
  --border-bright: rgba(255, 255, 255, 0.2);

  --glow: 0 0 0 1px rgba(110, 195, 255, 0.28),
          0 0 24px rgba(110, 195, 255, 0.07);

  --shadow:
    0px 0px 0px 1px rgba(165, 165, 165, 0.04),
    -9px 9px 9px -0.5px rgba(0, 0, 0, 0.04),
    -18px 18px 18px -1.5px rgba(0, 0, 0, 0.08),
    -37px 37px 37px -3px rgba(0, 0, 0, 0.16),
    -75px 75px 75px -6px rgba(0, 0, 0, 0.24);

  --sans: 'Space Grotesk', sans-serif;
  --mono: 'Space Mono', monospace;

  --max-w:      1160px;
  --pad-x:      40px;
  --section-py: 140px;
}

/* ─── BASE ────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Faint structural grid (ref: dark-ui-grid-monospace-typography.jpg) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.35;
  pointer-events: none;
}

/* ─── AUDIENCE SWITCHING ─────────────────────────────────────── */
/* data-show="dev" elements are hidden in ai mode, and vice versa */
html[data-audience="dev"] [data-show="ai"]  { display: none !important; }
html[data-audience="ai"]  [data-show="dev"] { display: none !important; }

/* ─── CANVAS + GRAIN ─────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: -100px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ─── CONTAINER ───────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 10;
}

/* ─── TYPE ────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}

h1 {
  font-size: clamp(3.4rem, 7.5vw, 6.8rem);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}

h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

h3 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

p { color: var(--text-dim); line-height: 1.75; }

strong { color: var(--text); font-weight: 500; }

/* ─── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 2px;
  cursor: pointer;
  border: none;
  outline: none;
  transition: background 0.18s, box-shadow 0.18s, border-color 0.18s, color 0.18s;
  white-space: nowrap;
}

.btn-primary { background: var(--text); color: var(--void); }
.btn-primary:hover { background: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-bright);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.35);
}

.btn-full { width: 100%; justify-content: center; }

/* ─── NAV ─────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 22px 0;
  transition: border-color 0.5s, background 0.5s, padding 0.4s;
}

#nav.scrolled {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 7, 13, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  gap: 32px;
}

.wordmark {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

/* Audience toggle — tab style */
.audience-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
}

.aud-btn {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 0 4px;
  transition: color 0.2s, border-color 0.2s;
}

.aud-btn:hover { color: var(--text-dim); }

.aud-btn.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.toggle-sep {
  color: var(--text-muted);
  font-size: 0.55rem;
  opacity: 0.6;
  user-select: none;
}

/* Right side of nav */
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-paid {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-paid:hover { color: var(--text-dim); }

.nav-waitlist { font-size: 0.68rem; padding: 10px 20px; }

/* ─── HERO ────────────────────────────────────────────────────── */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 160px 0 120px;
  position: relative;
  overflow: hidden;
}

.hero-geometry {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 5%;
  opacity: 0.045;
  pointer-events: none;
  z-index: 3;
}

.hero-geometry svg {
  width: min(700px, 80vw);
  height: min(700px, 80vw);
}

.hero-sub {
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 48px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* The one prismatic moment — spectral light at the section break */
.prismatic-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent              0%,
    rgba(139, 92, 246, 0.55) 12%,
    rgba(59, 130, 246, 0.75) 26%,
    rgba(6, 182, 212, 0.85)  40%,
    rgba(16, 185, 129, 0.75) 54%,
    rgba(234, 179, 8, 0.75)  68%,
    rgba(239, 68, 68, 0.65)  82%,
    transparent              100%
  );
  z-index: 10;
}

/* ─── PROBLEM ─────────────────────────────────────────────────── */
#problem {
  padding: var(--section-py) 0;
  border-top: 1px solid var(--border);
}

#problem h2 { margin-bottom: 64px; }

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  background: var(--border);
  gap: 1px;
}

.problem-item {
  background: var(--void);
  padding: 44px 40px;
  transition: background 0.25s;
}

.problem-item:hover { background: var(--void-raised); }

.problem-num {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.problem-item p { font-size: 0.9rem; line-height: 1.82; }

/* ─── LIBRARY ─────────────────────────────────────────────────── */
#library {
  padding: var(--section-py) 0;
  border-top: 1px solid var(--border);
}

.section-sub {
  font-size: 1rem;
  max-width: 580px;
  line-height: 1.85;
  margin-bottom: 64px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.library-card {
  padding: 44px 40px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(255,255,255,0.01);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.library-card:hover {
  border-color: var(--border-bright);
  box-shadow: var(--shadow);
  background: rgba(255,255,255,0.025);
}

.card-glyph {
  font-size: 1.4rem;
  margin-bottom: 24px;
  opacity: 0.5;
  line-height: 1;
}

.library-card p { font-size: 0.88rem; line-height: 1.82; }

/* ─── ABOUT ───────────────────────────────────────────────────── */
#about {
  padding: var(--section-py) 0;
  border-top: 1px solid var(--border);
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 44px 40px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(255,255,255,0.01);
  transition: border-color 0.3s, background 0.3s;
}

.team-card:hover {
  border-color: var(--border-bright);
  background: rgba(255,255,255,0.02);
}

.team-photo-wrap {
  width: 120px;
  height: 120px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.team-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder until real photos drop in */
.team-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--void-raised);
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.team-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.team-role {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.team-card p { font-size: 0.88rem; line-height: 1.82; }

/* ─── WAITLIST ────────────────────────────────────────────────── */
#waitlist {
  padding: var(--section-py) 0;
  position: relative;
}

/* Third prismatic moment — this border-top is spectral, not just white */
#waitlist::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--border)                        0%,
    var(--border)                        20%,
    rgba(139, 92, 246, 0.35)             32%,
    rgba(6, 182, 212, 0.55)              46%,
    rgba(16, 185, 129, 0.45)             58%,
    rgba(239, 68, 68, 0.3)               72%,
    var(--border)                        82%,
    var(--border)                        100%
  );
}

.waitlist-wrap { max-width: 680px; }

.waitlist-wrap .section-sub { margin-bottom: 44px; }

.waitlist-form { gap: 0; }

.waitlist-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.waitlist-row .form-group { flex: 1; min-width: 180px; }

.waitlist-btn { flex-shrink: 0; padding: 13px 22px; }

/* ─── CREATORS CARD ───────────────────────────────────────────── */
/* Visually distinct — this is for a different person than the main page */
#creators {
  padding: var(--section-py) 0;
  border-top: 1px solid var(--border);
  position: relative;
}

/* Faint prismatic ambient glow behind the card — light through glass in the distance */
#creators::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 400px;
  background: radial-gradient(ellipse,
    rgba(6, 182, 212, 0.025)  0%,
    rgba(139, 92, 246, 0.018) 45%,
    transparent               75%
  );
  pointer-events: none;
  z-index: 5;
}

.creator-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-bright);
  border-radius: 2px;
  background: var(--void-raised);
  padding: 64px;
  box-shadow: var(--shadow);
}

/* Prismatic top edge — the creator card gets its own spectral moment */
.creator-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent              0%,
    rgba(139, 92, 246, 0.7)  12%,
    rgba(59, 130, 246, 0.9)  26%,
    rgba(6, 182, 212, 1.0)   40%,
    rgba(16, 185, 129, 0.9)  54%,
    rgba(234, 179, 8, 0.9)   68%,
    rgba(239, 68, 68, 0.8)   82%,
    transparent              100%
  );
}

.creator-eyebrow { color: var(--text-dim); }

.creator-card-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.creator-copy p { margin-bottom: 32px; }

.creator-contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  gap: 20px;
}

.creator-contact-label {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  color: var(--text-muted);
}

.creator-email-link {
  font-family: var(--mono);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border-bright);
  padding-bottom: 12px;
  transition: color 0.2s, border-color 0.2s;
  word-break: break-all;
}

.creator-email-link:hover {
  color: #fff;
  border-bottom-color: var(--text);
}

.creator-contact-note {
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-list li {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  padding-left: 22px;
  position: relative;
  line-height: 1.65;
}

.detail-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* ─── FORMS ───────────────────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  color: var(--text-muted);
}

input, textarea, select {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 13px 16px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

input:focus, textarea:focus, select:focus {
  border-color: rgba(110, 195, 255, 0.38);
  box-shadow: var(--glow);
}

textarea { resize: vertical; min-height: 96px; line-height: 1.65; }

select {
  cursor: pointer;
  color: var(--text-dim);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235c5c80' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select option { background: #111120; color: var(--text); }

.form-success {
  display: none;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 2px;
  text-align: center;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.form-success.visible {
  display: flex;
  position: relative;
}

/* Prismatic reward — a tiny spectral top edge on successful submission */
.form-success.visible::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent              0%,
    rgba(139, 92, 246, 0.5)  15%,
    rgba(6, 182, 212, 0.7)   45%,
    rgba(16, 185, 129, 0.6)  65%,
    rgba(239, 68, 68, 0.4)   85%,
    transparent              100%
  );
}

.success-glyph { opacity: 0.5; }

/* ─── FOOTER ──────────────────────────────────────────────────── */
footer {
  padding: 52px 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 10;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-meta {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.footer-email {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  margin-left: auto;
  transition: color 0.2s;
}

.footer-email:hover { color: var(--text-dim); }

/* ─── SCROLL REVEAL ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .creator-card { padding: 48px; }
}

@media (max-width: 900px) {
  :root { --section-py: 100px; --pad-x: 28px; }

  .problem-grid { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: 1fr; gap: 14px; }
  .team-grid { grid-template-columns: 1fr; }
  .creator-card-split { grid-template-columns: 1fr; gap: 48px; }

  .hero-geometry { opacity: 0.025; justify-content: center; }

  .footer-email { margin-left: 0; }

  /* Collapse nav audience toggle to simpler layout */
  .nav-paid { display: none; }
}

@media (max-width: 700px) {
  :root { --section-py: 80px; --pad-x: 20px; }

  .nav-inner { gap: 16px; }
  .audience-toggle { gap: 10px; }
  .aud-btn { font-size: 0.58rem; }
  .nav-waitlist { display: none; } /* show Join Waitlist only in page */

  h1 { font-size: clamp(2.8rem, 12vw, 4rem); }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; justify-content: center; }

  .waitlist-row { flex-direction: column; gap: 16px; }
  .waitlist-row .form-group { min-width: 0; width: 100%; }
  .waitlist-btn { width: 100%; justify-content: center; }

  .creator-card { padding: 32px 24px; }

  .footer-inner { flex-direction: column; gap: 10px; }
}
