/* =========================================================================
   Stylesheet for lukasz-pudlo.
   Early-computing character: cream ground, hard black ink, traffic-red accent.
   Mono type is the machine's voice. No print furniture, no costume panels.
   Two typefaces: Hanken Grotesk (display & UI), IBM Plex Mono (computer voice).
   ========================================================================= */

/* ---------- 1. Tokens ---------- */

:root {
  --paper: #ece3cc;
  --paper-deep: #ddd2b4;
  --ink: #141414;
  --ink-soft: #4a4538;
  --ink-faint: #6f6957;
  --red: #d52b1e;
  --red-deep: #a51e14;
  --hairline: rgba(20, 20, 20, 0.22);
  --hairline-soft: rgba(20, 20, 20, 0.12);

  --font-display: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --shell-max: 1180px;
  --shell-gutter: clamp(1rem, 3.5vw, 2.25rem);
  --rule: 1px solid var(--hairline);
  --rule-ink: 1px solid var(--ink);
}

/* ---------- 2. Reset ---------- */

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(213, 43, 30, 0.04), transparent 50%),
    radial-gradient(ellipse at 90% 110%, rgba(20, 20, 20, 0.05), transparent 60%),
    var(--paper);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.55;
  font-feature-settings: "ss01", "ss02";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.025em;
  /* Descenders overlap the next line's ascenders below ~0.93 in Hanken Grotesk. */
  line-height: 1;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

.site-header__nav a:focus-visible,
.case-tabs__item a:focus-visible,
.directory__list a:focus-visible {
  outline-offset: -2px;
}

/* ---------- 3. Shell ---------- */

.site-shell {
  position: relative;
  z-index: 1;
  width: min(var(--shell-max), 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) var(--shell-gutter) clamp(2rem, 6vw, 4rem);
}

.page-shell {
  padding: clamp(2rem, 5vw, 4rem) 0 0;
}

/* ---------- 4. Site header ---------- */

.site-header {
  padding-bottom: 1.25rem;
  border-bottom: var(--rule-ink);
  overflow-wrap: break-word;
  word-break: break-word;
}

.site-header__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.5rem;
}

.site-header__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.site-header__brand-name {
  font-feature-settings: "ss01";
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding-bottom: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.site-header__nav a {
  position: relative;
  padding: 0.25rem 0;
  color: var(--ink);
  transition: color 120ms ease;
}

.site-header__nav a::after {
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  background: var(--ink);
  content: "";
  transition: width 220ms ease;
}

.site-header__nav a:hover::after,
.site-header__nav a:focus-visible::after {
  width: 100%;
}

.site-header__nav a[aria-current="page"] {
  color: var(--red);
}

.site-header__nav a[aria-current="page"]::after {
  width: 100%;
  height: 3px;
  background: var(--red);
}

/* ---------- 5. Page furniture ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

.headline {
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: -0.04em;
}

.headline--display {
  font-size: clamp(3.5rem, 12vw, 9rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.intro {
  max-width: 36ch;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  line-height: 1.4;
  color: var(--ink);
}

.intro--wide {
  max-width: 52ch;
}

.copy {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
}

.copy p+p {
  margin-top: 1em;
}

.copy strong {
  font-weight: 800;
}

.columns-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 2.25rem);
}

@media (min-width: 760px) {
  .columns-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.rule {
  width: 100%;
  height: 1px;
  margin: clamp(2rem, 5vw, 3rem) 0;
  background: var(--ink);
  border: 0;
}

.rule--soft {
  background: var(--hairline);
}

.page-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding-top: 1rem;
  border-top: var(--rule-ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  overflow-wrap: break-word;
  word-break: break-word;
}

.page-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.2rem;
  transition: border-color 180ms ease;
}

.page-nav__link:hover,
.page-nav__link:focus-visible {
  border-bottom-color: var(--red);
}

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work-list li {
  padding: 0.6rem 0;
  border-top: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink);
}

.work-list li:last-child {
  border-bottom: var(--rule);
}

/* ---------- 6. Buttons & links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border: 1px solid var(--ink);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button::after {
  content: "▸";
  font-size: 0.85em;
  transform: translateY(-0.05em);
  transition: transform 160ms ease;
}

.button:hover,
.button:focus-visible {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

.button:hover::after,
.button:focus-visible::after {
  transform: translate(0.25em, -0.05em);
}

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

.button--ghost {
  background: transparent;
  color: var(--ink);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.button--ghost::after {
  display: none;
}

.button--large {
  padding: 1.15rem 1.8rem;
  font-size: 0.85rem;
}

.link {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink);
  padding-bottom: 0.2rem;
  border-bottom: 2px solid var(--ink);
  transition: color 160ms ease, border-color 160ms ease;
}

.link::after {
  content: " ▸";
}

.link:hover,
.link:focus-visible {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ---------- 7. Hero (home) ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3rem);
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr);
    /* End-aligned so the panel shares a baseline with the buttons; the
       headline is taller than the rail, so start-aligning leaves a hole. */
    align-items: end;
  }
}

