/* ============================================================
   E.M.O. Behavior Lab — Shared Brand Stylesheet
   Editorial: Ivory + Plum/Burgundy · Fraunces + Inter
   Use across all site pages. Page-specific styles go inline.
   ============================================================ */

/* ─── Brand Tokens ─── */
:root {
  --ivory:        #F8F3E9;
  --ivory-warm:   #F3ECDD;
  --ivory-deep:   #EDE3D0;
  --cream-rule:   #D9CDB5;

  --ink:          #1A1410;
  --ink-soft:     #3C322B;
  --ink-muted:    #6B5D52;
  --ink-quiet:    #8F8174;

  --plum:         #4A1B2E;
  --plum-deep:    #2E0F1C;
  --burgundy:     #7A1F2E;
  --burgundy-br:  #A8334A;

  --ochre:        #C49A3E;
  --ochre-soft:   #E3C77A;

  --sage:         #4F5D42;

  --paper:        #FFFDF8;
  --paper-edge:   rgba(26, 20, 16, 0.08);

  --serif:         "Fraunces", "Iowan Old Style", Georgia, serif;
  --serif-display: "Fraunces", Georgia, serif;
  --sans:          "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono:          "JetBrains Mono", "SF Mono", Menlo, monospace;

  --container-pad-x: clamp(24px, 5vw, 72px);
  --container-max:   1280px;
  --container-narrow: 760px;

  --radius-sm: 3px;
  --radius:    6px;
  --radius-lg: 14px;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "ss01";
  overflow-x: hidden;
}

body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.3;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.25  0 0 0 0 0.2  0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* ─── Containers ─── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad-x);
  position: relative; z-index: 2;
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--container-pad-x);
  position: relative; z-index: 2;
}

/* ─── Typography ─── */
.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burgundy);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before, .eyebrow::after {
  content: ""; width: 24px; height: 1px;
  background: var(--burgundy); opacity: 0.6;
}

.display {
  font-family: var(--serif-display);
  font-weight: 360;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--plum);
  font-size: clamp(44px, 6.4vw, 96px);
  margin: 0;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--burgundy);
}

.section-title {
  font-family: var(--serif-display);
  font-weight: 380;
  font-variation-settings: "opsz" 96, "SOFT" 40;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--plum);
  font-size: clamp(34px, 4.4vw, 56px);
  margin: 14px 0 0.4em;
  text-wrap: balance;
}
.section-title em { font-style: italic; color: var(--burgundy); }

h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "opsz" 48;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 12px;
}
h3 em { font-style: italic; color: var(--burgundy); }

h4 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.lede {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
  max-width: 620px;
}

p { margin: 0 0 1em; color: var(--ink-soft); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
.small { font-size: 13px; color: var(--ink-muted); }

/* ─── Sections ─── */
section {
  padding: clamp(60px, 8vw, 96px) 0;
  position: relative;
}
.section-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  margin-bottom: 48px;
  align-items: end;
}
@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; gap: 20px; }
}

.rule { height: 1px; background: var(--cream-rule); margin: 0; }

/* ─── Nav (sticky top) ─── */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248, 243, 233, 0.93);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--cream-rule);
}
.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px var(--container-pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  color: var(--plum);
  letter-spacing: 0.01em;
}
.nav-logo em { font-style: italic; color: var(--burgundy); }
.nav-links {
  display: flex;
  gap: 24px;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-weight: 500;
}
.nav-links a:hover { color: var(--burgundy); }
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--burgundy);
  border-bottom: 1.5px solid var(--burgundy);
  padding-bottom: 2px;
}
@media (max-width: 700px) {
  .nav-links { display: none; }
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--burgundy);
  color: var(--ivory);
  border-color: var(--burgundy);
}
.btn-primary:hover { background: var(--plum); border-color: var(--plum); }

.btn-ghost {
  background: transparent;
  color: var(--burgundy);
  border-color: var(--burgundy);
}
.btn-ghost:hover { background: var(--burgundy); color: var(--ivory); }

.btn-large {
  font-size: 14px;
  padding: 16px 28px;
}

.arrow::after { content: " →"; }

/* ─── Card grid ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--cream-rule);
  border-radius: var(--radius);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--burgundy-br);
  box-shadow: 0 12px 32px rgba(74, 27, 46, 0.08);
}
.card-tag {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy);
  font-weight: 600;
  margin-bottom: 14px;
}
.card-tag.is-paid { color: var(--ochre); }
.card-tag.is-new { color: var(--sage); }
.card-body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 16px;
  flex: 1;
}
.card-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
  border-top: 1px solid var(--cream-rule);
  padding-top: 12px;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.card-price {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  color: var(--plum);
  margin-right: auto;
}
.card-price-strike {
  font-size: 13px;
  color: var(--ink-quiet);
  text-decoration: line-through;
  margin-left: 6px;
}

/* ─── Hero (default — pages can override) ─── */
.hero {
  padding: clamp(60px, 9vw, 110px) 0 clamp(40px, 6vw, 72px);
  position: relative;
}
.hero h1 {
  font-family: var(--serif-display);
  font-weight: 360;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(40px, 5.6vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--plum);
  margin: 22px 0 22px;
  text-wrap: balance;
  max-width: 880px;
}
.hero h1 em {
  font-style: italic;
  color: var(--burgundy);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.hero .lede {
  margin: 0 0 28px;
}

/* ─── Footer ─── */
.site-footer {
  background: var(--plum-deep);
  color: rgba(248, 243, 233, 0.75);
  padding: 48px 0 32px;
  font-size: 13px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer .footer-attr {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 14px;
  color: var(--ivory);
  font-style: italic;
}
.site-footer a {
  color: var(--ochre-soft);
  border-bottom: 1px solid rgba(227, 199, 122, 0.4);
}
.site-footer a:hover { color: var(--ivory); }

/* ─── Utility ─── */
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.relative { position: relative; }
.z-2 { z-index: 2; }

/* ─── Print ─── */
@media print {
  body { background: white !important; }
  body::before, .nav, .site-footer { display: none !important; }
  a { color: inherit; text-decoration: underline; }
}
