/* =============================================================
   HIRESCIENCE — dossier / spec-sheet design system
   Ink navy + cool paper + brass credential accent.
   Grotesque display, serif reading text, mono field labels.
   ============================================================= */

:root {
  --ink:        #0E1626;   /* deep navy — authority, ledgers      */
  --ink-soft:   #1B2740;   /* raised dark surfaces                */
  --paper:      #F3F2EE;   /* cool paper (not warm cream)         */
  --paper-2:    #E9E7E0;   /* section separation on light        */
  --slate:      #5A6478;   /* secondary text                     */
  --line:       #C9C6BC;   /* hairlines on paper                 */
  --line-dk:    #2C3852;   /* hairlines on ink                   */
  --brass:      #B98A3E;   /* credential / seal accent           */
  --brass-lo:   #9A7130;
  --white:      #FBFAF7;

  --disp: "Archivo", system-ui, sans-serif;
  --body: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --edge: clamp(1.25rem, 5vw, 6rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.06rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

h1, h2, h3, .disp { font-family: var(--disp); font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; }

/* mono field label — the signature device */
.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-lo);
}

a { color: inherit; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem var(--edge);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
}
.brand { font-family: var(--disp); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em; }
.brand span { color: var(--brass-lo); }
.top .label { display: none; }
@media (min-width: 720px){ .top .label { display: block; } }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em;
  text-transform: uppercase; border: none; cursor: pointer;
  padding: 0.9rem 1.5rem; border-radius: 2px; transition: transform .15s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--white); }
.btn--primary:hover { background: var(--ink-soft); }
.btn--brass { background: var(--brass); color: var(--ink); }
.btn--brass:hover { background: var(--brass-lo); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }

/* ---------- hero ---------- */
.hero { padding: clamp(3.5rem, 9vw, 7rem) var(--edge) clamp(3rem,6vw,5rem); border-bottom: 1px solid var(--line); }
.hero .label { margin-bottom: 1.6rem; display: block; }
.hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 6rem);
  max-width: 16ch; margin: 0 0 1.6rem;
}
.hero h1 em { font-family: var(--body); font-style: italic; font-weight: 500; color: var(--brass-lo); }
.hero p.lede {
  max-width: 46ch; font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--slate); margin: 0 0 2.4rem;
}
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- registry strip ---------- */
.strip {
  background: var(--ink); color: var(--white);
  padding: 2.4rem var(--edge);
  display: grid; grid-template-columns: 1fr; gap: 1.8rem;
}
@media (min-width: 720px){ .strip { grid-template-columns: repeat(3,1fr); } }
.strip .cell { border-left: 1px solid var(--line-dk); padding-left: 1.2rem; }
.strip .cell .n { font-family: var(--disp); font-weight: 800; font-size: clamp(2rem,5vw,3rem); color: var(--brass); line-height: 1; }
.strip .cell .k { display:block; margin-top:.5rem; color:#AEB6C6; font-family:var(--mono); font-size:.74rem; letter-spacing:.1em; text-transform:uppercase; }

/* ---------- findings ---------- */
.findings { padding: clamp(3.5rem,8vw,6rem) var(--edge); }
.findings > .label { display:block; margin-bottom: .8rem; }
.findings > h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 20ch; margin: 0 0 3rem; }

