/* ==========================================================================
   LETHOMETRY v1.2.59 — "DECLASSIFIED DOSSIER" art-direction layer
   Signature: registration/crop marks + evidence tags + scanline texture.
   Adds depth, asymmetry, and category color-coding on top of base tokens.
   No new colors introduced — uses existing --amber/--terra/--slate tokens.
   ========================================================================== */

/* ---- 1. SIGNATURE: registration (crop) marks on cards ---- */
/* L-shaped corner ticks drawn with pseudo-elements, amber, draw-in on hover */
.cc::before,
.ac::before {
  content: "";
  position: absolute;
  top: 8px; left: 8px;
  width: 12px; height: 12px;
  border-top: 1.5px solid var(--amber);
  border-left: 1.5px solid var(--amber);
  opacity: .35;
  transition: opacity .25s var(--ease, ease), transform .25s var(--ease, ease);
  pointer-events: none;
  z-index: 2;
}
.cc::after,
.ac::after {
  content: "";
  position: absolute;
  bottom: 8px; right: 8px;
  width: 12px; height: 12px;
  border-bottom: 1.5px solid var(--amber);
  border-right: 1.5px solid var(--amber);
  opacity: .35;
  transition: opacity .25s var(--ease, ease);
  pointer-events: none;
  z-index: 2;
}
.cc:hover::before,
.ac:hover::before {
  opacity: 1;
  transform: translate(2px, 2px);
}
.cc:hover::after,
.ac:hover::after { opacity: 1; }

/* evidence tag — monospace corner label, functional metadata */
.cc .ev-tag,
.ac .ev-tag {
  position: absolute;
  top: 10px; right: 12px;
  font-family: var(--font-mono, monospace);
  font-size: .5625rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-4);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
  opacity: 1;
  transition: color .25s var(--ease, ease);
  z-index: 3;
  pointer-events: none;
}
.cc:hover .ev-tag,
.ac:hover .ev-tag { color: var(--amber); }

/* ---- 2. CARD DEPTH + HOVER AFFORDANCE ---- */
.cc,
.ac {
  border-radius: var(--r-3, 12px);
  box-shadow: var(--shadow-1, 0 1px 2px rgba(0,0,0,.4));
}
.cc:hover,
.ac:hover {
  border-color: var(--border-hi);
  background: var(--bg-card-hi, #211d18);
  box-shadow: var(--shadow-3, 0 8px 24px rgba(0,0,0,.6));
  transform: translateY(-3px);
}

/* category accent: left rule colored per category (data-accent attr) */
.cc[data-accent="amber"]  { border-left: 2px solid var(--amber); }
.cc[data-accent="terra"]  { border-left: 2px solid var(--terra); }
.cc[data-accent="slate"]  { border-left: 2px solid var(--slate); }
.cc .cc-icon { transition: background .25s var(--ease, ease), color .25s var(--ease, ease); }
.cc[data-accent="terra"] .cc-icon { color: var(--terra); background: rgba(198,106,74,.08); }
.cc[data-accent="slate"] .cc-icon { color: var(--slate-hi, #a0bcbc); background: rgba(125,154,154,.08); }

/* ---- 3. ASYMMETRIC CATEGORY GRID ---- */
/* One featured wide card (first) + 2-up smaller grid. Grid break from uniform rows. */
.cgrid.sca {
  grid-template-columns: repeat(6, 1fr);
}
.cgrid.sca > .cc:nth-child(1) {
  grid-column: span 6;            /* featured full-width band */
  flex-direction: row;
  align-items: center;
  gap: var(--s-8);
  padding: var(--s-8);
}
.cgrid.sca > .cc:nth-child(1) .cc-icon {
  width: 56px; height: 56px;
  margin-bottom: 0;
}
.cgrid.sca > .cc:nth-child(1) .cc-icon svg { width: 28px; height: 28px; }
.cgrid.sca > .cc:nth-child(1) h3 { font-size: var(--fs-2xl); }
.cgrid.sca > .cc:nth-child(1) p { -webkit-line-clamp: 3; font-size: var(--fs-base); }
.cgrid.sca > .cc:nth-child(n+2) { grid-column: span 3; }   /* 2-up */
@media (max-width: 980px) {
  .cgrid.sca { grid-template-columns: repeat(2, 1fr); }
  .cgrid.sca > .cc:nth-child(1) { grid-column: span 2; flex-direction: column; align-items: flex-start; gap: var(--s-4); padding: var(--s-6); }
  .cgrid.sca > .cc:nth-child(1) h3 { font-size: var(--fs-xl); }
  .cgrid.sca > .cc:nth-child(n+2) { grid-column: span 1; }
}
@media (max-width: 620px) {
  .cgrid.sca { grid-template-columns: 1fr; }
  .cgrid.sca > .cc:nth-child(1),
  .cgrid.sca > .cc:nth-child(n+2) { grid-column: span 1; }
}

/* articles grid stays 2-up but with depth + thumb zoom */
.cgrid.aca > .ac { overflow: hidden; }
.ac-thumb img { transition: transform .4s var(--ease, ease); }
.ac:hover .ac-thumb img { transform: scale(1.05); }
.ac .ac-meta { position: relative; z-index: 2; }

/* ---- 4. SECTION DIVIDERS (registration motif) ---- */
.leth-section + .leth-section,
#tools, #categories, #articles, #latest {
  position: relative;
}
.dossier-rule {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin: var(--s-16) auto var(--s-10);
  max-width: var(--container, 1200px);
  padding: 0 var(--s-6);
  color: var(--ink-4);
}
.dossier-rule::before,
.dossier-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hi), transparent);
}
.dossier-rule span {
  font-family: var(--font-mono, monospace);
  font-size: .625rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--amber);
  white-space: nowrap;
}

