/* Vectra3D — shared styles.
   Swiss grid on a cool neutral, a dark hero lit by the work itself, and one
   accent: the orange of the lamps. Type is Archivo throughout: condensed and
   heavy for headings (close to the VECTRA3D wordmark), normal width for text. */

:root {
  --ink: #0f1115;
  --ink-2: #334155;
  --ink-3: #475569;
  --paper: #f8fafc;
  --paper-2: #ffffff;
  --placeholder: #e2e8f0;
  --rule: #e2e8f0;
  --rule-strong: #94a3b8;
  --accent: #ea580c;
  --on-accent: #0b0b0c;
  --on-ink: #f8fafc;
  --on-ink-2: #cbd5e1;

  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Archivo", "Segoe UI", system-ui, -apple-system, "Helvetica Neue",
    Arial, sans-serif;

  --step-1: 6px;
  --step-2: 12px;
  --step-3: 20px;
  --step-4: 32px;
  --step-5: 52px;
  --step-6: 84px;
  --step-7: 132px;

  --gutter: 28px;
  --radius: 2px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-variant-numeric: tabular-nums;
  caret-color: var(--ink);
}

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

figure {
  margin: 0;
}

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

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2.75rem, 6.4vw, 5.75rem);
  line-height: 0.94;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1;
  text-transform: uppercase;
}

h3 {
  font-size: 1.5rem;
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1.14;
}

p {
  margin: 0;
  max-width: 68ch;
}

.lede {
  font-size: 1.28rem;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
}

.wrap {
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--step-4);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  text-decoration: none;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--step-4);
  min-height: 78px;
}

.brand {
  display: block;
  text-decoration: none;
  flex: none;
}

.brand img {
  width: 190px;
  height: auto;
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 180ms ease-out;
}

.primary-nav a:hover {
  color: var(--ink);
}

.primary-nav a[aria-current="page"] {
  color: var(--ink);
}

.btn:active {
  transform: translateY(1px);
}

.header-cta {
  flex: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-text);
  font-size: 0.97rem;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
}

.btn,
.link-arrow,
.jump a {
  transition: background-color 180ms ease-out, border-color 180ms ease-out,
    color 180ms ease-out;
}

.btn {
  font-weight: 600;
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn--accent:hover {
  background: #fb7a2e;
  border-color: #fb7a2e;
}

.btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.btn--quiet:hover {
  background: var(--paper-2);
  border-color: var(--ink);
  color: var(--ink);
}

/* on the dark hero and the orange contact band the quiet button inverts */
.hero .btn--quiet {
  color: var(--on-ink);
  border-color: rgba(248, 250, 252, 0.4);
}

.hero .btn--quiet:hover {
  background: rgba(248, 250, 252, 0.08);
  border-color: var(--on-ink);
  color: var(--on-ink);
}

.hero :focus-visible {
  outline-color: var(--on-ink);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.97rem;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 3px;
}

.link-arrow {
  font-weight: 600;
}

.link-arrow:hover {
  border-bottom-color: var(--accent);
}

.link-arrow svg {
  transition: transform 180ms ease-out;
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

.link-arrow svg {
  width: 15px;
  height: 15px;
  flex: none;
}

/* ---------- media ---------- */

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ar, 3 / 2);
  background: var(--placeholder);
  border-radius: var(--radius);
}

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

.ar-3-2 { --ar: 3 / 2; }
.ar-4-3 { --ar: 4 / 3; }
.ar-4-5 { --ar: 4 / 5; }
.ar-1-1 { --ar: 1 / 1; }
.ar-16-9 { --ar: 16 / 9; }
.ar-5-7 { --ar: 5 / 7; }
.ar-2-3 { --ar: 2 / 3; }

figcaption {
  margin-top: 10px;
  font-size: 0.83rem;
  line-height: 1.45;
  color: var(--ink-3);
  max-width: 46ch;
}

/* ---------- hero ---------- */

.hero {
  background: var(--ink);
  color: var(--on-ink);
}

