/* ============================================================
   WordPress Checklists – styles
   Colours and fonts are set as variables below, so you can
   change the whole look in one place.
   ============================================================ */

:root {
  --paper: #f4f6fa;
  --surface: #ffffff;
  --ink: #141a2b;
  --ink-soft: #4a5470;
  --pine: #22325c;
  --pine-deep: #131a2e;
  --moss: #2f7bc0;
  --mist: #e0e6f0;
  --line: #c8d1e0;
  --sun: #f2a93b;
  --sun-soft: #fbe3b8;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --radius-lg: 18px;
  --radius-sm: 8px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Topographic contour pattern, used when an image is missing */
.no-image {
  background-color: var(--pine);
  background-image:
    repeating-radial-gradient(circle at 18% 120%, transparent 0 22px, rgba(255,255,255,.07) 22px 24px),
    repeating-radial-gradient(circle at 85% -10%, transparent 0 30px, rgba(255,255,255,.05) 30px 32px);
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  color: #fff;
  background: var(--pine-deep);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
  filter: blur(3px) saturate(.8);
  transform: scale(1.04);
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19,26,46,.78) 0%, rgba(19,26,46,.88) 55%, var(--pine-deep) 100%);
}

.hero__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) var(--gutter) clamp(40px, 6vw, 72px);
}

.hero__title {
  font-size: clamp(2.4rem, 6.5vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero__intro {
  max-width: 52ch;
  margin: 20px 0 0;
  font-size: 1.15rem;
  color: rgba(255,255,255,.86);
}

/* ---------- Trail (home) ---------- */

.trail {
  position: relative;
  margin: clamp(32px, 6vw, 64px) 0 0;
  aspect-ratio: 1000 / 160;
}

.trail__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.trail__base,
.trail__done {
  fill: none;
  stroke-linecap: round;
}

.trail__base {
  stroke: rgba(255,255,255,.35);
  stroke-width: 3;
  stroke-dasharray: 2 11;
}

.trail__done {
  stroke: var(--sun);
  stroke-width: 5;
  transition: stroke-dashoffset 1.2s cubic-bezier(.2,.7,.2,1);
}

.trail__points {
  list-style: none;
  margin: 0;
  padding: 0;
}

.trail__point {
  position: absolute;
  transform: translate(-50%, -50%);
}

.trail__dot {
  display: grid;
  place-items: center;
  width: clamp(36px, 5vw, 48px);
  height: clamp(36px, 5vw, 48px);
  border-radius: 50%;
  background: var(--pine-deep);
  border: 3px solid rgba(255,255,255,.7);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(.95rem, 1.6vw, 1.2rem);
  text-decoration: none;
}

a.trail__dot:hover { background: var(--pine); }

.is-active .trail__dot { border-color: var(--sun); }

.is-complete .trail__dot {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--pine-deep);
}

.is-locked .trail__dot {
  border-style: dashed;
  border-color: rgba(255,255,255,.35);
  color: rgba(255,255,255,.5);
}

.trail__caption {
  position: absolute;
  left: 0;
  bottom: -36px;
  font-size: .95rem;
  color: rgba(255,255,255,.75);
}

/* ---------- Module rows (home) ---------- */

.page-home { background: var(--pine-deep); color: #fff; }
.page-home .site-footer { color: rgba(255,255,255,.6); }

.modules {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 88px) var(--gutter) 24px;
}

.modules__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}

.card__link {
  display: grid;
  grid-template-columns: clamp(150px, 22vw, 240px) 1fr auto;
  align-items: stretch;
  border: 3px solid rgba(255,255,255,.55);
  border-radius: 22px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease;
}

a.card__link:hover {
  border-color: #fff;
  background: rgba(255,255,255,.04);
}

a.card__link:hover .card__arrow { transform: translateX(4px); }

.card__media {
  position: relative;
  background: var(--pine);
  min-height: 132px;
}

.card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__media.no-image[data-module="4"] { background-color: #2a3a66; }
.card__media.no-image[data-module="5"] { background-color: #233158; }
.card__media.no-image[data-module="6"] { background-color: #1c2747; }

.card__number {
  position: absolute;
  left: 14px;
  bottom: 4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.6rem;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}

.card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px clamp(18px, 3vw, 34px);
  min-width: 0;
}

.card__title {
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card__summary {
  margin: 6px 0 14px;
  color: rgba(255,255,255,.72);
  max-width: 60ch;
}

.card__meter {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card__bar {
  flex: 1;
  max-width: 320px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,.16);
  overflow: hidden;
}

.card__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--moss);
  border-radius: inherit;
}

.card--complete .card__fill { background: var(--sun); }

.card__status {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
}

.card--complete .card__status { color: var(--sun); }

.card__arrow {
  display: grid;
  place-items: center;
  padding: 0 clamp(18px, 3vw, 34px) 0 6px;
  transition: transform .2s ease;
}

.card__arrow svg { width: 26px; height: 26px; }

.card--locked .card__link {
  border-style: dashed;
  border-color: rgba(255,255,255,.25);
}

.card--locked .card__media { opacity: .4; }
.card--locked .card__title,
.card--locked .card__summary,
.card--locked .card__status { color: rgba(255,255,255,.5); }
.card--locked .card__bar { display: none; }

@media (max-width: 640px) {
  .card__link { grid-template-columns: 1fr auto; }
  .card__media { grid-column: 1 / -1; min-height: 0; aspect-ratio: 16 / 7; }
  .card__body { padding: 18px 0 20px 18px; }
  .card__meter { flex-wrap: wrap; gap: 8px 12px; }
  .card__bar { flex-basis: 100%; max-width: none; }
}

/* ---------- Module header ---------- */

.module-head {
  position: relative;
  color: #fff;
  background: var(--pine-deep);
  overflow: hidden;
}

.module-head__media {
  position: absolute;
  inset: 0;
}

.module-head__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.module-head__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19,26,46,.5), rgba(19,26,46,.9));
}

