/* =====================================================================
   ERGOSPHERE - HOME PAGE HOOKS (index.html), namespace .ehk_
   Built 12 Nov 2026 to surface three pages that were footer-only or a
   single text link. Each hook borrows the real material of the page it
   points to, so it reads as a preview, not an advert:

     1. THE FOLDER (Problem section) -> one-file.html
        Real file names from that page's folder (29 items) collapse into
        its one project file. Amber marks "which one is current?", the
        same job amber does on one-file.html; cyan is the ErgoSphere file.
     2. THE BRIEF (end of the Library section) -> need-advice.html
        The three questions of that page's form, filled with the form's
        own placeholder examples. Pewter is Need Advice's page accent;
        its button stays filled pewter (grey must never read disabled).
     3. THE RECORDS (Trust section) -> verification.html, engineering.html
        Two cards drawn as a controlled document's title block. The
        verification card quotes one DATED executed result (REBA, 240 of
        240, 27 Aug 2026, from that page's own meta). The register card
        lists the five document series, never a count, so it cannot go
        stale when documents are added. Never add a fail figure, a count
        or an undated claim here; see engineering.html's rules.

   Colours: #0a1628 navy, #0d1a2d raised, #070e1b well, #00d4ff cyan,
   #f5b249 amber, #8fa3bd pewter (#b9c9db light). Type: Poppins heads,
   Mulish body, IBM Plex Mono for file names, labels and codes.
   No em dashes. Reduced motion: no transforms.
   ===================================================================== */