.hero .grid {
  row-gap: 0;
  align-items: stretch;
  min-height: min(84vh, 800px);
}

.hero-copy {
  grid-column: 1 / 8;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--step-4);
  padding-block: var(--step-6);
}

/* sized so the headline sets in two lines beside the lamp */
.hero-copy h1 {
  font-size: clamp(2.75rem, 5.6vw, 5rem);
}

.hero .lede {
  color: var(--on-ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--step-2);
}

.hero-media {
  grid-column: 8 / 13;
  position: relative;
  min-height: 420px;
}

.hero-media .media {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  border-radius: 0;
  background: var(--ink);
  /* let the photo's own dark wall dissolve into the hero instead of ending in an edge */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 26%);
  mask-image: linear-gradient(to right, transparent, #000 26%);
}

.hero-media figcaption {
  position: absolute;
  left: 0;
  bottom: var(--step-3);
  margin: 0;
  max-width: 30ch;
  color: var(--on-ink-2);
}

/* the six things the studio does, as one ruled row under the hero */
.strip {
  border-bottom: 1px solid var(--rule);
}

.strip ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-block: 0;
  padding-block: 0;
  list-style: none;
}

.strip li {
  padding: var(--step-3) var(--step-3) var(--step-3) 0;
  font-size: clamp(0.85rem, 0.8rem + 0.3vw, 0.95rem);
  font-weight: 600;
  color: var(--ink-2);
  hyphens: auto;
  overflow-wrap: anywhere;
}

/* ---------- sections ---------- */

.section {
  padding-block: var(--step-6);
  border-bottom: 1px solid var(--rule);
}

.section-head {
  grid-column: 1 / 5;
}

.section-head h2 {
  margin-bottom: var(--step-3);
}

.section-head p {
  color: var(--ink-2);
}

.section-head--wide {
  grid-column: 1 / 8;
}

.draw-rule {
  height: 1px;
  background: var(--ink);
  margin-bottom: var(--step-4);
  transform-origin: left center;
}

/* ---------- services ---------- */

.service-list {
  grid-column: 6 / 13;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  column-gap: var(--gutter);
}

.service {
  display: flex;
  flex-direction: column;
  gap: var(--step-2);
  padding-block: var(--step-3) var(--step-4);
  border-top: 2px solid var(--ink);
}

.service p {
  color: var(--ink-2);
  font-size: 1rem;
}

/* ---------- selected work ---------- */

.work-list {
  grid-column: 1 / 13;
  display: grid;
  gap: var(--step-7);
  margin-top: var(--step-6);
}

.work {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--step-4);
  align-items: start;
}

.work h3 {
  font-size: 1.9rem;
}

.work h3 a {
  text-decoration: none;
}

.work h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.work-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--step-3);
}

.work-text p {
  color: var(--ink-2);
}

.work-meta {
  font-size: 0.83rem;
  color: var(--ink-3);
  margin: 0;
}

/* preview shapes: band, flip, pair (and its mirror), gallery, offset */
.work--band .work-media { grid-column: 1 / 13; }
.work--band .work-text { grid-column: 1 / 6; margin-top: var(--step-4); }
.work--band .work-aside { grid-column: 1 / 8; }

.work--flip .work-media { grid-column: 1 / 7; }
.work--flip .work-text { grid-column: 9 / 13; }

.work--pair .work-text { grid-column: 1 / 5; }
.work--pair .work-media {
  grid-column: 6 / 13;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--step-4);
  align-items: start;
}
.work--pair .work-media > :first-child { grid-column: 1 / 5; }
.work--pair .work-media > :last-child { grid-column: 5 / 8; margin-top: var(--step-6); }

.work--pair.work--rev .work-media { grid-column: 1 / 8; }
.work--pair.work--rev .work-text { grid-column: 9 / 13; }

.work--band .work-aside + .work-aside { grid-column: 8 / 13; margin-top: var(--step-5); }

