/* =============================================================================
   themes/nwmphn.css — North Western Melbourne PHN case study
   -----------------------------------------------------------------------------
   Art direction: "the manual". Ruled paper with a red-line margin drawn in
   sumi, a title card for the manual, and a contents page that is really a list
   of what I built. Quiet, legible, structured — the qualities of the work.
   ============================================================================= */

.manual-paper {
  background:
    repeating-linear-gradient(180deg, transparent 0 35px, rgba(18, 16, 21, .06) 35px 36px),
    linear-gradient(90deg, transparent 0 calc(var(--gutter) + 56px), rgba(18, 16, 21, .14) calc(var(--gutter) + 56px) calc(var(--gutter) + 57px), transparent 0),
    var(--bone);
}
.nw-hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px clamp(16px, 2.6vw, 44px); align-items: center; }
.nw-hero__id { grid-column: 1 / span 6; }
.nw-hero__doc { grid-column: 8 / span 5; }
@media (max-width: 960px) { .nw-hero__id, .nw-hero__doc { grid-column: 1 / -1; } }

/* Cover sheet of the manual (generic — no internal content shown) */
.cover {
  position: relative;
  aspect-ratio: 1 / 1.414;           /* A4 */
  max-height: 72vh;
  margin-inline: auto;
  padding: 9% 10%;
  background: #f8f4ec;
  box-shadow: 0 1px 0 rgba(18, 16, 21, .1), 12px 12px 0 -1px #f3eee4, 12px 12px 0 0 rgba(18, 16, 21, .14), 24px 24px 0 -1px #efe9de, 24px 24px 0 0 rgba(18, 16, 21, .1), 0 40px 80px rgba(18, 16, 21, .16);
  display: grid;
  align-content: space-between;
  color: var(--sumi);
}
.cover .org-plate { width: 46%; padding: 6px 8px; }
.cover__title { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.6rem); line-height: 1.02; }
.cover__meta { display: grid; gap: 6px; font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: rgba(18, 16, 21, .65); border-top: 1.5px solid var(--sumi); padding-top: 12px; }

/* Contents page — what I built, with "page" references */
.contents { list-style: none; padding: 0; border-top: 1.5px solid var(--sumi); }
.contents li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 4px 14px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.contents .numeral { font-size: 1.3rem; padding-top: .1em; }
.contents__row { display: flex; align-items: baseline; gap: 10px; }
.contents__row h3 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.9rem); line-height: 1.1; }
.contents__row i { flex: 1; min-width: 20px; border-bottom: 1.5px dotted var(--rule-strong); transform: translateY(-6px); }
.contents__row b { font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; }
.contents li p { grid-column: 2; color: var(--text-soft); max-width: 64ch; }

/* Capabilities as margin notes */
.margin-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 22px 36px; }
.margin-note { border-left: 2px solid var(--sumi); padding: 4px 0 4px 16px; display: grid; gap: 6px; }
.margin-note h3 { font-size: 1.4rem; line-height: 1.1; }
.margin-note p { color: var(--text-soft); font-size: 1.05rem; }


/* ---- The world: the PHN's navy, a blueprint, the manual and the code ---------
   Navy #0C3C66 from the logo, a blueprint grid, the manual's title card on it,
   and a code window for the staff wiki I built by hand, whose lines type in. */
.world--phn {
  background:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(60vw 60vh at 75% 30%, #13507F, transparent 70%),
    linear-gradient(160deg, #0C3C66, #072641 80%);
}
.world--phn .nw-hero__doc { position: relative; }
.world--phn .cover { box-shadow: 0 1px 0 rgba(0, 0, 0, .1), 12px 12px 0 -1px #f3eee4, 24px 24px 0 -1px #e9e3d8, 0 50px 90px rgba(0, 0, 0, .45); }
.nw-code {
  position: absolute;
  left: -14%;
  bottom: 8%;
  width: 70%;
  background: #061C31;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.nw-code__bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.nw-code__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .28); }
.nw-code__bar span { margin-left: auto; font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: .74rem; color: rgba(255, 255, 255, .5); }
.nw-code code { display: grid; gap: 4px; padding: 16px 18px 20px; font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: clamp(.78rem, .6rem + .4vw, .98rem); line-height: 1.4; color: #CFE3F5; white-space: pre; }
.nw-code__caret { display: inline-block; width: .55em; height: 1.05em; margin-left: .15em; vertical-align: -.15em; background: #CFE3F5; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.calm) .nw-code code span { animation: nw-type .5s steps(4, end) calc(.7s + var(--n) * .34s) both; }
  html:not(.calm) .nw-code__caret { animation: nw-caret 1.1s steps(2, jump-none) infinite; }
}
@keyframes nw-type { from { opacity: 0; } to { opacity: 1; } }
@keyframes nw-caret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (max-width: 960px) { .nw-code { position: relative; left: auto; bottom: auto; width: auto; margin-top: 24px; } }
