/* HwP portfolio: a job register set as a calm typographic index.
   White paper, black ink, one accent (CutContour magenta) used only for thin rules
   between rows and for link underlines.

   Two scales rule every value below: spacing (--s1 to --s7) and type (--fs-*).
   Rule roles: the ink rule opens a section, the magenta rule separates rows. */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/Barlow-Regular.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/Barlow-Medium.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/Barlow-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/BarlowCondensed-Medium.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/BarlowCondensed-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/BarlowCondensed-Bold.woff2) format("woff2"); }

:root {
  --paper: #ffffff;
  --ink: #000000;
  --cut: #e0007a;
  --draft: #575757;
  --draft-line: #8c8c8c;
  --photo-edge: rgba(0, 0, 0, 0.16);

  /* spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 px */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --row-pad: var(--s3);
  --sec: var(--s6);

  /* type scale */
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lead: 1.125rem;
  --fs-title: 1.25rem;
  --fs-section: 1.625rem;
  --fs-name: clamp(2.5rem, 11vw, 4.5rem);

  --pad: clamp(16px, 4vw, 40px);
  --gap: clamp(1rem, 2.5vw, 2rem);
  --c1: 100%;
  --measure: 28rem;

  --cond: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: "Barlow", "Helvetica Neue", Arial, sans-serif;
}

@media (min-width: 720px) {
  :root {
    --c1: clamp(160px, 20vw, 210px);
    --row-pad: var(--s4);
    --sec: clamp(var(--s6), 4vw, var(--s7));
    --fs-title: 1.375rem;
    --fs-section: 2rem;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 400;
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- links: black text, magenta underline ---------- */

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--cut);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
}
a:hover { text-decoration-thickness: 3px; }
a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  text-decoration-thickness: 3px;
}

/* ---------- page frame ---------- */

header.ticket,
main {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- header: the title row of the register ---------- */

header.ticket {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-top: var(--s1);
  padding-bottom: var(--s3);
}

header.ticket .crop,
header.ticket .stamp { display: none; }

header.ticket .mark {
  grid-row: 1;
  align-self: center;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.01em;
  padding-block: var(--s2) 0;
}

header.ticket nav {
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--s5);
}
header.ticket nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;                 /* a comfortable tap target ... */
  padding-inline: var(--s1);
  margin-inline: calc(-1 * var(--s1)); /* ... without moving the text */
  font-family: var(--text);
  font-weight: 500;
  font-size: var(--fs-md);
  line-height: 1.3;
}

/* the hairline under the title row */
header.ticket::after {
  content: "";
  grid-row: 3;
  height: 1px;
  background: var(--cut);
}

header.ticket h1 {
  grid-row: 4;
  margin: var(--s3) 0 0;
  font-family: var(--cond);
  font-weight: 700;
  font-size: var(--fs-name);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

header.ticket > p {
  grid-row: 5;
  margin: var(--s3) 0 0;
  max-width: 38ch;
  font-size: var(--fs-lead);
  line-height: 1.4;
  font-weight: 500;
  text-wrap: pretty;
}

header.ticket > .spec {
  grid-row: 6;
  margin-top: var(--s4);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--s4);
}
header.ticket > .spec span {
  display: block;
  padding-block: var(--s2);
  border-top: 1px solid var(--cut);
  font-size: var(--fs-sm);
  line-height: 1.35;
}
header.ticket > .spec b {
  display: block;
  font-family: var(--cond);
  font-weight: 600;
  font-size: var(--fs-md);
  line-height: 1.15;
}

@media (min-width: 720px) {
  header.ticket {
    grid-template-columns: var(--c1) minmax(0, 1fr);
    column-gap: var(--gap);
    padding-top: var(--s2);
    padding-bottom: 0;
  }
  header.ticket .mark { grid-column: 1; grid-row: 1 / span 1; padding-block: var(--s2); }
  header.ticket nav { grid-column: 2; grid-row: 1; align-self: center; column-gap: var(--s6); }
  header.ticket::after { grid-column: 1 / -1; grid-row: 2; }
  header.ticket h1 { grid-column: 1 / -1; grid-row: 3; margin-top: var(--s4); }
  header.ticket > p { grid-column: 2; grid-row: 4; margin-top: var(--s4); }
  header.ticket > .spec { grid-column: 2; grid-row: 5; margin-top: var(--s5); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--s5); }
  header.ticket > .spec span { padding-bottom: 0; }
}

/* ---------- sections: an ink rule opens each one, then the rows ---------- */

main { padding-bottom: var(--sec); }

main > section {
  margin-top: var(--sec);
  scroll-margin-top: var(--s4);
}