.work--solo .work-text { grid-column: 1 / 5; }
.work--solo .work-media { grid-column: 6 / 12; }

.work--gallery .work-text { grid-column: 1 / 6; }
.work--gallery.work--rev .work-text { grid-column: 8 / 13; }

.work--offset .work-media { grid-column: 3 / 9; }
.work--offset .work-text { grid-column: 10 / 13; }

/* ---------- process ---------- */

.steps {
  grid-column: 1 / 13;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  column-gap: var(--gutter);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: var(--step-3);
  padding-block: var(--step-3) var(--step-4);
  border-top: 2px solid var(--ink);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--accent);
}

.steps h3 {
  margin-bottom: var(--step-2);
}

.steps p {
  color: var(--ink-2);
  font-size: 1rem;
}

/* ---------- explore upload form ---------- */

.explore-form {
  display: grid;
  gap: 14px;
  margin-top: var(--step-3);
}

.explore-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
}

.field-label .opt {
  font-style: normal;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.field input[type="file"] {
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.field textarea {
  resize: vertical;
  min-height: 72px;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--ink-3);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-sent {
  display: none;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  border-left: 4px solid var(--accent);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 0.95rem;
}

.form-sent:target {
  display: block;
}

.explore-form .btn {
  justify-self: start;
}

@media (max-width: 560px) {
  .explore-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- about ---------- */

.about-body {
  grid-column: 6 / 11;
  display: flex;
  flex-direction: column;
  gap: var(--step-4);
}

.about-body p {
  color: var(--ink-2);
}

.about-body p:first-child {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink);
}

.skills {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.skills div {
  display: flex;
  justify-content: space-between;
  gap: var(--step-3);
  padding-block: 11px;
  border-bottom: 1px solid var(--rule);
}

.skills dt {
  font-size: 0.97rem;
}

.skills dd {
  margin: 0;
  font-size: 0.97rem;
  color: var(--ink-3);
}

/* ---------- contact ---------- */

.contact {
  padding-block: var(--step-7);
  background: var(--accent);
  color: var(--on-accent);
  border-bottom: 0;
}

.contact .draw-rule {
  background: var(--on-accent);
}

.contact .fineprint {
  color: var(--on-accent);
}

.contact .btn--quiet {
  color: var(--on-accent);
  border-color: var(--on-accent);
}

.contact .btn--quiet:hover {
  background: var(--on-accent);
  color: var(--paper);
}

.contact-copy {
  grid-column: 1 / 7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--step-4);
}

.contact-copy h2 {
  max-width: 18ch;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--step-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.fineprint {
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 46ch;
}

.contact-mark {
  grid-column: 9 / 13;
  align-self: center;
}

.contact-mark img {
  width: min(230px, 60%);
  height: auto;
  /* the source PNG carries a stray stroke along its top edge */
  clip-path: inset(6% 0 0 0);
}

.contact-mark canvas {
  display: block;
  width: min(230px, 60%);
  aspect-ratio: 1 / 1;
  cursor: grab;
  touch-action: pan-y;
}

.contact-mark canvas:active {
  cursor: grabbing;
}

.footer-grid li a {
  display: inline-block;
  padding-block: 6px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--step-5) var(--step-5);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--step-4);
  align-items: start;
}

.footer-brand {
  grid-column: 1 / 5;
}

.footer-brand img {
  width: 150px;
  height: auto;
}

.footer-nav {
  grid-column: 6 / 9;
}

.footer-contact {
  grid-column: 10 / 13;
  font-style: normal;
}

.footer-label {
  font-family: var(--font-text);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-3);
  margin-bottom: var(--step-2);
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 0.97rem;
}

.colophon {
  grid-column: 1 / 13;
  padding-top: var(--step-4);
  border-top: 1px solid var(--rule);
  font-size: 0.83rem;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--step-3);
}

/* ---------- projects page ---------- */

.page-head {
  padding-block: var(--step-5) var(--step-4);
  border-bottom: 1px solid var(--rule);
}