.hero__lead {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  min-width: 0;
}

.hero__headline {
  font-size: clamp(2.6rem, 8.2vw, 6rem);
  letter-spacing: -0.05em;
  line-height: 1;
  overflow-wrap: break-word;
  hyphens: manual;
}

.hero__headline span {
  display: block;
}

.hero__headline .accent {
  color: var(--red);
}

.hero__ctas {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero__rail {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2rem);
  min-width: 0;
}

.hero__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.4rem 1.5rem 1.5rem;
  background: var(--paper-deep);
  border: var(--rule-ink);
  border-top-width: 4px;
  border-top-color: var(--red);
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero__sidebar h2 {
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.directory {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.25rem;
  border-top: var(--rule-ink);
}

.directory__title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.directory__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.directory__list li {
  border-top: var(--rule);
}

.directory__list li:last-child {
  border-bottom: var(--rule);
}

.directory__list a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 1rem;
  padding: 0.95rem 0.25rem;
  color: var(--ink);
  transition: background-color 160ms ease, color 160ms ease, padding 160ms ease;
}

.directory__list a:hover,
.directory__list a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.directory__label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1;
}

.directory__desc {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-align: right;
  transition: color 160ms ease;
}

/* The row inverts on hover, but this element sets its own colour, so it would
   otherwise stay dark brown on near-black. */
.directory__list a:hover .directory__desc,
.directory__list a:focus-visible .directory__desc {
  color: var(--paper);
}

/* ---------- 8. Page header (portfolio/about/prices/contact) ---------- */

.page-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---------- 9. Portfolio tabs ---------- */

.case-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule-ink);
  border-bottom: var(--rule-ink);
}

.case-tabs__item {
  position: relative;
  flex: 1 1 auto;
  border-right: var(--rule);
}

.case-tabs__item:last-child {
  border-right: 0;
}

.case-tabs__item a {
  display: block;
  padding: 0.8rem 1rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  transition: background-color 160ms ease, color 160ms ease;
}

.case-tabs__item a:hover,
.case-tabs__item a:focus-visible {
  background: var(--paper-deep);
}

.case-tabs__item a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.case-tabs__item--index a {
  text-align: right;
}

.case-tabs__item a[aria-current="page"]::before {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red);
  content: "";
}

.case-tabs__title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ---------- 10. Portfolio index ---------- */

.index-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule-ink);
}

.project-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 1.75rem);
  padding: clamp(1.5rem, 4vw, 2.25rem) 0;
  border-bottom: var(--rule-ink);
}

@media (min-width: 760px) {
  .project-card {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.project-card__thumb {
  display: block;
  position: relative;
  padding: 0.5rem;
  background: var(--paper-deep);
  border: var(--rule-ink);
  box-shadow: 6px 6px 0 0 var(--ink);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.project-card__thumb:hover,
.project-card:focus-within .project-card__thumb {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 0 var(--red);
}

.project-card__thumb-inner {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--paper);
  border: var(--rule);
  overflow: hidden;
  container-type: inline-size;
}

/* The frame lays the site out at desktop width and is scaled down to fit,
   so the whole first screen shows rather than a slice of the phone layout.
   The ratio comes from CSS where the browser can divide lengths, and from
   the FitFrame behaviour everywhere. */
@supports (scale: calc(1cqw / 1px)) {
  .project-card__thumb-inner {
    --frame-scale: calc(100cqw / 1440px);
  }
}

.project-card__frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  max-width: none;
  height: 900px;
  border: 0;
  background: var(--paper);
  pointer-events: none;
  transform: scale(var(--frame-scale, 0.3));
  transform-origin: 0 0;
}

.project-card__thumb-glyph {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}

.project-card__thumb-tag {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.45rem 0.6rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.project-card__meta {
  display: flex;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.project-card__meta span+span {
  padding-left: 1rem;
  border-left: var(--rule);
}

.project-card__title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1;
}

.project-card__strap {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--ink);
  max-width: 38ch;
}

.project-card__cta {
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* ---------- 11. Article (project detail) ---------- */

.article-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  overflow-wrap: break-word;
  word-break: break-word;
}

@media (min-width: 880px) {
  .article-header {
    grid-template-columns: minmax(0, 1.6fr) minmax(15rem, 1fr);
  }
}

.article-header__title {
  font-size: clamp(2.6rem, 7.5vw, 5.5rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.article-header__strap {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.4;
  max-width: 40ch;
}

.case-facts {
  padding: 1.25rem 1.4rem 1.4rem;
  background: var(--paper-deep);
  border: var(--rule-ink);
  border-top-width: 4px;
  border-top-color: var(--red);
  overflow-wrap: break-word;
  word-break: break-word;
}

.case-facts__title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 0.75rem;
}

.case-facts__list {
  margin: 0;
}

.case-facts__list div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-top: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.case-facts__list div:last-child {
  border-bottom: var(--rule);
}

.case-facts__list dt {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  flex: 0 0 auto;
}

.case-facts__list dd {
  margin: 0;
  text-align: right;
}

.case-facts__link {
  display: inline-block;
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.2rem;
  transition: color 160ms ease, border-color 160ms ease;
}

.case-facts__link:hover,
.case-facts__link:focus-visible {
  color: var(--red);
  border-bottom-color: var(--red);
}

.case-deck {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  padding-top: 1.25rem;
  border-top: var(--rule-ink);
}

@media (min-width: 760px) {
  .case-deck {
    grid-template-columns: repeat(2, 1fr);
  }
}

.case-deck__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--red);
  margin-bottom: 0.6rem;
}

