/* ==========================================================================
   THE LEDGER — bensachwitz.com design overhaul (2026-09-21, branch redesign-2026-09-21)

   One restrained system. Ink on paper. Oxblood is the single voice of color;
   brass appears only as a hairline. No animated gradients, no glow, no drift.
   Typography does the talking. Everything else gets out of the way.

   Loaded after styles.css + tailwind.css on every page. Overrides win by
   cascade order at equal specificity. Nothing here renames hooks, so app.js
   and the arcade engine are untouched.
   ========================================================================== */

:root {
  --ledger-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ledger-ink: #0A0A0A;
  --ledger-bone: #F5F2EC;
  --ledger-ox: #8B1A1A;
  --ledger-brass: #B88A2F;
  --ledger-hairline: rgba(10, 10, 10, 0.14);
  --ledger-hairline-soft: rgba(10, 10, 10, 0.08);
  --ledger-hairline-bone: rgba(245, 242, 236, 0.18);
}

/* ------------------------------------------------------------------
   1. KILLS — remove every competing decoration system
   ------------------------------------------------------------------ */

/* floating glyph layer: gone, everywhere */
.section-glyphs { display: none !important; }

/* hero atmosphere: gone — calm paper instead */
#top .gridlines,
#top .depth-orb {
  display: none !important;
}

/* shimmer bars -> still hairlines */
.section-divider,
.footer-gradient {
  height: 1px;
  background: var(--ledger-hairline);
  background-size: auto;
  animation: none;
  margin: 0;
}
#scrollProgress {
  height: 2px;
  background: var(--ledger-ox);
  animation: none;
  background-size: auto;
}

/* gradient-clipped display italics -> solid oxblood */
.display-h em,
.stat-num .count-target,
.cert-num {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: currentColor;
  background-clip: initial;
  color: var(--ledger-ox);
}
/* on dark grounds the oxblood needs lightening to stay readable */
.bg-ink .display-h em,
.text-bone .display-h em {
  color: #E0A96D;
}

/* pulsing eyebrow dot -> still brass tick */
.eyebrow-dot {
  animation: none;
  box-shadow: none;
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: var(--ledger-brass);
  margin-right: 10px;
}

/* glowing animated border on framed images -> still hairline */
.sat-frame::before {
  content: none;
}
.sat-frame {
  border: 1px solid var(--ledger-hairline);
  border-radius: 2px;
  box-shadow: 0 12px 32px rgba(10, 10, 10, 0.12);
}
.sat-frame:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(10, 10, 10, 0.16);
}

/* any other ambient loops */
.spotlight-host .spotlight,
.tw-dot {
  animation: none !important;
}
.tw-dot {
  background: var(--ledger-ox);
  box-shadow: none;
}

/* paper grain: keep, but quieter */
.grain::before {
  opacity: 0.45;
}

/* ------------------------------------------------------------------
   2. HERO — editorial, ledger-calm
   ------------------------------------------------------------------ */

#top {
  background:
    linear-gradient(to bottom, rgba(10, 10, 10, 0.028), rgba(10, 10, 10, 0) 220px),
    var(--ledger-bone);
}

.hero-title {
  font-size: clamp(3.4rem, 9.5vw, 8.5rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 560;
  color: var(--ledger-ink);
}
.hero-title .hero-line {
  line-height: 0.94;
}
.hero-title .hero-line + .hero-line {
  margin-top: 0;
}
.hero-title em {
  font-style: italic;
  font-weight: 480;
  color: var(--ledger-ox);
}
@media (max-width: 640px) {
  .hero-title {
    font-size: clamp(2.6rem, 13.5vw, 4rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
  }
}

/* hero load choreography: lines rise once, then hold still */
@media (prefers-reduced-motion: no-preference) {
  .hero-title .hero-line {
    opacity: 0;
    transform: translateY(0.35em);
    animation: heroLineUp 1s var(--ledger-ease) forwards;
  }
  .hero-title .hero-line + .hero-line {
    animation-delay: 0.12s;
  }
}
@keyframes heroLineUp {
  to { opacity: 1; transform: none; }
}

/* portrait: a ledger plate, not a floating cutout */
.photo-mask {
  border: 1px solid var(--ledger-hairline);
  border-radius: 2px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 14px 34px rgba(10, 10, 10, 0.14);
}
.photo-mask img {
  border-radius: 1px;
  filter: saturate(0.82) contrast(1.04);
}

/* typewriter row: quieter */
.tw-rotator {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.62);
}
.tw-label { color: rgba(10, 10, 10, 0.45); }
.tw-phrase { color: var(--ledger-ink); }

/* pills -> quiet hairline chips (one voice, no color coding) */
.hero-pill {
  border: 1px solid var(--ledger-hairline) !important;
  background: transparent !important;
  color: rgba(10, 10, 10, 0.72) !important;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.9rem;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.hero-pill:hover {
  border-color: var(--ledger-ox) !important;
  color: var(--ledger-ox) !important;
  background: rgba(139, 26, 26, 0.05) !important;
}
.hero-pill-gold, .hero-pill-ox, .hero-pill-ink { /* neutralized by the rules above */ }

/* stat strip -> ledger row with hairline dividers */
.hero-stat-link {
  position: relative;
  padding: 0.9rem 0.25rem;
}
.hero-stat-link + .hero-stat-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: var(--ledger-hairline-soft);
}
.hero-stat-link .stat-num {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}
.hero-stat-link .text-ox {
  color: var(--ledger-ox);
}
.hero-stat-label {
  letter-spacing: 0.18em !important;
  font-size: 10px !important;
  color: rgba(10, 10, 10, 0.48) !important;
}

/* scroll cue: quieter */
#top .border-t {
  border-color: var(--ledger-hairline-soft) !important;
}