.page-head h1 {
  max-width: 16ch;
  margin-bottom: var(--step-3);
}

.page-head .lede {
  max-width: 52ch;
}

.jump {
  margin-top: var(--step-4);
}

.jump ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jump a {
  display: inline-block;
  padding: 11px 16px;
  font-weight: 500;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-size: 0.9rem;
  text-decoration: none;
}

.jump a:hover {
  border-color: var(--ink);
}

.project {
  padding-block: var(--step-6);
  border-bottom: 1px solid var(--rule);
}

.project-head {
  grid-column: 1 / 7;
}

.project-head h2 {
  margin-bottom: var(--step-3);
}

.project-head p {
  color: var(--ink-2);
}

.project-body {
  grid-column: 1 / 7;
  display: flex;
  flex-direction: column;
  gap: var(--step-4);
}

.project-body p {
  color: var(--ink-2);
}

.project-meta {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-top: var(--step-3);
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
}

.project-meta > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: var(--step-3);
}

.project-meta dt {
  color: var(--ink-3);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding-top: 3px;
}

.project-meta dd {
  margin: 0;
}

.did {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.did li {
  position: relative;
  padding: 10px 0 10px 22px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.97rem;
  color: var(--ink-2);
}

.did li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 20px;
  width: 9px;
  height: 1px;
  background: var(--ink-2);
}

.project-gallery {
  grid-column: 1 / 13;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--step-4);
  align-items: start;
}

.project-gallery > figure { grid-column: span 12; }
.project-gallery > .w-3 { grid-column: span 3; }
.project-gallery > .w-4 { grid-column: span 4; }
.project-gallery > .w-5 { grid-column: span 5; }
.project-gallery > .w-6 { grid-column: span 6; }
.project-gallery > .w-7 { grid-column: span 7; }
.project-gallery > .w-8 { grid-column: span 8; }
.project-gallery > .w-9 { grid-column: span 9; }

.project-gallery > .push { margin-top: var(--step-5); }

.project--flip .project-head,
.project--flip .project-body {
  grid-column: 7 / 13;
}

.project--flip .project-lead {
  grid-column: 1 / 6;
  grid-row: 1 / 3;
  align-self: start;
}

/* ---------- motion ----------
   One personality throughout: premium. Signature easing is --ease (an expo
   deceleration), the palette is quick 180ms / standard 600ms / slow 900ms, and
   everything enters the same way: a short rise that settles into focus. */

@keyframes hero-in {
  from {
    opacity: 0;
    clip-path: inset(0 0 12% 0);
    transform: scale(1.03);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}

.hero-media img {
  animation: hero-in 1000ms var(--ease) both;
}

/* hero headline: each word rises out of its own line box */
.js [data-words].is-split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-block: 0.06em;
  margin-block: -0.06em;
}

.js [data-words].is-split .w-i {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
}

.js [data-words].is-in .w-i {
  transform: none;
  opacity: 1;
  transition: transform 700ms var(--ease), opacity 400ms ease-out;
  transition-delay: var(--d, 0ms);
}

/* the highlighter: a bar of the lamp's orange sweeps under the key phrase */
.hi {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 100% 0.11em;
  background-position: 0 92%;
}

.js [data-words] .hi {
  background-size: 0% 0.11em;
}

.js [data-words].is-in .hi {
  background-size: 100% 0.11em;
  transition: background-size 500ms var(--ease);
  transition-delay: var(--hi-d, 600ms);
}

/* every text block rises into focus as it enters the viewport */
.js .t-in {
  opacity: 0;
  transform: translateY(16px);
}

.js .t-in.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 600ms var(--ease), transform 700ms var(--ease);
  transition-delay: var(--d, 0ms);
}

/* headings travel a little further and take a little longer: they lead */
.js h2.t-in {
  transform: translateY(24px);
}

.js h2.t-in.is-in {
  transition-duration: 700ms, 900ms;
}