.case-deck__text {
  font-weight: 300;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.6;
  max-width: 46ch;
}

/* ---------- 12. Figure (printed-insert iframe) ---------- */

.embed-frame {
  margin: 0;
  padding: clamp(0.6rem, 1.5vw, 1rem);
  background: var(--paper);
  border: var(--rule-ink);
  box-shadow: 10px 10px 0 0 var(--ink);
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.embed-frame__caption-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  border-bottom: var(--rule);
  flex-wrap: wrap;
  min-width: 0;
}

.embed-frame__caption-top>span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.embed-frame__caption-top .reload {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.embed-frame__caption-top .reload:hover,
.embed-frame__caption-top .reload:focus-visible {
  background: var(--red);
  border-color: var(--red);
}

.embed-frame__frame {
  position: relative;
  background: #fff;
  border: var(--rule);
  overflow: hidden;
  margin-top: 0.6rem;
}

.embed-frame__frame iframe {
  width: 100%;
  height: min(72vh, 760px);
  min-height: 28rem;
  border: 0;
  display: block;
  background: #fff;
}

.embed-frame__caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.85rem;
  padding: 0 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.embed-frame__caption em {
  font-style: italic;
  color: var(--ink-soft);
}

.fallback-note {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--paper-deep);
  border-left: 3px solid var(--red);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- 12a. Specification list ---------- */

.spec-list {
  display: grid;
  grid-template-columns: 1fr;
  /* Matches the measure of .body-section .copy above it, so the two blocks
     share a right edge. Mono ch is narrower, hence the larger number. */
  max-width: 76ch;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}

.spec-list dt {
  padding-top: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  border-top: var(--rule);
}

.spec-list dd {
  margin: 0;
  padding-bottom: 0.7rem;
  color: var(--ink);
}

.spec-list dd:last-of-type {
  border-bottom: var(--rule);
}

@media (min-width: 560px) {
  .spec-list {
    /* One shared grid so every value starts on the same column. The gutter is
       padding on the term, not column-gap, so the row rules stay unbroken. */
    grid-template-columns: auto minmax(0, 1fr);
  }

  .spec-list dt,
  .spec-list dd {
    padding: 0.7rem 0;
    border-top: var(--rule);
  }

  .spec-list dt {
    padding-right: clamp(1.25rem, 4vw, 2.5rem);
  }

  .spec-list dt:last-of-type,
  .spec-list dd:last-of-type {
    border-bottom: var(--rule);
  }
}

/* ---------- 13. Body sections (project body, about, contact) ---------- */

.body-section {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.body-section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: var(--rule-ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: break-word;
  word-break: break-word;
}

.body-section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.body-section .copy {
  max-width: 64ch;
}

/* About / contact specific layouts */

.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

@media (min-width: 880px) {
  .about-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(15rem, 1fr);
  }
}

.about-sidebar {
  padding: 1.25rem 1.4rem 1.4rem;
  background: var(--paper-deep);
  border: var(--rule-ink);
  overflow-wrap: break-word;
  word-break: break-word;
}

.about-sidebar h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.about-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.about-sidebar li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-top: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.about-sidebar li:last-child {
  border-bottom: var(--rule);
}

.about-sidebar li span:last-child {
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

#coverage {
  scroll-margin-top: 1.5rem;
}

.coverage-grid {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 1.5rem);
}

@media (min-width: 760px) {
  .coverage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 880px) {
  .coverage-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.coverage-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 1.4rem 1.4rem;
  background: var(--paper-deep);
  border: var(--rule-ink);
  border-top-width: 4px;
  border-top-color: var(--red);
}

