/* Fred edits — a portfolio marked up with a red pen.
   Black type on white paper. Red is reserved for Fred's edits: strikes, underlines, margin notes. */
:root {
  --paper: #fff;
  --ink: #000;
  --struck: #9a9a9a;     /* text that has been crossed out */
  --quiet: #5c5c5c;      /* secondary text */
  --rule: #e2e2e2;
  --pen: #ff4a4a;        /* the red pen, and nothing else */
  --display: "Big Shoulders Display", "Bayon", Impact, "Arial Narrow", sans-serif;
  --hand: "Nanum Pen Script", "Caveat", "Bradley Hand", cursive;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --wrap: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.6 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 4px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.display { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .9; letter-spacing: -.005em; }
.d-1 { font-size: clamp(52px, 9.5vw, 148px); }
.d-2 { font-size: clamp(40px, 6vw, 88px); }
.d-3 { font-size: clamp(30px, 3.8vw, 52px); line-height: .95; }
section { padding: clamp(72px, 10vw, 150px) 0; }
section + section { border-top: 1px solid var(--rule); }

/* ---------- the pen ---------- */
.note { font: 400 clamp(26px, 2.6vw, 38px)/1 var(--hand); color: var(--pen); display: inline-block; rotate: -3deg; }
.cut { position: relative; display: inline-block; color: var(--struck); }
.pen { position: absolute; left: -3%; top: 0; width: 106%; height: 100%; overflow: visible; pointer-events: none; }
.pen path { fill: none; stroke: var(--pen); stroke-width: var(--sw, 7); stroke-linecap: round; vector-effect: non-scaling-stroke; }
.struck { color: var(--struck); text-decoration: line-through; text-decoration-color: var(--pen); text-decoration-thickness: .09em; }
.under { position: relative; display: inline-block; }
.under .pen { top: auto; bottom: -.16em; height: .3em; }

/* strokes draw in once, left to right: on load in the hero, on arrival elsewhere */
.js .draw .pen { clip-path: inset(-50% 100% -50% -5%); }
.js .draw.is-drawn .pen { clip-path: inset(-50% -5% -50% -5%); transition: clip-path .5s cubic-bezier(.6, 0, .3, 1) var(--d, 0s); }
.js .draw.cut, .js .draw .struck { color: var(--ink); text-decoration-color: transparent; }
.js .draw.is-drawn.cut, .js .draw.is-drawn .struck { color: var(--struck); text-decoration-color: var(--pen); transition: color .4s ease calc(var(--d, 0s) + .3s), text-decoration-color .4s ease var(--d, 0s), clip-path .5s; }
.js .draw .after { opacity: 0; translate: 0 8px; }
.js .draw.is-drawn .after { opacity: 1; translate: 0 0; transition: opacity .45s ease calc(var(--d, 0s) + .45s), translate .45s ease calc(var(--d, 0s) + .45s); }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 28px; padding-bottom: 12px; font-size: 15px; }
.nav__name { font-weight: 600; text-decoration: none; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
.nav__links a { text-decoration: none; }
.nav__links a:hover { text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 2px; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--text); text-decoration: none; border-radius: 2px; }
.btn:hover { background: var(--pen); color: var(--ink); text-decoration: none !important; }

/* ---------- hero: the name, edited down ---------- */
.hero { padding: clamp(24px, 4vw, 56px) 0 clamp(56px, 8vw, 110px); border: 0; }
.hero__name { position: relative; font-size: clamp(74px, 19.5vw, 300px); line-height: .82; }
.hero__name > span { display: block; }
.hero__name .cut { width: max-content; }
.hero__note { position: absolute; right: 0; top: 5%; width: max-content; font-size: clamp(34px, 5vw, 76px); text-transform: none; letter-spacing: 0; }
.hero__note svg { display: block; width: 1.5em; height: .8em; margin: .1em 0 0 -1.1em; overflow: visible; }
.hero__note path { fill: none; stroke: var(--pen); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hero__line { margin-top: clamp(28px, 4vw, 56px); max-width: 34ch; font-size: clamp(20px, 2vw, 26px); line-height: 1.4; }
.hero__line b { font-weight: 600; }

/* ---------- three edits ---------- */
.edits__intro { max-width: 20ch; }
.edit { display: grid; grid-template-columns: 180px minmax(0, 1fr) 220px; gap: 12px 40px; align-items: start; padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--rule); }
.edits .edit:first-of-type { margin-top: clamp(40px, 6vw, 80px); }
.edit__where { font-weight: 600; padding-top: .5em; }
.edit__plan { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; }
.edit__fix { margin-top: 14px; }
.edit__claim { margin-top: 18px; max-width: 52ch; color: var(--quiet); font-size: 16px; }
.edit__claim a { color: var(--ink); font-weight: 600; }
.edit .note { padding-top: .35em; }

