/* NumiTrail public pages: landing page and organization websites. --accent is set per organization. */

:root {
  --ink: #172a27;
  --muted: #6f7b75;
  --line: #e2e7e1;
  --paper: #fff;
  --ground: #f6f7f3;
  --forest: #143b35;
  --accent: #196e57;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
/* Derived shades live on body, where each site's --accent is set inline, so they follow that colour. */
body { --accent-soft: color-mix(in srgb, var(--accent) 12%, white); --accent-deep: color-mix(in srgb, var(--accent) 80%, black); margin: 0; min-height: 100vh; background: var(--ground); }
a { color: var(--accent); }
h1, h2 { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 500; color: #18322c; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, white); outline-offset: 2px; }

.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; color: white; background: var(--accent); border: 0; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--accent-deep); }
.empty { padding: 34px 20px; color: var(--muted); text-align: center; background: var(--paper); border: 1px dashed var(--line); border-radius: 8px; }

/* Organization site */
.preview-bar { padding: 10px 16px; color: #765320; background: #fff4de; border-bottom: 1px solid #f1dfb9; font-size: 13px; font-weight: 600; text-align: center; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header-inner, .site-footer-inner, .page, .hero-inner { width: min(1160px, 100%); margin: 0 auto; padding-right: 24px; padding-left: 24px; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.site-name { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); font-family: Fraunces, Georgia, serif; font-size: 20px; font-weight: 600; text-decoration: none; }
.site-mark { width: 26px; height: 26px; flex: 0 0 auto; border: 3px solid var(--accent); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--accent-soft), inset 0 0 0 7px var(--accent); }
.site-nav { display: flex; gap: 6px; }
.site-nav a { padding: 8px 12px; color: var(--muted); border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent-deep); background: var(--accent-soft); }

.hero { color: white; background: linear-gradient(135deg, var(--accent-deep), var(--accent)); }
.hero-inner { padding-top: 56px; padding-bottom: 52px; }
.hero .eyebrow { color: color-mix(in srgb, white 75%, var(--accent)); }
.hero h1 { color: white; font-size: clamp(34px, 6vw, 56px); line-height: 1.05; overflow-wrap: anywhere; }
.hero-tagline { max-width: 640px; margin: 14px 0 0; color: color-mix(in srgb, white 85%, var(--accent)); font-size: 18px; line-height: 1.5; }
.hero-stats { margin: 22px 0 24px; color: color-mix(in srgb, white 80%, var(--accent)); font-size: 15px; }
.hero-stats strong { color: white; font-size: 20px; }
.hero .button { color: var(--accent-deep); background: white; }
.hero .button:hover { background: var(--accent-soft); }