/* hero copy settles a touch faster than body text so the CTA is up promptly */
.hero .t-in.is-in {
  transition-duration: 500ms, 700ms;
}

/* secondary layer: the step number lands slightly after its text */
.steps li::before {
  transition: transform 700ms var(--ease), opacity 500ms ease-out, color 180ms ease-out;
}

.js .steps li.t-in::before {
  transform: translateY(0.25em);
  opacity: 0;
}

.js .steps li.t-in.is-in::before {
  transform: none;
  opacity: 1;
  transition-delay: calc(var(--d, 0ms) + 120ms);
}

/* the orange hairline under the header grows as you read down the page */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  pointer-events: none;
}

/* ---------- interaction: text answers the pointer ---------- */

/* main navigation: an underline grows from the left; the section in view keeps it */
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--rule-strong);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 260ms var(--ease), background-color 180ms ease-out;
}

.primary-nav a:hover::after,
.primary-nav a.is-active::after,
.primary-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.primary-nav a.is-active::after,
.primary-nav a[aria-current="page"]::after {
  background: var(--accent);
}

.primary-nav a.is-active {
  color: var(--ink);
}

/* project titles: the underline is drawn, not switched on */
.work h3 a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: 0 100%;
  transition: background-size 320ms var(--ease), color 180ms ease-out;
}

.work h3 a:hover,
.work h3 a:focus-visible {
  text-decoration: none;
  background-size: 100% 2px;
  color: var(--accent);
}

/* services and steps: the rule above warms up and the title steps forward */
.service,
.steps li {
  transition: border-color 260ms ease-out;
}

.service h3,
.steps h3 {
  transition: transform 320ms var(--ease), color 180ms ease-out;
}

.service:hover,
.steps li:hover {
  border-top-color: var(--accent);
}

.service:hover h3,
.steps li:hover h3 {
  transform: translateX(6px);
}

.steps li:hover::before {
  color: var(--ink);
}

/* the strip of six: each item brightens under the pointer */
.strip li {
  transition: color 180ms ease-out;
}

.strip li:hover {
  color: var(--accent);
}

/* skills table and the "what we did" lists: a line warms, a dash stretches */
.skills div {
  transition: border-color 220ms ease-out;
}

.skills div:hover {
  border-bottom-color: var(--accent);
}

.skills dt {
  transition: color 180ms ease-out;
}

.skills div:hover dt {
  color: var(--accent);
}

.did li {
  transition: color 180ms ease-out;
}

.did li::before {
  transition: width 260ms var(--ease), background-color 180ms ease-out;
}

.did li:hover {
  color: var(--ink);
}

.did li:hover::before {
  width: 16px;
  background: var(--accent);
}

/* jump pills on the projects page */
.jump a {
  transition: border-color 180ms ease-out, color 180ms ease-out,
    transform 220ms var(--ease);
}

.jump a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* buttons: a quiet lift, no bounce */
.btn {
  transition: background-color 180ms ease-out, border-color 180ms ease-out,
    color 180ms ease-out, transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -10px rgba(15, 17, 21, 0.5);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
  transition-duration: 80ms;
}

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
}

/* a focused link inside a still-hidden block must be revealed immediately,
   so keyboard users are never parked on invisible content */
.js .t-in:focus-within,
.js .reveal:focus-within {
  opacity: 1;
  transform: none;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
  transition-delay: var(--d, 0ms);
}

.js .draw-rule {
  clip-path: inset(0 100% 0 0);
}

.js .draw-rule.is-in {
  clip-path: inset(0 0 0 0);
  transition: clip-path 900ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-media img {
    animation: none;
  }

  .js .reveal,
  .js .draw-rule,
  .js .t-in,
  .js .t-in::before,
  .js [data-words] .w-i,
  .js [data-words] .hi {
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: none;
    transition: none;
  }

  .js [data-words] .hi {
    background-size: 100% 0.11em;
  }

  .primary-nav a::after,
  .work h3 a,
  .service,
  .service h3,
  .steps li,
  .steps h3,
  .steps li::before,
  .did li::before,
  .jump a,
  .btn {
    transition: none;
  }

  .service:hover h3,
  .steps li:hover h3,
  .jump a:hover,
  .btn:hover {
    transform: none;
  }
}