/* ---------- work index ---------- */
.work__list { list-style: none; padding: 0; margin: clamp(32px, 5vw, 64px) 0 0; border-bottom: 1px solid var(--ink); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 190px clamp(160px, 22vw, 300px); gap: 16px 40px; align-items: center; padding: 28px 0; border-top: 1px solid var(--ink); color: inherit; text-decoration: none; }
.row__what { max-width: 16ch; }
.row__meta { font-size: 15px; color: var(--quiet); }
.row__meta b { display: block; color: var(--ink); font-weight: 600; font-size: 17px; }
.row__shot { aspect-ratio: 4 / 3; overflow: hidden; background: #f3f3f3; border: 1px solid var(--rule); }
.row__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; filter: grayscale(1); transition: filter .3s, scale .5s; }
a.row:hover .row__shot img, a.row:focus-visible .row__shot img { filter: none; scale: 1.04; }
a.row:hover .row__what { text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: .07em; text-underline-offset: .12em; }
.row__soon { display: inline-block; margin-top: 6px; }

/* ---------- about + contact ---------- */
.about { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: center; }
.about img { background: #f3f3f3; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.about p { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.35; max-width: 26ch; }
.about p + p { margin-top: 24px; font-size: 18px; }
.contact__mail { display: inline-block; margin-top: 20px; font: 900 clamp(28px, 5.2vw, 76px)/1 var(--display); text-transform: uppercase; text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: .06em; text-underline-offset: .14em; word-break: break-word; }
.contact__mail:hover { color: var(--pen); }
.contact__more { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 36px; padding: 0; list-style: none; font-size: 16px; }

/* ---------- case study ---------- */
.case-hero { padding: clamp(32px, 6vw, 80px) 0 0; border: 0; }
.case-hero h1 { max-width: 13ch; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 40px; margin-top: clamp(32px, 5vw, 56px); padding-top: 20px; border-top: 1px solid var(--ink); }
.facts dt { font-size: 15px; color: var(--quiet); }
.facts dd { font-weight: 600; }
.shot { margin-top: clamp(36px, 5vw, 64px); border: 1px solid var(--rule); box-shadow: 0 30px 70px rgba(0, 0, 0, .12); }
.minute { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); margin-top: clamp(32px, 5vw, 56px); }
.minute h3 { font: 600 16px/1.3 var(--text); color: var(--quiet); margin-bottom: 12px; }
.minute p { font-size: 20px; line-height: 1.45; }
.minute .note { margin-top: 18px; }
.decision { position: relative; padding: 0 0 0 24px; border-left: 3px solid var(--pen); }

