/* ---------------------------------------------------------------------------
   Eudavol AI — design tokens
--------------------------------------------------------------------------- */
:root {
  --bg: #faf7f2;
  --bg-raised: #ffffff;
  --ink: #1c1914;
  --ink-soft: #5c554a;
  --ink-faint: #9a917f;
  --gold: #b8912f;
  --gold-soft: #e3caa6;
  --line: rgba(28, 25, 20, 0.12);
  --shadow: 0 1px 2px rgba(28, 25, 20, 0.04), 0 12px 32px rgba(28, 25, 20, 0.06);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 1080px;
  --pad: clamp(1.25rem, 5vw, 3rem);
}

[data-theme="dark"] {
  --bg: #16130e;
  --bg-raised: #201c15;
  --ink: #efe9dd;
  --ink-soft: #b3a892;
  --ink-faint: #7d745f;
  --gold: #d4ab4a;
  --gold-soft: #6b5626;
  --line: rgba(239, 233, 221, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16130e;
    --bg-raised: #201c15;
    --ink: #efe9dd;
    --ink-soft: #b3a892;
    --ink-faint: #7d745f;
    --gold: #d4ab4a;
    --gold-soft: #6b5626;
    --line: rgba(239, 233, 221, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7.5rem) var(--pad);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
}

.accent { color: var(--gold); }

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.875rem var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover { color: var(--ink); border-color: var(--ink-faint); }

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

/* ---------------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); opacity: 0.92; }

.btn-small { padding: 0.5rem 1.125rem; font-size: 0.875rem; }

.btn-large { padding: 0.9375rem 2rem; font-size: 1.0625rem; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover { border-color: var(--ink-faint); }

/* ---------------------------------------------------------------------------
   Hero
--------------------------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: clamp(4rem, 12vh, 8rem);
  padding-bottom: clamp(4rem, 12vh, 8rem);
}

.hero-mark {
  width: clamp(110px, 16vw, 170px);
  margin-bottom: 2.5rem;
  animation: mark-in 1.4s ease both;
}

@keyframes mark-in {
  from { opacity: 0; transform: scale(0.92) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

.hero h1 {
  font-size: clamp(2.75rem, 7.5vw, 5.25rem);
  font-weight: 400;
  animation: rise-in 0.9s 0.15s ease both;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}

.hero-sub {
  max-width: 34em;
  margin-top: 1.75rem;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  animation: rise-in 0.9s 0.3s ease both;
}

.hero-cta {
  display: flex;
  gap: 0.875rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: rise-in 0.9s 0.45s ease both;
}

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

/* ---------------------------------------------------------------------------
   Statement sections (scroll word-reveal)
--------------------------------------------------------------------------- */
.statement-section { max-width: 900px; }

.statement {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.375rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.statement em { color: var(--gold); font-weight: 500; }

.statement .w {
  opacity: 0.16;
  transition: opacity 0.35s ease;
}

.statement .w.on { opacity: 1; }

/* ---------------------------------------------------------------------------
   Quotes
--------------------------------------------------------------------------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.25rem;
}

.quote-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.75rem;
  padding: 2rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.quote-card blockquote {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  line-height: 1.5;
}

.quote-card figcaption { display: flex; flex-direction: column; gap: 0.125rem; }

.quote-card strong { font-size: 0.9375rem; }

.quote-card span {
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------------------------
   Cards (approach / values)
--------------------------------------------------------------------------- */
.approach-intro { max-width: 44em; margin-bottom: 3rem; }

.lede {
  font-size: clamp(1.1875rem, 2.4vw, 1.5rem);
  font-family: var(--font-display);
  line-height: 1.5;
}

.approach-intro .lede + .lede { margin-top: 1rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.card {
  padding: 2rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.card-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.card h3 { font-size: 1.375rem; margin-bottom: 0.625rem; }

.card p { color: var(--ink-soft); font-size: 0.9688rem; }

/* ---------------------------------------------------------------------------
   Founder
--------------------------------------------------------------------------- */
.founder-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  margin-bottom: 4rem;
}

@media (max-width: 760px) {
  .founder-grid { grid-template-columns: 1fr; }
}

.founder-bio h2 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 1.25rem; }

.founder-bio .lede { margin-bottom: 1.25rem; }

.founder-bio p:not(.lede) { color: var(--ink-soft); margin-bottom: 1.75rem; }

.pull-quote {
  padding: 2.25rem;
  border-left: 3px solid var(--gold);
  background: var(--bg-raised);
  border-radius: 0 16px 16px 0;
  box-shadow: var(--shadow);
}

.pull-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.pull-quote figcaption {
  font-size: 0.875rem;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------------------------
   Prose blocks
--------------------------------------------------------------------------- */
.prose { max-width: 44em; }

.prose p { margin-bottom: 1.375rem; color: var(--ink-soft); }

.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: var(--ink);
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.prose a:hover { color: var(--gold); }

.prose .accent {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  color: var(--gold);
}

/* ---------------------------------------------------------------------------
   Essays
--------------------------------------------------------------------------- */
.essays-intro {
  margin: 3.5rem 0 1.5rem;
  font-family: var(--font-display);
  font-size: 1.1875rem;
}

.essay-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.essay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.625rem 0.25rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding-left 0.25s ease;
}

.essay:hover { padding-left: 0.875rem; }

.essay h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }

.essay p { font-size: 0.9063rem; color: var(--ink-faint); }

.essay-arrow {
  font-size: 1.25rem;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.essay:hover .essay-arrow { transform: translateX(4px); }

/* ---------------------------------------------------------------------------
   Contact / footer
--------------------------------------------------------------------------- */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.contact h2 { font-size: clamp(2rem, 4.5vw, 3rem); }

.contact p { max-width: 36em; color: var(--ink-soft); }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--pad) 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* ---------------------------------------------------------------------------
   Scroll reveal + motion preferences
--------------------------------------------------------------------------- */
/* Fade-from-below only applies once JS has confirmed it can reveal it */
.js [data-fade] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js [data-fade].visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-fade] { opacity: 1; transform: none; transition: none; }
  .statement .w { opacity: 1; transition: none; }
  .hero-mark, .hero h1, .hero-sub, .hero-cta { animation: none; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
}
