:root {
  --ink: #0a0e1a;
  --ink-2: #121829;
  --paper: #f5f2ec;
  --paper-2: #ebe6dc;
  --text: #1a1d26;
  --text-soft: #5b5f6b;
  --on-ink: #eef0f5;
  --on-ink-soft: #9aa3b8;
  --gold: #e3b866;
  --teal: #5fd3c6;
  --line-ink: rgba(238, 240, 245, .12);
  --line-paper: rgba(26, 29, 38, .12);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --wrap: 72rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--text); font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }

/* header */
.top { position: absolute; inset: 0 0 auto 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 5rem; }
.brand { font-weight: 600; letter-spacing: .02em; text-decoration: none; color: var(--on-ink); font-size: 1.05rem; }
.brand b { color: var(--gold); font-weight: 600; }
.nav { display: flex; gap: 1.6rem; font-size: .92rem; }
.nav a { color: var(--on-ink-soft); text-decoration: none; }
.nav a:hover { color: var(--on-ink); }
@media (max-width: 640px) { .nav a:not(.cta-link) { display: none; } }

/* hero */
.hero { position: relative; min-height: 100svh; background: var(--ink); color: var(--on-ink); overflow: hidden; display: flex; align-items: center; }
#waves { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(10,14,26,.92) 0%, rgba(10,14,26,.75) 38%, rgba(10,14,26,0) 70%); }
@media (max-width: 760px) { .hero::before { background: rgba(10,14,26,.6); } }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(transparent, var(--ink)); pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 6rem; padding-bottom: 6rem; }
.eyebrow { font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; color: var(--teal); margin: 0 0 1.6rem; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.8rem, 8vw, 6rem); line-height: 1.02; letter-spacing: -.02em; margin: 0 0 1.8rem; max-width: 14ch; }
.hero h1 span { display: block; }
.hero h1 .glow { background: linear-gradient(90deg, var(--gold), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--on-ink-soft); max-width: 36rem; margin: 0 0 2.5rem; }
.btn { display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.5rem; border-radius: 999px; background: var(--gold); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; transition: transform .2s ease, box-shadow .2s ease; }
.btn:hover, .btn:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(227, 184, 102, .6); outline: none; }
.btn.ghost { background: transparent; color: var(--on-ink); border: 1px solid var(--line-ink); margin-left: .6rem; }
.btn.ghost:hover { box-shadow: none; border-color: var(--on-ink-soft); }
.scroll-hint { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--on-ink-soft); }

/* sections */
section { padding: clamp(4.5rem, 12vh, 8rem) 0; }
.kicker { font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; color: var(--text-soft); margin: 0 0 1rem; }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.1; letter-spacing: -.015em; margin: 0 0 1.2rem; max-width: 22ch; }
.intro { font-size: 1.15rem; color: var(--text-soft); max-width: 40rem; margin: 0 0 3.5rem; }

/* thesis band */
.thesis { background: var(--ink-2); color: var(--on-ink); }
.thesis .wrap { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .thesis .wrap { grid-template-columns: 1.1fr 1fr; align-items: end; } }
.thesis h2 { color: var(--on-ink); }
.thesis p { color: var(--on-ink-soft); font-size: 1.12rem; margin: 0 0 1rem; }
.thesis em { color: var(--gold); font-style: normal; }