section > h2 {
  display: flex;
  align-items: baseline;
  margin: 0 0 var(--s3);
  padding-top: var(--s2);
  border-top: 2px solid var(--ink);
  font-family: var(--cond);
  font-weight: 700;
  font-size: var(--fs-section);
  line-height: 1.15;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
section > h2 .num {
  flex: 0 0 auto;
  margin-right: var(--s3);
  font-family: var(--cond);
  font-weight: 600;
  font-size: var(--fs-md);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 720px) {
  section > h2 .num {
    flex: 0 0 var(--c1);
    margin-right: var(--gap);
  }
  section#about > h2,
  section#contact > h2 { padding-left: calc(var(--c1) + var(--gap)); }
}

/* sections that are still empty drafts keep a quieter heading */
section:has(> p.todo) > h2 { border-top-color: var(--draft-line); color: var(--draft); }

/* ---------- the row ---------- */

article.proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--s3);
  align-items: start;
  padding-block: var(--row-pad);
  border-top: 1px solid var(--cut);
}
section > h2 + article.proof { border-top: 0; padding-top: 0; }
section > article.proof:last-child { padding-bottom: 0; }

picture.frame,
div.frame {
  display: block;
  width: 100%;
  min-width: 0;
}
/* true aspect ratio, never cropped: the column fixes the width, and a height
   cap keeps tall portraits from stretching the row (the photo stays left) */
picture.frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 16rem;
  outline: 1px solid var(--photo-edge);
  outline-offset: -1px;
  background: var(--paper);
}
div.frame.empty {
  aspect-ratio: 3 / 2;
  max-height: 16rem;
  border: 1px dashed var(--draft-line);
}

article.proof .body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto auto 1fr;
  align-content: start;
  min-width: 0;
}

article.proof h3 {
  margin: 0;
  font-family: var(--cond);
  font-weight: 600;
  font-size: var(--fs-title);
  line-height: 1.15;
  letter-spacing: 0;
  text-wrap: balance;
}

article.proof .spec {
  margin-top: var(--s2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
  font-size: var(--fs-sm);
  line-height: 1.35;
}
article.proof .spec b {
  font-family: var(--cond);
  font-weight: 600;
  font-size: var(--fs-md);
  margin-right: var(--s1);
}

/* the ownership caption: the honesty line. Plain, black, full size. */
article.proof p.cap {
  margin: var(--s2) 0 0;
  max-width: var(--measure);
  font-weight: 500;
  font-size: var(--fs-md);
  line-height: 1.4;
  text-wrap: pretty;
}

article.proof p.words {
  margin: var(--s2) 0 0;
  max-width: var(--measure);
  font-weight: 400;
  font-size: var(--fs-md);
  line-height: 1.55;
  text-wrap: pretty;
}

@media (min-width: 720px) {
  article.proof {
    grid-template-columns: var(--c1) minmax(0, 1fr);
    column-gap: var(--gap);
    row-gap: 0;
  }
  picture.frame img { max-height: 11rem; }
  article.proof h3 { margin-top: -0.18em; }   /* title ascenders sit on the photo's top edge */
}

/* a third narrow column for spec chips where there is room */
@media (min-width: 980px) {
  @supports selector(:has(a)) {
    article.proof .body:has(> .spec) {
      grid-template-columns: minmax(0, 1fr) 10.5rem;
      column-gap: var(--gap);
    }
    article.proof .body:has(> .spec) > :not(.spec) { grid-column: 1; }
    article.proof .body:has(> .spec) > .spec {
      grid-column: 2;
      grid-row: 1 / -1;
      margin-top: 0;
      display: block;
      padding-top: var(--s2);
      border-top: 1px solid var(--cut);
    }
    article.proof .body:has(> .spec) > .spec span { display: block; margin-bottom: var(--s3); }
    article.proof .body:has(> .spec) > .spec b { display: block; margin: 0; }
  }
}

/* ---------- draft notes: gray, dashed, plainly a placeholder ---------- */

p.todo {
  margin: var(--s2) 0 0;
  max-width: var(--measure);
  padding: var(--s2) var(--s3);
  border: 1px dashed var(--draft-line);
  color: var(--draft);
  font-weight: 500;
  font-size: var(--fs-sm);
  line-height: 1.4;
  text-wrap: pretty;
}
section > p.todo { margin-top: 0; }

/* ---------- about and contact ---------- */

section#about > p,
section#contact > p {
  margin: var(--s3) 0 0;
  max-width: var(--measure);
}
section#about > h2 + p,
section#contact > h2 + p { margin-top: 0; }
section#about > p.words {
  font-size: var(--fs-lead);
  line-height: 1.5;
  text-wrap: pretty;
}
section#contact > p {
  font-family: var(--cond);
  font-weight: 600;
  font-size: var(--fs-title);
  line-height: 1.15;
  letter-spacing: 0;
  max-width: none;
}
section#contact > p + p { font-size: var(--fs-lead); font-weight: 500; }
section#contact > p a { display: inline-block; padding-block: var(--s2); }

