/* An editorial page rather than a landing page: one column of type, hairline
   rules instead of cards, and colour used only where it means something.
   Black ground, red for the one thing worth pointing at, midnight purple in
   the rules, so the palette reads as the seal blown up to page size. */

:root {
  color-scheme: dark;

  --paper: #0a090d;
  --ink: #ece7e2;
  --ink-soft: #c6bfc4;
  --muted: #9a929c;
  --faint: #898095;
  --rule: #2b2433;
  --rule-soft: #1d1824;
  --accent: #e04a56;
  --plum-light: #33204d;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --measure: 64ch;
  --page: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0 var(--gutter);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
}

main, .masthead, .colophon { max-width: var(--page); margin-inline: auto; }

a { color: inherit; }

.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
}
.skip:focus { left: var(--gutter); top: 8px; position: fixed; z-index: 10; }

/* ── masthead ──────────────────────────────────────────── */
.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0 18px;
  border-bottom: 1px solid var(--plum-light);
}

.masthead__name {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -0.01em;
}

.masthead__nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}
.masthead__nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 3px;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 280ms cubic-bezier(0.22, 0.61, 0.36, 1),
    color 180ms ease;
}
.masthead__nav a:hover,
.masthead__nav a:focus-visible {
  color: var(--ink);
  background-size: 100% 1px;
}

/* ── intro ─────────────────────────────────────────────── */
.intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
  padding: clamp(48px, 9vh, 96px) 0 clamp(40px, 6vh, 64px);
}

.intro::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--plum-light);
}

.intro h1 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.intro__body {
  margin: 0;
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: 17.5px;
}

.intro__aside {
  display: grid;
  gap: clamp(22px, 3.5vh, 34px);
  align-content: start;
  justify-items: start;
}

/* The seal is the one dark object on the page, so it is given room and left
   unframed: the artwork already has its own black field. */
.intro__mark {
  margin: 0;
  width: min(100%, 190px);
  --d: 240ms; /* the seal follows the headline rather than arriving with it */
}

.intro__mark img {
  display: block;
  width: 100%;
  height: auto;
}

.intro__mark figcaption span {
  display: block;
}

.intro__mark figcaption {
  margin-top: 9px;
  text-wrap: balance;
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
}

.intro__meta {
  margin: 0;
  display: grid;
  gap: 16px;
  font-size: 14px;
}
.intro__meta dt {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}
.intro__meta dd { margin: 0; color: var(--ink-soft); }

/* ── sections ──────────────────────────────────────────── */
section, article { scroll-margin-top: 24px; }

.section-head {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 34px 0 12px;
}

.section-head::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--accent);
}
.section-head h2 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.section-head p {
  margin: 0;
  font-size: 13.5px;
  color: var(--faint);
}

/* ── index of work ─────────────────────────────────────── */
.index__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.index__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 200px;
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.index__mark {
  display: block;
  width: 44px;
  height: 44px;
  margin-top: 2px;
}

.index__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 260ms ease;
}

.index__row:hover .index__mark img,
.index__row:focus-within .index__mark img {
  filter: brightness(1.14) saturate(1.08);
}

.index__main h3 {
  margin: 0 0 3px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.index__main h3 a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.index__row:hover .index__main h3 a,
.index__row:focus-within .index__main h3 a { background-size: 100% 1px; }

.index__main p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 52ch;
}

.index__role {
  font-size: 12.5px;
  color: var(--faint);
  text-align: right;
  padding-top: 5px;
  transition: color 200ms ease;
}

.index__row:hover .index__role,
.index__row:focus-within .index__role { color: var(--ink-soft); }

/* ── case study ────────────────────────────────────────── */
.case {
  padding: clamp(44px, 8vh, 84px) 0;
  border-bottom: 1px solid var(--rule);
}

.case__kicker {
  margin: 0 0 10px;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.case__head h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1;
  letter-spacing: -0.025em;
}

.case__standfirst {
  margin: 0;
  max-width: 52ch;
  font-family: var(--serif);
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.45;
  color: var(--ink-soft);
}

/* A flat product figure: no glow, no fake depth, just the interface at rest. */
.shot {
  margin: clamp(28px, 5vh, 44px) 0 0;
}

.shot__frame {
  background: #131019;
  border: 1px solid #2a2233;
  border-radius: 10px;
  width: min(100%, 540px);
  overflow: hidden;
}