.site-main { min-height: 50vh; }
.page { padding-top: 36px; padding-bottom: 56px; }
.page section + section { margin-top: 40px; }
.about { max-width: 760px; }
.about h2, .section-head h2 { margin-bottom: 12px; font-size: 26px; }
.about p { margin: 0; color: #3d4a44; font-size: 16px; line-height: 1.7; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head a { font-size: 14px; font-weight: 600; text-decoration: none; }

.page-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 18px; }
.page-head h1 { font-size: 38px; }
.page-head p { margin: 0; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 22px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.filter { display: grid; gap: 5px; flex: 1 1 150px; color: var(--muted); font-size: 11px; font-weight: 700; }
.filter-search { flex: 2 1 220px; }
.filter-year { flex: 0 1 100px; }
.filter input, .filter select { width: 100%; height: 40px; padding: 0 10px; color: var(--ink); background: white; border: 1px solid #d9e0d9; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 400; }
.filter-actions { display: flex; align-items: center; gap: 12px; }
.filter-actions a { font-size: 14px; font-weight: 600; }

.coin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.coin-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 16px 18px; color: inherit; text-align: center; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.coin-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, white); box-shadow: 0 8px 22px #1329201a; transform: translateY(-2px); }
.coin-card-body { display: grid; justify-items: center; gap: 6px; }
.coin-card strong { color: #22362f; font-size: 15px; line-height: 1.3; }
.coin-card-meta { color: var(--muted); font-size: 13px; }
.coin-card-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.tag { padding: 3px 8px; color: var(--accent-deep); background: var(--accent-soft); border-radius: 12px; font-size: 11px; font-weight: 700; }
.tag-muted { color: #5f6d66; background: #f0f2ee; }

.coin-photo { display: block; object-fit: contain; background: #f3f5f1; border-radius: 10px; }
.coin-photo-card { width: 112px; height: 112px; }
.coin-detail-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.coin-detail-photos figure { margin: 0; display: grid; gap: 6px; justify-items: center; }
.coin-detail-photos figure a { display: block; width: 100%; }
.coin-detail-photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: white; border-radius: 8px; }
.coin-detail-photos figcaption { color: var(--muted); font-size: 12px; font-weight: 600; }
.coin-detail-photos .art-note { grid-column: 1 / -1; text-align: center; }
.coin-art { display: block; }
.coin-art-card { width: 112px; height: 112px; }
.coin-art-large { width: min(280px, 70vw); height: auto; aspect-ratio: 1; }
.coin-rim { fill: var(--accent); }
.coin-face { fill: color-mix(in srgb, var(--accent) 82%, white); }
.coin-ring { fill: none; stroke: color-mix(in srgb, white 55%, transparent); stroke-width: 1.5; stroke-dasharray: 2 3; }
.coin-value { fill: white; font-family: Fraunces, Georgia, serif; font-size: 26px; font-weight: 600; }
.coin-value-long { font-size: 15px; }
.coin-year { fill: color-mix(in srgb, white 82%, var(--accent)); font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .04em; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; color: var(--muted); font-size: 14px; }
.pager a { font-weight: 700; text-decoration: none; }

.breadcrumb { margin-bottom: 18px; font-size: 14px; }
.breadcrumb a { font-weight: 600; text-decoration: none; }
.coin-detail { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: 40px; align-items: start; padding: 32px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.coin-detail-art { display: grid; justify-items: center; gap: 10px; padding: 20px; background: var(--accent-soft); border-radius: 10px; }
.art-note { margin: 0; color: var(--muted); font-size: 12px; }
.coin-detail h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.coin-sub { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.coin-note { margin: 18px 0 0; color: #3d4a44; font-size: 16px; line-height: 1.65; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 24px 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 12px 0; border-bottom: 1px solid #eef1ec; }
.facts dt { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; }

.site-footer { color: var(--muted); background: var(--paper); border-top: 1px solid var(--line); font-size: 13px; }
.site-footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; min-height: 64px; padding-top: 14px; padding-bottom: 14px; }
.site-footer .powered { margin-left: auto; }
.site-footer strong { color: var(--ink); }

/* Landing page */
.landing { background: var(--forest); }
.landing-hero { position: relative; display: flex; flex-direction: column; min-height: 100vh; padding: 32px max(24px, 7vw); overflow: hidden; color: #f5f6eb; }
.landing-hero::before { position: absolute; inset: 0; content: ''; pointer-events: none; opacity: .16; background-image: radial-gradient(#c1e9ce 0.7px, transparent 0.7px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, black, transparent 85%); }
.landing-brand { position: relative; display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.landing-mark { width: 30px; height: 30px; border: 3px solid #e9ab66; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--forest), inset 0 0 0 7px #e9ab66; }
.landing-copy { position: relative; max-width: 640px; margin: auto 0; padding: 60px 0; }
.landing .eyebrow { color: #c2d8bd; }
.landing h1 { color: #f5f6eb; font-size: clamp(42px, 8vw, 76px); line-height: 1.02; }
.landing h1 em { color: #efb275; font-style: normal; }
.landing-copy p:not(.eyebrow) { max-width: 480px; margin: 20px 0 30px; color: #bdcec3; font-size: 18px; line-height: 1.6; }
.button-light { color: var(--forest); background: #f5f6eb; }
.button-light:hover { background: white; }
.landing-foot { position: relative; margin: 0; color: #8fa699; font-size: 13px; }

/* Not found */
.not-found { display: grid; place-items: center; padding: 24px; }
.not-found-box { max-width: 460px; padding: 40px 32px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.not-found-box h1 { font-size: 32px; }
.not-found-box p:not(.eyebrow) { margin: 12px 0 24px; color: var(--muted); }

@media (max-width: 720px) {
  .site-header-inner, .site-footer-inner, .page, .hero-inner { padding-right: 16px; padding-left: 16px; }
  .site-name { font-size: 17px; }
  .hero-inner { padding-top: 36px; padding-bottom: 36px; }
  .hero-tagline { font-size: 16px; }
  .coin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .coin-card { padding: 14px 10px; }
  .coin-art-card, .coin-photo-card { width: 88px; height: 88px; }
  .coin-detail { grid-template-columns: 1fr; gap: 24px; padding: 18px; }
  .facts { grid-template-columns: 1fr; }
  .site-footer .powered { margin-left: 0; }
  .filter-year { flex: 1 1 calc(50% - 5px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Organization collections (docs/FEATURE-org-collections.md): book covers linking to each collection's album. */
.collection-shelf { display: flex; flex-wrap: wrap; gap: 22px; padding: 22px 20px 28px; background: linear-gradient(#f4efe6, #ebe3d5); border-radius: 8px; box-shadow: inset 0 -12px 0 #c9b79a; }
.collection-book { display: flex; width: 160px; height: 216px; color: #f1dfb4; text-decoration: none; transition: transform .2s ease; }
.collection-book:hover, .collection-book:focus-visible { transform: translateY(-6px) rotate(-1deg); }
.collection-book-spine { width: 15px; flex: 0 0 auto; background: linear-gradient(90deg, #00000055, #ffffff14 40%, #00000033), var(--accent); border-radius: 4px 0 0 4px; }
.collection-book-cover { position: relative; display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center; background: radial-gradient(circle at 30% 20%, #ffffff1c, transparent 60%), repeating-linear-gradient(45deg, #ffffff05 0 2px, #00000008 2px 4px), color-mix(in srgb, var(--accent) 82%, #000); border-radius: 0 6px 6px 0; box-shadow: 6px 8px 16px #2a1d0d40; }
.collection-book-cover::before { content: ""; position: absolute; inset: 6px; border: 1px solid #e6cd8f55; border-radius: 3px; }
.collection-book-kicker { color: #e6cd8fcc; font-size: 9px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.collection-book-cover strong { font-family: Fraunces, Georgia, serif; font-size: 21px; font-weight: 500; line-height: 1.1; overflow-wrap: anywhere; }
.collection-book-rule { width: 46px; height: 1px; background: #e6cd8f99; }
.collection-book-cover small { color: #e9d9b2cc; font-size: 11px; }
.crumbs { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--accent); text-decoration: none; }
.collection-intro { max-width: 760px; margin: -6px 0 18px; color: var(--muted); line-height: 1.6; }
.collection-album { margin-top: 8px; }
.collection-album .album-stage { border-radius: 10px; }
.collection-plain { padding-left: 18px; line-height: 1.8; }
@media (max-width: 600px) { .collection-shelf { justify-content: center; gap: 16px; padding: 16px 10px 24px; } .collection-book { width: 140px; height: 190px; } }
