/* ============================================================
   websites.christopheralanjones.com
   The Working File. Paper, ink, one marker.
   ============================================================ */

:root {
  --paper: #F6F2EA;
  --paper-deep: #EFE9DD;
  --mat: #FCFAF5;
  --ink: #1D1A16;
  --ink-body: #2B2620;
  --ink-soft: #57514A;
  --ink-faint: #8B847A;
  --line: #DCD5C6;
  --line-soft: #E7E1D4;
  --accent: #C2491A;
  --live: #3E7C4F;
  --off: #A8A29A;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --pad: 48px;
  --max: 1240px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 380;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: var(--paper); }

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.accent { color: var(--accent); }
.dim { color: var(--ink-soft); }

.skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 50;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 12px;
  padding: 10px 16px;
  text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 16px; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ============ TOP BAR ============ */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.bar.scrolled { border-bottom-color: var(--line); }

.bar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--pad);
  display: flex;
  align-items: baseline;
  gap: 28px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 560;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.bar-index {
  color: var(--accent);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(2px);
  transition: opacity .25s, transform .25s, visibility 0s .25s;
  pointer-events: none;
}
.bar.scrolled .bar-index {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity .25s, transform .25s, visibility 0s;
}
.bar-index:hover { text-decoration: underline; text-underline-offset: 4px; }

.bar-audit {
  margin-left: auto;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.bar-audit:hover { color: var(--accent); }
.bar-audit .visit-mark { margin-left: 6px; }
.audit-short { display: none; }

.bar-loc { color: var(--ink-soft); }

/* ============ HERO ============ */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px var(--pad) 60px;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 56px;
  align-items: center;
}

.kicker { color: var(--ink-soft); }

.hero h1 {
  margin-top: 30px;
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 540;
  line-height: 1.02;
  letter-spacing: -0.018em;
  font-variation-settings: "SOFT" 28, "WONK" 1;
}

/* the collage: a cutout object resting on the paper, not a matted plate */
.hero-fig {
  justify-self: end;
  width: 100%;
  max-width: 440px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .7s var(--ease-out) .15s, transform .7s var(--ease-out) .15s;
}
.hero-fig.in { opacity: 1; transform: none; }
.hero-fig img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 26px rgba(29, 26, 22, .13));
}
.fig-cap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding-left: 8px;
  color: var(--ink-faint);
}
.fig-tick { width: 26px; height: 1px; background: var(--accent); }
.h1-line { display: block; }
.hero h1 em { color: var(--accent); }

.lede {
  margin-top: 30px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 54ch;
}

/* ============ MANIFEST ============ */

.manifest {
  max-width: var(--max);
  margin: 0 auto 40px;
  padding: 0 var(--pad);
}

.rule-2 { height: 2px; background: var(--ink); }

.manifest-head {
  display: grid;
  grid-template-columns: 56px 1.25fr 1.7fr 130px 64px 110px;
  gap: 0 20px;
  padding: 12px 0;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: 56px 1.25fr 1.7fr 130px 64px 110px;
  gap: 0 20px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  position: relative;
  transition: background-color .2s;
}
.row:hover { background: linear-gradient(to right, transparent, var(--mat) 8%, var(--mat) 92%, transparent); }

.row .num { color: var(--accent); }

.row .name { font-size: clamp(20px, 2.1vw, 27px); font-weight: 520; letter-spacing: -0.012em; line-height: 1.15; }
.name-text {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: 0 100%;
  padding-bottom: 3px;
  transition: background-size .28s var(--ease-out);
}
.row:hover .name-text, .row:focus-visible .name-text { background-size: 100% 2px; }

.row .desc { font-size: 15px; color: var(--ink-soft); line-height: 1.45; }
.row .meta { color: var(--ink-soft); }
.row .status { white-space: nowrap; }

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 1px;
}
.dot.live { background: var(--live); }
.dot.off { background: var(--off); }