.shot__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #332a3d;
  color: #b3aab8;
  font-size: 12.5px;
}
.shot__meta { color: #8b8296; }

.shot__thread {
  display: grid;
  gap: 10px;
  padding: 12px 16px 18px;
}

.shot__date {
  margin: 0;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: #7b7285;
}

.msg {
  max-width: 76%;
  padding: 9px 12px;
  border-radius: 8px;
  background: #1a1622;
  color: #ded7e2;
  font-size: 13px;
  line-height: 1.45;
}
.msg--own {
  justify-self: end;
  background: #241a2b;
  border: 1px solid #3d2b47;
}
.msg__who {
  margin: 0 0 3px;
  font-size: 11px;
  color: #e05a63;
}
.msg__text { margin: 0; }
.msg__time {
  margin: 4px 0 0;
  font-size: 10.5px;
  color: #8b8296;
  text-align: right;
}

.msg__file { display: flex; align-items: center; gap: 10px; }
.msg__ext {
  border: 1px solid #4a3555;
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: #e05a63;
}
.msg__name { display: block; font-size: 13px; }
.msg__sub { display: block; font-size: 10.5px; color: #9a92a6; }

.shot figcaption {
  margin-top: 14px;
  max-width: 58ch;
  font-size: 13px;
  color: var(--muted);
}

.case__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(28px, 5vw, 64px);
  margin-top: clamp(32px, 5vh, 52px);
  align-items: start;
}

.prose p {
  margin: 0 0 1.05em;
  max-width: var(--measure);
  color: var(--ink-soft);
}
.prose p:last-child { margin-bottom: 0; }

.spec {
  margin: 0;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
}
.spec > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.spec dt {
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 2px;
}
.spec dd { margin: 0; color: var(--ink-soft); }

.case__action { margin: 30px 0 0; }

/* The one thing on the page the reader is meant to press. */
.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 20px;
  background: var(--accent);
  color: var(--paper);
  border-radius: 4px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.015em;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 200ms ease, transform 120ms ease;
}

.button:hover { background: #ef5560; }

.button:active {
  background: #c93b47;
  transform: translateY(1px);
  transition-duration: 60ms;
}

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

.button svg {
  margin-top: 1px; /* optical nudge against the 14.5px cap height */
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.button:hover svg { transform: translateY(2px); }

@media (prefers-reduced-motion: reduce) {
  .button,
  .button svg { transition: none; }
  .button:active { transform: none; }
  .button:hover svg { transform: none; }
}

/* ── about ─────────────────────────────────────────────── */
.about { padding-bottom: clamp(40px, 7vh, 72px); border-bottom: 1px solid var(--rule); }

.about__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(28px, 5vw, 64px);
  padding-top: 26px;
  align-items: start;
}

.principles {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}
.principles strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}

/* ── contact ───────────────────────────────────────────── */
.contact {
  padding: 0 0 clamp(40px, 6vh, 64px);
}

.contact__body { padding-top: 26px; }

.contact__lead {
  margin: 0 0 22px;
  max-width: 48ch;
  color: var(--ink-soft);
}

/* Two fields side by side, the message across both, and a rule under each
   field instead of a box — the form sits in the page rather than on it. */
.contact__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 26px;
  max-width: var(--measure);
  margin: 4px 0 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field--wide,
.contact__actions { grid-column: 1 / -1; }

.field label {
  font-size: 11.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
}

.field input,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 0 11px;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  font: inherit;
  font-size: 15.5px;
  line-height: 1.5;
  transition: border-color 200ms ease;
}

.field textarea {
  min-height: 112px;
  padding-top: 6px;
  resize: vertical;
}

.field input:hover,
.field textarea:hover { border-bottom-color: var(--muted); }

/* the accent rule replacing the bottom border is the focus mark, so the
   browser's ring is suppressed only where that replacement is visible */
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.field input:focus-visible,
.field textarea:focus-visible { outline: none; }