@media (min-width: 720px) {
  section > p.todo,
  section#about > p,
  section#contact > p { margin-left: calc(var(--c1) + var(--gap)); }
}

/* ---------- the process page: the same rows ---------- */

section#steps { margin-top: var(--sec); border-top: 2px solid var(--ink); }
section#steps > article.proof:first-child { border-top: 0; }

/* ---------- motion: none needed ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- selected work: the strongest pieces, large, ahead of the register ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: var(--s5);
}
article.card { min-width: 0; }
article.card .shot { display: block; }
article.card picture.frame {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: var(--paper);
  outline: 1px solid var(--photo-edge);
  outline-offset: -1px;
}
article.card picture.frame img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  outline: 0;
}
article.card h3 {
  margin: var(--s3) 0 0;
  font-family: var(--cond);
  font-weight: 600;
  font-size: var(--fs-title);
  line-height: 1.15;
}
article.card h3 a { text-decoration: none; }
article.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--cut); text-decoration-thickness: 2px; }
article.card p.cap {
  margin: var(--s2) 0 0;
  font-weight: 500;
  font-size: var(--fs-sm);
  line-height: 1.4;
  text-wrap: pretty;
}
article.card a.more { display: inline-block; margin-top: var(--s2); padding-block: var(--s1); font-weight: 500; }

@media (min-width: 720px) {
  #featured > h2 { padding-left: calc(var(--c1) + var(--gap)); }
  #featured > .cards { margin-left: calc(var(--c1) + var(--gap)); }
}

/* ---------- a case study page: the same rows, with the pictures large ---------- */

section#case > p.cap,
section#case > p.words,
section#case > p.todo { margin: 0 0 var(--s3); max-width: var(--measure); }
section#case article.proof { display: block; border-top: 1px solid var(--cut); padding-block: var(--s5); }
section#case article.proof:first-of-type { border-top: 0; padding-top: 0; }
section#case picture.frame img { width: 100%; max-height: 28rem; object-fit: contain; object-position: left top; }
section#case article.proof .body { margin-top: var(--s3); }
section#case article.proof h3 { margin-top: 0; }

@media (min-width: 720px) {
  section#case article.proof { display: grid; grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); column-gap: var(--gap); }
  section#case article.proof .body { margin-top: 0; }
}

/* ---------- customer quotes ---------- */

.quotes { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.quote { margin: 0; padding-top: var(--s3); border-top: 2px solid var(--cut); }
.quote blockquote { margin: 0; }
.quote blockquote p { margin: 0; font: 500 var(--fs-lead)/1.4 var(--text); text-wrap: pretty; }
.quote figcaption { margin-top: var(--s2); font-size: var(--fs-sm); color: var(--draft); }
@media (min-width: 720px) {
  #quotes > h2 { padding-left: calc(var(--c1) + var(--gap)); }
  #quotes > .quotes { margin-left: calc(var(--c1) + var(--gap)); grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- tiles: sections of many small pieces become a grid of larger pictures ---------- */

/* sections of many small marks become a grid of larger tiles: picture first, caption under */
#marks, #own, #embroidery, #apparel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr));
  gap: var(--s5) var(--s4);
  align-items: start;
}
#marks > h2, #own > h2, #embroidery > h2, #apparel > h2 { grid-column: 1 / -1; }
#marks article.proof, #own article.proof, #embroidery article.proof, #apparel article.proof {
  display: block; padding: 0; border-top: 0;
}
#marks article.proof picture.frame, #own article.proof picture.frame,
#embroidery article.proof picture.frame, #apparel article.proof picture.frame {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; padding: var(--s3);
  background: var(--paper); outline: 1px solid var(--photo-edge); outline-offset: -1px;
}
#marks article.proof picture.frame img, #own article.proof picture.frame img,
#embroidery article.proof picture.frame img, #apparel article.proof picture.frame img {
  width: auto; height: auto; max-width: 100%; max-height: 100%; outline: 0;
}
#marks article.proof .body, #own article.proof .body, #embroidery article.proof .body, #apparel article.proof .body { margin-top: var(--s2); }
#marks article.proof h3, #own article.proof h3, #embroidery article.proof h3, #apparel article.proof h3 { margin-top: 0; font-size: var(--fs-md); }
#marks article.proof p.cap, #own article.proof p.cap, #embroidery article.proof p.cap, #apparel article.proof p.cap { font-size: var(--fs-sm); }
#marks article.proof p.words, #own article.proof p.words, #embroidery article.proof p.words, #apparel article.proof p.words { display: none; }
@media (min-width: 720px) {
  #marks, #own, #embroidery, #apparel { margin-left: 0; }
  #marks > h2 .num, #own > h2 .num, #embroidery > h2 .num, #apparel > h2 .num { flex: 0 0 var(--c1); }
}

section#case picture.frame { width: fit-content; max-width: 100%; }
section#case picture.frame img { width: auto; max-width: 100%; }
