/* FOLIO authority — espadvisorygroup.com
   Cream paper, near-black ink, warm hairline, wax red accent.
   Cormorant Garamond body + Cormorant SC wordmarks. */

:root {
  color-scheme: light dark;
  --paper:    #f5f1e8;
  --ink:      #0a0a0a;
  --muted:    #6b665c;
  --hairline: #c8bfae;
  --wax:      #8b1414;
  --rule:     #1a1a1a;
  --accent:   #8b1414;

  --serif:     "Cormorant Garamond", Garamond, "EB Garamond", Georgia, serif;
  --smallcaps: "Cormorant SC", "Cormorant Garamond", serif;
  --sans:      ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:      ui-monospace, "SF Mono", "JetBrains Mono", monospace;

  --measure:  38em;
  --space:    1.25rem;
}
@media (prefers-color-scheme: dark) {
  :root:not(.style-light) {
    --paper:    #15110a;
    --ink:      #ece7dc;
    --muted:    #9a948a;
    --hairline: #3a342b;
    --wax:      #cf6464;
    --rule:     #ece7dc;
    --accent:   #cf6464;
  }
}

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

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.005em;
}
body { padding: 6vh 6vw 10vh; max-width: 980px; margin: 0 auto; }

/* Element baselines — the cascade carries 80% of the design */
h1, h2, h3, h4 {
  font-family: var(--smallcaps);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.2;
  margin: 1.8em 0 0.6em;
  color: var(--ink);
}
h1 { font-size: clamp(34px, 5.5vw, 56px); letter-spacing: 0.18em; }
h2 { font-size: clamp(13px, 1.6vw, 16px); letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); }
h3 { font-size: clamp(20px, 2.4vw, 26px); }
h4 { font-size: 14px; letter-spacing: 0.18em; color: var(--muted); }

p, li {
  font-family: var(--serif);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.65;
  margin: 0 0 0.9em;
  max-width: var(--measure);
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  transition: border-color .15s, color .15s;
}
a:hover { border-bottom-color: var(--wax); color: var(--wax); }

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 2.4em auto;
  width: 100%;
}

button, .submit, .cta {
  font: inherit;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  padding: 0.85em 1.4em;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
button:hover, .submit:hover, .cta:hover {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
button.cancel { border-color: var(--hairline); color: var(--muted); }

input, textarea, select {
  font: inherit;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  padding: 0.6em 0.8em;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-bottom-color: var(--wax);
}
:focus-visible { outline: 1px solid var(--wax); outline-offset: 3px; }

/* ─── Brand chrome ─── */
.topbar {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 1.4em;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 3em;
  font-family: var(--smallcaps);
}
.topbar .home, .topbar a.home {
  font-size: 19px; letter-spacing: 0.26em; color: var(--ink);
  border-bottom: none; text-indent: 0.26em;
}
.topbar .hash { font-family: var(--mono); font-size: 10.5px;
                letter-spacing: 0.08em; color: var(--muted); }

.wordmark {
  font-family: var(--smallcaps);
  font-weight: 500;
  font-size: clamp(40px, 6.5vw, 64px);
  letter-spacing: 0.24em;
  text-align: center;
  text-indent: 0.24em;
  margin: 0.4em 0 0.8em;
  line-height: 1.05;
}
.wordmark.small {
  font-size: 20px; text-align: left;
  letter-spacing: 0.26em; text-indent: 0.26em;
  margin: 0;
}
.wordmark.small a { border-bottom: none; }
.wordmark a { border-bottom: none; color: inherit; }

.tagline, .lede, .statement p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.01em;
  color: var(--ink);
  max-width: 28em;
  margin: 0 auto 1em;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.6em;
  text-align: center;
}

.title {
  font-family: var(--smallcaps);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: 0.18em;
  text-align: center;
  margin: 0.2em 0 0.8em;
}

.locations, .section-label, .colophon {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.locations { margin-top: 2.2em; }
.colophon { margin-top: 4em; padding-top: 1.6em; border-top: 1px solid var(--hairline); }
.section-label { margin: 3em 0 1.2em; }

.hint {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 1.6em;
}

/* ─── Home page hero (FOLIO scaling) ─── */
body.home {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6vh 8vw 8vh;
  max-width: 820px;
  text-align: center;
}
body.home .wordmark { font-size: clamp(36px, 6vw, 56px); margin-bottom: 0.8em; }
body.home hr.rule { width: clamp(120px, 30%, 220px); margin: 1.4em auto;
                    border-top: 1px solid var(--wax); }
body.home .statement { max-width: 32em; margin: 0 auto; }

/* ─── Cards & panels ─── */
.panel, .panel-body, .continue-card, .doc-panel {
  font-family: var(--serif);
  padding: 1.6em 0;
}
.continue-card {
  border: 1px solid var(--hairline);
  padding: 1.6em 1.8em;
  margin: 2em 0;
}
.continue-card .label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6em;
}
.continue-card .who {
  font-family: var(--smallcaps);
  font-size: 22px;
  letter-spacing: 0.12em;
  margin: 0 0 0.3em;
}
.continue-card .meta { font-size: 14px; color: var(--muted); margin: 0 0 1.2em; }

/* ─── Forms ─── */
.field { margin: 1.6em 0; }
.field label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6em;
}
.field input, .field textarea, .field select { width: 100%; }
.submit-row { margin-top: 2em; display: flex; gap: 1em; flex-wrap: wrap; }
.status { font-style: italic; color: var(--muted); margin-top: 1em; min-height: 1em; }

/* ─── Accordion ─── */
.accordion { margin: 3em 0; border-top: 1px solid var(--hairline); }
.accordion-toggle {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1.2em 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.accordion-toggle:hover { color: var(--wax); background: transparent; }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .25s; }
.accordion-body.open { max-height: 1200px; }
.accordion-body .inner { padding-bottom: 1.6em; }

/* ─── or-paste divider ─── */
.or-paste {
  display: flex; align-items: center; gap: 1em;
  margin: 2.4em 0;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
}
.or-paste .rule { flex: 1; height: 1px; background: var(--hairline); }

/* ─── fades / reveal animations ─── */
.fade { opacity: 0; animation: fadeIn .6s ease-out forwards; }
.fade.d1 { animation-delay: 0.05s; }
.fade.d2 { animation-delay: 0.15s; }
.fade.d3 { animation-delay: 0.30s; }
.fade.d4 { animation-delay: 0.45s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); }
                    to   { opacity: 1; transform: translateY(0); } }

/* ─── code ─── */
code, pre, kbd { font-family: var(--mono); font-size: 13.5px; }
pre { background: rgba(10,10,10,0.04); padding: 1em 1.2em;
      border-left: 2px solid var(--hairline); overflow-x: auto;
      font-size: 12px; line-height: 1.55; }

/* ─── mobile ─── */
@media (max-width: 720px) {
  body { padding: 4vh 6vw 8vh; font-size: 17px; }
  body.home { padding: 5vh 6vw 5vh; }
  .topbar { flex-direction: column; gap: 0.4em; align-items: flex-start; }
}