.coverage-card__title {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.coverage-card p:not(.coverage-card__tag) {
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
}

.coverage-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding: 1rem 1.4rem;
  background: var(--paper-deep);
  border: var(--rule-ink);
  border-left-width: 4px;
  border-left-color: var(--red);
}

.coverage-strip__items {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

#testimonials {
  scroll-margin-top: 1.5rem;
}

.testimonial-grid {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 1.5rem);
}

@media (min-width: 760px) {
  .testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.4rem 1.4rem;
  background: var(--paper-deep);
  border: var(--rule-ink);
  border-top-width: 4px;
  border-top-color: var(--red);
}

.testimonial-card__quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
}

.testimonial-card__quote::before {
  content: "\201C";
}

.testimonial-card__quote::after {
  content: "\201D";
}

.testimonial-card__attribution {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

.testimonial-card__name {
  font-weight: 600;
  color: var(--ink);
}

.about-mark {
  margin-bottom: 1rem;
  position: relative;
  border: var(--rule-ink);
}

.about-mark__photo {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.1);
  mix-blend-mode: multiply;
}

/* Contact */

.contact-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3rem);
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--paper-deep);
  border: var(--rule-ink);
  border-top-width: 6px;
  border-top-color: var(--red);
  position: relative;
  overflow-wrap: break-word;
  word-break: break-word;
}

.contact-email-button {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
}

.contact-email-button__link {
  border-right: 0;
}

.contact-email-button__link::after {
  display: none;
}

.contact-email-button__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 3.45rem;
  padding: 0 0.85rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-left-color: color-mix(in srgb, var(--paper) 35%, var(--ink));
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.contact-email-button:hover .contact-email-button__link,
.contact-email-button:focus-within .contact-email-button__link,
.contact-email-button__copy:hover,
.contact-email-button__copy:focus-visible,
.contact-email-button__copy--done {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

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

.contact-email-button__copy:active {
  transform: translateY(1px);
}

.contact-email-button__icon {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: miter;
}

.contact-email-button__status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.contact-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.25rem;
  border-top: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
}

@media (min-width: 760px) {
  .contact-meta {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-meta dt {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.contact-meta dd {
  margin: 0;
}

/* ---------- 13a. Prices ---------- */

.price-grid {
  list-style: none;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 1.5rem);
}

@media (min-width: 760px) {
  .price-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 880px) {
  .price-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.4rem 1.4rem;
  background: var(--paper-deep);
  border: var(--rule-ink);
  border-top-width: 4px;
  border-top-color: var(--red);
  overflow-wrap: break-word;
  word-break: break-word;
}

.price-card__name {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.price-card__amount {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--red);
}

.price-card__amount-note {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.price-card__summary {
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.5;
}

.price-card__includes {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
}

.price-card__includes li {
  padding: 0.5rem 0;
  border-top: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
}

.price-card__includes li:last-child {
  border-bottom: var(--rule);
}

.price-note {
  max-width: 64ch;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-left: 1.1rem;
  border-left: 3px solid var(--red);
  font-weight: 300;
  line-height: 1.6;
}

/* ---------- 14. Site footer ---------- */

.site-footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 1.25rem 0 0;
  border-top: var(--rule-ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---------- 15. Motion ---------- */

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger>* {
  opacity: 0;
  animation: slide-up 520ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.stagger> :nth-child(1) {
  animation-delay: 40ms;
}

.stagger> :nth-child(2) {
  animation-delay: 120ms;
}

.stagger> :nth-child(3) {
  animation-delay: 200ms;
}

.stagger> :nth-child(4) {
  animation-delay: 280ms;
}

.stagger> :nth-child(5) {
  animation-delay: 360ms;
}

.stagger> :nth-child(6) {
  animation-delay: 440ms;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .stagger>* {
    opacity: 1;
  }
}

/* ---------- 16. Mobile ---------- */

@media (max-width: 760px) {
  .site-header__row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .site-header__nav {
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
  }

  .hero__sidebar {
    margin-top: 0.5rem;
  }

  .project-card__thumb {
    box-shadow: 4px 4px 0 0 var(--ink);
  }

  .embed-frame {
    box-shadow: 5px 5px 0 0 var(--ink);
  }

  .case-tabs {
    flex-direction: column;
  }

  .case-tabs__item {
    border-right: 0;
    border-bottom: var(--rule);
  }

  .case-tabs__item:last-child {
    border-bottom: 0;
  }

  .contact-email-button {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-email-button__link {
    border-right: 1px solid var(--ink);
    border-bottom: 0;
  }

  .contact-email-button__copy {
    border-left-color: var(--ink);
    border-top-color: color-mix(in srgb, var(--paper) 35%, var(--ink));
  }
}

/* ---------- 17. Utility ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}