/* ------------------------------------------------------------------
   3. SECTION HEADERS — one chapter system
   ------------------------------------------------------------------ */

eyebrow, .eyebrow, [class*="eyebrow"] {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.55);
}
.bg-ink eyebrow, .bg-ink .eyebrow,
.text-bone eyebrow, .text-bone .eyebrow {
  color: rgba(245, 242, 236, 0.6);
}

.display-h {
  letter-spacing: -0.035em;
  line-height: 1.02;
  font-weight: 540;
  text-wrap: balance;
}
.chapter-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(10, 10, 10, 0.42);
}
.bg-ink .chapter-num, .text-bone .chapter-num {
  color: rgba(245, 242, 236, 0.45);
}

/* ------------------------------------------------------------------
   4. BUTTONS & LINKS
   ------------------------------------------------------------------ */

.btn-ink {
  background: var(--ledger-ink);
  color: var(--ledger-bone);
  border: 1px solid var(--ledger-ink);
  border-radius: 2px;
  padding: 0.8rem 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ledger-ease);
}
.btn-ink:hover {
  background: var(--ledger-ox);
  border-color: var(--ledger-ox);
}
.btn-outline {
  border: 1px solid var(--ledger-hairline);
  border-radius: 2px;
  padding: 0.8rem 1.5rem;
  color: var(--ledger-ink);
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s var(--ledger-ease);
}
.btn-outline:hover {
  border-color: var(--ledger-ink);
}

.link-line {
  background: none !important;
  text-decoration: underline;
  text-decoration-color: var(--ledger-hairline);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.25s ease, color 0.25s ease;
}
.link-line:hover {
  text-decoration-color: var(--ledger-ox);
  color: var(--ledger-ox);
}

/* ------------------------------------------------------------------
   5. CARDS & ROWS — calm containers
   ------------------------------------------------------------------ */

.proj, .cred-card, .case-card {
  border: 1px solid var(--ledger-hairline-soft);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.35s var(--ledger-ease), box-shadow 0.35s ease, border-color 0.35s ease;
}
.proj:hover, .cred-card:hover, .case-card:hover {
  transform: translateY(-3px);
  border-color: var(--ledger-hairline);
  box-shadow: 0 16px 40px rgba(10, 10, 10, 0.1);
}
.proj:hover .proj-num {
  color: var(--ledger-ox);
}

/* dark-ground cards keep bone hairlines */
.bg-ink .proj, .bg-ink .cred-card,
.text-bone .proj, .text-bone .cred-card {
  border-color: var(--ledger-hairline-bone);
  background: rgba(245, 242, 236, 0.03);
}

/* ------------------------------------------------------------------
   6. ONE MOTION SYSTEM
   ------------------------------------------------------------------ */

.reveal {
  transition-timing-function: var(--ledger-ease);
  transition-duration: 0.7s;
}
.reveal.card {
  transition-duration: 0.8s;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track, .marquee-track-rev { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-title .hero-line { opacity: 1 !important; transform: none !important; animation: none !important; }
  .mask-reveal { clip-path: inset(0 0 0 0) !important; }
}

/* ------------------------------------------------------------------
   7. TYPE REFINEMENTS
   ------------------------------------------------------------------ */

p { text-wrap: pretty; }
.prose-p {
  max-width: 62ch;
  color: rgba(10, 10, 10, 0.78);
}
.font-serif { letter-spacing: -0.015em; }

/* section breathing room: chapters get a ledger's whitespace */
section[data-sw-section] {
  scroll-margin-top: 84px;
}

/* ------------------------------------------------------------------
   8. DARK SECTIONS — keep the inversion, lose the noise
   ------------------------------------------------------------------ */

.bg-ink {
  background-color: #0C0C0B;
}
.bg-ink .rule, .text-bone .rule {
  background: currentColor;
  opacity: 0.18;
}
.bg-ink .hero-pill {
  border-color: var(--ledger-hairline-bone) !important;
  color: rgba(245, 242, 236, 0.72) !important;
}
.bg-ink .hero-pill:hover {
  border-color: #E0A96D !important;
  color: #E0A96D !important;
  background: rgba(224, 169, 109, 0.06) !important;
}

/* ------------------------------------------------------------------
   9. MOBILE POLISH
   ------------------------------------------------------------------ */

@media (max-width: 640px) {
  .hero-stat-link .stat-num { font-size: 1.35rem; }
  .hero-stat-link + .hero-stat-link::before { display: none; }
  .photo-mask { padding: 4px; }
  .display-h { font-size: clamp(2rem, 8.5vw, 2.9rem); }
  section[data-sw-section] { scroll-margin-top: 64px; }
}

/* ------------------------------------------------------------------
   10. KILL REMAINING AMBIENT LAYERS
   .ambient-bg/.ambient-glyph = the fixed drifting layer: text glyphs AND
   the JS-injected outline icons (anchor, gamepad, truck, shield, camera,
   scales) painted via CSS mask. Inline 80px-grid overlays go too.
   ------------------------------------------------------------------ */

.ambient-bg, .ambient-glyph { display: none !important; }
div[style*="background-size: 80px 80px"] { display: none !important; }

/* GreekStack placeholder tile (typographic monogram until the standalone
   column+laurel master is ratified — never invent a logo) */
.app-visual-gs {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 300px; border-radius: 14px;
  background: radial-gradient(ellipse at 50% 35%, #1d1a16 0%, #12100d 70%);
  border: 1px solid rgba(245, 242, 236, 0.14);
  text-decoration: none;
}
.app-gs-mono {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 104px; line-height: 1; color: #E8C77D; letter-spacing: .06em;
}
