/* Fulcrum Foundry - Proposal System V4 FINAL */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0e1a;
  --bg-card: rgba(12, 16, 30, 0.88);
  --accent-1: #2d8caa;
  --accent-2: #4eeadb;
  --accent-3: #3ecfcf;
  --text: #e8edf5;
  --text-dim: rgba(232, 237, 245, 0.55);
  --text-muted: rgba(232, 237, 245, 0.8);
  --border: rgba(78, 234, 219, 0.12);
  --border-hover: rgba(78, 234, 219, 0.25);
  --glow-soft: 0 0 60px rgba(45, 140, 170, 0.08);
  --glow-accent: 0 0 40px rgba(78, 234, 219, 0.06);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 1.15rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

#proposal-content.visible {
  display: block;
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-top: 0;
}

/* ── Sticky Header ── */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 36px;
  background: transparent;
  pointer-events: none;
}
.sticky-header img {
  height: 36px;
  width: auto;
  pointer-events: auto;
}

/* ── Background layers ── */
#stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora .blob { position: absolute; border-radius: 50%; filter: blur(130px); opacity: 0.10; animation: drift 22s ease-in-out infinite alternate; }
.aurora .blob:nth-child(1) { width: 550px; height: 550px; background: var(--accent-1); top: -12%; left: -8%; animation-duration: 24s; }
.aurora .blob:nth-child(2) { width: 450px; height: 450px; background: var(--accent-2); bottom: -10%; right: -5%; animation-duration: 28s; animation-delay: -6s; }
.aurora .blob:nth-child(3) { width: 350px; height: 350px; background: var(--accent-3); top: 35%; left: 55%; animation-duration: 32s; animation-delay: -12s; }
@keyframes drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(35px,-25px) scale(1.06); } 100% { transform: translate(-25px,18px) scale(0.94); } }

.hero-glow { position: fixed; top: 20%; left: 50%; transform: translateX(-50%); width: 900px; height: 600px; background: radial-gradient(ellipse, rgba(45,140,170,0.08) 0%, transparent 70%); pointer-events: none; z-index: 0; }