.finding {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
  padding: 2.2rem 0; border-top: 1px solid var(--line);
  transition: opacity .6s, transform .6s;
}
/* Hidden only once JS confirms it can reveal them — no JS = always visible */
.reveal-armed .finding { opacity: 0; transform: translateY(18px); }
.reveal-armed .finding.in { opacity: 1; transform: none; }
@media (min-width: 860px){
  .finding { grid-template-columns: 5.5rem 1fr 15rem; gap: 2.5rem; align-items: start; }
}
.finding .idx { font-family: var(--mono); font-size:.8rem; color: var(--brass-lo); letter-spacing:.1em; padding-top:.4rem; }
.finding h3 { font-size: clamp(1.3rem, 2.6vw, 1.9rem); margin: 0 0 .7rem; }
.finding p { margin: 0; color: #2A3345; }
.finding .cite {
  font-family: var(--mono); font-size: .72rem; line-height: 1.6;
  color: var(--slate); border-left: 2px solid var(--brass); padding-left: .9rem;
}
.finding .cite b { color: var(--ink); font-weight: 600; }

/* ---------- split CTA ---------- */
.split { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr; }
@media (min-width: 820px){ .split { grid-template-columns: 1fr 1fr; } }
.split .half { padding: clamp(2.5rem,6vw,4.5rem) var(--edge); }
.split .half + .half { border-top: 1px solid var(--line); }
@media (min-width: 820px){ .split .half + .half { border-top: none; border-left: 1px solid var(--line); } }
.split .half.dark { background: var(--ink); color: var(--white); }
.split .half .label { margin-bottom: 1rem; display:block; }
.split .half h2 { font-size: clamp(1.6rem,3.5vw,2.4rem); margin: 0 0 .8rem; }
.split .half p { color: var(--slate); margin: 0 0 1.8rem; max-width: 32ch; }
.split .half.dark p { color: #AEB6C6; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #8A93A6; padding: 2.5rem var(--edge); font-family: var(--mono); font-size:.76rem; letter-spacing:.04em; display:flex; flex-wrap:wrap; gap:.6rem 2rem; justify-content: space-between; border-top: 1px solid var(--line-dk); }
.foot .brand { color: var(--white); }

/* ---------- chat panel ---------- */
.chat {
  position: fixed; inset: 0; z-index: 50;
  display: flex; justify-content: flex-end;
  background: rgba(14,22,38,0); pointer-events: none;
  transition: background .3s;
}
.chat.is-open { background: rgba(14,22,38,.55); pointer-events: auto; }
.chat__panel {
  width: min(480px, 100%); height: 100%;
  background: var(--paper); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.1,1);
  box-shadow: -20px 0 60px rgba(0,0,0,.25);
}
.chat.is-open .chat__panel { transform: none; }
.chat__head { padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); display:flex; align-items:flex-start; justify-content:space-between; }
.chat__head .label { display:block; margin-bottom:.35rem; }
.chat__head h2 { font-size: 1.35rem; margin: 0; }
#chat-close { background:none; border:none; font-family:var(--mono); font-size:1.4rem; cursor:pointer; color: var(--slate); line-height:1; padding:.2rem .4rem; }
#chat-close:hover { color: var(--ink); }

.chat__stream { flex: 1; min-height: 0; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: .8rem; }
.bubble { max-width: 82%; padding: .8rem 1rem; border-radius: 12px; font-size: .98rem; line-height: 1.5; }
.bubble--bot { background: var(--white); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 3px; }
.bubble--user { background: var(--ink); color: var(--white); align-self: flex-end; border-bottom-right-radius: 3px; font-family: var(--disp); font-weight: 500; font-size: .92rem; }

.chat__input { flex-shrink: 0; padding: 1rem 1.5rem 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .6rem; }
.field { flex: 1; min-width: 60%; font-family: var(--body); font-size: 1rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 6px; background: var(--white); resize: vertical; }
.field:focus { outline: 2px solid var(--brass); outline-offset: 1px; border-color: var(--brass); }
.field--error { border-color: #B4442F; outline-color:#B4442F; }
.send { font-family: var(--mono); font-size:.78rem; letter-spacing:.06em; text-transform:uppercase; background: var(--ink); color: var(--white); border:none; border-radius:6px; padding: 0 1.2rem; cursor:pointer; }
.send:hover { background: var(--ink-soft); }
.send--wide { display:inline-block; text-decoration:none; padding:.8rem 1.2rem; margin-top:.8rem; }
.choices { display:flex; flex-direction:column; gap:.5rem; width:100%; }
.choice { text-align:left; font-family: var(--body); font-size:.98rem; background: var(--white); border:1px solid var(--line); border-radius:8px; padding:.75rem .9rem; cursor:pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--brass); background: #fff; }
.chat-done { width:100%; font-size:.95rem; color: var(--slate); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .finding { opacity:1; transform:none; }
}
