/* ===== CO-WRITE WITH AI — SHARED STYLES ===== */
/* Version 1.0 — Multi-page foundation */

:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --paper-warm: #fafafa;
  --cream: #f5f5f5;
  --rust: #ffe169;
  --rust-glow: #ffd633;
  --charcoal: #1a1a1a;
  --smoke: #555555;
  --pencil: #777777;
  --whisper: #cccccc;
  --highlight: #fff8dc;
  --accent-text: #0a0a0a;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--charcoal);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 248, 244, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 0.7rem 2rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav-brand {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--charcoal);
  text-transform: uppercase;
  text-decoration: none;
}

.nav-brand:hover { color: var(--ink); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--smoke);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--ink); }

.nav-links a.active { color: var(--ink); font-weight: 600; }

/* Mobile CTA inside nav-links: hidden on desktop */
.mobile-cta-wrap { display: none; list-style: none; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  margin: 5px 0;
  transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== LAYOUT ===== */
section {
  padding: 6rem 2rem;
}

.container {
  max-width: 820px;
  margin: 0 auto;
}

.container-wide {
  max-width: 1080px;
  margin: 0 auto;
}

/* ===== TYPOGRAPHY ===== */
.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 1rem;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 1.8rem;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: 0.8rem;
}

h1 em, h2 em {
  font-style: italic;
  color: var(--ink);
  background: var(--rust);
  padding: 0 0.15em;
}

/* ===== HERO (shared pattern) ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}

.hero-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

.hero h1 {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.4s;
}

.hero-body {
  font-size: 1.15rem;
  color: var(--smoke);
  max-width: 620px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.6s;
}

.hero-body strong { color: var(--charcoal); font-weight: 600; }

.hero-cta {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.8s;
}

/* Page hero (shorter, for inner pages) */
.page-hero {
  padding: 10rem 2rem 4rem;
  max-width: 820px;
  margin: 0 auto;
}

.page-hero .hero-label {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.4s;
}

.page-hero .hero-body {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.6s;
}

/* ===== DARK SECTIONS ===== */
.dark-section {
  background: var(--ink);
  color: var(--cream);
  padding: 6rem 2rem;
}

.dark-section h2 { color: var(--paper); }
.dark-section h3 { color: var(--paper); }
.dark-section .section-label { color: var(--rust-glow); }

/* ===== WARM SECTIONS ===== */
.warm-section {
  background: var(--paper-warm);
  border-top: 1px solid var(--cream);
  border-bottom: 1px solid var(--cream);
}

/* ===== CARDS (shared) ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

/* ===== BUTTONS ===== */
.inline-cta {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: var(--rust);
  color: var(--ink);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.3s, transform 0.15s;
}

.inline-cta:hover {
  background: var(--rust-glow);
  transform: translateY(-1px);
}

.inline-cta-ghost {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border: 1px solid var(--charcoal);
  color: var(--charcoal);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  font-size: 0.95rem;
  margin-left: 0.8rem;
  transition: all 0.3s;
}

.inline-cta-ghost:hover {
  background: var(--charcoal);
  color: var(--paper);
}

/* ===== EMAIL FORMS ===== */
.email-form {
  display: flex;
  gap: 0.8rem;
  max-width: 480px;
}

.email-input {
  flex: 1;
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 5px;
  background: rgba(255,255,255,0.06);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s;
}

.email-input::placeholder { color: var(--pencil); }
.email-input:focus { border-color: var(--rust); }

.submit-btn {
  padding: 0.85rem 1.8rem;
  background: var(--rust);
  color: var(--ink);
  border: none;
  border-radius: 5px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.15s;
  white-space: nowrap;
}

.submit-btn:hover {
  background: var(--rust-glow);
  transform: translateY(-1px);
}

/* ===== NEWSLETTER CTA SECTION ===== */
.newsletter-section {
  background: var(--ink);
  color: var(--cream);
  padding: 5rem 2rem;
}

.newsletter-section h2 {
  color: var(--paper);
  margin-bottom: 0.8rem;
}

.newsletter-body {
  color: var(--pencil);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 2rem;
}

.newsletter-body strong { color: var(--cream); }

/* ===== FOOTER ===== */
footer {
  padding: 3rem 2rem;
  background: var(--ink);
  color: var(--pencil);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--pencil);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--rust-glow); }