/* ---------- layout collapses ---------- */

@media (max-width: 1080px) {
  .section {
    padding-block: var(--step-5);
  }

  .work-list {
    gap: var(--step-6);
  }

}

@media (max-width: 900px) {
  .hero .grid {
    min-height: 0;
  }

  .hero-copy {
    padding-block: var(--step-5) var(--step-4);
  }

  .hero-media {
    min-height: 0;
    height: 62vh;
    max-height: 560px;
    margin-inline: clamp(-56px, -4vw, -20px);
  }

  .hero-media .media {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%);
    mask-image: linear-gradient(to bottom, transparent, #000 22%);
  }

  .hero-media figcaption {
    left: clamp(20px, 4vw, 56px);
  }

  .steps {
    grid-column: 1 / -1;
  }

  .hero-copy,
  .hero-media,
  .section-head,
  .section-head--wide,
  .service-list,
  .about-body,
  .contact-copy,
  .contact-mark,
  .project-head,
  .project-body,
  .project-gallery,
  .project--flip .project-head,
  .project--flip .project-body,
  .project--flip .project-lead,
  .work--band .work-media,
  .work--band .work-text,
  .work--band .work-aside,
  .work--band .work-aside + .work-aside,
  .work--solo .work-text,
  .work--solo .work-media,
  .work--pair.work--rev .work-media,
  .work--pair.work--rev .work-text,
  .work--gallery .work-text,
  .work--gallery.work--rev .work-text,
  .work--flip .work-media,
  .work--flip .work-text,
  .work--pair .work-text,
  .work--pair .work-media,
  .work--offset .work-media,
  .work--offset .work-text {
    grid-column: 1 / -1;
  }

  .work--pair .work-media > :first-child,
  .work--pair .work-media > :last-child {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .project--flip .project-lead {
    grid-row: auto;
  }

  .contact-mark {
    justify-self: start;
  }

  .contact-mark img {
    width: 140px;
  }

  .footer-brand,
  .footer-nav,
  .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  /* twelve columns need eleven gutters: 28px ones do not fit a 320px screen */
  :root {
    --gutter: 16px;
  }

  h3 {
    font-size: 1.3rem;
  }

  .lede {
    font-size: 1.12rem;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    gap: var(--step-2);
    min-height: 0;
    padding-block: 12px 0;
  }

  .brand img {
    width: 156px;
  }

  .primary-nav {
    grid-column: 1 / -1;
    order: 3;
    margin-inline: clamp(-20px, -4vw, -56px);
    margin-top: 10px;
    border-top: 1px solid var(--rule);
  }

  .primary-nav ul {
    flex-wrap: nowrap;
    gap: 22px;
    overflow-x: auto;
    padding: 12px clamp(20px, 4vw, 56px) 14px;
    scroll-padding-inline: clamp(20px, 4vw, 56px);
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .primary-nav li {
    scroll-snap-align: start;
  }

  .primary-nav a {
    white-space: nowrap;
    padding-block: 4px;
  }

  .primary-nav ul::-webkit-scrollbar {
    height: 3px;
  }

  .primary-nav ul::-webkit-scrollbar-thumb {
    background: var(--rule-strong);
  }

  html {
    scroll-padding-top: 132px;
  }

  .project-gallery > .w-3,
  .project-gallery > .w-4,
  .project-gallery > .w-5,
  .project-gallery > .w-6,
  .project-gallery > .w-7,
  .project-gallery > .w-8,
  .project-gallery > .w-9 {
    grid-column: 1 / -1;
  }

  .project-gallery > .push {
    margin-top: 0;
  }
}

@media (max-width: 420px) {
  .btn {
    width: 100%;
    justify-content: center;
    padding-inline: 16px;
  }
}
