/* timdej.com — dark hero into white. Ink, cool greys, one accent. */

:root {
  --paper: #ffffff;
  --paper-2: #f5f5f5;
  --night: #1c1c1c;
  --ink: #111111;
  --ink-soft: rgba(17, 17, 17, 0.66);
  --ink-faint: rgba(17, 17, 17, 0.45);
  --rule: rgba(17, 17, 17, 0.1);
  --accent: #0e5f68;
  --accent-soft: rgba(14, 95, 104, 0.06);
  --glow: #9fe3ea;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --col: 680px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
strong { font-weight: 600; color: var(--ink); }

.wrap { max-width: var(--col); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ── Type ─────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-optical-sizing: auto; }
h1 { font-size: clamp(46px, 7.4vw, 84px); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(32px, 4.6vw, 46px); line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
.lede { font-size: 21px; line-height: 1.55; color: var(--ink-soft); }
.small { font-size: 14px; color: var(--ink-faint); }

/* ── Top bar ──────────────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.3s, color 0.3s;
}
.bar.on-dark { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.bar.on-dark .wordmark { color: #fff; }
.bar.on-dark .wordmark em { color: var(--glow); }
.bar.on-dark nav a { color: rgba(255, 255, 255, 0.7); }
.bar.on-dark nav a:hover { color: #fff; }
.bar.on-dark nav a.btn { background: #fff; color: var(--ink); }
.bar.on-dark nav a.btn:hover { background: var(--glow); color: var(--ink); }
.bar.scrolled.on-dark { border-bottom-color: transparent; }
.bar.scrolled { border-bottom-color: var(--rule); }
body.has-dark-hero .bar { position: fixed; left: 0; right: 0; }
.bar-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark {
  font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; text-decoration: none; color: var(--ink);
}
.wordmark em { color: var(--accent); }
.bar nav { display: flex; align-items: center; gap: 28px; }
.bar nav a { font-size: 15px; text-decoration: none; color: var(--ink-soft); }
.bar nav a:hover, .bar nav a.active { color: var(--ink); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-size: 16px; font-weight: 500;
  padding: 14px 24px; border-radius: 999px; text-decoration: none;
  transition: background 0.2s;
}
.btn:hover { background: var(--accent); }
.bar nav a.btn { color: var(--paper); padding: 9px 18px; font-size: 14px; }
.bar nav a.btn:hover { color: var(--paper); }
.link {
  font-size: 16px; color: var(--ink); text-decoration: underline;
  text-decoration-color: var(--rule); text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: text-decoration-color 0.2s;
}
.link:hover { text-decoration-color: var(--accent); }

/* ── Sections ─────────────────────────────────────────────────── */
section { padding: 96px 0; }
section + section { border-top: 1px solid var(--rule); }
section.tint { background: var(--paper-2); border-top: none; }
section.tint + section { border-top: none; }
.section-head { margin-bottom: 40px; }
.section-head p { margin-top: 16px; color: var(--ink-soft); }

/* Hero: charcoal sonar field, clean edge into the white page (as Relief) */
.hero {
  --sonar-dot: #ffffff;
  --sonar-hot: #9fe3ea;
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 140px 0 120px; text-align: center;
  background: var(--night); color: #fff;
  cursor: crosshair;
}
.hero > .wrap-wide { position: relative; width: 100%; }
.sonar-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none;
  /* Dots soften just before the hero edge. */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 85%, transparent 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 48% 38% at 50% 47%, rgba(28, 28, 28, 0.97) 0%, rgba(28, 28, 28, 0.85) 45%, transparent 100%);
}
.hero h1 { max-width: 900px; margin: 0 auto; color: #fff; }
.hero h1 em { color: var(--glow); }
.hero .lede { max-width: 560px; margin: 28px auto 0; color: rgba(255, 255, 255, 0.68); }
.hero-actions { margin-top: 40px; display: flex; gap: 28px; justify-content: center; align-items: center; flex-wrap: wrap; }
.hero a { cursor: pointer; }
.hero .btn { background: #fff; color: var(--ink); }
.hero .btn:hover { background: var(--glow); }
.hero .link { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.35); }
.hero .link:hover { text-decoration-color: var(--glow); }
.hero + section { border-top: none; }

/* Results ledger */
.ledger { list-style: none; border-top: 1px solid var(--rule); }
.ledger li {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.ledger .who { font-family: var(--serif); font-size: 22px; line-height: 1.25; }
.ledger .what { display: block; font-family: var(--sans); font-size: 15px; color: var(--ink-soft); margin-top: 4px; }
.ledger .num {
  font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--accent);
  text-align: right; white-space: nowrap;
}

/* Me */
section.me { padding: 112px 0 104px; }
.bio { display: grid; grid-template-columns: 160px 1fr; gap: 44px; align-items: start; }
.bio img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }
.bio h2 { margin-bottom: 18px; }
.bio p { font-size: 20px; line-height: 1.65; color: var(--ink-soft); }
.bio p + p { margin-top: 18px; }

