/* Sections below the hero, round 2 (night). Each one has its own shape:
   work = heading band, the board of 21 lit like the floor, five lines under it;
   maniot = heading row, two shelves of lit tiles; background = one compact strip;
   off the clock = a pull quote with three line drawings; online + contact = the front desk. */

.sec { border-bottom: 1px solid var(--rule); }
h3, h4 { margin: 0; }
.h2-small { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.8rem); }
.sec .lede { max-width: 56ch; color: var(--text); }
.sec-link { margin: 0; }
.sec-link a { font-size: 1.0625rem; }
.sec-foot { color: var(--muted); max-width: 70ch; margin: 0; }

/* ---------- Healthcare IT: the board ---------- */
.sec-work { padding-block: clamp(56px, 7vw, 96px) clamp(48px, 6vw, 80px); }
.work-head { display: grid; gap: 18px; margin-bottom: clamp(28px, 4vw, 44px); }
.work-head .lede { font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); line-height: 1.5; }
.board { position: relative; }
.board-title { font: 500 var(--t-mono)/1.4 var(--mono); color: var(--muted); margin-bottom: 12px; }
.board-grid {
  list-style: none; margin: 0; padding: 1px; display: grid; gap: 1px; background: var(--wall);
  grid-template-columns: repeat(3, minmax(0, 1fr)); box-shadow: 0 0 0 1px #88A6CC;
}
.board-grid li {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 84px; padding: 8px 8px 10px;
  background: radial-gradient(130% 120% at 50% 65%, var(--lit-in), var(--lit-out));
}
.b-dept { font-weight: 650; font-size: clamp(.75rem, .7rem + .2vw, .875rem); line-height: 1.25; color: var(--lit-ink); }
.b-app {
  align-self: flex-start; padding: 3px 7px 2px; background: var(--sign-plate); color: var(--sign);
  font: 800 clamp(1.05rem, .85rem + .8vw, 1.6rem)/1.05 var(--display); letter-spacing: .01em;
  text-shadow: 0 0 10px rgba(80, 240, 170, .7); overflow-wrap: anywhere;
}
/* with JavaScript the board follows the floor: a tile is dark until its room goes live */
.board.is-sync li:not(.is-on) { background: var(--night-2); }
.board.is-sync li:not(.is-on) .b-dept { color: #A3B4C6; }
.board.is-sync li:not(.is-on) .b-app { background: transparent; color: #8AA0B8; text-shadow: none; padding-inline: 0; }
.board.is-sync li.is-on { animation: catch .32s steps(1, end); }
@keyframes catch { 0% { filter: brightness(.35); } 20% { filter: brightness(1); } 40% { filter: brightness(.45); } 65% { filter: brightness(1.05); } }

.five { list-style: none; margin: clamp(28px, 4vw, 40px) 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.five li { padding: 14px 0 14px 22px; border-bottom: 1px solid var(--rule); position: relative; font-size: 1.0625rem; line-height: 1.5; color: var(--text); }
.five li::before { content: ""; position: absolute; left: 0; top: 21px; width: 9px; height: 9px; background: var(--window); box-shadow: 0 0 10px rgba(255, 197, 107, .7); }
.five .five-lead { font-size: 1.1875rem; font-weight: 600; color: var(--paper); }

/* ---------- Maniot: shelves of lit tiles ---------- */
.sec-maniot { padding-block: clamp(56px, 7vw, 96px) clamp(44px, 5vw, 72px); background: linear-gradient(to bottom, rgba(11, 21, 32, .0), rgba(11, 21, 32, .9) 40%, rgba(11, 21, 32, .9)); }
.maniot-head { display: grid; gap: 18px; margin-bottom: clamp(28px, 4vw, 48px); }
.maniot-head .lede { margin-bottom: 12px; }
.shelf-title { font: 500 var(--t-mono)/1.4 var(--mono); color: var(--muted); margin: 0 0 12px; }
.shelf { list-style: none; margin: 0 0 clamp(28px, 4vw, 44px); padding: 0 0 14px; display: grid; gap: 14px; position: relative; border-bottom: 3px solid #2C4058; }
.shelf::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: linear-gradient(90deg, transparent, rgba(255, 197, 107, .55), transparent); }
.shelf li {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 14px; row-gap: 2px; align-content: start;
  padding: 16px; border: 1px solid var(--rule); background:
    radial-gradient(90% 70% at 50% 0%, rgba(255, 197, 107, .16), transparent 70%), var(--night-2);
  transition: border-color .2s, background-color .2s;
}
.shelf li:hover, .shelf li:focus-within { border-color: rgba(255, 197, 107, .7); background-color: #101E2D; }
.shelf img { grid-row: 1 / span 3; width: 56px; height: 56px; border-radius: 22%; box-shadow: 0 6px 22px rgba(255, 197, 107, .18); }
.shelf-apps img { width: 64px; height: 64px; }
.t-name { font: 800 1.5rem/1.05 var(--display); letter-spacing: .01em; color: var(--paper); text-decoration: none; padding-top: 2px; }
.t-name::after { content: ""; position: absolute; inset: 0; }
.t-name:hover { color: var(--white); text-decoration: underline; text-decoration-thickness: 2px; }
.t-name:focus-visible { outline: none; }
.t-name:focus-visible::after { outline: 3px solid var(--signal); outline-offset: 2px; }
.t-what { color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.t-more { position: relative; z-index: 1; justify-self: start; margin-top: 6px; font-size: .875rem; font-weight: 650; padding-block: 4px; }
.sec-maniot .sec-foot { margin-top: 4px; }

/* ---------- Background: one strip ---------- */
.sec-bg { padding-block: clamp(36px, 4.5vw, 56px); }
.bg-in { display: grid; gap: 16px; }
.strip { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--wall); border-bottom: 1px solid var(--wall); }
.strip div { padding: 12px 14px 14px 0; border-bottom: 1px solid var(--rule); }
.strip div:nth-last-child(-n+2) { border-bottom: 0; }
.strip dt { font: 500 .8125rem/1.3 var(--mono); color: var(--muted); }
.strip dd { margin: 4px 0 0; font-weight: 680; font-size: 1.0625rem; line-height: 1.3; color: var(--paper); }

/* ---------- Off the clock: a pull quote ---------- */
.sec-off { padding-block: clamp(56px, 7vw, 104px); }
.off-in { display: grid; gap: 20px 56px; align-items: end; }
.off-text { margin: 0; font-size: clamp(1.45rem, 1.05rem + 1.6vw, 2.5rem); line-height: 1.28; font-weight: 520; letter-spacing: -0.012em; color: var(--paper); max-width: 30ch; text-wrap: pretty; }
.sketches { display: flex; gap: 18px; align-items: flex-end; }
.sk { height: 124px; width: auto; fill: none; stroke: #8EA9CC; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sk-moto { height: 104px; }
html.dawn .sk { stroke: #C9B58F; transition: stroke 4s; }

/* ---------- The front desk: online + contact ---------- */
.desk { position: relative; padding-block: clamp(48px, 6vw, 88px); }
.desk::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--window) 20%, var(--window) 80%, transparent); box-shadow: 0 0 24px 2px rgba(255, 197, 107, .35); }
.desk-in { display: grid; gap: 40px; }
.sec-online, .sec-contact { min-width: 0; display: grid; gap: 18px; align-content: start; }
.directory { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wall); }
.directory li { display: grid; gap: 2px; padding: 11px 0 12px; border-bottom: 1px solid var(--rule); }
.d-name { font-weight: 700; font-size: 1.125rem; line-height: 1.3; overflow-wrap: anywhere; justify-self: start; padding-block: 2px; }
.d-what { color: var(--muted); font-size: .9375rem; }

.sec-contact { background: var(--blue); color: var(--white); padding: clamp(22px, 3vw, 36px); box-shadow: 0 0 0 1px #3658B0, 0 18px 60px rgba(31, 60, 136, .35); }
.sec-contact .h2 { color: var(--white); }
.sec-contact a { color: var(--white); }
.mail-main { margin: 0; }
.mail-main a { font-size: clamp(1.05rem, .55rem + 1.9vw, 1.75rem); line-height: 1.25; text-decoration-thickness: 2px; overflow-wrap: anywhere; }
.aliases { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(200, 211, 238, .45); }
.aliases li { display: grid; gap: 2px; padding: 11px 0; border-bottom: 1px solid rgba(200, 211, 238, .45); }
.aliases a { font-size: .9375rem; overflow-wrap: anywhere; justify-self: start; padding-block: 2px; }
.aliases span { color: var(--haze); font-size: .9375rem; }
.contact-note { margin: 0; color: var(--white); }

/* ---------- 404 ---------- */
.nf { min-height: calc(78svh - var(--header)); display: grid; align-items: center; padding-block: 48px; }
.nf-in { display: grid; gap: 28px; align-items: center; }
.nf h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 5.2rem); line-height: .88; text-transform: uppercase; }
.nf .lede { max-width: 44ch; color: var(--muted); margin: 18px 0 22px; }
.nf-art { width: 100%; max-width: 420px; }
.nf-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wall); max-width: 30rem; }
.nf-links li { border-bottom: 1px solid var(--rule); }
.nf-links a { display: block; padding: 11px 0; font-size: 1.125rem; font-weight: 680; }

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .board-grid li { padding: 10px 12px 12px; min-height: 96px; }
  .shelf-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf-games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip div:nth-last-child(-n+3) { border-bottom: 0; }
}
@media (min-width: 900px) {
  .board-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .board-grid li { min-height: 116px; }
  .five { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; border-top: 0; }
  .five li { border-bottom: 0; border-top: 1px solid var(--rule); padding: 16px 0 0 22px; }
  .five li::before { top: 23px; }
  .five .five-lead { grid-column: 1 / -1; padding-bottom: 16px; font-size: 1.3125rem; max-width: 70ch; }
  .work-head, .maniot-head { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; column-gap: 48px; }
  .shelf-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shelf-apps li { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .shelf-apps img { grid-row: auto; margin-bottom: 12px; }
  .shelf-games { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .strip div { border-bottom: 0; border-left: 1px solid var(--rule); padding: 12px 16px 14px; }
  .strip div:first-child { border-left: 0; padding-left: 0; }
  .bg-in { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 40px; }
  .off-in { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
  .off-in .h2 { grid-column: 1 / -1; }
  .sketches { justify-content: flex-end; padding-bottom: 8px; }
  .desk-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(32px, 4vw, 64px); align-items: start; }
  .nf-in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
@media (min-width: 1200px) {
  .shelf-games { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
  .shelf-games li { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; padding: 14px; }
  .shelf-games img { grid-row: auto; margin-bottom: 10px; }
  .shelf-games .t-name { font-size: 1.3rem; }
  .shelf-games .t-what { font-size: .875rem; }
}
@media (max-width: 400px) {
  .board-grid li { padding: 7px 6px 8px; }
  .b-app { font-size: .92rem; padding: 2px 4px 1px; overflow-wrap: normal; letter-spacing: 0; }
}
@media (max-width: 380px) {
  .sketches { gap: 12px; }
  .sk { height: 64px; } .sk-moto { height: 54px; }
}
