/*
 * Moss public site polish layer.
 * Loaded after page-specific CSS. Keeps the existing static architecture,
 * but makes the public surfaces read like one premium ledger product.
 */

:root {
  --moss-bg: #070807;
  --moss-panel: rgba(13, 18, 14, 0.84);
  --moss-panel-strong: rgba(16, 23, 17, 0.94);
  --moss-line: rgba(182, 210, 166, 0.14);
  --moss-line-strong: rgba(200, 217, 75, 0.34);
  --moss-ink: #ece8d8;
  --moss-muted: #889181;
  --moss-faint: #4e584d;
  --moss-green: #c8d94b;
  --moss-emerald: #5cc56f;
  --moss-gold: #d9bd61;
  --moss-red: #c47070;
}

html {
  background: var(--moss-bg);
}

body {
  background:
    radial-gradient(900px 500px at 68% -12%, rgba(92, 197, 111, 0.12), transparent 62%),
    radial-gradient(760px 420px at 8% 18%, rgba(200, 217, 75, 0.06), transparent 58%),
    linear-gradient(180deg, #070807 0%, #090b09 48%, #060706 100%) !important;
  color: var(--moss-ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.19'/%3E%3C/svg%3E");
  background-size: 44px 44px, 44px 44px, 160px 160px;
  opacity: 0.26;
  mix-blend-mode: screen;
}

.site-header,
.top-nav,
.app-header {
  border-bottom: 1px solid rgba(200, 217, 75, 0.12) !important;
  background: rgba(7, 8, 7, 0.82) !important;
  backdrop-filter: blur(18px) saturate(1.08);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

.brand,
.app-brand,
.top-nav .nav-brand {
  letter-spacing: -0.02em;
}

.brand-mark,
.app-brand-portrait,
.top-nav .nav-mark,
.footer-mark {
  border-color: rgba(200, 217, 75, 0.52) !important;
  box-shadow: 0 0 0 1px rgba(200, 217, 75, 0.10), 0 0 22px rgba(92, 197, 111, 0.18) !important;
}

.nav-links a {
  color: rgba(236, 232, 216, 0.72);
  font-weight: 650;
}

.nav-links a[aria-current="page"],
.nav-links a:hover {
  color: var(--moss-green);
}

.button,
.ledger-cta-button,
.home-section-cta,
.dossier-share,
.access-actions a {
  border-radius: 6px !important;
}

.button-primary,
.ledger-cta-button {
  background: linear-gradient(180deg, #dbe864, #a7be39) !important;
  color: #10130d !important;
  box-shadow: 0 14px 32px rgba(200, 217, 75, 0.16);
}

.button-secondary,
.dossier-share {
  border-color: rgba(200, 217, 75, 0.28) !important;
  background: rgba(200, 217, 75, 0.055) !important;
}

.hero {
  min-height: min(92svh, 940px);
  border-bottom-color: rgba(200, 217, 75, 0.12);
  isolation: isolate;
}

.hero-image {
  object-position: 42% center;
  filter: saturate(0.92) contrast(1.12) brightness(0.82);
}

.hero-scrim {
  background:
    linear-gradient(90deg, rgba(7, 8, 7, 0.04), rgba(7, 8, 7, 0.28) 38%, rgba(7, 8, 7, 0.90) 72%),
    linear-gradient(0deg, rgba(7, 8, 7, 0.98), rgba(7, 8, 7, 0.10) 42%, rgba(7, 8, 7, 0.52));
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent, rgba(7, 8, 7, 0.96) 86%),
    repeating-linear-gradient(0deg, rgba(200, 217, 75, 0.035) 0 1px, transparent 1px 7px);
  opacity: 0.72;
}

.hero-content {
  width: min(650px, 100%);
  padding-bottom: clamp(54px, 8vh, 110px);
}

.hero-content h1 {
  margin-bottom: 16px;
  font-size: clamp(5.6rem, 15vw, 12.4rem);
  letter-spacing: -0.055em;
}

.hero-content h1,
#ledger-title,
.wrap > h1,
.dossier-handle,
.docs-hero-content h1 {
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 18px 50px rgba(92, 197, 111, 0.08);
}

.hero-copy {
  max-width: 39rem;
  color: rgba(236, 232, 216, 0.84);
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
}

.hero-copy-lead {
  display: block;
  color: var(--moss-ink);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.hero-copy-list,
.hero-copy-sub {
  display: block;
  margin-top: 0.7em;
}

.hero-copy-sub {
  color: rgba(136, 145, 129, 0.95);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0;
}

.hero-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  width: min(520px, 100%);
  margin-top: 24px;
  border: 1px solid rgba(200, 217, 75, 0.18);
  background: rgba(200, 217, 75, 0.12);
}

.hero-proof-grid span {
  min-height: 62px;
  padding: 14px 16px;
  background: rgba(7, 10, 8, 0.74);
  color: rgba(236, 232, 216, 0.86);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.hero-proof-grid b {
  display: block;
  margin-bottom: 7px;
  color: var(--moss-green);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.eyebrow,
.section-kicker,
.home-section-eyebrow,
.dossier-eyebrow,
.sect small,
.cotw-label,
.ledger-section-sub,
.hall-of-fame-subtitle,
.app-shell .eyebrow {
  color: var(--moss-green) !important;
  letter-spacing: 0.18em;
}

.cat-divider {
  opacity: 0.46;
}

.why-cat-portrait img,
.post-example--card img,
.access-cat-portrait {
  filter: saturate(0.94) contrast(1.1) brightness(0.9);
}

.why-cat-portrait img {
  object-fit: cover;
}

.post-example--card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgba(200, 217, 75, 0.18);
}

.home-league,
.home-cooking,
.ledger-speaks-card,
.why-cat-band,
.shipped-band,
.feature-strip,
.pricing-band,
.rooms-band,
.platform-section,
.ledger-section,
.hall-of-fame,
.ledger-table-wrap,
.room,
.podium-card,
.throne-card,
.h2h,
.player,
.dossier,
.access-state,
.room-hero,
.app-controls,
.stats-band,
.view-panel,
.dashboard-page .stat-card,
.dashboard-page .chart-wrap,
.dashboard-page table,
.dashboard-page .feed-item {
  border-color: var(--moss-line) !important;
  background-color: var(--moss-panel);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.home-league,
.home-cooking,
.why-cat-band,
.platform-section,
.ledger-section,
.dossier,
.player,
.room-hero,
.access-state {
  border-radius: 8px;
}

.home-section-head,
.ledger-head,
.section-heading,
.dossier-topline,
.header {
  border-color: rgba(200, 217, 75, 0.16) !important;
}

.home-league-row,
.home-cooking-row,
.room,
.podium-card,
.hall-of-fame-card,
.ledger-table tbody tr,
.caller-row,
.call-row,
.receipt-card,
.feed-item {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.home-league-row:hover,
.home-cooking-row:hover,
.room:hover,
.podium-card:hover,
.hall-of-fame-card:hover,
.ledger-table tbody tr:hover,
.caller-row:hover,
.call-row:hover,
.receipt-card:hover,
.feed-item:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 217, 75, 0.36) !important;
  box-shadow: 0 16px 44px rgba(92, 197, 111, 0.08);
}

.wrap {
  max-width: 1120px;
}

.wrap > h1 {
  font-size: clamp(42px, 7vw, 82px);
  margin-top: 22px;
}

.sub,
.ledger-live-line,
.league-closer,
.profile-back,
.dossier-context,
.dossier-since,
.footer-tagline,
.footer-credit,
.app-footer {
  color: var(--moss-muted) !important;
}

.commish,
.cotw,
.ledger-commish {
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(200, 217, 75, 0.10), rgba(92, 197, 111, 0.035) 52%, transparent),
    rgba(13, 18, 14, 0.86) !important;
  border: 1px solid rgba(200, 217, 75, 0.16) !important;
  border-left: 2px solid var(--moss-green) !important;
}

.throne-card,
.room.throne,
.hall-of-fame-card[data-position="1"],
.home-league-row.is-throne,
.home-cooking-row.is-rank-1,
.player .stat.stat--hero,
.dg--hero {
  border-color: rgba(217, 189, 97, 0.56) !important;
  background:
    radial-gradient(circle at 20% 20%, rgba(217, 189, 97, 0.13), transparent 42%),
    linear-gradient(180deg, rgba(200, 217, 75, 0.075), rgba(13, 18, 14, 0.92) 68%) !important;
  box-shadow:
    0 0 0 1px rgba(217, 189, 97, 0.05),
    0 28px 90px rgba(217, 189, 97, 0.08),
    inset 0 1px 0 rgba(217, 189, 97, 0.15) !important;
}

.player {
  padding: clamp(18px, 3vw, 28px);
  grid-template-columns: 82px minmax(0, 1fr);
}

.pgrid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.player .stat {
  min-height: 112px;
}

.player .stat .n {
  font-size: clamp(20px, 2.2vw, 30px);
}

.bestcall,
.psparkrow {
  grid-column: auto / span 3 !important;
}

.dossier {
  max-width: 960px;
  margin-inline: auto;
}

.dossier-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(200, 217, 75, 0.10);
  background: rgba(200, 217, 75, 0.08);
}

.dg {
  min-height: 88px;
  background: rgba(7, 10, 8, 0.72) !important;
}

.dg-v,
.stat-value,
.stat .n,
.ledger-stat-value,
.stat-value {
  font-variant-numeric: tabular-nums;
}

.dossier-standing {
  border-color: rgba(217, 189, 97, 0.28);
  border-radius: 6px;
  background: rgba(217, 189, 97, 0.045);
}

.dossier-section {
  border-top-color: rgba(200, 217, 75, 0.10);
}

.dossier-receipt,
.bestcall,
.psparkrow {
  border-color: rgba(200, 217, 75, 0.18) !important;
  background: rgba(7, 10, 8, 0.62) !important;
}

.dashboard-page .container {
  max-width: 1180px;
  padding-top: 42px;
}

.dashboard-page .header h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.dashboard-page .stats-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-page .stat-card {
  min-height: 116px;
}

.dashboard-page table {
  display: table;
  overflow: hidden;
  border-radius: 8px;
}

.app-shell {
  max-width: 1180px;
}

.room-hero {
  min-height: 320px;
  overflow: hidden;
}

.room-hero-art img,
.access-art img {
  filter: saturate(0.9) contrast(1.06) brightness(0.84);
}

.stats-band {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 840px) {
  .site-header {
    min-height: 66px;
  }

  .nav-links {
    display: none;
  }

  .hero-content {
    justify-self: start;
    width: min(620px, 100%);
  }

  .hero-scrim {
    background:
      linear-gradient(0deg, rgba(7, 8, 7, 0.96), rgba(7, 8, 7, 0.18) 52%, rgba(7, 8, 7, 0.68)),
      linear-gradient(90deg, rgba(7, 8, 7, 0.28), rgba(7, 8, 7, 0.72));
  }

  .hero-image {
    object-position: 34% center;
  }

  .pgrid,
  .dashboard-page .stats-row,
  .stats-band,
  .dossier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .bestcall,
  .psparkrow {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 88svh;
    padding-bottom: 42px;
  }

  .hero-content h1 {
    font-size: clamp(4.4rem, 26vw, 7rem);
  }

  .hero-proof-grid {
    grid-template-columns: 1fr;
  }

  .hero-proof-grid span {
    min-height: 48px;
  }

  .hero-actions,
  .access-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .player {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .pgrid,
  .dashboard-page .stats-row,
  .stats-band,
  .dossier-grid {
    grid-template-columns: 1fr !important;
  }

  .player .stat {
    min-height: 86px;
  }

  .dossier {
    padding: 20px 16px;
  }
}
