/* ============================================================
   4thought.ai — Stylesheet
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --ink:          #1C1B2E;
  --ink-mid:      #4A4864;
  --ink-light:    #9490A8;
  --bg:           #F5F1E8;
  --bg-alt:       #EDEAE0;
  --bg-dark:      #1C1B2E;
  --accent:       #E05C1A;
  --accent-cool:  #1A6B8A;
  --white:        #FEFCF8;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  --nav-h:        64px;
  --container:    1100px;
  --pad-section:  clamp(5rem, 10vw, 9rem);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
img   { max-width: 100%; display: block; }
a     { color: inherit; }

/* --- Base --- */
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* --- Utility --- */
.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-light);
}


/* ============================================================
   Navigation
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(245, 241, 232, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(28, 27, 46, 0.07);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.brand-mark {
  height: 36px;
  width: auto;
}


.nav-email {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-email:hover { color: var(--accent); }


/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-h);
  overflow: hidden;
  background: var(--bg);
}

#ideaCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.coming-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 100px;
  padding: 0.3em 1.1em;
  margin-bottom: 2.25rem;
  animation: fadeInDown 0.8s ease both;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8.5vw, 7.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.9s 0.1s ease both;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.9s 0.2s ease both;
}

.btn-primary {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--white);
  background: var(--ink);
  padding: 0.9em 2.4em;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s;
  animation: fadeInUp 0.9s 0.3s ease both;
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 1.5s 1.2s ease both;
}

.scroll-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.scroll-bar {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--ink-light), transparent);
  animation: scrollPulse 2.2s 1.8s ease-in-out infinite;
}


/* ============================================================
   Pillars
   ============================================================ */
.pillars {
  background: var(--white);
  padding: var(--pad-section) 0;
}

.pillars-header {
  margin-bottom: 3.5rem;
  text-align: center;
}

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

.pillar {
  padding: 3rem 2.5rem;
  background: var(--white);
  position: relative;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.pillar.visible {
  opacity: 1;
  transform: none;
}

.pillar:nth-child(2) { transition-delay: 0.12s; }
.pillar:nth-child(3) { transition-delay: 0.24s; }

.pillar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--bg-alt);
  transition: background 0.3s;
}
.pillar:hover::before { background: var(--accent); }

.pillar-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--ink-light);
  margin-bottom: 1.5rem;
  display: block;
}

.pillar-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 1rem;
}

.pillar-line {
  width: 22px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 1.25rem;
  transition: width 0.35s ease;
}
.pillar:hover .pillar-line { width: 48px; }

.pillar-body {
  font-size: 0.95rem;
  line-height: 1.78;
  color: var(--ink-mid);
}


/* ============================================================
   Manifesto
   ============================================================ */
.manifesto {
  background: var(--bg);
  padding: var(--pad-section) 0;
}

.manifesto-inner {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
  align-items: start;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.manifesto-inner.visible {
  opacity: 1;
  transform: none;
}

.manifesto-side {
  padding-top: 0.5rem;
}

.manifesto-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 2rem;
}

.manifesto-content p {
  font-size: 1.05rem;
  color: var(--ink-mid);
  line-height: 1.82;
  margin-bottom: 1.3rem;
  max-width: 58ch;
}
.manifesto-content p:last-child { margin-bottom: 0; }


/* ============================================================
   CTA Section
   ============================================================ */
.cta-section {
  background: var(--bg-dark);
  padding: var(--pad-section) 0;
}

.cta-inner {
  text-align: center;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.cta-inner.visible {
  opacity: 1;
  transform: none;
}

.cta-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 1.75rem;
}

.cta-headline {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6.5vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.cta-headline em {
  font-style: italic;
  color: var(--accent);
}

.cta-body {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 2.75rem;
  line-height: 1.7;
}

.btn-outline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.9em 2.4em;
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 0.25s, background 0.25s;
}
.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent);
}


/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-mark {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.6;
}


.footer-copy {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
}
.footer-copy a {
  text-decoration: none;
  transition: color 0.2s;
}
.footer-copy a:hover { color: rgba(255, 255, 255, 0.7); }


/* ============================================================
   Keyframe Animations
   ============================================================ */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1;   transform: scaleY(1);   transform-origin: top; }
  50%       { opacity: 0.4; transform: scaleY(0.5); transform-origin: top; }
}


/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 800px) {
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .pillar { padding: 2.25rem 1.75rem; }
  .pillar:nth-child(2),
  .pillar:nth-child(3) { transition-delay: 0s; }

  .manifesto-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 560px) {
  .nav-email  { display: none; }
  .hero-sub br { display: none; }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================================
   Waitlist Form
   ============================================================ */
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 480px;
  margin: 2rem auto 0;
}

.form-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.waitlist-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.75em 1em;
  border: 1px solid rgba(28,27,46,0.22);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: rgba(255,255,255,0.82);
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.waitlist-form input[type="email"]:focus {
  border-color: var(--accent-cool);
  box-shadow: 0 0 0 3px rgba(26,107,138,0.12);
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  font-size: 0.78rem;
  color: rgba(28,27,46,0.60);
  line-height: 1.55;
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  margin-top: 0.15em;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.consent-label a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-msg {
  font-size: 0.85rem;
  line-height: 1.5;
  min-height: 1.2em;
}
.form-msg--success { color: #2a7a4f; font-weight: 500; }
.form-msg--error   { color: #c0392b; }

/* ============================================================
   Cookie Consent Banner
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.07);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner--visible { transform: translateY(0); }

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
  padding: 1.1rem 0;
  flex-wrap: wrap;
}

.cookie-banner-text {
  font-size: 0.83rem;
  color: rgba(254,252,248,0.70);
  line-height: 1.6;
  flex: 1;
  min-width: 200px;
}
.cookie-banner-text a {
  color: rgba(254,252,248,0.90);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions { display: flex; gap: 0.65rem; flex-shrink: 0; }

.cookie-btn {
  font-family: var(--font-body);
  font-size: 0.80rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.55em 1.3em;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.cookie-btn-decline {
  color: rgba(254,252,248,0.65);
  background: transparent;
  border-color: rgba(254,252,248,0.20);
}
.cookie-btn-decline:hover {
  border-color: rgba(254,252,248,0.45);
  color: var(--white);
}

.cookie-btn-accept {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
}
.cookie-btn-accept:hover { background: #c54d13; border-color: #c54d13; }

/* ============================================================
   Policy Page Document Layout
   ============================================================ */
.doc-page {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.doc-content {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3.5rem) 1.5rem 5rem;
}

.doc-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.4em;
}

.doc-meta {
  font-size: 0.80rem;
  font-family: var(--font-mono);
  color: var(--ink-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--bg-alt);
}

.doc-content h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2.4rem;
  margin-bottom: 0.6rem;
}

.doc-content p {
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--ink-mid);
  margin-bottom: 1em;
}

.doc-content ul,
.doc-content ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.doc-content li {
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--ink-mid);
  margin-bottom: 0.3em;
}

.doc-content a {
  color: var(--accent-cool);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc-content a:hover { color: var(--accent); }

.doc-content strong { color: var(--ink); font-weight: 500; }

.doc-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.90rem;
  margin: 1.2rem 0 1.5rem;
}
.doc-content th,
.doc-content td {
  text-align: left;
  padding: 0.65em 1em;
  border: 1px solid var(--bg-alt);
  color: var(--ink-mid);
  line-height: 1.6;
}
.doc-content th {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}
.doc-loading {
  color: var(--ink-muted, #888);
  font-size: 0.9rem;
  padding: 2rem 0;
}
