/* Public site. Same brand as the Counting House, but written for visitors: more air, larger type, the art up front. */
:root {
  color-scheme: dark;
  --ink: #08121F; --deep: #0E1C30; --panel: #13253D; --rule: #26416A;
  --gold: #D9B65C; --gold-dim: #9C7A2E; --silver: #C9CFD8; --text: #E6EAF0; --muted: #8C99AD;
  --display: 'Cinzel', 'Times New Roman', serif;
  --body: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 18px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
.top { position: absolute; inset: 0 0 auto; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }
.mark { display: flex; align-items: center; gap: 12px; color: var(--silver); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.15; }
.mark img { width: 44px; height: 44px; }
.mark span { display: block; color: var(--gold); font-weight: 400; font-size: 12px; }
.links { display: flex; gap: 26px; align-items: center; }
.links a { color: var(--silver); text-decoration: none; font-weight: 500; }
.links a:hover, .links a[aria-current] { color: #fff; }
.links .members { border: 1px solid var(--gold-dim); color: var(--gold); padding: 7px 14px; border-radius: 4px; }
.top.solid { position: static; background: var(--deep); border-bottom: 1px solid var(--rule); }

/* Hero */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; background: #0a1628 url(/assets/hero-starchart.jpg) center / cover no-repeat; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,18,31,.92) 0%, rgba(8,18,31,.55) 45%, rgba(8,18,31,0) 75%), linear-gradient(0deg, var(--ink) 0%, transparent 25%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 80px; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 6.2vw, 78px); line-height: 1.02; margin: 0; color: #fff; max-width: 12ch; letter-spacing: .01em; }
.hero .honourable { display: block; font-size: .32em; font-weight: 400; color: var(--gold); letter-spacing: .08em; margin-bottom: 14px; }
.hero p { font-family: var(--serif); font-size: clamp(21px, 2.2vw, 26px); line-height: 1.4; color: var(--silver); max-width: 34ch; margin: 22px 0 32px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; font: 600 17px var(--body); padding: 13px 24px; border-radius: 4px; text-decoration: none; border: 1px solid var(--rule); color: var(--text); background: rgba(19,37,61,.7); cursor: pointer; }
.btn:hover { border-color: var(--silver); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1A1406; }
.btn.gold:hover { background: #E8CE84; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* The ledger: the Company's live numbers, written as an entry in the books */
.ledger { position: relative; z-index: 3; margin-top: -64px; }
.ledger-sheet { background: linear-gradient(180deg, #13284A 0%, #0F2140 100%); color: var(--silver); border: 1px solid var(--gold-dim); border-radius: 4px;
  box-shadow: 0 18px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(217,182,92,.25); padding: 26px 34px 22px; font-family: var(--serif);
  background-image: repeating-linear-gradient(transparent 0 33px, rgba(217,182,92,.10) 33px 34px), linear-gradient(180deg, #13284A 0%, #0F2140 100%); }
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--gold); padding-bottom: 6px; margin-bottom: 4px; font-family: var(--display); font-size: 14px; letter-spacing: .06em; color: var(--gold); }
.ledger-row { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: baseline; font-size: 22px; line-height: 34px; color: var(--silver); }
.ledger-row .fig { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold); }
.ledger-row .dots { border-bottom: 1px dotted rgba(201,207,216,.35); transform: translateY(-7px); }
.ledger-foot { font-size: 15px; color: var(--muted); margin-top: 8px; font-style: italic; }

/* Sections */
section.block { padding: 96px 0; }
.kicker { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 22px; margin: 0 0 6px; }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; margin: 0 0 18px; color: #fff; }
h3 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 0 0 6px; color: #fff; }
.lede { font-size: 20px; color: var(--silver); max-width: 62ch; }

.divisions { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px; margin-top: 40px; background: var(--rule); border: 1px solid var(--rule); }
.division { background: var(--deep); padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: background .15s; }
.division:hover { background: var(--panel); }
.division img { width: 72px; height: 72px; }
.division .motto { font-family: var(--serif); font-style: italic; color: var(--silver); font-size: 19px; line-height: 1.35; }
.division .what { color: var(--muted); font-size: 16px; }
.division .count { margin-top: auto; font-size: 14px; color: var(--muted); }
.division-cta { background: linear-gradient(160deg, #1A2F52, var(--deep)); justify-content: flex-end; }

.articles { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 64px; margin-top: 36px; }
.article h3 { font-size: 19px; }
.article .num { font-family: var(--display); color: var(--gold); margin-right: 8px; }
.article p { margin: 0; color: var(--silver); }
.quote { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.6vw, 32px); color: var(--silver); text-align: center; max-width: 30ch; margin: 64px auto 0; line-height: 1.35; }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 52px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--gold-dim); color: var(--gold); font-family: var(--display); display: grid; place-items: center; }
.steps b { color: #fff; display: block; }
.steps span { color: var(--silver); }

.band { background: linear-gradient(180deg, var(--deep), var(--ink)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* Page heads for inner pages */
.pagehead { padding: 72px 0 36px; border-bottom: 1px solid var(--rule); background: var(--deep) url(/assets/hero-gilded.jpg) center 30% / cover; position: relative; }
.pagehead::after { content: ''; position: absolute; inset: 0; background: rgba(8,18,31,.78); }
.pagehead .wrap { position: relative; z-index: 1; }
.pagehead h1 { font-family: var(--display); font-size: clamp(34px, 4.6vw, 56px); margin: 0; color: #fff; line-height: 1.1; }
.pagehead p { font-family: var(--serif); font-size: 22px; color: var(--silver); margin: 10px 0 0; max-width: 50ch; }

.prose { max-width: 70ch; }
.prose p, .prose li { color: var(--silver); }
.prose h2 { margin-top: 48px; }

.rank-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 17px; }
.rank-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 15px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.rank-table td { padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--silver); }
.rank-table td:first-child { font-family: var(--display); color: #fff; white-space: nowrap; }

.div-page { display: grid; grid-template-columns: 120px 1fr; gap: 28px; padding: 44px 0; border-bottom: 1px solid var(--rule); }
.div-page img { width: 120px; height: 120px; }
.titles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.titles span { font-size: 14px; border: 1px solid var(--rule); border-radius: 20px; padding: 2px 11px; color: var(--silver); }

/* Join form */
.form { background: var(--deep); border: 1px solid var(--rule); border-radius: 8px; padding: 32px; }
.q { margin-bottom: 26px; }
.q > label, .q legend { display: block; font-weight: 600; color: #fff; margin-bottom: 6px; font-size: 18px; }
.q .help { color: var(--muted); font-size: 15px; margin: -2px 0 8px; }
.q input[type=text], .q textarea, .q select { width: 100%; background: var(--panel); color: var(--text); border: 1px solid var(--rule); border-radius: 4px; padding: 11px 12px; font: inherit; }
.q textarea { min-height: 120px; resize: vertical; }
.q fieldset { border: 0; padding: 0; margin: 0; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; color: var(--silver); cursor: pointer; }
.choice input { margin-top: 6px; accent-color: var(--gold); width: 17px; height: 17px; }
.div-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.div-pick label { display: flex; gap: 10px; align-items: center; border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; cursor: pointer; background: var(--panel); }
.div-pick label:has(input:checked) { border-color: var(--gold); }
.div-pick img { width: 34px; height: 34px; }
.err { color: #F08A92; font-size: 15px; margin-top: 6px; }
.q.bad input, .q.bad textarea, .q.bad select { border-color: #C8303C; }
.status { border-left: 3px solid var(--gold); padding: 6px 0 6px 18px; margin: 18px 0; }
.status b { color: #fff; font-family: var(--display); font-size: 20px; display: block; }

/* Footer */
footer { border-top: 1px solid var(--rule); padding: 40px 0 56px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer .motto { font-family: var(--display); color: var(--silver); letter-spacing: .04em; }

/* One orchestrated moment: the hero settles in on load */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero p, .hero .cta { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero p { animation-delay: .12s; } .hero .cta { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

@media (max-width: 860px) {
  body { font-size: 17px; }
  .links a:not(.members):not([href="/join"]) { display: none; }
  .links { gap: 14px; }
  .hero { min-height: 82vh; background-position: 30% center; }
  .hero::after { background: linear-gradient(0deg, var(--ink) 5%, rgba(8,18,31,.75) 60%, rgba(8,18,31,.6) 100%); }
  .ledger-sheet { padding: 18px 18px 14px; }
  .ledger-row { font-size: 18px; }
  .articles, .split { grid-template-columns: 1fr; gap: 32px; }
  section.block { padding: 64px 0; }
  .div-page { grid-template-columns: 1fr; }
  .div-page img { width: 84px; height: 84px; }
  .form { padding: 20px; }
  .wrap { padding: 0 16px; }
}

.q .opt { color: var(--muted); font-weight: 400; font-size: 15px; margin-left: 6px; }

.story { padding: 0 0 40px; margin-bottom: 40px; border-bottom: 1px solid var(--rule); }
.story time { color: var(--gold); font-family: var(--serif); font-style: italic; font-size: 19px; }
.story h2 { margin: 6px 0 14px; }
.story-body p { color: var(--silver); font-size: 19px; max-width: 66ch; }
.story .byline { color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 18px; }
#latest .story { border-bottom: 0; padding-bottom: 0; margin-bottom: 12px; }
.partner-list { list-style: none; padding: 0; margin: 12px 0 0; }
.partner-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); color: var(--silver); }
.partner-list b { color: #fff; font-family: var(--display); }
.partner-list span { color: var(--gold); font-size: 15px; margin-left: 6px; }

/* Public star map */
.pub-map svg { width: 100%; height: auto; display: block; background: radial-gradient(circle at 30% 50%, #11284A, #08121F 70%); border: 1px solid rgba(217,182,92,.25); border-radius: 6px; }
.pub-map .legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; color: var(--muted, #9AA6B8); font-size: 15px; }
.pub-map .legend span, .map-places li { display: flex; gap: 8px; align-items: baseline; }
.pub-map .legend i, .map-places li i { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.map-places { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; margin-top: 40px; }
.map-places ul { list-style: none; padding: 0; margin: 0; }
.map-places li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.map-places li span { color: var(--muted, #9AA6B8); font-size: 15px; }
.map-places li p { margin: 4px 0 0; font-size: 15px; color: var(--muted, #9AA6B8); }