/* ---- 5. HERO SCANLINE TEXTURE + STRONGER LEDGE ---- */
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-2, 10px);
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,.18) 3px,
    rgba(0,0,0,0) 4px
  );
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: .5;
}
.hero-tag {
  background: rgba(200,154,74,.06);
  letter-spacing: .25em;
}

/* ---- 6. ARTICLE CARD META RIBBON ---- */
.ac .ac-meta .ac-cat {
  color: var(--amber);
}

/* ---- 7. REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  .cc::before, .ac::before, .cc::after, .ac::after,
  .cc .ev-tag, .ac .ev-tag { transition: none; }
  .cc:hover, .ac:hover { transform: none; }
  .ac:hover .ac-thumb img { transform: none; }
}

/* ---- 8. SOURCES & METHODOLOGY PAGE ---- */
.sources-page { position: relative; }
.sources-page > .container { max-width: var(--container-narrow); }
.sources-page p { font-size: var(--fs-md); line-height: 1.75; color: var(--ink-1); margin-bottom: var(--s-5); }
.sources-page h2 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--ink-1);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.sources-page ul { list-style: disc; padding-left: 1.4rem; line-height: 1.9; color: var(--ink-2); margin-bottom: var(--s-5); }
.sources-page li { margin-bottom: var(--s-2); }
.sources-page li strong { color: var(--ink-1); font-weight: 600; }
.sources-page a { color: var(--amber); text-decoration: none; }
.sources-page a:hover { text-decoration: underline; }
.sources-page .sources-back { margin-top: 2rem; }

/* ---- SOURCES PAGE: primary-source index + video library ---- */
.src-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; }
.src-list li { padding: 1rem 1.25rem; background: var(--bg-elev); border-left: 3px solid var(--amber); border-radius: 4px; }
.src-list a { font-weight: 600; color: var(--ink-1); }
.src-list a:hover { color: var(--amber); }
.src-note { display: block; margin-top: 0.35rem; color: var(--ink-2); font-size: var(--fs-sm); }
.src-videos { margin: 1.5rem 0 0.5rem; display: grid; gap: 1.5rem; }
.src-cap { margin: 0.5rem 0 0; color: var(--ink-2); font-size: var(--fs-sm); text-align: center; }
.sources-page .sources-back .btn-ghost {
  font-family: var(--font-mono); font-size: var(--fs-sm); letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-1); border: 1px solid var(--border); padding: 10px 20px; border-radius: 4px; display: inline-block;
  transition: border-color .2s var(--ease, ease), color .2s var(--ease, ease);
}
.sources-page .sources-back .btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ---- 9. PILLAR SUB-GRID (simulation-theory-pillar) ---- */
.pillar-subgrid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.pillar-subcard {
  padding: 1.25rem;
  border: 1px solid var(--line, #222);
  border-radius: 12px;
  background: var(--bg-elev);
  transition: border-color .2s var(--ease, ease), transform .2s var(--ease, ease);
}
.pillar-subcard:hover { border-color: var(--amber); transform: translateY(-3px); }
.pillar-subcard .acls { color: var(--amber); }
.pillar-subcard .exc { margin: 0.5rem 0 0; color: var(--ink-2); font-size: var(--fs-sm); }

/* ---- HERO WORDMARK (brand lockup above H1) ---- */
.hero-wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--amber);
  margin: 0 0 0.25rem;
  text-transform: uppercase;
}
.hero-title { color: var(--ink-1); }