/* ---------- 1. the folder ---------- */
/* the theme sets letter-spacing on body; these hooks set their own */
.ehk_folder, .ehk_brief, .ehk_records { letter-spacing: normal; }
.ehk_folder {
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.3fr) minmax(0, .7fr); align-items: center; gap: 30px;
  margin: 56px 0 64px; padding: 24px 28px; border-radius: 12px; text-decoration: none; color: inherit;
  background: #070e1b; border: 1px solid rgba(255,255,255,.09);
  transition: border-color .3s ease, box-shadow .3s ease;
}
.ehk_folder:hover, .ehk_folder:focus-visible { border-color: rgba(0,212,255,.45); box-shadow: 0 0 0 1px rgba(0,212,255,.12), 0 18px 50px rgba(0,0,0,.35); outline: none; }
.ehk_folder_k b { display: block; font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 700; color: #fff; line-height: 1.25; }
.ehk_folder_k .ehk_say { display: grid; margin-top: 8px; }
/* the line answers its own question as the files merge: both lines share one
   grid cell, so the card never changes height; timings match the merge */
.ehk_say > span {
  grid-area: 1 / 1; display: block; font-family: 'Mulish', sans-serif; font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.62);
  transition: opacity .3s ease, transform .3s ease;
}
.ehk_say_a { opacity: 1; transform: none; transition-delay: .3s; }
.ehk_say_b { opacity: 0; transform: translateY(6px); transition-delay: 0s; }
.ehk_say_b { color: #e6f8ff; }
.ehk_folder:is(:hover, :focus-visible) .ehk_say_a { opacity: 0; transform: translateY(-6px); transition-delay: 0s; }
.ehk_folder:is(:hover, :focus-visible) .ehk_say_b { opacity: 1; transform: none; transition-delay: .38s; }

/* the pile: six rows on a fixed 23px pitch, so the merge can aim at the
   middle (row 2.5) with plain arithmetic */
.ehk_pile { position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ehk_f {
  display: flex; align-items: center; gap: 9px; min-width: 0; height: 18px; letter-spacing: 0;
  font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 12px; font-weight: 500; color: rgba(230,236,245,.8);
}
.ehk_f b { flex: 0 0 auto; width: 9px; height: 11px; border-radius: 1.5px; background: var(--ehk-ft, #8a96a8); }
.ehk_f span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ehk_f i { flex: 0 0 auto; font-style: normal; font-size: 10px; font-weight: 600; color: #0a1628; background: #f5b249; border-radius: 3px; padding: 0 4px; line-height: 15px; }
.ehk_xlsx { --ehk-ft: #21a366; }
.ehk_docx { --ehk-ft: #2b7cd3; }
.ehk_vsdx { --ehk-ft: #3955a3; }
.ehk_pdf  { --ehk-ft: #e5473b; }
.ehk_more { font-size: 11px; color: rgba(255,255,255,.38); padding-left: 18px; }

/* THE MERGE. Mouse away (the resting state): the files break apart and
   return, staggered from the middle outward, after the one file has gone.
   Mouse over: the outer rows lead, everything draws to the middle, shrinks
   and fades, and the one file arrives where they met. */
.ehk_pile > .ehk_f {
  transform: none; opacity: 1;
  transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .4s ease;
  transition-delay: calc(.18s + var(--ehk-out, 0) * .05s);
}
.ehk_pile > .ehk_f:nth-child(1), .ehk_pile > .ehk_f:nth-child(6) { --ehk-out: 2; }
.ehk_pile > .ehk_f:nth-child(2), .ehk_pile > .ehk_f:nth-child(5) { --ehk-out: 1; }
.ehk_folder:is(:hover, :focus-visible) .ehk_pile > .ehk_f {
  transform: translateY(calc((2.5 - var(--i)) * 23px)) scale(.86); opacity: 0;
  transition: transform .5s cubic-bezier(.6,0,.4,1), opacity .35s ease .15s;
  transition-delay: calc((2 - var(--ehk-out, 0)) * .04s);
}
.ehk_merge {
  position: absolute; left: 0; right: 0; top: 50%; display: flex; justify-content: flex-start;
  transform: translateY(-50%) scale(.9); opacity: 0; pointer-events: none;
  transition: transform .25s ease, opacity .2s ease; transition-delay: 0s;
}
.ehk_merge .ehk_f {
  height: auto; padding: 11px 14px; border-radius: 8px; color: #fff; font-size: 13px;
  border: 1px solid rgba(0,212,255,.5); background: rgba(0,212,255,.08); box-shadow: 0 0 0 0 rgba(0,212,255,0);
}
.ehk_merge .ehk_f b { background: #00d4ff; }
.ehk_folder:is(:hover, :focus-visible) .ehk_merge {
  transform: translateY(-50%) scale(1); opacity: 1;
  transition: transform .45s cubic-bezier(.2,.9,.25,1.15), opacity .3s ease; transition-delay: .38s;
}
.ehk_folder:is(:hover, :focus-visible) .ehk_merge .ehk_f { box-shadow: 0 0 28px 0 rgba(0,212,255,.22); transition: box-shadow .6s ease .5s; }

/* the tally: 29 dims and the 1 lights as the files become one */
.ehk_one { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ehk_tally { font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 13px; letter-spacing: 0; color: rgba(255,255,255,.5); white-space: nowrap; }
.ehk_tally b { font-family: 'Poppins', sans-serif; font-size: 30px; font-weight: 700; line-height: 1; vertical-align: -3px; transition: color .4s ease, opacity .4s ease; }
.ehk_tally .is-many { color: #fff; }
.ehk_tally .is-one { color: rgba(255,255,255,.35); }
.ehk_tally em { font-style: normal; color: #00d4ff; margin: 0 4px; }
.ehk_folder:is(:hover, :focus-visible) .ehk_tally .is-many { opacity: .35; }
.ehk_folder:is(:hover, :focus-visible) .ehk_tally .is-one { color: #00d4ff; transition-delay: .38s; }
.ehk_go { font-family: 'Mulish', sans-serif; font-size: 14px; font-weight: 600; color: #00d4ff; }
.ehk_go em { font-style: normal; display: inline-block; margin-left: 6px; transition: margin .2s ease; }
.ehk_folder:hover .ehk_go em { margin-left: 12px; }

/* ---------- 2. the brief ---------- */
.ehk_brief {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 44px; align-items: center;
  margin-top: 72px; padding: 38px 42px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(143,163,189,.09), rgba(143,163,189,.02) 60%), #0d1a2d;
  border: 1px solid rgba(143,163,189,.28);
}
.ehk_brief_k { display: inline-flex; align-items: center; gap: 12px; font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: #8fa3bd; }
.ehk_brief_k::before { content: ''; width: 28px; height: 1px; background: #8fa3bd; opacity: .8; }
.ehk_brief h4 { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 700; color: #fff; line-height: 1.2; margin: 14px 0 0; }
.ehk_brief h4 span { color: #b9c9db; }
.ehk_brief_body { font-family: 'Mulish', sans-serif; font-size: 15px; line-height: 1.7; color: rgba(255,255,255,.7); margin: 14px 0 0; }
.ehk_brief_btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 13px 22px; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; text-decoration: none;
  background: #8fa3bd; color: #0a1628; border: 1px solid #8fa3bd; transition: background .2s ease, border-color .2s ease;
}
.ehk_brief_btn:hover, .ehk_brief_btn:focus-visible { background: #b9c9db; border-color: #b9c9db; color: #0a1628; outline: none; }
.ehk_brief_btn:focus-visible { box-shadow: 0 0 0 3px rgba(185,201,219,.4); }
.ehk_brief_btn span { transition: transform .2s ease; }
.ehk_brief_btn:hover span { transform: translateX(4px); }
.ehk_brief_note { letter-spacing: 0; display: block; margin-top: 12px; font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 11.5px; color: rgba(255,255,255,.45); }

/* the form, previewed: the three questions and the page's own examples */
.ehk_sheet { margin: 0; padding: 0; list-style: none; border-radius: 10px; background: #070e1b; border: 1px solid rgba(143,163,189,.2); overflow: hidden; }
.ehk_sheet li { padding: 16px 20px 15px; border-top: 1px solid rgba(143,163,189,.14); }
.ehk_sheet li:first-child { border-top: 0; }
.ehk_sheet b { display: block; font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: #8fa3bd; margin-bottom: 6px; }
.ehk_sheet span { display: block; font-family: 'Mulish', sans-serif; font-size: 15px; font-style: italic; line-height: 1.55; color: rgba(230,236,245,.82); }
.ehk_sheet li:last-child { background: rgba(143,163,189,.06); }
.ehk_sheet li:last-child span { color: #fff; }

/* ---------- 3. the records ---------- */
.ehk_records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 48px; }
.ehk_rec {
  display: flex; flex-direction: column; text-decoration: none; color: inherit; border-radius: 12px; overflow: hidden;
  background: #070e1b; border: 1px solid rgba(255,255,255,.12); transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.ehk_rec:hover, .ehk_rec:focus-visible { border-color: rgba(0,212,255,.5); transform: translateY(-3px); box-shadow: 0 22px 60px rgba(0,0,0,.4); outline: none; }
.ehk_rec_top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.02); }
.ehk_rec_top b { font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: #00d4ff; }
.ehk_rec_top span { letter-spacing: 0; font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 11px; color: rgba(255,255,255,.42); }
.ehk_rec_body { padding: 22px 20px 6px; }
.ehk_rec h5 { font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 700; color: #fff; margin: 0; line-height: 1.25; }
.ehk_rec p { font-family: 'Mulish', sans-serif; font-size: 14.5px; line-height: 1.65; color: rgba(255,255,255,.68); margin: 10px 0 0; }

/* the title block: labelled cells, the way a controlled document's is */
.ehk_tb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 20px 0; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; overflow: hidden; }
.ehk_tb div { padding: 10px 12px; border-right: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); min-width: 0; }
.ehk_tb div:nth-child(2n) { border-right: 0; }
.ehk_tb div:nth-last-child(-n+2) { border-bottom: 0; }
.ehk_tb small { display: block; font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 10px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.4); }
.ehk_tb span { display: block; margin-top: 3px; letter-spacing: 0; font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 500; color: #e6ecf5; }
.ehk_tb .is-hit span { color: #00d4ff; font-weight: 600; }

/* the register card lists its series instead: code, then what it holds */
.ehk_series { margin: 18px 20px 0; padding: 0; list-style: none; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; overflow: hidden; }
.ehk_series li { letter-spacing: 0; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; padding: 8px 12px; border-top: 1px solid rgba(255,255,255,.08); font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 12.5px; }
.ehk_series li:first-child { border-top: 0; }
.ehk_series b { font-weight: 600; color: #00d4ff; }
.ehk_series span { color: rgba(230,236,245,.8); }

.ehk_rec_go { margin-top: auto; padding: 18px 20px 20px; font-family: 'Mulish', sans-serif; font-size: 14px; font-weight: 600; color: #00d4ff; }
.ehk_rec_go em { font-style: normal; display: inline-block; margin-left: 4px; transition: margin .2s ease; }
.ehk_rec:hover .ehk_rec_go em { margin-left: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .ehk_folder { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
  .ehk_folder_k { grid-column: 1 / -1; }
  .ehk_brief { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 30px 28px; }
  .ehk_records { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .ehk_folder { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px; margin: 40px 0 48px; }
  .ehk_brief { margin-top: 48px; padding: 24px 18px; }
  .ehk_brief h4 { font-size: 22px; }
  .ehk_tb span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  /* reduced motion: the merge becomes a plain crossfade, nothing moves */
  .ehk_folder:is(:hover, :focus-visible) .ehk_pile > .ehk_f { transform: none; }
  .ehk_say > span, .ehk_folder:is(:hover, :focus-visible) .ehk_say > span { transform: none; }
  .ehk_merge, .ehk_folder:is(:hover, :focus-visible) .ehk_merge { transform: translateY(-50%); }
  .ehk_rec, .ehk_go em, .ehk_rec_go em, .ehk_brief_btn span { transition: none; }
  .ehk_rec:hover, .ehk_brief_btn:hover span { transform: none; }
}
