/* ==========================================================
   eSuite — shared site styles (Design System 26.2 / Theme.md)
   Warm monochrome + one gold accent. Light is the default;
   dark is the alternate. Never pure #000/#FFF backgrounds.
   Gold Deep only on light surfaces, Gold Light only on dark.
   ========================================================== */
:root {
  color-scheme: light dark;

  --paper:          #FAF9F6;  /* BrandBackground */
  --surface:        #FFFFFF;  /* BrandSurface */
  --text-primary:   #0B0B0A;  /* BrandLabel (Ink) */
  --text-secondary: #4A4741;  /* Graphite */
  --text-tertiary:  #8A867E;  /* Ash — both modes */
  --hairline:       #E9E5DC;  /* Bone */
  --bezel:          #1F1E1B;  /* Charcoal — device frames */
  --accent:         #85661F;  /* Gold Deep — light surfaces only */
  --on-accent:      #FFFFFF;  /* BrandOnAccent */
  --header-veil:    rgba(250, 249, 246, 0.82);

  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", ui-sans-serif,
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --panel-shadow: 0 24px 64px -32px rgba(11, 11, 10, 0.25),
                  0 2px 8px rgba(11, 11, 10, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:          #0B0B0A;
    --surface:        #1F1E1B;
    --text-primary:   #FAF9F6;
    --text-secondary: #C8C4BB;
    --hairline:       #4A4741;  /* Graphite — Charcoal vanishes on Ink */
    --bezel:          #4A4741;
    --accent:         #E3C27E;  /* Gold Light — dark surfaces only */
    --on-accent:      #0B0B0A;  /* Ink text on Gold Light */
    --header-veil:    rgba(11, 11, 10, 0.82);
    --panel-shadow: 0 24px 64px -32px rgba(11, 11, 10, 0.7),
                    0 2px 8px rgba(11, 11, 10, 0.35);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-primary);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* short pages keep the footer at the viewport bottom */
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 8px;
}

/* ===================== gold CTA button ===================== */
/* BrandAccent fill + BrandOnAccent label — always the pair. */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;          /* gold controls ≥ 44pt targets */
  padding: 0 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.cta:hover { transform: translateY(-1px); filter: brightness(1.06); }
.cta:active { transform: translateY(0); filter: brightness(0.97); }

/* ===================== fixed site header ===================== */
/* Hidden by default (the home hero carries its own gold CTA);
   pages without a hero add .is-visible in the markup. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px clamp(16px, 3vw, 32px);
  background: var(--header-veil);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.35s ease, visibility 0.35s;
}

.site-header.is-visible {
  transform: translateY(0);
  visibility: visible;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-brand .mark-svg { height: 26px; }  /* mark never below 24px */

.header-brand .wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1;
}

.site-header .cta {
  min-height: 40px;
  padding: 0 20px;
  font-size: 0.95rem;
}

.mark-svg {
  display: block;
  width: auto;
  aspect-ratio: 349 / 821;
  color: var(--text-primary);  /* one color: Ink on light, Paper on dark */
}

/* ============================ footer ========================== */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: clamp(24px, 3.5vw, 40px) clamp(24px, 4vw, 56px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: 1280px;
  width: 100%;
  margin: auto auto 0;
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* ================== long-form pages (about, legal) ================== */
.page-main {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(64px + clamp(32px, 6vh, 64px)) clamp(24px, 5vw, 40px) clamp(48px, 7vw, 88px);
}

.page-main h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.page-meta {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

.prose h2 {
  margin: clamp(40px, 7vh, 64px) 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.15;
}

.prose p, .prose li {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.prose p { margin: 1.1em 0 0; }

.prose ul {
  margin: 1.1em 0 0;
  padding-left: 1.3em;
}

.prose li { margin-top: 0.6em; }

.prose li::marker { color: var(--text-tertiary); }

.prose strong { color: var(--text-primary); font-weight: 600; }

.prose a { color: var(--text-primary); }

.prose .lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  line-height: 1.35;
  color: var(--text-primary);
}

.prose .signature {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-primary);
}

/* ======================= reduced motion ======================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