/* The honeypot: removed from the flow and from the grid entirely, so it
   neither shows nor takes a slot. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 4px;
}

.contact__submit {
  min-height: 48px;
  padding: 0 22px;
  background: var(--accent);
  color: var(--paper);
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.015em;
  cursor: pointer;
  transition: background-color 200ms ease, transform 120ms ease;
}

.contact__submit:hover { background: #ef5560; }

.contact__submit:active {
  background: #c93b47;
  transform: translateY(1px);
  transition-duration: 60ms;
}

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

.contact__submit[disabled] {
  background: var(--plum-light);
  color: var(--ink-soft);
  cursor: progress;
}

.contact__status {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.contact__status[data-state="done"] { color: var(--ink); }
.contact__status[data-state="error"] { color: var(--accent); }

/* The address stays, one line down, for anyone who would rather write from
   their own mail client; the form is the path that gets stored. */
.contact__mail {
  margin: 26px 0 0;
  font-size: 14.5px;
  color: var(--muted);
}
.contact__mail a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  overflow-wrap: anywhere; /* a long address may break rather than widen the page */
  transition: border-color 240ms ease;
}

@media (max-width: 620px) {
  .contact__form { grid-template-columns: minmax(0, 1fr); }
}
.contact__mail a:hover,
.contact__mail a:focus-visible { border-bottom-color: var(--accent); }

/* ── colophon ──────────────────────────────────────────── */
.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 40px;
  padding: 22px 0 40px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  line-height: 1.6;
  color: var(--faint);
}

.colophon__note { margin: 0; max-width: 62ch; }

/* the closing line answers the wordmark at the top of the page */
.colophon__copy {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* ── focus and selection ───────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--plum-light);
  color: #f4eff8;
}

h1, h2, h3, .case__standfirst { text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }

/* ── entrance motion ───────────────────────────────────────
   Everything below is inert unless the <html> element carries .motion,
   which the head script only sets when the reader allows motion. */

.motion [data-rise] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 620ms cubic-bezier(0.22, 0.61, 0.36, 1) var(--d, 0ms),
    transform 620ms cubic-bezier(0.22, 0.61, 0.36, 1) var(--d, 0ms);
}

.motion [data-rise].is-in {
  opacity: 1;
  transform: none;
}

.motion [data-rule]::after {
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 880ms cubic-bezier(0.22, 0.61, 0.36, 1) var(--d, 0ms);
}

.motion [data-rule].is-in::after { transform: none; }

/* Messages arrive after their frame, so the figure reads as a live thread. */
.motion .shot__thread [data-rise] { transform: translateY(8px); }

/* Stagger: neighbours follow rather than move together. */
.intro__body { --d: 90ms; }
.intro__meta { --d: 180ms; }
.shot__thread > :nth-child(1) { --d: 160ms; }
.shot__thread > :nth-child(2) { --d: 290ms; }
.shot__thread > :nth-child(3) { --d: 420ms; }
.principles li:nth-child(2) { --d: 90ms; }
.principles li:nth-child(3) { --d: 180ms; }
.case__body .spec { --d: 110ms; }
.contact__lead { --d: 70ms; }
.contact__form { --d: 130ms; }
.contact__mail { --d: 220ms; }

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

  .motion [data-rise],
  .motion [data-rule]::after {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media print {
  .motion [data-rise] { opacity: 1; transform: none; }
  .motion [data-rule]::after { transform: none; }

  :root {
    color-scheme: light;
    --paper: #ffffff;
    --ink: #111111;
    --ink-soft: #333333;
    --muted: #555555;
    --faint: #666666;
    --rule: #cccccc;
    --rule-soft: #e2e2e2;
    --accent: #8e1622;
    --plum-light: #ddd8e2;
  }

  .button {
    background: none;
    color: var(--ink);
    border: 1px solid var(--ink);
  }
}

/* ── narrow screens ────────────────────────────────────── */
@media (max-width: 880px) {
  .intro { grid-template-columns: 1fr; gap: 28px; }
  .intro__aside {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .intro__meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .case__body, .about__body { grid-template-columns: 1fr; }
  .spec { margin-top: 8px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .masthead { flex-wrap: wrap; gap: 10px; }
  .masthead__nav { gap: 16px; font-size: 13px; }
  .intro__aside { grid-template-columns: 1fr; gap: 22px; }
  .intro__mark { width: 132px; }
  .intro__mark figcaption span { display: none; }
  .intro__meta { grid-template-columns: 1fr; }
  .index__row {
    grid-template-columns: 44px minmax(0, 1fr);
    row-gap: 4px;
  }
  .index__role { grid-column: 2; text-align: left; }
  .shot__frame { max-width: none; }
}

