/* ============================================================
   CLUECRAFT: one-page site layout. Builds on case-system.css.
   ============================================================ */

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cc-paper); }
.cc-grid-bg {
  background-color: var(--cc-paper);
  background-image:
    linear-gradient(rgb(20 22 25 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(20 22 25 / 0.045) 1px, transparent 1px);
  background-size: 30px 30px;
}
body[data-grid="off"] .cc-grid-bg { background-image: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* ---- sticky nav ---- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgb(242 237 227 / 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.site-nav[data-scrolled="true"] { border-bottom-color: var(--cc-line); background: rgb(242 237 227 / 0.92); }
.site-nav .row { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.site-nav .links { display: flex; align-items: center; gap: 30px; }
.site-nav .links a { font-size: 15px; font-weight: 500; color: var(--cc-text-3); text-decoration: none; }
.site-nav .links a:hover { color: var(--cc-text); }
.site-nav .right { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; }

/* ---- section scaffolding ---- */
.section { padding: 96px 0; position: relative; }
body[data-density="cozy"] .section { padding: 120px 0; }
.section.dark { background: var(--cc-ink); color: var(--cc-blank-text); }
/* hairlines top and bottom so the tinted band reads as a deliberate
   panel rather than a slight change of paper */
.section.tint { background: var(--cc-paper-2); border-top: 1px solid var(--cc-line-2); border-bottom: 1px solid var(--cc-line-2); }
.section-head { max-width: 760px; }
.eyebrow {
  font-family: var(--cc-mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--cc-text-4); display: inline-flex; align-items: center; gap: 10px;
}
.dark .eyebrow { color: var(--cc-amber-dk); }
.eyebrow .ln { width: 26px; height: 1px; background: currentColor; opacity: .5; }
.h2 { font-family: var(--cc-sans); font-weight: 700; font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.02em; line-height: 1.05; margin: 18px 0 0; color: inherit; }
.dark .h2 { color: var(--cc-on-dark); }
.lead { font-family: var(--cc-serif); font-size: 19px; line-height: 1.6; color: var(--cc-text-2); margin: 20px 0 0; max-width: 60ch; }
.dark .lead { color: var(--cc-on-dark-2); }

/* ---- hero ---- */
.hero { padding: 36px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 48px; align-items: center; }
.hero h1 { font-family: var(--cc-sans); font-weight: 700; letter-spacing: -0.025em; line-height: 1.0; font-size: clamp(48px, 7vw, 78px); margin: 22px 0 0; }
.hero .lead { font-size: 20px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }

/* ================= evidence pack =================
   Layered like a real folder: things tucked INSIDE (z-index 1) show
   only where they poke past the folder's edge, the folder sits over
   them (z 2), and the loose documents rest on top (z 3). */
.pack { position: relative; height: 540px; }

/* --- contents of the folder, only their edges visible --- */
.pack-peek {
  position: absolute; z-index: 1; border-radius: 3px; overflow: hidden;
  border: 1px solid var(--cc-line-2); box-shadow: var(--helix-shadow-md);
}
.pack-peek.art-frame { aspect-ratio: 4 / 3; }
.pack-peek.sheet { background: var(--cc-blank); }
.pack-peek.sheet::before {
  /* faint ruled lines so the edge reads as a document, not a blank block */
  content: ""; position: absolute; inset: 16px 14px 18px 14px;
  background: repeating-linear-gradient(180deg, var(--cc-line) 0 1px, transparent 1px 11px);
  opacity: .9;
}

/* --- evidence artwork (SVG) --- */
.art { display: block; width: 100%; height: 100%; }
.art-mono { font-family: var(--cc-mono); letter-spacing: .1em; }
.art-mono-light  { font-size: 7px;   fill: #dbe3f0; opacity: .88; }
.art-mono-dark   { font-size: 6.5px; fill: #6b7280; letter-spacing: .14em; }
.art-mono-invert { font-size: 6.5px; fill: #f2f4fb; letter-spacing: .16em; }
.art-mono-mid    { font-size: 7px;   fill: #6b7280; letter-spacing: .1em; }
/* CCTV scanlines: the giveaway that it's surveillance footage, not a photo */
.art-scan rect { fill: #0b1020; opacity: .13; }

/* --- the folder --- */
/* top inset is deliberately deep: it's the window the tucked-in prints show
   through, so most of each print is visible above the folder line */
.pack-folder {
  position: absolute; z-index: 2; inset: 98px 24px 32px 8px;
  background: linear-gradient(168deg, var(--cc-folder) 0%, var(--cc-folder) 55%, var(--cc-folder-2) 100%);
  border: 1px solid var(--cc-folder-edge); border-radius: 6px 6px 4px 4px;
  box-shadow: var(--helix-shadow-md), inset 0 1px 0 rgb(255 255 255 / .45);
}
.pack-folder::before {
  content: ""; position: absolute; top: -22px; left: 30px; width: 150px; height: 26px;
  background: linear-gradient(180deg, var(--cc-folder-tab), var(--cc-folder));
  border: 1px solid var(--cc-folder-edge); border-bottom: none; border-radius: 8px 8px 0 0;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .5);
}
/* the inside fold, so the front cover reads as a separate piece of card */
/* the scored fold just below the tab, where the card is creased */
.pack-folder::after { content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 2px;
  background: linear-gradient(180deg, rgb(120 92 40 / .28), rgb(255 255 255 / .35)); }
.folder-stamp { position: absolute; right: 30px; bottom: 116px; transform: rotate(-9deg); opacity: .55; }
.folder-ref { position: absolute; left: 22px; bottom: 18px; font-family: var(--cc-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--cc-folder-ink); opacity: .62; }

/* --- loose documents resting on top --- */
.pack-card { position: absolute; z-index: 3; background: var(--cc-blank); border: 1px solid var(--cc-line); box-shadow: var(--helix-shadow-lg); border-radius: 5px; }
.clip { position: absolute; top: -15px; right: 24px; width: 17px; height: 38px; color: #9aa2ad; filter: drop-shadow(0 1px 1px rgb(0 0 0 / .28)); }

/* --- artefact cards: artwork, not documents to read --- */
.art-card { padding: 14px 14px 12px; }
.art-card .art { margin-top: 10px; border-radius: 3px; }

/* --- access badge --- */
.badge-card { padding: 0; overflow: hidden; border-radius: 6px; aspect-ratio: 150 / 96; }

/* --- document contents --- */
.doc-label { font-family: var(--cc-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cc-text-4); }

/* ---- recognition boxout: understated, but it should hold the eye ---- */
.recognition {
  margin-top: 52px; background: var(--cc-blank);
  border: 1px solid var(--cc-line); border-left: 4px solid var(--cc-ox);
  border-radius: var(--helix-radius-md); overflow: hidden;
}
.rec-head { padding: 26px 30px 22px; }
.rec-label {
  font-family: var(--cc-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--cc-ox); display: block; margin-bottom: 12px;
}
.rec-lede {
  font-family: var(--cc-serif); font-size: 18px; line-height: 1.55;
  color: var(--cc-text); margin: 0;
  /* no width cap: a boxout line should run the full width of its panel.
     Where it is a few pixels too long to fit, balance the two lines rather
     than leaving "by:" stranded on its own. */
  text-wrap: balance;
}
.rec-bodies {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--cc-line);
}
.rec-body {
  padding: 22px 20px; border-right: 1px solid var(--cc-line);
  display: flex; align-items: center; justify-content: center; min-height: 84px;
}
/* Constrain by BOTH axes and let the browser preserve the ratio: setting an explicit
   height alongside max-width would squash the wider marks on narrow cells. */
.rec-logo { display: block; width: auto; height: auto; max-width: 100%; max-height: 34px; }
/* optically balanced rather than uniform: the wide marks read heavier at equal height */
.rl-cipd { max-height: 32px; }
.rl-ioic { max-height: 25px; }
.rl-iol  { max-height: 34px; }
.rl-ice  { max-height: 38px; border-radius: 3px; }
.rec-body:last-child { border-right: none; }
@media (max-width: 920px) {
  .rec-bodies { grid-template-columns: 1fr 1fr; }
  .rec-body:nth-child(2) { border-right: none; }
  .rec-body:nth-child(-n+2) { border-bottom: 1px solid var(--cc-line); }
}
@media (max-width: 560px) {
  .rec-bodies { grid-template-columns: 1fr; }
  .rec-body { border-right: none; border-bottom: 1px solid var(--cc-line); }
  .rec-body:last-child { border-bottom: none; }
}

/* ---- three beats ---- */
.beats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--cc-line); border-radius: var(--helix-radius-md); overflow: hidden; background: var(--cc-blank); }
.beats .b { padding: 30px 30px; border-right: 1px solid var(--cc-line); }
.beats .b:last-child { border-right: none; }
.beats .bn { font-family: var(--cc-mono); font-size: 12px; color: var(--cc-amber-ink); letter-spacing: 0.1em; }
.beats .bt { font-family: var(--cc-sans); font-size: 22px; font-weight: 600; margin-top: 12px; letter-spacing: -0.01em; line-height: 1.2; }

/* ---- generic cards / grids ---- */
.cards { display: grid; gap: 20px; margin-top: 44px; }
.cards.c2 { grid-template-columns: repeat(2, 1fr); }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--cc-blank); border: 1px solid var(--cc-line); border-radius: var(--helix-radius-md); padding: 28px; }
.dark .card { background: var(--cc-dark-panel); border-color: var(--cc-dark-line); }
.card .ct { font-family: var(--cc-sans); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.dark .card .ct { color: var(--cc-on-dark); }
.card .cp { font-family: var(--cc-serif); font-size: 15px; color: var(--cc-text-3); line-height: 1.55; margin-top: 8px; }
.dark .card .cp { color: var(--cc-on-dark-2); }
.card .cidx { font-family: var(--cc-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cc-text-4); }
.dark .card .cidx { color: var(--cc-amber-dk); }

/* ticked list */
.ticks { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ticks li { display: flex; gap: 13px; align-items: flex-start; font-family: var(--cc-sans); font-size: 16px; color: var(--cc-text-2); line-height: 1.4; }
.dark .ticks li { color: var(--cc-on-dark-2); }
.ticks svg { width: 18px; height: 18px; color: var(--cc-amber-ink); flex: none; margin-top: 1px; }
.dark .ticks svg { color: var(--cc-amber-dk); }

/* two-column split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split.narrow { gap: 40px; }

/* compare (smart alternative) */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
.compare .col { border: 1px solid var(--cc-line); border-radius: var(--helix-radius-md); padding: 28px; background: var(--cc-blank); }
.compare .col.bad { background: var(--cc-paper-2); }
.compare .col.good { border-color: var(--cc-amber-edge); box-shadow: 0 0 0 3px var(--cc-amber-soft); }
.compare .tag-line { display: flex; align-items: center; gap: 10px; }
.compare h3 { font-family: var(--cc-sans); font-weight: 700; font-size: 20px; margin: 16px 0 16px; letter-spacing: -0.01em; }

/* accordion (services detail) */
.acc { border-top: 1px solid var(--cc-line); }
.acc .item { border-bottom: 1px solid var(--cc-line); }
.acc .head { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 24px 4px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-family: var(--cc-sans); }
.acc .head .t { font-weight: 600; font-size: 20px; color: var(--cc-text); letter-spacing: -0.01em; }
.acc .head .ix { font-family: var(--cc-mono); font-size: 12px; color: var(--cc-text-4); margin-right: auto; margin-left: 18px; letter-spacing: 0.1em; }
.acc .chev { width: 22px; height: 22px; color: var(--cc-text-3); transition: transform .25s; flex: none; }
.acc .item[data-open="true"] .chev { transform: rotate(45deg); }
.acc .panel { overflow: hidden; height: 0; transition: height .28s ease; }
.acc .panel-inner { padding: 0 4px 28px; }

/* off-the-shelf case rows (dark) */
/* --- example investigations: expandable rows --- */
.cases-list { display: flex; flex-direction: column; gap: 12px; margin-top: 44px; }
.case-item { border-radius: var(--helix-radius-sm); overflow: hidden; }
.case-row {
  width: 100%; text-align: left; font-family: var(--cc-sans); cursor: pointer;
  display: flex; align-items: center; gap: 22px; padding: 22px 24px;
  border: 1px solid var(--cc-dark-line); border-radius: var(--helix-radius-sm);
  background: var(--cc-dark-panel); transition: border-color .2s, background .2s;
}
.case-item[data-open="true"] .case-row { border-color: var(--cc-amber-dk); background: var(--cc-dark-raise); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.case-row .chev { width: 20px; height: 20px; color: var(--cc-amber-dk); transition: transform .25s; flex: none; }
.case-item[data-open="true"] .chev { transform: rotate(45deg); }
.cases-list .panel { overflow: hidden; height: 0; transition: height .28s ease; }
.cases-list .panel-inner {
  padding: 22px 24px 24px; border: 1px solid var(--cc-amber-dk); border-top: none;
  border-radius: 0 0 var(--helix-radius-sm) var(--helix-radius-sm); background: var(--cc-dark-raise);
}
.case-hook { font-family: var(--cc-serif); font-size: 17.5px; line-height: 1.55; color: var(--cc-on-dark); margin: 0; max-width: 68ch; }
.case-ev-label { font-family: var(--cc-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cc-on-dark-3); margin: 20px 0 11px; }
.case-ev { display: flex; flex-wrap: wrap; gap: 9px; }
.case-learn { margin: 18px 0 0; font-size: 15px; line-height: 1.55; color: var(--cc-on-dark-2); max-width: 68ch; }
.case-learn span { font-family: var(--cc-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cc-amber-dk); margin-right: 8px; }
/* the closing invitation reads better unbroken; it wraps only if it must */
.case-invite { text-wrap: balance; }
.case-cta { margin-top: 20px; height: 44px; font-size: 15px; }
/* the closing invitation used to live under the list; Theme 06 carries it now */
.case-run { display: flex; align-items: center; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--cc-dark-line-2); font-size: 14px; color: var(--cc-on-dark-2); }
.case-run b { color: var(--cc-amber-dk); font-weight: 700; }
.case-row:hover { border-color: var(--cc-amber-dk); background: var(--cc-dark-raise); }
.case-row .no { font-family: var(--cc-mono); font-size: 12px; color: var(--cc-amber-dk); letter-spacing: 0.1em; flex: none; width: 70px; }
.case-row .nm { font-family: var(--cc-sans); font-weight: 600; font-size: 19px; color: var(--cc-on-dark); }
.case-row .meta { font-family: var(--cc-serif); font-size: 14px; color: var(--cc-on-dark-2); margin-left: auto; flex: none; }

/* contact / form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--cc-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cc-on-dark-2); }
.field input, .field textarea, .field select {
  font-family: var(--cc-sans); font-size: 15px; color: var(--cc-on-dark);
  background: var(--cc-dark-panel); border: 1px solid var(--cc-dark-line-2);
  border-radius: var(--helix-radius-x-sm); padding: 13px 14px; outline: none; transition: border-color .15s, background .15s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: var(--cc-on-dark-4); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--cc-amber-dk); background: var(--cc-dark-raise); }
.contact-note {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 30px;
  font-family: var(--cc-serif); font-size: 16px; line-height: 1.55;
  color: var(--cc-on-dark-2); max-width: 44ch;
}
.contact-note .ic {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  border: 1px solid var(--cc-dark-line-2); display: grid; place-items: center;
  color: var(--cc-amber-dk);
}
.contact-detail { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--cc-dark-line); }
.contact-detail .ic { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--cc-dark-line-2); display: grid; place-items: center; color: var(--cc-amber-dk); flex: none; }
.contact-detail .k { font-family: var(--cc-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cc-on-dark-3); }
.contact-detail .v { font-family: var(--cc-sans); font-size: 17px; color: var(--cc-on-dark); font-weight: 500; margin-top: 2px; }
.form-note { font-family: var(--cc-serif); font-size: 13px; color: var(--cc-on-dark-3); margin-top: 14px; }

/* footer */
.footer { background: var(--cc-ink); color: var(--cc-on-dark-2); padding: 56px 0 40px; border-top: 1px solid var(--cc-dark-line); }
.footer .row { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer a { color: var(--cc-on-dark-2); text-decoration: none; font-size: 15px; }
.footer a:hover { color: var(--cc-on-dark); }
.footer .cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer .col { display: flex; flex-direction: column; gap: 12px; }
.footer .col .ch { font-family: var(--cc-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cc-on-dark-4); margin-bottom: 4px; }
.footer .legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--cc-dark-line); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--cc-on-dark-4); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* responsive */
@media (max-width: 920px) {
  .container { padding: 0 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .pack { height: 420px; }
  .split, .compare, .form-grid { grid-template-columns: 1fr; }
  .cards.c2, .cards.c3, .cards.c4 { grid-template-columns: 1fr 1fr; }
  .beats { grid-template-columns: 1fr; }
  .beats .b { border-right: none; border-bottom: 1px solid var(--cc-line); }
  .beats .b:last-child { border-bottom: none; }
  .site-nav .links, .site-nav .right .desktop-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .section { padding: 72px 0; }
}
@media (max-width: 560px) {
  .cards.c2, .cards.c3, .cards.c4 { grid-template-columns: 1fr; }
  .case-row { flex-wrap: wrap; gap: 10px; }
  .case-row .meta { margin-left: 0; }
}