/* Situations: one per row, hairline between, teal marker */
.situations { list-style: none; border-top: 1px solid var(--rule); }
.situations li {
  position: relative; font-size: 20px; line-height: 1.5;
  padding: 22px 0 22px 40px; border-bottom: 1px solid var(--rule);
}
.situations li::before {
  content: "→"; position: absolute; left: 4px; top: 22px;
  color: var(--accent); font-weight: 500;
}
.after-list { margin-top: 36px; }

/* How I work */
.pull {
  font-family: var(--serif); font-style: italic; font-size: clamp(26px, 3.6vw, 34px); line-height: 1.25;
  color: var(--ink); background: var(--accent-soft);
  border-left: 3px solid var(--accent); border-radius: 0 14px 14px 0;
  padding: 28px 32px; margin-bottom: 40px;
}
.principles { list-style: none; }
.principles li { padding: 16px 0; border-bottom: 1px solid var(--rule); color: var(--ink-soft); }
.principles li:first-child { border-top: 1px solid var(--rule); }
.principles strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--ink); margin-bottom: 2px; }

/* Engagements */
.offers { list-style: none; }
.offer { padding: 32px 0; border-bottom: 1px solid var(--rule); }
.offer:first-child { border-top: 1px solid var(--rule); }
.offer .for { font-size: 14px; color: var(--accent); font-weight: 500; margin-bottom: 6px; }
.offer h3 { margin-bottom: 10px; }
.offer p { color: var(--ink-soft); }
.offer .steps { margin-top: 12px; font-size: 14px; color: var(--ink-faint); }

/* Reports list */
.reports h3 a { text-decoration: none; }
.reports h3 a:hover { color: var(--accent); }
.reports .go { margin-top: 14px; }

/* Close */
.close { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.close h3 { font-size: 28px; margin-bottom: 10px; }
.close p { color: var(--ink-soft); margin-bottom: 20px; }
.close .links { display: flex; gap: 20px; flex-wrap: wrap; }

/* About essay */
.essay p { font-size: 20px; line-height: 1.7; color: var(--ink-soft); }
.essay p + p { margin-top: 20px; }
.essay .photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 32px; }
.beliefs { list-style: none; counter-reset: b; }
.beliefs li { counter-increment: b; padding: 32px 0 32px 64px; border-bottom: 1px solid var(--rule); position: relative; }
.beliefs li:first-child { border-top: 1px solid var(--rule); }
.beliefs li::before {
  content: counter(b); position: absolute; left: 0; top: 30px;
  font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--accent);
}
.beliefs h3 { margin-bottom: 8px; }
.beliefs p { color: var(--ink-soft); }

/* Contact */
.page-top { padding: 96px 0 40px; }
.page-top h1 { font-size: clamp(40px, 6vw, 60px); }
.page-top .lede { margin-top: 20px; }
.cal { max-width: 1000px; margin: 0 auto; padding: 0 16px 96px; }
.cal > div { width: 100%; min-height: 600px; }

/* ── Sticky call bar ──────────────────────────────────────────── */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--rule);
  transform: translateY(100%); transition: transform 0.3s ease;
}
.callbar.show { transform: none; }
.callbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: center; gap: 20px;
}
.callbar span { font-size: 15px; color: var(--ink-soft); }
.callbar span strong { color: var(--accent); font-weight: 500; }
.callbar .btn { padding: 10px 20px; font-size: 14px; }

/* ── Footer ───────────────────────────────────────────────────── */
footer { background: var(--night); color: rgba(255, 255, 255, 0.6); padding: 56px 0 96px; }
.foot { max-width: 960px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.foot a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 15px; }
.foot a:hover { color: var(--paper); }
.foot svg { display: block; }
.foot .evs img { height: 22px; width: auto; opacity: 0.7; }
.foot .evs:hover img { opacity: 1; }

/* ── Reveal ───────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  body { font-size: 17px; }
  section { padding: 64px 0; }
  .hero { padding: 120px 0 96px; }
  .hero::before { background: radial-gradient(ellipse 80% 40% at 50% 46%, rgba(28, 28, 28, 0.92) 0%, rgba(28, 28, 28, 0.6) 55%, transparent 100%); }
  .lede { font-size: 19px; }
  .bar nav { gap: 18px; }
  .bar nav a.hide-sm { display: none; }
  .ledger li { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .ledger .num { text-align: left; font-size: 30px; }
  .bio { grid-template-columns: 1fr; gap: 20px; }
  .bio img { width: 112px; height: 112px; }
  section.me { padding: 72px 0; }
  .situations li { font-size: 18px; padding: 18px 0 18px 32px; }
  .situations li::before { top: 18px; left: 0; }
  .pull { padding: 22px 22px; }
  .close { grid-template-columns: 1fr; gap: 40px; }
  .beliefs li { padding-left: 48px; }
  .callbar span { display: none; }
  .foot { flex-direction: column; align-items: flex-start; }
}