.module-head__inner {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 28px var(--gutter) clamp(40px, 6vw, 64px);
}

.back-link {
  display: inline-block;
  margin-bottom: clamp(32px, 6vw, 56px);
  color: rgba(255,255,255,.85);
  font-weight: 700;
  text-underline-offset: 4px;
}

.back-link::before { content: "← "; }

.module-head__number {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--sun);
}

.module-head__title {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.module-head__summary {
  margin: 14px 0 0;
  max-width: 52ch;
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
}

/* ---------- Sticky progress bar ---------- */

.progress-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244,246,250,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.progress-bar__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "track track"
    "label actions";
  gap: 10px 16px;
  align-items: center;
}

.progress-bar__track {
  grid-area: track;
  height: 12px;
  border-radius: 99px;
  background: var(--mist);
  overflow: hidden;
}

.progress-bar__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--moss);
  transition: width .35s ease, background-color .35s ease;
}

.is-complete .progress-bar__fill { background: var(--sun); }

.progress-bar__label {
  grid-area: label;
  margin: 0;
  font-weight: 700;
  color: var(--pine);
}

.progress-bar__actions {
  grid-area: actions;
  display: flex;
  gap: 6px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--pine);
  border: 1px solid var(--line);
}

.btn--ghost:hover { border-color: var(--pine); }

.btn--ghost[aria-pressed="false"] { color: var(--ink-soft); }

.btn--solid {
  background: var(--pine);
  color: #fff;
  border: 0;
  padding: 12px 20px;
  font-size: 1rem;
}

.btn--solid:hover { background: var(--pine-deep); }

/* ---------- Checklist ---------- */

.checklist {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px var(--gutter) 24px;
}

.phase { margin-top: clamp(36px, 5vw, 56px); }

.phase__title {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 800;
  color: var(--pine);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--pine);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
}

.step__head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.step__number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--pine);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--pine);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

.step.is-done .step__number {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--pine-deep);
}

.step__title {
  font-size: 1.2rem;
  font-weight: 700;
}

.step__count {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.items {
  list-style: none;
  margin: 0;
  padding: 0 0 0 58px;
}

.item { position: relative; }

.item input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.item label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.item label:hover { background: var(--mist); }

.item__box {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border: 2px solid var(--pine);
  border-radius: 6px;
  background: var(--surface);
  display: grid;
  place-items: center;
  transition: background-color .15s ease, border-color .15s ease;
}

.item__box::after {
  content: "";
  width: 6px;
  height: 12px;
  border: solid var(--surface);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) translate(-1px, -1px) scale(0);
  transition: transform .15s ease;
}

.item input:checked + label .item__box {
  background: var(--moss);
  border-color: var(--moss);
}

.item input:checked + label .item__box::after {
  transform: rotate(45deg) translate(-1px, -1px) scale(1);
}

.item input:checked + label .item__label {
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--moss);
  text-decoration-thickness: 2px;
}

.item input:focus-visible + label {
  outline: 3px solid var(--sun);
  outline-offset: 0;
}

.item__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item__tip {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .85rem;
  background: var(--mist);
  color: var(--pine-deep);
  padding: 6px 10px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

/* ---------- Completion ---------- */

.complete {
  position: relative;
  max-width: 820px;
  margin: 40px auto 0;
  padding: clamp(40px, 6vw, 64px) var(--gutter);
  text-align: center;
  background: var(--pine);
  color: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 880px) {
  .complete { width: calc(100% - 2 * var(--gutter)); }
}

.complete__sun {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 16px rgba(242,169,59,.2), 0 0 0 34px rgba(242,169,59,.1);
}

.complete__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
}

.complete__text {
  margin: 10px 0 26px;
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
}

.complete .btn--solid {
  background: var(--sun);
  color: var(--pine-deep);
}

.complete .btn--solid:hover { background: var(--sun-soft); }

/* One celebratory moment: the sun rises */
.is-celebrating .complete__sun {
  animation: sunrise 1.1s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes sunrise {
  from { transform: translateY(80px) scale(.6); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) 56px;
  color: var(--ink-soft);
  font-size: .9rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  .progress-bar__inner {
    grid-template-areas:
      "track track"
      "label label"
      "actions actions";
  }
  .items { padding-left: 0; }
  .step__head { grid-template-columns: 38px 1fr auto; gap: 12px; }
  .step__number { width: 38px; height: 38px; }
  .trail__caption { bottom: -40px; }
  .trail__base { stroke-width: 6; stroke-dasharray: 4 18; }
  .trail__done { stroke-width: 10; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Print ---------- */

@media print {
  body { background: #fff; font-size: 11pt; }
  .module-head { background: none; color: #000; }
  .module-head__media,
  .back-link,
  .progress-bar__actions,
  .progress-bar__track,
  .complete,
  .site-footer { display: none !important; }
  .module-head__inner { padding: 0 0 12pt; max-width: none; margin: 0; }
  .module-head__number { color: #000; }
  .module-head__summary { color: #333; }
  .progress-bar { position: static; background: none; border: 0; }
  .progress-bar__inner { padding: 0; }
  .checklist { padding: 0; max-width: none; }
  .phase { margin-top: 18pt; break-inside: auto; }
  .step { break-inside: avoid; padding: 10pt 0; }
  .item label { padding: 3pt 0; margin: 0; }
  .item label:hover { background: none; }
  .item__box { border-color: #000; }
  .item input:checked + label .item__box { background: #000; }
  .item__tip { background: #f2f2f2; }
}