/* floating thumbnail preview */
.thumb-float {
  position: fixed;
  z-index: 30;
  width: 250px;
  padding: 8px 8px 6px;
  background: var(--mat);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -18px rgba(29, 26, 22, .35);
  opacity: 0;
  transform: scale(.96) translateY(4px);
  transition: opacity .18s var(--ease-out), transform .18s var(--ease-out);
  pointer-events: none;
}
.thumb-float.on { opacity: 1; transform: none; }
.thumb-float img { width: 100%; display: block; }

/* ============ CASE STUDIES ============ */

.case {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px var(--pad) 96px;
  scroll-margin-top: 56px;
}

.case-rule {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}

/* dimension line: draws when section enters */
.dim-line {
  position: relative;
  height: 34px;
  margin-top: 26px;
  display: flex;
  align-items: center;
}
.dim-line::before {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  top: 50%;
  border-top: 1px solid var(--accent);
  transition: right 1s var(--ease-out);
}
/* end ticks */
.dim-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--accent), var(--accent)) left center / 1px 12px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right center / 1px 12px no-repeat;
  opacity: 0;
  transition: opacity .3s .15s;
}
.dim-line.in::before { right: 0; }
.dim-line.in::after { opacity: 1; }

.dim-label {
  position: relative;
  z-index: 1;
  margin-left: 42px;
  background: var(--paper);
  padding: 0 12px;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .4s .45s, transform .4s .45s;
}
.dim-line.in .dim-label { opacity: 1; transform: none; }

.case h2 {
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 560;
  letter-spacing: -0.015em;
  line-height: 1.04;
  font-variation-settings: "SOFT" 28, "WONK" 1;
}

.sub {
  margin-top: 14px;
  font-size: clamp(16.5px, 1.55vw, 19px);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 58ch;
}

.case-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: minmax(300px, 5fr) 7fr;
  gap: 56px;
  align-items: start;
}

.case-copy { position: sticky; top: 96px; }
.case-copy p {
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink-body);
  margin-bottom: 18px;
  max-width: 44ch;
}

.did {
  list-style: none;
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}
.did li {
  padding: 8px 0 8px 22px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.did li::before {
  content: "";
  position: absolute;
  left: 2px; top: 50%;
  width: 8px; height: 1px;
  background: var(--accent);
}

.visit {
  display: inline-block;
  margin-top: 30px;
  padding: 13px 20px;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.visit:hover { background: var(--ink); color: var(--paper); }
.visit-mark { display: inline-block; margin-left: 10px; transition: transform .25s var(--ease-out); }
.visit:hover .visit-mark { transform: translate(2px, -2px); }
.visit.is-note { border-color: var(--line); color: var(--ink-soft); cursor: default; }

/* plates */
.case-plates { display: flex; flex-direction: column; gap: 28px; min-width: 0; }

.plate {
  background: var(--mat);
  border: 1px solid var(--line);
  padding: 13px;
  box-shadow: 0 1px 0 rgba(29, 26, 22, .05), 0 14px 34px -26px rgba(29, 26, 22, .4);
}
.plate img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line-soft);
}
.cap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 11px;
  color: var(--ink-soft);
}
.cap span:last-child { color: var(--ink-faint); }

.plate-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.plate-pair.is-phones { grid-template-columns: 1fr 1fr; max-width: 560px; }

.note-card {
  border: 1px solid var(--line);
  background: transparent;
  padding: 22px 24px;
  align-self: end;
}
.note-card .mono { color: var(--accent); margin-bottom: 12px; }
.note-card p:last-child { font-size: 15.5px; font-style: italic; color: var(--ink-soft); line-height: 1.55; }

/* ============ PROSE BLOCKS ============ */

.prose-block {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) 88px;
  scroll-margin-top: 56px;
}

.prose-grid {
  display: grid;
  grid-template-columns: minmax(220px, 5fr) 7fr;
  gap: 56px;
  padding-top: 34px;
}

.prose-block h2 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 560;
  letter-spacing: -0.012em;
  font-variation-settings: "SOFT" 28, "WONK" 1;
}

