/* ═══════════════════════════════════════════════════════════
   Freemind — shared design system (light / warm)
   Used by: index.html, preset.html, dashboard.html, signin.html
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Canvas & ink */
  --bg: #FAF8F4;
  --bg-elevated: #FFFFFF;
  --bg-elevated-2: #F5F2EC;
  --surface: #FFFFFF;
  --surface-soft: #FBFAF6;
  --surface-hover: #F5F2EC;

  /* Lines & dividers */
  --line: #ECE8E0;
  --line-2: #E0DBD0;
  --border: #ECE8E0;
  --border-strong: #D8D2C5;

  /* Text */
  --text: #1A1A24;
  --text-2: #4A4A5A;
  --text-muted: #6A6A78;
  --text-dim: #8A8A99;
  --text-fade: #B5B3AB;

  /* Brand */
  --primary: #5B5BD6;
  --primary-ink: #2E2E9C;
  --primary-soft: #EEEEFE;
  --accent: #E8825A;
  --accent-soft: #FBEFE8;
  --accent-2: #4FB3C4;        /* muted teal */
  --accent-2-soft: #E4F2F4;
  --accent-3: #B97E1A;        /* amber */
  --accent-3-soft: #FBF1DC;
  --accent-4: #B85D8A;        /* dusty rose */

  /* Gradients */
  --gradient: linear-gradient(135deg, #5B5BD6 0%, #8888EE 100%);
  --gradient-warm: linear-gradient(135deg, #E8825A 0%, #B85D8A 60%, #5B5BD6 100%);
  --gradient-cool: linear-gradient(135deg, #5B5BD6 0%, #4FB3C4 100%);

  /* Radius */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Shadows — soft, paper-like */
  --shadow-sm: 0 1px 2px rgba(20, 20, 40, 0.04);
  --shadow: 0 4px 16px rgba(20, 20, 40, 0.06), 0 1px 2px rgba(20, 20, 40, 0.04);
  --shadow-lg: 0 18px 48px rgba(20, 20, 40, 0.10), 0 2px 6px rgba(20, 20, 40, 0.05);
  --shadow-brand: 0 12px 40px -16px rgba(91, 91, 214, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Soft, warm glow on marketing pages */
body.has-glow::before {
  content: '';
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 800px;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(91, 91, 214, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 60%, rgba(232, 130, 90, 0.08) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.container.wide { max-width: 1320px; }

/* ───── Typography ───── */
.serif {
  font-family: 'Fraunces', 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.text-gradient {
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-gradient-cool {
  background: var(--gradient-cool);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ───── Nav ───── */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(250, 248, 244, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
nav.site-nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(250, 248, 244, 0.95);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', 'Instrument Serif', serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}
.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  /* G2.1 placeholder: clean Gondor tree silhouette with a single taproot,
     over the brand gradient. Inline SVG to keep it self-contained. */
  background:
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-linecap='round'%3E%3Cline x1='3' y1='17.5' x2='21' y2='17.5' stroke-width='0.2' opacity='0.25'/%3E%3Cpath d='M12 17.5L12 11.5' stroke-width='0.9'/%3E%3Cpath d='M12 11.5L8 8' stroke-width='0.7'/%3E%3Cpath d='M12 11.5L12 8' stroke-width='0.7'/%3E%3Cpath d='M12 11.5L16 8' stroke-width='0.7'/%3E%3Cpath d='M8 8L5.5 4.5' stroke-width='0.5'/%3E%3Cpath d='M8 8L9 4.5' stroke-width='0.5'/%3E%3Cpath d='M12 8L10 3.5' stroke-width='0.5'/%3E%3Cpath d='M12 8L14 3.5' stroke-width='0.5'/%3E%3Cpath d='M16 8L15 4.5' stroke-width='0.5'/%3E%3Cpath d='M16 8L18.5 4.5' stroke-width='0.5'/%3E%3Cpath d='M12 17.5L12 21.5' stroke-width='0.5'/%3E%3Ccircle cx='12' cy='21.5' r='0.55' fill='white' stroke='none'/%3E%3C/svg%3E") center / 22px 22px no-repeat,
    var(--gradient);
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(91, 91, 214, 0.25);
  flex-shrink: 0;
}
.logo-mark::before {
  /* Old partial-circle mark replaced by the SVG background above */
  content: none;
}
.logo-sub {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--line-2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }

/* Nav CTA — warm gradient. Selector is specific (.nav-links a.nav-cta)
   to override .nav-links a's default text color, fixing the dark-on-dark bug. */
.nav-links a.nav-cta {
  background: linear-gradient(135deg, #E8825A 0%, #B85D8A 100%);
  color: #fff;
  font-weight: 600;
  border: 1px solid transparent;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 8px 24px -8px rgba(232, 130, 90, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav-links a.nav-cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgba(232, 130, 90, 0.55);
}

@media (max-width: 720px) {
  .nav-links a:not(.nav-cta):not(.always-show) { display: none; }
  .logo-sub { display: none; }
}

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(26, 26, 36, 0.35);
}
.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(26, 26, 36, 0.4);
}
.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}
.btn-gradient {
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(91, 91, 214, 0.5);
}
.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgba(91, 91, 214, 0.6);
}
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-block { width: 100%; }

/* ───── Eyebrow / Pills ───── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--bg-elevated);
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 28px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(232, 130, 90, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}
.eyebrow .chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 100px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ───── Hero ───── */
.hero {
  padding: 88px 0 64px;
  position: relative;
}
.hero.center { text-align: center; }
.hero h1 {
  font-family: 'Fraunces', 'Instrument Serif', serif;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 28px;
  max-width: 900px;
}
.hero.center h1 { margin-left: auto; margin-right: auto; }
.hero-sub {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--text-2);
  max-width: 640px;
  margin-bottom: 40px;
  line-height: 1.55;
}
.hero.center .hero-sub { margin-left: auto; margin-right: auto; }

/* ───── Sections ───── */
section { padding: 96px 0; position: relative; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.section-label {
  display: inline-block;
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Fraunces', 'Instrument Serif', serif;
  font-size: clamp(32px, 4.2vw, 50px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.08;
  margin-bottom: 18px;
}
.section-sub {
  font-size: 18px;
  color: var(--text-2);
  max-width: 620px;
  line-height: 1.55;
}
.section-head { margin-bottom: 52px; }
.section-head.center { text-align: center; }
.section-head.center .section-sub { margin-left: auto; margin-right: auto; }

/* ───── Waitlist & inputs ───── */
.waitlist {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 480px;
  box-shadow: var(--shadow);
}
.hero.center .waitlist { margin: 0 auto; }
.waitlist input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  padding: 10px 14px;
  font-family: inherit;
}
.waitlist input::placeholder { color: var(--text-dim); }
.waitlist button {
  background: var(--text);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.waitlist button:hover {
  background: #000;
  transform: translateY(-1px);
}
.waitlist-note {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 14px;
}
.hero.center .waitlist-note { text-align: center; }

.cta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.hero.center .cta-row { justify-content: center; }

/* ───── Cards (problem / pillar / step) ───── */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .card-grid-3 { grid-template-columns: 1fr; } }

.card {
  padding: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-3-soft);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  font-size: 18px;
}
.card .icon.cool {
  background: var(--accent-2-soft);
}
.card .icon.purple {
  background: var(--primary-soft);
}
.card .icon.warm {
  background: var(--accent-soft);
}
.card h3 {
  font-family: 'Fraunces', 'Instrument Serif', serif;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.card p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
}

/* Steps */
.steps {
  display: grid;
  gap: 14px;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 24px 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.step:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}
@media (max-width: 720px) {
  .step { grid-template-columns: 48px 1fr; }
  .step .step-visual { grid-column: 1 / -1; }
}
.step-num {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  font-family: 'Fraunces', 'Instrument Serif', serif;
  font-weight: 600;
  color: var(--primary-ink);
  font-size: 17px;
}
.step-body h3 {
  font-family: 'Fraunces', 'Instrument Serif', serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.step-body p {
  font-size: 14.5px;
  color: var(--text-2);
}
.step-visual {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* ───── FAQ ───── */
.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
}
details.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}
details.faq-item[open] {
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}
details.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}
details.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  font-size: 18px;
}
details[open] .faq-icon { transform: rotate(45deg); }
details.faq-item .faq-answer {
  padding: 0 22px 20px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ───── Footer CTA ───── */
.cta-section {
  padding: 80px 40px;
  background: linear-gradient(145deg, #F2EEFF 0%, #FBF4EC 60%, #FAF8F4 100%);
  border: 1px solid rgba(91, 91, 214, 0.16);
  border-radius: var(--radius-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(91, 91, 214, 0.10), transparent 60%);
  pointer-events: none;
}
.cta-section h2 {
  font-family: 'Fraunces', 'Instrument Serif', serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.cta-section p {
  color: var(--text-2);
  font-size: 17px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.cta-section .waitlist {
  position: relative;
  z-index: 1;
  margin: 0 auto;
}
.cta-section .cta-row {
  position: relative;
  z-index: 1;
  justify-content: center;
}

/* ───── Footer ───── */
footer.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--line);
  margin-top: 56px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--text); }
.footer-note {
  font-size: 13px;
  color: var(--text-dim);
}

/* ───── Reveal animation ───── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.float { animation: float 6s ease-in-out infinite; }