/* ── Auth Gate ── */
#auth-gate { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.auth-box { position: relative; z-index: 1001; text-align: center; max-width: 400px; width: 90%; }
.auth-box .auth-logo { width: 180px; margin-bottom: 48px; opacity: 0.9; }
.auth-box h2 { font-family: var(--font-body); font-size: 0.85rem; font-weight: 400; color: var(--text-dim); margin-bottom: 28px; letter-spacing: 0.06em; text-transform: uppercase; }
.auth-input-wrap { display: flex; gap: 12px; margin-bottom: 16px; }
.auth-input-wrap input { flex: 1; padding: 14px 18px; background: rgba(255,255,255,0.04); border: 1px solid rgba(78,234,219,0.15); border-radius: 10px; color: var(--text); font-family: var(--font-body); font-size: 1rem; outline: none; transition: border-color 0.3s; }
.auth-input-wrap input:focus { border-color: var(--accent-2); }
.auth-input-wrap input::placeholder { color: var(--text-dim); }
.auth-input-wrap button { padding: 14px 28px; background: linear-gradient(135deg, var(--accent-1), var(--accent-3)); border: none; border-radius: 10px; color: #fff; font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: opacity 0.3s, transform 0.2s; }
.auth-input-wrap button:hover { opacity: 0.9; transform: translateY(-1px); }
#auth-error { color: #ff6b6b; font-size: 0.85rem; min-height: 1.2em; }

/* ── Slides ── */
.slide {
  min-height: 100vh;
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  overflow: hidden;
}

.slide-inner {
  max-width: 1000px;
  width: 100%;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-inner.visible { opacity: 1; transform: translateY(0); }

/* ── Section headers ── */
.section-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.1;
}

.section-sub {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 36px;
}

/* ── Cover ── */
.cover-center { text-align: center; }
.cover-center .client-logo { width: 280px; max-width: 55vw; margin-bottom: 40px; opacity: 0.95; }
.cover-center h1 {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.cover-meta { display: flex; gap: 32px; justify-content: center; margin-top: 12px; color: var(--text-dim); font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase; }

.scroll-indicator { position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-dim); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; animation: scrollBounce 2s ease-in-out infinite; }
.scroll-indicator svg { width: 22px; height: 22px; stroke: var(--accent-2); opacity: 0.6; }
@keyframes scrollBounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ── Executive Summary ── */
.exec-summary p { font-size: 1.2rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 24px; max-width: 800px; }
.exec-summary p.highlight { color: var(--text); font-weight: 400; }

.btn-research { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 14px 28px; background: rgba(78,234,219,0.06); border: 1px solid rgba(78,234,219,0.2); border-radius: 10px; color: var(--accent-2); font-family: var(--font-heading); font-weight: 500; font-size: 1rem; text-decoration: none; transition: all 0.3s; }
.btn-research:hover { background: rgba(78,234,219,0.12); border-color: var(--accent-2); transform: translateY(-2px); }
.btn-research svg { width: 18px; height: 18px; }

blockquote.mit-quote { border-left: 3px solid rgba(78,234,219,0.4); padding: 16px 24px; margin: 24px 0; background: rgba(78,234,219,0.04); border-radius: 0 10px 10px 0; font-size: 1.1rem; line-height: 1.75; color: var(--text-muted); font-style: italic; max-width: 800px; }

/* ── Accordion/Phases ── */
.phases-accordion { display: flex; flex-direction: column; gap: 14px; }
.phase-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color 0.3s; }
.phase-item.active { border-color: var(--border-hover); }
.phase-header { display: flex; align-items: center; gap: 18px; padding: 22px 28px; cursor: pointer; user-select: none; transition: background 0.3s; }
.phase-header:hover { background: rgba(78,234,219,0.03); }
.phase-number { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--accent-1), var(--accent-3)); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; font-size: 1rem; color: #fff; flex-shrink: 0; }
.phase-title { flex: 1; font-family: var(--font-heading); font-weight: 600; font-size: 1.2rem; }
.phase-chevron { width: 22px; height: 22px; stroke: var(--text-dim); transition: transform 0.3s; flex-shrink: 0; }
.phase-item.active .phase-chevron { transform: rotate(180deg); stroke: var(--accent-2); }
.phase-body { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.phase-item.active .phase-body { max-height: 400px; }
.phase-content { padding: 0 28px 24px 86px; color: var(--text-muted); font-size: 1.05rem; line-height: 1.75; }
.phase-content p { margin-bottom: 12px; }
.phase-content ul { list-style: none; padding: 0; }
.phase-content ul li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.phase-content ul li::before { content: ''; position: absolute; left: 0; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); opacity: 0.5; }