.prose-copy p {
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-body);
  max-width: 58ch;
  margin-bottom: 18px;
}

.cta {
  display: inline-block;
  margin-top: 14px;
  padding: 18px 30px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s;
}
.cta:hover { background: var(--accent); }
.cta .visit-mark { margin-left: 12px; }

.cta-sub { margin-top: 14px; color: var(--ink-faint); }

.person-col { display: flex; flex-direction: column; gap: 28px; align-items: start; }
.person-col .plate.is-photo { width: 100%; max-width: 460px; }

.person-links { display: flex; gap: 26px; margin-top: 26px; }
.person-links a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: color .2s, border-color .2s;
}
.person-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.person-links .visit-mark { margin-left: 6px; }

/* ============ BACK COVER ============ */

.back-cover {
  background: var(--ink);
  color: var(--paper);
}
.bc-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--pad) 56px;
}
.bc-domain { color: var(--accent); filter: brightness(1.35); }
.bc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 26px 0 34px;
}
.bc-nav a {
  color: color-mix(in srgb, var(--paper) 75%, transparent);
  text-decoration: none;
}
.bc-nav a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.bc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-bottom: 22px;
}
.bc-links a {
  color: color-mix(in srgb, var(--paper) 75%, transparent);
  text-decoration: none;
}
.bc-links a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }

.bc-colophon {
  font-size: 14.5px;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
  max-width: 64ch;
  line-height: 1.6;
}

/* ============ REVEALS ============ */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }

.rule-draw {
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform .8s var(--ease-out);
}
.rule-draw.in { transform: scaleX(1); }

.plate {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.plate.in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */

@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero-fig { max-width: 340px; justify-self: start; }
  .case-grid, .prose-grid { grid-template-columns: 1fr; gap: 36px; }
  .case-copy { position: static; }
  .case-copy p { max-width: 58ch; }
}

@media (max-width: 820px) {
  :root { --pad: 22px; }

  .bar-inner { padding: 14px var(--pad); gap: 16px; }
  .bar-loc { display: none; }

  .hero { padding: 64px var(--pad) 56px; gap: 0; }
  /* phones go straight from the claim to the manifest; the collage is desktop furniture */
  .hero-fig { display: none; }

  .manifest-head { display: none; }
  .manifest { margin-bottom: 8px; }

  .row {
    grid-template-columns: 40px 1fr auto;
    grid-template-areas:
      "num name status"
      "num desc desc"
      "num metaline metaline";
    gap: 6px 12px;
    padding: 20px 0;
  }
  .row .num { grid-area: num; }
  .row .name { grid-area: name; }
  .row .desc { grid-area: desc; }
  .row .status { grid-area: status; }
  .row .meta { display: none; }
  .row::after {
    content: attr(data-meta);
    grid-area: metaline;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-faint);
  }

  .thumb-float { display: none; }

  .case { padding-bottom: 72px; }
  .case-rule { flex-direction: column; gap: 5px; }
  .case-rule .mono { white-space: normal; }
  .plate-pair, .plate-pair.is-phones { grid-template-columns: 1fr; max-width: none; }
  .plate-pair.is-phones .plate, .plate.is-phone { max-width: 340px; }
  .plate { padding: 10px; }

  .dim-label { margin-left: 22px; }

  .prose-block { padding-bottom: 64px; }
}

@media (max-width: 520px) {
  /* keep the bar on one line once the Index link appears */
  .audit-full { display: none; }
  .audit-short { display: inline; }
}

/* ============ REDUCED MOTION ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .plate, .rule-draw, .dim-line::before, .dim-line::after, .dim-label {
    transition: none !important;
  }
  .reveal, .plate { opacity: 1; transform: none; }
  .rule-draw { transform: none; }
  .dim-line::before { right: 0; }
  .dim-line::after, .dim-line .dim-label { opacity: 1; transform: none; }
  .thumb-float { display: none; }
}
