/* ==========================================================
   Eidetic — shared site styles
   Design tokens lifted from app/theme.js
   ========================================================== */

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

:root {
  --cream:        #EDE5D8;
  --cream-dark:   #E4D9C8;
  --cream-soft:   #F4EFE5;
  --ink:          #1A1208;
  --ink-soft:     #5C4E38;
  --saffron:      #E8820C;
  --saffron-mid:  #F9C97A;
  --saffron-light:#FDF0E0;
  --border:       rgba(92, 78, 56, 0.12);
  --border-mid:   rgba(92, 78, 56, 0.20);
  --border-strong:rgba(92, 78, 56, 0.32);
  --white:        #FFFFFF;

  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1120px;
  --maxw-narrow: 880px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 400;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ——— NAV —————————————————————————————————————— */
.nav {
  position: sticky;
  top: 0; z-index: 100;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(237, 229, 216, 0.88);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 2.5px;
  color: var(--ink);
}
.wordmark .e { color: var(--saffron); font-size: 1.35em; line-height: 1; }
.nav-tagline {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.65;
  font-weight: 500;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-size: 13.5px;
  font-weight: 450;
  color: var(--ink-soft);
  letter-spacing: 0.1px;
  transition: color .2s ease;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--saffron);
  transition: width .28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.nav-link:hover::after { width: 100%; }
.nav-link.active::after { width: 100%; }
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link.active { color: var(--saffron); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: transform .2s cubic-bezier(0.25, 0.46, 0.45, 0.94), background .2s ease, box-shadow .2s ease;
}
.nav-cta:hover { background: #2c1f10; transform: translateY(-2px); color: var(--cream); box-shadow: 0 8px 20px -6px rgba(26,18,8,0.28); }

/* ——— BUTTONS —————————————————————————————————— */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: transform .2s cubic-bezier(0.25, 0.46, 0.45, 0.94), background .2s ease, box-shadow .2s ease;
  will-change: transform;
}
.btn-primary:hover { background: #2c1f10; transform: translateY(-2px); color: var(--cream); box-shadow: 0 10px 24px -8px rgba(26,18,8,0.30); }
.btn-primary svg { width: 14px; height: 14px; }

.btn-saffron {
  background: var(--saffron);
  border-color: var(--saffron);
  color: var(--white);
}
.btn-saffron:hover { background: #C9700A; color: var(--white); box-shadow: 0 10px 24px -8px rgba(232,130,12,0.38); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-mid);
  transition: color .2s, border-color .2s;
}
.btn-ghost:hover { color: var(--saffron); border-bottom-color: var(--saffron); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 14px;
  font-weight: 500;
  transition: transform .2s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color .2s ease, color .2s ease, box-shadow .2s ease;
  cursor: pointer;
  will-change: transform;
}
.btn-outline:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(26,18,8,0.16); }

/* ——— SECTION SHELL ————————————————————————— */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px 40px;
}
.section.narrow { max-width: var(--maxw-narrow); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--saffron);
}
.eyebrow.center { justify-content: center; }

.title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.8px;
  color: var(--ink);
  max-width: 820px;
}
.title em { font-style: italic; color: var(--saffron); font-weight: 400; }
.title.center { margin-left: auto; margin-right: auto; text-align: center; }

.lede {
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 580px;
}
.lede.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ——— PAGE HEADER (subpages) ————————————————— */
.page-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 40px 56px;
}
.page-header .title { max-width: 900px; }
.page-header .lede { max-width: 640px; }

/* ——— FOOTER —————————————————————————————————— */
.footer-band {
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 40px 56px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand .wordmark { font-size: 22px; }
.footer-brand small {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 10px;
  max-width: 280px;
  line-height: 1.55;
}
.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  align-items: center;
}
.footer-social a {
  color: var(--ink-soft);
  opacity: 0.55;
  transition: opacity .2s, color .2s;
  display: flex;
  align-items: center;
}
.footer-social a:hover {
  opacity: 1;
  color: var(--saffron);
}

.footer-col h5 {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
  opacity: 0.7;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 13.5px; color: var(--ink); transition: color .2s; }
.footer-col a:hover { color: var(--saffron); }

.footer-base {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 40px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.7;
}

/* ——— TYPING INDICATOR ————————————————————— */
.typing-indicator {
  display: none;
  align-self: flex-start;
  background: var(--cream-dark);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  padding: 9px 13px;
  gap: 5px;
  align-items: center;
}
.typing-indicator span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-soft);
  display: block;
  animation: typing-dot 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

/* ——— SCROLL REVEAL ————————————————————————— */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ——— RESPONSIVE ————————————————————————————— */
@media (max-width: 900px) {
  .nav { padding: 16px 24px; }
  .nav-right { gap: 14px; }
  .nav-link.hide-sm { display: none; }
  .section, .page-header { padding-left: 24px; padding-right: 24px; }
  .footer { grid-template-columns: 1fr 1fr; gap: 36px; padding: 48px 24px; }
  .footer-brand { grid-column: span 2; }
  .footer-base { flex-direction: column; gap: 8px; padding: 20px 24px 32px; align-items: flex-start; }
}
