/* =============================================
   Keep Your Mind — styles.css
   Mobile-first, no frameworks
   ============================================= */

/* --- Reset & box model --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Tokens --- */
:root {
  --bg:        #FAF7F2;
  --ink:       #1A1A1A;
  --ink-muted: #5A5650;
  --mint:      #b5efbd;
  --mint-dark: #7ed68a;
  --border:    #E0DDD6;
  --max-prose: 68ch;
  --max-wide:  1100px;
  --gap:       clamp(1.5rem, 4vw, 3rem);
  --section-pad: clamp(4rem, 8vw, 7rem);

  /* type scale */
  --text-sm:   0.875rem;
  --text-base: 1.125rem;   /* 18px */
  --text-lg:   1.375rem;
  --text-xl:   1.75rem;
  --text-2xl:  2.25rem;
  --text-3xl:  clamp(2.5rem, 5vw, 3.75rem);

  /* serif display stack — Georgia as strong fallback */
  --font-display: "Georgia", "Times New Roman", serif;
  /* readable sans for body */
  --font-body:    "Helvetica Neue", "Arial", sans-serif;
}

/* --- Base --- */
html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* --- Utility --- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--max-wide);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.prose { max-width: var(--max-prose); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.7em 1.5em;
  border-radius: 3px;
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  border: 2px solid transparent;
}
.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 3px solid var(--mint-dark);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--mint);
  color: var(--ink);
  border-color: var(--mint);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

/* --- Links --- */
.text-link {
  color: var(--ink);
  text-underline-offset: 3px;
  text-decoration-color: var(--mint-dark);
  text-decoration-thickness: 2px;
}
.text-link:hover { text-decoration-color: var(--ink); }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-block: 1rem;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.3em 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--mint-dark); }

.site-nav .btn { padding: 0.45em 1.1em; font-size: 0.9rem; }

/* =============================================
   HERO
   ============================================= */
.hero {
  padding-block: var(--section-pad);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  align-items: center;
}

@media (min-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-copy { order: 1; }

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  max-width: 18ch;
}

.hero-sub {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 50ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

/* --- Brain illustration --- */
.hero-art {
  order: 0;
  display: flex;
  justify-content: center;
}

@media (min-width: 768px) {
  .hero-art { order: 2; }
}

.brain-wrap {
  max-width: 480px;
  width: 100%;
  mix-blend-mode: multiply;
}

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

.brain-float {
  animation: float 5s ease-in-out infinite;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .brain-float { animation: none; }
}

/* =============================================
   SECTIONS — shared
   ============================================= */
.section {
  padding-block: var(--section-pad);
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}

.section p {
  margin-bottom: 1rem;
  max-width: var(--max-prose);
}
.section p:last-child { margin-bottom: 0; }

/* =============================================
   PROBLEM SECTION
   ============================================= */
.problem-section {
  background: var(--ink);
  color: var(--bg);
}

.problem-section h2 { color: var(--mint); }

.problem-section p { color: #D8D4CE; }

.source-line {
  font-size: var(--text-sm);
  color: #9A9590;
  margin-top: 1.5rem !important;
  font-style: italic;
}

/* =============================================
   TURN SECTION
   ============================================= */
.turn-section {
  background: var(--bg);
}

/* mint accent line on left */
.turn-section .prose {
  border-left: 4px solid var(--mint);
  padding-left: 1.5rem;
}

/* =============================================
   METHOD SECTION
   ============================================= */
.method-section {
  background: #F0ECE5;
}

/* =============================================
   OFFERS SECTION
   ============================================= */
.offers-section {
  background: var(--bg);
}

.offers-section h2 {
  margin-bottom: var(--gap);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

.card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.2;
}

.card p {
  color: var(--ink-muted);
  font-size: 0.975rem;
  flex: 1;
  max-width: none;
  margin: 0;
}

.card .btn { align-self: flex-start; margin-top: auto; }

/* founding cohort label */
.cohort-label {
  display: inline-block;
  background: var(--mint);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.2em 0.6em;
  border-radius: 2px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about-section {
  background: #F0ECE5;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  align-items: start;
}

@media (min-width: 640px) {
  .about-inner {
    grid-template-columns: 1fr 280px;
  }
}

.about-section h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.photo-placeholder {
  background: var(--border);
  border-radius: 4px;
  aspect-ratio: 3/4;
  max-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: var(--text-sm);
  text-align: center;
  padding: 1rem;
  border: 2px dashed #C5C0B8;
}

/* =============================================
   SIGNUP SECTION
   ============================================= */
.signup-section {
  background: var(--ink);
  color: var(--bg);
}

.signup-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
  color: var(--mint);
}

.signup-section p { color: #D8D4CE; }

/* Kit embed placeholder */
.form-embed-placeholder {
  margin-top: 2rem;
  background: rgba(255,255,255,0.06);
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 1.5rem;
}

/* Fallback form — shown until real Kit embed is pasted */
.fallback-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.fallback-form label {
  font-size: var(--text-sm);
  color: #9A9590;
  display: block;
  margin-bottom: 0.5rem;
}

.email-field-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

.fallback-form input[type="email"] {
  flex: 1 1 240px;
  padding: 0.7em 1em;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  color: var(--bg);
  font-size: var(--text-base);
  font-family: inherit;
}

.fallback-form input[type="email"]::placeholder { color: #7A7671; }

.fallback-form input[type="email"]:focus {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.fallback-form .btn-primary {
  white-space: nowrap;
}

.reassurance {
  font-size: var(--text-sm);
  color: #7A7671;
  margin-top: 0.75rem !important;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
  color: var(--ink-muted);
  text-underline-offset: 3px;
}
.footer-links a:hover {
  text-decoration: underline;
  text-decoration-color: var(--mint-dark);
}