.walk { margin-top: clamp(32px, 5vw, 56px); }
.walk__step { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px clamp(28px, 5vw, 72px); align-items: start; }
.walk__step + .walk__step { margin-top: 72px; }
.walk__n { display: block; font: 400 64px/.8 var(--hand); color: var(--pen); margin-bottom: 14px; }
.walk__text p + p { margin-top: 10px; }
.walk__media { display: grid; gap: 20px; }
.walk__media img { border: 1px solid var(--rule); }
.walk__media img.persona { width: 182px; border-radius: 12px; }
.walk__bar { display: none; }
.walk.is-enhanced .walk__step { display: none; margin-top: 0; }
.walk.is-enhanced .walk__step.is-current { display: grid; }
.walk.is-enhanced .walk__bar { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.walk__dots { display: flex; gap: 6px; flex: 1; }
.walk__dots span { height: 3px; flex: 1; max-width: 64px; background: var(--rule); }
.walk__dots span.is-done { background: var(--pen); }
button.btn { border: 0; cursor: pointer; }
button.btn:disabled { background: var(--rule); color: var(--struck); cursor: default; }

.steps { list-style: none; padding: 0; margin: clamp(28px, 4vw, 48px) 0 0; border-top: 1px solid var(--ink); }
.steps > li { border-bottom: 1px solid var(--ink); }
.step > summary { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr) 32px; gap: 6px clamp(28px, 5vw, 72px); align-items: baseline; padding: 22px 0; cursor: pointer; list-style: none; }
.step > summary::-webkit-details-marker { display: none; }
.step__t { font-weight: 600; font-size: 20px; }
.step__s { color: var(--quiet); }
.step__x::before { content: "+"; font: 400 28px/1 var(--text); }
.step[open] .step__x::before { content: "–"; }
.step > summary:hover .step__t { text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 2px; }
.detail { padding: 4px 0 36px; max-width: 820px; margin-left: calc(min(300px, 26%) + clamp(28px, 5vw, 72px)); }
.detail > * + * { margin-top: 18px; }
.detail ul { padding-left: 1.1em; }
.detail li + li { margin-top: 8px; }
.detail li::marker { color: var(--pen); }
.detail img { border: 1px solid var(--rule); }
.detail .cap { font-size: 15px; color: var(--quiet); margin-bottom: -8px; }
.detail .quote { font-size: 22px; line-height: 1.4; }
.detail .pair { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.detail .pair img { flex: 0 1 auto; min-width: 0; }

.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(32px, 6vw, 96px); margin-top: clamp(32px, 5vw, 56px); }
.results p { margin-top: 14px; font-size: 20px; max-width: 30ch; }
.back { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }

@media (max-width: 860px) {
  .hero__note { position: static; display: block; margin-top: .45em; rotate: -2deg; }
  .hero__note svg { display: none; }
  .edit { grid-template-columns: minmax(0, 1fr); }
  .edit__where { padding-top: 0; }
  .row { grid-template-columns: minmax(0, 1fr) 120px; }
  .row__meta { grid-column: 1; grid-row: 2; }
  .row__shot { grid-column: 2; grid-row: 1 / span 2; }
  .about, .minute, .facts, .results, .walk__step, .walk.is-enhanced .walk__step.is-current { grid-template-columns: minmax(0, 1fr); }
  .about img { max-width: 260px; }
  .step > summary { grid-template-columns: minmax(0, 1fr) 32px; }
  .step__s { grid-column: 1; }
  .step__x { grid-column: 2; grid-row: 1; }
  .detail { margin-left: 0; }
  .nav__links a.optional { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .draw .pen, .js .draw.is-drawn .pen { clip-path: none; transition: none; }
  .js .draw.cut, .js .draw .struck { color: var(--struck); text-decoration-color: var(--pen); transition: none; }
  .js .draw .after { opacity: 1; translate: 0 0; transition: none; }
  .row__shot img { transition: none; }
}

/* ---------- full build additions ---------- */
.edit--case { grid-template-columns: minmax(0, 1fr) 240px; }
.edits--case .edit:first-of-type { margin-top: clamp(28px, 4vw, 48px); }
.showcase img { margin-top: clamp(28px, 4vw, 48px); border: 1px solid var(--rule); }
.group + .group { margin-top: clamp(48px, 7vw, 88px); }
.group__t { font: 600 22px/1.2 var(--text); margin-top: clamp(28px, 4vw, 48px); }
.group__t + .group__intro, .group__intro { max-width: 62ch; margin-top: 12px; color: var(--quiet); }
.group__intro img { display: none; }
.group .steps { margin-top: 20px; }
.detail .note-box, .detail .note.prose { font: inherit; color: inherit; rotate: none; display: block; padding: 20px 24px; background: #f4f4f4; }
.detail .prose p + p { margin-top: 12px; }
.endnote { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); max-width: 62ch; color: var(--quiet); }
.results--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nextcase { display: block; text-decoration: none; }
.nextcase .d-2 { margin-top: 10px; max-width: 16ch; }
.nextcase:hover .d-2 { text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: .07em; text-underline-offset: .12em; }
.back { align-items: end; }
@media (max-width: 860px) {
  .edit--case, .results--3 { grid-template-columns: minmax(0, 1fr); }
}

.group__intro p + p { margin-top: 8px; }