.footer-social {
  max-width: 820px;
  margin: 1.5rem auto 0;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.footer-social a {
  color: var(--pencil);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-social a:hover { color: var(--rust-glow); }

.footer-legal {
  max-width: 820px;
  margin: 1.5rem auto 0;
  text-align: center;
}

.footer-legal a {
  font-size: 0.75rem;
  color: var(--smoke);
  text-decoration: none;
  margin: 0 0.5rem;
}

.footer-legal span {
  color: var(--smoke);
  font-size: 0.75rem;
}

.footer-tagline {
  font-size: 0.75rem;
  color: var(--smoke);
  margin-top: 1.5rem;
  text-align: center;
  font-style: italic;
}

/* ===== DIVIDER ===== */
.section-divider {
  max-width: 820px;
  margin: 0 auto;
  height: 1px;
  background: var(--cream);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  html { font-size: 16px; }

  nav { padding: 0.8rem 1.2rem; flex-wrap: nowrap; }
  nav .nav-brand { order: 1; }

  .nav-toggle { display: block; order: 3; }

  /* Shrink the nav-bar CTA on mobile but keep it visible */
  nav > .nav-cta {
    font-size: 0.68rem;
    padding: 0.35rem 0.7rem;
    order: 2;
    margin-left: auto;
    margin-right: 0.6rem;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #1a1a1a;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    z-index: 150;
    padding: 2rem;
    overflow-y: auto;
  }

  .nav-links.open { display: flex; }

  .nav-links li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  /* Show the CTA in the mobile menu */
  .nav-links .mobile-cta-wrap {
    display: block;
    border-bottom: none;
  }

  .nav-links a {
    font-size: 1.2rem;
    color: #faf8f4;
    display: block;
    padding: 1.1rem 0;
    -webkit-tap-highlight-color: rgba(255, 225, 105, 0.15);
  }

  .nav-links a:hover,
  .nav-links a:active {
    color: var(--rust);
  }

  /* Mobile menu CTA button */
  .nav-links .mobile-cta {
    display: block;
    margin-top: 1.5rem;
    background: var(--rust);
    color: #1a1a1a;
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.9rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255, 225, 105, 0.3);
  }

  /* Keep hamburger above the overlay */
  .nav-toggle { z-index: 151; }

  /* When menu is open, make hamburger white so it's visible on dark bg */
  .nav-toggle.open span {
    background: #faf8f4;
  }

  .hero { padding: 7rem 1.5rem 3rem; min-height: auto; }
  .page-hero { padding: 7rem 1.5rem 3rem; }
  section { padding: 4rem 1.5rem; }

  .card-grid { grid-template-columns: 1fr; }

  .email-form { flex-direction: column; }

  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-links { gap: 0.6rem 1.2rem; padding: 0 0.5rem; font-size: 0.75rem; }
  .footer-links a { padding: 0.4rem 0.2rem; }
  .footer-social { max-width: 280px; gap: 1.2rem 1.4rem; }
  .footer-social a { width: calc(20% - 1.2rem); text-align: center; padding: 0.3rem; }

  .inline-cta { display: block; text-align: center; font-size: 0.9rem; }
  .inline-cta-ghost { margin-left: 0; margin-top: 0.8rem; display: block; text-align: center; }
}

/* ===== POPUP MODAL (site-wide) ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}
.modal-overlay.active { display: flex; }

.modal-box {
  background: #ffe169;
  border-radius: 12px;
  padding: 0;
  max-width: 740px;
  width: 100%;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  animation: modalIn 0.25s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  color: #1a1a1a;
  font-size: 1.5rem;
  cursor: pointer;
  transition: opacity 0.2s;
  line-height: 1;
  z-index: 2;
  opacity: 0.6;
}
.modal-close:hover { opacity: 1; }

.modal-copy {
  padding: 2.5rem 2rem;
}
.modal-copy .section-label {
  color: #c0792a;
  margin-bottom: 0.5rem;
}
.modal-copy h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: #1a1a1a;
  margin-bottom: 0.8rem;
  line-height: 1.25;
}
.modal-copy p {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.65;
  margin-bottom: 1rem;
}
.modal-copy ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.modal-copy ul li {
  font-size: 0.88rem;
  color: #333;
  line-height: 1.6;
  padding: 0.25rem 0;
  padding-left: 1.5rem;
  position: relative;
}
.modal-copy ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #c0792a;
  font-weight: 700;
}

.modal-form-col {
  padding: 2.5rem 2rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.modal-form-note {
  font-size: 0.75rem;
  color: #999;
  text-align: center;
  margin-top: 0.8rem;
}

@media (max-width: 768px) {
  .modal-box {
    grid-template-columns: 1fr;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-copy { padding: 2rem 1.5rem 1rem; }
  .modal-copy h3 { font-size: 1.3rem; }
  .modal-form-col { padding: 1.5rem; }
}
@media (max-width: 420px) {
  .modal-box { max-width: 100%; border-radius: 8px; }
  .modal-copy { padding: 1.5rem 1.2rem 0.8rem; }
  .modal-form-col { padding: 1.2rem; }
}

/* Nav CTA button */
.nav-cta {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: #1a1a1a;
  background: var(--rust);
  padding: 0.45rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--rust-glow);
  transform: translateY(-1px);
}