/* ── CTA Cards ── */
.cta-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 760px; margin: 32px auto 24px; text-align: left; }
.cta-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; transition: all 0.35s; }
.cta-card:hover { transform: translateY(-3px); box-shadow: var(--glow-soft); }
.cta-card.primary { border-color: var(--accent-1); box-shadow: var(--glow-accent); }
.cta-card h3 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; }
.cta-card .price { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; margin-bottom: 18px; background: linear-gradient(135deg, var(--accent-2), var(--accent-1)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.cta-card ul { list-style: none; padding: 0; }
.cta-card li { padding: 5px 0 5px 22px; position: relative; font-size: 0.95rem; color: var(--text-muted); }
.cta-card li::before { content: '\2713'; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; font-size: 0.85rem; }

.scarcity { max-width: 760px; margin: 0 auto 20px; font-size: 0.95rem; line-height: 1.7; color: var(--text-dim); text-align: center; }
.scarcity strong { color: var(--accent-2); }

.next-steps-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 20px 28px; max-width: 760px; margin: 0 auto 28px; font-size: 1rem; line-height: 1.7; color: var(--text-muted); text-align: center; }

.closer-intro { font-size: 1.15rem; line-height: 1.75; color: var(--text-muted); max-width: 760px; margin: 0 auto 28px; text-align: center; }
.closer-intro .accent { color: var(--accent-2); font-weight: 600; }

.signoff { text-align: center; max-width: 760px; margin: 0 auto; }
.signoff p { font-size: 1.05rem; color: var(--text-muted); font-style: italic; margin-bottom: 6px; }
.signoff .signoff-name { font-family: var(--font-heading); font-weight: 600; font-style: normal; color: var(--text); font-size: 1.05rem; }
.signoff .signoff-name .accent { color: var(--accent-2); font-weight: 400; }
.signoff .signoff-email { color: var(--accent-2); text-decoration: none; font-size: 0.9rem; }
.signoff .signoff-email:hover { opacity: 0.8; }

/* ── Slide Navigation ── */
.slide-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.slide-nav-arrow {
  width: 40px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: opacity 0.3s;
}
.slide-nav-arrow svg { width: 18px; height: 18px; stroke: var(--accent-2); opacity: 0.35; transition: opacity 0.3s; }
.slide-nav-arrow:hover svg { opacity: 0.9; }

.slide-nav-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(78, 234, 219, 0.1);
  color: var(--text-dim);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide-nav-num:hover {
  border-color: rgba(78, 234, 219, 0.35);
  color: var(--accent-2);
  background: rgba(78, 234, 219, 0.08);
}
.slide-nav-num.active {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: rgba(78, 234, 219, 0.12);
  box-shadow: 0 0 20px rgba(78, 234, 219, 0.12), inset 0 0 12px rgba(78, 234, 219, 0.06);
  transform: scale(1.1);
}

/* ── Proposal content visibility ── */
#proposal-content { display: none; }

/* ── Landing page ── */
.landing-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.landing-box { text-align: center; }
.landing-box img { width: 200px; margin-bottom: 32px; opacity: 0.9; }
.landing-box h1 { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0.02em; }

/* ── Mobile ── */
@media (max-width: 768px) {
  body { font-size: 1.05rem; }
  .slide { padding: 28px 20px; height: auto; min-height: 100vh; }
  .slide-next-steps { padding-top: 80px; }
  .cover-center .client-logo { width: 180px; margin-bottom: 28px; }
  .cover-center h1 { font-size: clamp(2.4rem, 8vw, 3.2rem); }
  .section-title { font-size: clamp(1.8rem, 5vw, 2.6rem); }
  .section-label { font-size: 0.75rem; }
  .section-sub { font-size: 1.05rem; }
  .exec-summary p { font-size: 1.05rem; line-height: 1.7; }
  blockquote.mit-quote { font-size: 1rem; padding: 14px 18px; }
  .phase-header { padding: 18px 20px; }
  .phase-title { font-size: 1.05rem; }
  .phase-content { padding-left: 20px; font-size: 0.95rem; }
  .cover-meta { flex-direction: column; gap: 6px; }
  .auth-box .auth-logo { width: 140px; margin-bottom: 36px; }
  .cta-cards { grid-template-columns: 1fr; gap: 16px; margin: 24px auto 20px; }
  .cta-card { padding: 24px; }
  .closer-intro { font-size: 1rem; }
  .next-steps-box { font-size: 0.95rem; }
  .scarcity { font-size: 0.9rem; }
  .slide-nav { display: none; }
  .sticky-header { padding: 16px 20px; }
  .sticky-header img { height: 30px; }
  #proposal-content.visible { padding-top: 0; }
  .btn-research { font-size: 0.9rem; padding: 12px 20px; }
}

@media (max-width: 480px) {
  .auth-input-wrap { flex-direction: column; }
  .slide { padding: 24px 16px; }
  .cover-center h1 { font-size: 2.2rem; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(78, 234, 219, 0.12); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(78, 234, 219, 0.25); }
::selection { background: rgba(78, 234, 219, 0.2); color: var(--text); }
