/* JPC's Process Flow */
@font-face { font-family: "Fredericka the Great"; src: url(../fonts/fredericka-the-great-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Nunito Sans"; font-weight: 400; src: url(../fonts/nunito-sans-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Nunito Sans"; font-weight: 600; src: url(../fonts/nunito-sans-latin-600-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Nunito Sans"; font-weight: 700; src: url(../fonts/nunito-sans-latin-700-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Nunito Sans"; font-weight: 800; src: url(../fonts/nunito-sans-latin-800-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --brown: #826d62;
  --ink: #3a3533;
  --teal: #59c1a2;
  --teal-text: #2f9b7c;
  --orange: #ee9a2e;
  --rule: #c9c2bd;
  --bg: #fff;
  --sans: "Nunito Sans", "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --display: "Fredericka the Great", Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-text); }
a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.inner .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 3rem; }

/* ---------- brand ---------- */
.brand { font-weight: 700; letter-spacing: .08em; color: #b3a28f; text-decoration: none; font-size: .95rem; margin: 0; }
.brand span { color: #111; }

/* ---------- sidebar ---------- */
.phases { padding-top: 2rem; position: sticky; top: 0; align-self: start; }
.brand-sub { margin: .1rem 0 1.25rem; font-size: .8rem; color: var(--brown); text-transform: uppercase; letter-spacing: .1em; }
.phases ol { list-style: none; margin: 0; padding: 0; border-left: 2px dotted var(--rule); counter-reset: ph; }
.phases li { counter-increment: ph; }
.phases ol a { display: flex; gap: .6rem; padding: .45rem .75rem; text-decoration: none; color: var(--brown);
  font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; line-height: 1.3; margin-left: -2px; border-left: 3px solid transparent; }
.phases ol a::before { content: counter(ph); color: var(--rule); min-width: 1ch; }
.phases ol a:hover { color: var(--teal-text); }
.phases ol a.current { border-left-color: var(--orange); color: var(--orange); }
.phases ol a.current::before { color: var(--orange); }

/* ---------- page header ---------- */
main { min-width: 0; padding: 2rem 0 3rem; }
.page-head { display: grid; grid-template-columns: clamp(96px, 16vw, 200px) 1fr; gap: clamp(1rem, 3vw, 2rem); align-items: center;
  padding-bottom: 1.5rem; border-bottom: 2px dotted var(--rule); margin-bottom: 1.75rem; }
.page-head .phase-icon { width: 100%; }
h1 { font-family: var(--display); font-weight: 400; color: var(--brown); font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; margin: 0; }
.eyebrow { margin: .35rem 0 0; color: var(--brown); font-size: .95rem; }
.page-head h2 { color: var(--teal-text); font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 700; margin: .6rem 0 0; line-height: 1.25; }

.tags { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: .25rem 0;
  color: var(--brown); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: clamp(.95rem, 1.6vw, 1.1rem); }
.tags li:not(:last-child)::after { content: "|"; color: var(--rule); margin: 0 .75rem; font-weight: 400; }
.note { color: var(--brown); font-size: 1.1rem; margin: 0 0 1.25rem; }
.bullets { color: var(--brown); font-size: 1.1rem; margin: 0 0 1.5rem; padding-left: 1.25rem; }
.bullets li { margin: .25rem 0; }

/* ---------- hub links ---------- */
.hub-links { list-style: none; padding: 0; margin: 0; }
.hub-links li { margin: 0 0 1.1rem; }
.hub-links a { font-weight: 700; font-size: clamp(1.15rem, 2.2vw, 1.45rem); text-decoration: none; line-height: 1.3; }
.hub-links a::after { content: " »"; color: var(--orange); }
.hub-links a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem; max-width: 560px; }
.cards a { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.cards img { width: 110px; transition: transform .15s; }
.cards a:hover img { transform: translateY(-3px); }
.cards span::after { content: " »"; color: var(--orange); }

/* ---------- galleries ---------- */
.gallery { display: grid; gap: 1rem; margin-top: .5rem; }
.gallery.n2 { grid-template-columns: repeat(2, 1fr); }
.gallery.n3 { grid-template-columns: repeat(3, 1fr); }
.gallery.n4 { grid-template-columns: repeat(2, 1fr); }
.gallery.n5 { grid-template-columns: repeat(5, 1fr); }
.g-item { display: block; overflow: hidden; background: #f3f0ee; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .25s; }
.gallery.n1 img, .gallery-document img { aspect-ratio: auto; object-fit: contain; }
.gallery-squares img { aspect-ratio: 1; }
.gallery.n3 img { aspect-ratio: 3 / 4; }
.g-item:hover img { transform: scale(1.02); }
.gallery-document .g-item { background: none; border: 1px solid #e6e1dd; }

/* ---------- process timeline (weeks) ---------- */
.weeks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.week { position: relative; }
.week:not(:last-child)::after { content: ""; position: absolute; top: 34px; left: 88px; right: -1rem; border-top: 2px dotted var(--rule); }
.week-icon { width: 72px; position: relative; z-index: 1; background: #fff; }
.week-num { margin: .75rem 0 0; color: var(--teal-text); font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.week h3 { color: var(--orange); margin: .1rem 0 .5rem; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; }
.week h4 { color: var(--brown); margin: .75rem 0 .25rem; font-size: 1rem; }
.week ul { list-style: disc; margin: 0; padding-left: 1.1rem; color: var(--ink); }
.week li { margin: .15rem 0; }

/* ---------- questionnaire flow ---------- */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1.6fr; gap: 1rem; align-items: center; }
.flow figure { margin: 0; }
.flow-step { margin: 0; text-align: center; color: var(--brown); font-weight: 700; font-size: .95rem; max-width: 9rem; }
.flow-step::after { content: "→"; display: block; color: var(--orange); font-size: 2rem; line-height: 1; }

/* ---------- survey ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.questions h3 { color: var(--teal-text); margin: 0 0 .5rem; }
.questions li { margin: 0 0 .75rem; }

/* ---------- pager ---------- */
.pager { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 2px dotted var(--rule); font-weight: 700; }
.pager a { text-decoration: none; color: var(--brown); }
.pager a:hover { color: var(--teal-text); }
.pager-home svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.pager-prev span, .pager-next span { color: var(--orange); }
.pager-next { margin-left: auto; text-align: right; }

/* ---------- home ---------- */
.home main { padding-top: 2.5rem; }
.home-head { text-align: center; margin-bottom: 2.5rem; }
.home-head h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); margin-top: .5rem; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 1rem; }
.phase { position: relative; }
.phase:not(:last-child)::after { content: ""; position: absolute; top: calc(var(--icon, 120px) / 2); left: 70%; right: -1rem;
  border-top: 2px dotted var(--rule); z-index: -1; }
.phase:not(:last-child)::before { content: ""; position: absolute; top: calc(var(--icon, 120px) / 2 - 9px); right: -.9rem;
  border: 9px solid transparent; border-left: 11px solid var(--orange); border-right: 0; }
.timeline { --icon: min(11vw, 140px); }
.timeline .phase-icon { width: var(--icon); }
.phase h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: .03em; color: var(--brown); line-height: 1.25; margin: 1rem 0 .5rem; min-height: 2.5em; }
.phase h2 a { color: inherit; text-decoration: none; }
.phase ul { list-style: none; margin: 0; padding: 0; }
.phase li { margin: 0 0 .65rem; }
.phase li a { font-weight: 700; text-decoration: none; line-height: 1.3; display: inline-block; }
.phase li a:hover { text-decoration: underline; }

.site-footer { border-top: 2px dotted var(--rule); text-align: center; color: var(--brown); font-size: .85rem; padding: 1rem; margin-top: 1rem; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .timeline { grid-template-columns: repeat(4, 1fr); gap: 2.5rem 1.5rem; --icon: 120px; }
  .phase:nth-child(4)::after, .phase:nth-child(4)::before { display: none; }
  .weeks { grid-template-columns: repeat(2, 1fr); }
  .week:nth-child(2)::after { display: none; }
  .gallery.n5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .inner .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .phases { min-width: 0; }
  .phases { position: static; order: -1; padding-top: 1rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; }
  .brand-sub { margin: 0; }
  .phases ol { flex-basis: 100%; min-width: 0; max-width: 100%; display: flex; overflow-x: auto; border-left: 0; border-bottom: 2px dotted var(--rule); padding-bottom: .25rem; scrollbar-width: thin; }
  .phases ol a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; margin: 0; }
  .phases ol a.current { border-bottom-color: var(--orange); }
  main { padding-top: 1.25rem; }
  .flow { grid-template-columns: 1fr auto 1fr; }
  .flow-wide { grid-column: 1 / -1; }
  .flow > .flow-step:nth-of-type(2) { grid-column: 1 / -1; }
  .flow > .flow-step:nth-of-type(2)::after { content: "↓"; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .timeline { grid-template-columns: 1fr; gap: 0; --icon: 84px; }
  .phase { display: grid; grid-template-columns: var(--icon) 1fr; column-gap: 1.25rem; padding: 0 0 1.75rem; }
  .phase .phase-icon-link { grid-row: span 2; }
  .phase h2 { margin-top: .5rem; min-height: 0; }
  .phase:not(:last-child)::after { top: calc(var(--icon) + .5rem); bottom: .5rem; left: calc(var(--icon) / 2); right: auto; border-top: 0; border-left: 2px dotted var(--rule); }
  .phase:not(:last-child)::before { display: none; }
  .phase:nth-child(4)::after { display: block; }
  .weeks { grid-template-columns: 1fr; }
  .week::after { display: none; }
  .gallery.n2, .gallery.n3, .gallery.n4 { grid-template-columns: 1fr; }
  .gallery.n3 img { aspect-ratio: 4 / 3; }
  .gallery.n5 { grid-template-columns: repeat(2, 1fr); }
  .tags { flex-direction: column; }
  .tags li::after { display: none; }
  .pager { flex-wrap: wrap; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