/* ---- 10. 404 PAGE ---- */
.leth-404 {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 2rem;
}
.leth-404-inner { max-width: 600px; }
.leth-404 h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  color: var(--ink-1);
}
.leth-404 p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-md);
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}
.leth-404-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.leth-404-links { border-top: 1px solid var(--border); padding-top: 2rem; }
.leth-404-or {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  margin-bottom: 1rem;
}
.leth-404-chips { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }

/* ---- 11. COOKIE BANNER ---- */
.leth-cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  width: 100vw; max-width: 100vw;
  box-sizing: border-box;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 1rem;
  z-index: 9999;
  font-size: .875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.leth-cookie-text {
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
  color: var(--ink-2);
  word-break: break-word;
}
.leth-cookie-link {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.leth-cookie-link:hover { color: var(--ink-1); }
.leth-cookie-accept {
  flex-shrink: 0;
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: .5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   INNER PAGES — dossier extension (category, archive, single post)
   ========================================================================== */

/* ---- Category header ---- */
.cat-header { position: relative; padding: 3rem 0 1.5rem; }
.cat-header h1 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--ink-1);
  margin: 0.6rem 0 0.5rem;
  letter-spacing: -0.02em;
}
.cat-header p { max-width: 65ch; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.6; margin: 0; }
.cat-ev { position: static; display: inline-block; margin-bottom: 0.5rem; }

/* ---- Archive cards (category.php) ---- */
.archive-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color .25s var(--ease, ease), transform .25s var(--ease, ease), box-shadow .25s var(--ease, ease);
}
.archive-card > a { display: block; padding: var(--s-5); color: var(--ink); text-decoration: none; position: relative; z-index: 2; }
.archive-card .card-thumbnail { margin: calc(var(--s-5) * -1) calc(var(--s-5) * -1) var(--s-4); overflow: hidden; border-radius: var(--r-3) var(--r-3) 0 0; }
.archive-card .card-thumbnail img { width: 100%; height: auto; display: block; transition: transform .4s var(--ease, ease); }
.archive-card:hover { border-color: var(--amber-lo); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.archive-card:hover .card-thumbnail img { transform: scale(1.04); }
.archive-card h2 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; margin: 0.5rem 0 0.5rem; line-height: 1.25; color: var(--ink-1); }
.archive-card p { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; margin: 0 0 0.75rem; }
.archive-card time { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
/* registration marks on archive cards */
.archive-card::before, .archive-card::after {
  content: ""; position: absolute; width: 9px; height: 9px; z-index: 4; pointer-events: none;
  border-color: var(--amber-lo); border-style: solid; border-width: 0;
}
.archive-card::before { top: 6px; left: 6px; border-top-width: 1px; border-left-width: 1px; }
.archive-card::after { bottom: 6px; right: 6px; border-bottom-width: 1px; border-right-width: 1px; }
.archive-card .ev-tag {
  position: absolute; top: 6px; right: 6px; left: auto; z-index: 5;
  background: var(--bg-elev); color: var(--ink-4); border: 1px solid var(--border);
  border-radius: 3px; padding: 2px 6px; font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .08em; text-transform: uppercase; opacity: 1;
}

/* ---- Single post: related cards (.rc) ---- */
.rc { position: relative; overflow: hidden; }
.rc::before, .rc::after {
  content: ""; position: absolute; width: 8px; height: 8px; z-index: 3; pointer-events: none;
  border-color: var(--amber-lo); border-style: solid; border-width: 0;
}
.rc::before { top: 6px; left: 6px; border-top-width: 1px; border-left-width: 1px; }
.rc::after { bottom: 6px; right: 6px; border-bottom-width: 1px; border-right-width: 1px; }
.rc:hover { border-color: var(--amber-lo); }
.rcls { font-family: var(--font-mono); font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--amber); }
.rrm { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; color: var(--ink-3); margin-top: auto; padding-top: var(--s-3); }

