/* EPAGOGE — Shared stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
  --cream: #FAF8F3;
  --cream-deep: #F3EFE5;
  --ink: #1A1A1A;
  --ink-soft: #2B2B2B;
  --gold: #B8860B;
  --gold-soft: #D4A628;
  --muted: #8A8075;
  --rule: #E5DFD2;
  --accent: #6B4423;
  --shadow: rgba(26, 26, 26, 0.08);

  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;

  --max: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--cream);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Grain texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  opacity: 0.04;
  z-index: 1000;
  mix-blend-mode: multiply;
}

/* ===== NAV ===== */
.nav {
  border-bottom: 1px solid var(--rule);
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}

.brand::after {
  content: ".";
  color: var(--gold);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s var(--ease);
  position: relative;
  padding: 4px 0;
}

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

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
}

/* ===== MAIN LAYOUT ===== */
main {
  flex: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 40px 100px;
  width: 100%;
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 80px;
  max-width: 760px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
  display: inline-block;
}

h1.display {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 32px;
}

h1.display em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.lead {
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 640px;
}

/* ===== SECTIONS ===== */
section {
  margin-bottom: 100px;
}

h2 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 32px;
  max-width: 720px;
}

h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 16px;
}

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 40px;
  display: block;
}

p {
  margin-bottom: 20px;
  max-width: 680px;
  color: var(--ink-soft);
}

p.large {
  font-size: 20px;
  line-height: 1.55;
}

/* ===== THREE-COLUMN ===== */
.triad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-bottom: 40px;
}

.triad-item {
  background: var(--cream);
  padding: 40px 32px;
}

.triad-item .num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 20px;
  display: block;
}

.triad-item h3 {
  font-size: 22px;
  margin-bottom: 14px;
}

.triad-item p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

/* ===== DATA GRID ===== */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.data-row {
  display: contents;
}

.data-label,
.data-value {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

.data-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding-right: 20px;
}

.data-value {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
}

.data-value a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s var(--ease);
}

.data-value a:hover {
  text-decoration-color: var(--gold);
}

/* ===== PULL QUOTE ===== */
.pull-quote {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.35;
  color: var(--ink);
  padding: 48px 0 48px 40px;
  border-left: 2px solid var(--gold);
  margin: 60px 0;
  max-width: 760px;
}

/* ===== CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.card {
  padding: 36px 32px;
  background: var(--cream-deep);
  border: 1px solid var(--rule);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow);
}

.card .num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 18px;
  display: block;
}

.card h3 {
  font-size: 22px;
  margin-bottom: 14px;
}

.card p {
  font-size: 16px;
  margin: 0;
  line-height: 1.55;
}

/* ===== CTA ===== */
.cta-row {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 18px 36px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  display: inline-block;
}

.btn:hover {
  background: transparent;
  color: var(--ink);
}

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

.btn-ghost:hover {
  background: var(--ink);
  color: var(--cream);
}

/* ===== FORM ===== */
form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 600px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.field input,
.field textarea,
.field select {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  outline: none;
  transition: border-color 0.3s var(--ease);
  width: 100%;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-bottom-color: var(--gold);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--serif);
  line-height: 1.5;
}

.form-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  line-height: 1.6;
  padding: 20px;
  background: var(--cream-deep);
  border-left: 2px solid var(--gold);
  margin-top: 16px;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--rule);
  padding: 60px 40px 40px;
  background: var(--cream);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--ink);
  margin-bottom: 16px;
}

.footer-brand::after {
  content: ".";
  color: var(--gold);
}

.footer-tag {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 16px;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

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

.footer-bottom {
  max-width: var(--max);
  margin: 60px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ===== UTILITY ===== */
.small-rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 40px 0;
  border: none;
}

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

.meta-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

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

.page-header,
.page-header .eyebrow,
h1.display,
.lead,
section {
  animation: fadeUp 0.8s var(--ease) both;
}

.page-header .eyebrow { animation-delay: 0.05s; }
h1.display { animation-delay: 0.15s; }
.lead { animation-delay: 0.3s; }
section:nth-of-type(1) { animation-delay: 0.4s; }
section:nth-of-type(2) { animation-delay: 0.5s; }
section:nth-of-type(3) { animation-delay: 0.6s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  main { padding: 48px 24px 72px; }
  .nav-inner { padding: 20px 24px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--rule);
    gap: 20px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .triad { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .data-grid { grid-template-columns: 1fr; }
  .data-label, .data-value { padding: 16px 0; }
  .data-label { padding-bottom: 4px; border-bottom: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  h2 { font-size: 30px; }
  .pull-quote { padding: 24px 0 24px 24px; font-size: 22px; }
  .lead { font-size: 19px; }
}