/* services */
.pillars { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { background: #fff; border: 1px solid var(--line-paper); border-radius: 18px; padding: 2rem 1.8rem 2.2rem; position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.pillar:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(10, 14, 26, .35); }
.pillar .num { font-family: var(--serif); font-size: 3.2rem; line-height: 1; color: var(--paper-2); position: absolute; top: 1.2rem; right: 1.4rem; }
.pillar h3 { font-size: 1.35rem; margin: 2.6rem 0 .8rem; font-weight: 600; }
.pillar p { margin: 0; color: var(--text-soft); }
.pillar .bar { position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--gold), var(--teal)); }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; grid-template-columns: 1fr; counter-reset: s; border-top: 1px solid var(--line-paper); }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(4, 1fr); border-top: 0; } }
.steps li { padding: 1.8rem 1.4rem 1.8rem 0; border-bottom: 1px solid var(--line-paper); }
@media (min-width: 860px) { .steps li { border-bottom: 0; border-top: 2px solid var(--text); padding-top: 1.4rem; margin-right: 1.4rem; } }
.steps li::before { counter-increment: s; content: "0" counter(s); font-size: .8rem; letter-spacing: .2em; color: var(--text-soft); display: block; margin-bottom: .8rem; }
.steps h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.steps p { margin: 0; color: var(--text-soft); font-size: .98rem; }

/* about */
.about { background: var(--paper-2); }
.about .wrap { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .about .wrap { grid-template-columns: 1fr 1.1fr; } }
.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: 1rem 0; border-bottom: 1px solid var(--line-paper); display: flex; gap: 1rem; font-size: 1.05rem; }
.facts li::before { content: ""; flex: none; width: .55rem; height: .55rem; margin-top: .55rem; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--teal)); }

/* writing */
.posts { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .posts { grid-template-columns: 1fr 1fr; } }
.post { display: block; text-decoration: none; padding: 1.8rem; border: 1px solid var(--line-paper); border-radius: 18px; background: #fff; transition: border-color .2s ease, transform .2s ease; }
.post:hover { border-color: var(--text); transform: translateY(-2px); }
.post time { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); }
.post h3 { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.25; margin: .6rem 0 .7rem; }
.post p { margin: 0; color: var(--text-soft); font-size: .98rem; }

/* closing */
.closing { background: var(--ink); color: var(--on-ink); text-align: center; position: relative; overflow: hidden; }
.closing h2 { color: var(--on-ink); margin: 0 auto 1.2rem; }
.closing p { color: var(--on-ink-soft); max-width: 34rem; margin: 0 auto 2.4rem; font-size: 1.1rem; }

/* footer */
footer { background: var(--ink); color: var(--on-ink-soft); border-top: 1px solid var(--line-ink); font-size: .88rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding-top: 2rem; padding-bottom: 2.5rem; }
footer a { color: var(--on-ink-soft); text-decoration: none; }
footer a:hover { color: var(--on-ink); }
footer nav { display: flex; gap: 1.5rem; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* article + legal pages */
.page-head { background: var(--ink); color: var(--on-ink); padding: 8rem 0 4rem; }
.page-head .wrap, .article .wrap { max-width: 46rem; }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.12; margin: .8rem 0 0; }
.page-head time { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.article { padding: 3.5rem 0 5rem; }
.article .wrap { font-family: var(--serif); font-size: 1.16rem; line-height: 1.75; }
.article h1, .article h2, .article h3 { font-family: var(--sans); font-weight: 600; line-height: 1.3; max-width: none; letter-spacing: 0; }
.article h1 { font-size: 1.7rem; margin: 2.5rem 0 1rem; }
.article h2 { font-size: 1.4rem; margin: 2.5rem 0 .8rem; }
.article h3 { font-size: 1.15rem; margin: 2rem 0 .6rem; }
.article figure { margin: 2rem 0; }
.article img { border-radius: 12px; display: block; margin: 0 auto; }
.article a { color: #8a5d12; }
.article blockquote { border-left: 3px solid var(--gold); margin: 1.5rem 0; padding: .2rem 0 .2rem 1.2rem; color: var(--text-soft); }
.article table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: .95rem; }
.article td, .article th { border: 1px solid var(--line-paper); padding: .5rem .7rem; }
.back { font-family: var(--sans); font-size: .95rem; text-decoration: none; display: inline-block; margin-top: 3rem; }
.legal .wrap { font-family: var(--sans); font-size: 1rem; }
.legal h2 { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-soft); font-family: var(--sans); font-weight: 600; margin: 2.2rem 0 .5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .pillar, .post { transition: none; }
}