/* ---- Author box + share + newsletter: subtle registration corners ---- */
.leth-author-box::after,
.share-block::after,
.leth-newsletter::after {
  content: ""; position: absolute; bottom: 6px; right: 6px; width: 8px; height: 8px; z-index: 2; pointer-events: none;
  border-color: var(--amber-lo); border-style: solid; border-width: 0 1px 1px 0;
}
.leth-author-name { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; color: var(--ink-1); }
.leth-newsletter-cta {
  display: inline-block; font-family: var(--font-mono); font-size: var(--fs-sm); letter-spacing: .05em; text-transform: uppercase;
  color: var(--bg); background: var(--amber); padding: 12px 24px; border-radius: 4px; text-decoration: none;
  transition: background .2s var(--ease, ease), transform .2s var(--ease, ease);
}
.leth-newsletter-cta:hover { background: var(--amber-hi); transform: translateY(-2px); }

/* ---- Archive header (archive.php) ---- */
.archive-header .sh { position: relative; }
.archive-header .sh::before {
  content: ""; position: absolute; top: -6px; left: -6px; width: 10px; height: 10px; z-index: 2; pointer-events: none;
  border-color: var(--amber-lo); border-style: solid; border-width: 1px 0 0 1px;
}

@media (prefers-reduced-motion: reduce) {
  .archive-card:hover, .rc:hover, .leth-newsletter-cta:hover { transform: none; }
  .archive-card .card-thumbnail img, .ac-thumb img { transition: none; }
}

/* ---- Category empty state ---- */
.leth-category .archive-empty,
.leth-category p[style*="text-align:center"] {
  color: var(--ink-2);
  padding: 4rem 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.05em;
}
/* KINETICS spring-physics micro-interactions */
.btn,button,.leth-newsletter-cta,input[type="submit"]{transition:transform .15s cubic-bezier(.34,1.56,.64,1),background .2s ease}
.btn:active,button:active,.leth-newsletter-cta:active,input[type="submit"]:active{transform:scale(.94);transition:transform .12s cubic-bezier(.34,1.56,.64,1)}
.archive-card:hover,.fs-card:hover,.ac-item:hover,.rc:hover,.card:hover{transform:translateY(-6px);transition:transform .4s cubic-bezier(.34,1.56,.64,1),box-shadow .3s ease;box-shadow:0 12px 32px rgba(0,0,0,.4)}
.archive-card .card-thumbnail img,.fs-card img,.ac-item img,.post-thumbnail img,.entry-content img{transition:transform .5s cubic-bezier(.16,1,.3,1)}
.archive-card:hover .card-thumbnail img,.fs-card:hover img,.ac-item:hover img,.post-thumbnail:hover img{transform:scale(1.05)}
.entry-content a,.post-content a{text-decoration:none;background-image:linear-gradient(currentColor,currentColor);background-position:0 100%;background-repeat:no-repeat;background-size:0% 1px;transition:background-size .4s cubic-bezier(.16,1,.3,1),color .2s ease}
.entry-content a:hover,.post-content a:hover{background-size:100% 1px}
.toast{transform:translate(-50%,140%) scale(.9);opacity:0;transition:transform .55s cubic-bezier(.18,1.25,.4,1),opacity .3s}
.toast.show{transform:translate(-50%,0) scale(1);opacity:1}
.leth-newsletter-cta:focus-visible,input:focus,textarea:focus,select:focus{outline:none;box-shadow:0 0 0 3px rgba(232,220,200,.3);transition:box-shadow .2s ease}
