/*
  STYLES
  ======
  Written "mobile first": the base rules are for phones, and the
  @media (min-width: ...) blocks further down adjust things for bigger screens.

  To change the overall look, start with the variables in :root below.
*/

:root {
  --bg: #f7f6f3;        /* page background */
  --ink: #111111;       /* main text */
  --muted: #6e6e6e;     /* secondary text */
  --accent: #b4432a;    /* the red used for [labels] */
  --line: rgba(17, 17, 17, 0.14);
  --placeholder: #e4e1db;

  --gutter: 16px;       /* space at the left/right edges of the page */
  --header-h: 52px;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

@media (min-width: 768px) {
  :root {
    --gutter: 28px;
    --header-h: 60px;
  }
}

/* ---------- Basics ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

h1, h2, h3, p, ul, dl, dd, figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

/* The bold, narrow headline style used across the site */
.display {
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.85;
  letter-spacing: -0.01em;
}

.label {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.text-link {
  display: inline-block;
  font-size: 14px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  background: rgba(247, 246, 243, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 13px;
  text-transform: uppercase;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-meta {
  display: none;               /* hidden on phones to save space */
  gap: 28px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.site-nav {
  display: flex;
  gap: 16px;
  font-weight: 700;
}

.site-nav a,
.contact-links a,
.text-link {
  transition: color 0.2s;
}

.site-nav a:hover,
.contact-links a:hover,
.text-link:hover {
  color: var(--accent);
}

@media (min-width: 900px) {
  .header-meta {
    display: flex;
  }
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--header-h) + 24px) var(--gutter) 0;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 8px;
}

.hero-intro {
  max-width: 22ch;
  text-wrap: balance;  /* evens out line lengths so no word sits alone */
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

.hero-year {
  color: var(--accent);
  font-stretch: 62%;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
}

.hero-name-wrap {
  width: 100%;
  overflow: hidden;
}

/* site.js sets the exact font-size so the name fills the width */
.hero-name {
  display: inline-block;
  white-space: nowrap;
  font-size: 22vw;
  font-stretch: 62%;
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: -0.01em;
  padding-bottom: 0.06em;
}

@media (min-width: 768px) {
  .hero-intro {
    font-size: 22px;
    max-width: 26ch;
  }
  .hero-year {
    font-size: 48px;
  }
}

/* ---------- Statement ---------- */

.statement {
  padding: 96px var(--gutter);
  display: grid;
  gap: 16px;
}

.statement-text {
  font-size: 22px;
  line-height: 1.25;
  max-width: 34ch;
}

@media (min-width: 768px) {
  .statement {
    padding: 160px var(--gutter);
    grid-template-columns: 1fr 3fr;
  }
  .statement-text {
    font-size: clamp(28px, 3vw, 44px);
  }
}

/* ---------- Section headings ---------- */

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  margin-top: 6px;
  font-size: clamp(44px, 9vw, 120px);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.85;
}

@media (min-width: 768px) {
  .section-head {
    margin-bottom: 72px;
  }
}

/* ---------- Project cards (shared by both grids) ---------- */

.works {
  padding: 48px var(--gutter) 96px;
}

.work-card {
  display: block;
}

.work-media {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--placeholder);
}

.work-media img,
.work-media .placeholder {
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.work-card:hover .work-media img,
.work-card:hover .work-media .placeholder {
  transform: scale(1.04);
}

.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-top: 6px;
  font-size: 12px;
}

.work-index {
  color: var(--muted);
}

.work-title {
  font-weight: 700;
  text-align: right;
}

/* fit: "contain" in projects.js: show the whole image, uncropped, on white */
.work-media.is-contain,
.gallery-item.is-contain {
  background: #ffffff;
}

.is-contain img {
  object-fit: contain;
  padding: 6%;
}

.placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--placeholder);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  text-align: center;
  padding: 8px;
}

/* ---------- Selected Collections: index list ---------- */

/* Phones: a list of big titles, each with a small thumbnail.
   Desktop: the list on the left, and a large photo on the right
   that switches to whichever collection you hover. */
.index {
  display: grid;
  gap: 40px;
}

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

.index-row a {
  display: grid;
  grid-template-columns: 64px 1fr;
  column-gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.index-thumb {
  grid-row: span 2;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--placeholder);
}

.index-num {
  display: block;
  color: var(--accent);
  font-size: 12px;
}

.index-title {
  display: block;
  font-size: clamp(30px, 8vw, 40px);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.88;
  transition: color 0.2s, transform 0.3s;
}

.index-year,
.index-cap {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.index-side {
  display: none;           /* the big hover photo is desktop-only */
}

@media (min-width: 900px) {
  .index {
    grid-template-columns: 1.4fr 1fr;
    gap: 56px;
    align-items: start;
  }

  .index-row a {
    grid-template-columns: 1fr auto;
    column-gap: 24px;
    padding: 18px 0;
  }

  .index-thumb {
    display: none;
  }

  .index-title {
    font-size: clamp(44px, 5vw, 80px);
  }

  .index-year {
    text-align: right;
  }

  .index-row a:hover .index-title,
  .index-row a:focus-visible .index-title,
  .index-row.is-on .index-title {
    color: var(--accent);
    transform: translateX(10px);
  }

  .index-side {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }

  .index-preview {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--placeholder);
  }

  .index-cap {
    margin-top: 10px;
  }
}

@media (min-width: 768px) {
  .work-meta {
    font-size: 13px;
  }
}

/* ---------- Graphic design grid ---------- */

.works--graphic {
  border-top: 1px solid var(--line);
  padding-top: 96px;
}

.graphic-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.graphic-grid .work-media {
  aspect-ratio: 4 / 3;
}

@media (min-width: 600px) {
  .graphic-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    row-gap: 40px;
  }
}

/* Three across on wide screens (six half-columns so a lone card
   on the last row can sit centered) */
@media (min-width: 1000px) {
  .graphic-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .graphic-grid .work-card {
    grid-column: span 2;
  }

  .graphic-grid .work-card:last-child:nth-child(3n + 1) {
    grid-column: 3 / 5;
  }
}

/* ---------- About ---------- */

.about {
  padding: 96px var(--gutter);
  border-top: 1px solid var(--line);
}

.about-body {
  display: grid;
  gap: 48px;
}

.about-bio {
  font-size: 20px;
  line-height: 1.3;
  max-width: 36ch;
}

.about-lists {
  display: grid;
  gap: 32px;
  align-content: start;
}

.about-list h3 {
  font-size: 12px;
  font-weight: 400;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.about-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.about-list li span:last-child:not(:first-child) {
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 900px) {
  .about-body {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
  .about-bio {
    font-size: clamp(24px, 2.4vw, 34px);
  }
}

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

.contact {
  background: var(--accent);
  color: var(--bg);
  padding: 72px var(--gutter) 24px;
  text-align: center;
}

.contact .label {
  color: var(--bg);
  opacity: 0.8;
}

.contact-kicker {
  margin-top: 16px;
  font-size: 18px;
}

.contact-big {
  display: block;
  margin: 24px 0 40px;
  font-size: clamp(64px, 18vw, 260px);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.85;
  transition: opacity 0.2s;
}

.contact-big:hover {
  opacity: 0.75;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  font-size: 14px;
  text-transform: uppercase;
}

.contact-links a:hover {
  color: var(--ink);
}

.copyright {
  margin-top: 64px;
  font-size: 12px;
  opacity: 0.7;
}

/* Trademark note under the gallery on fashion project pages */
.disclaimer {
  max-width: 640px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* ---------- Project page ---------- */

.project {
  padding: calc(var(--header-h) + 56px) var(--gutter) 0;
}

.project-hero {
  padding-bottom: 40px;
}

.project-title {
  margin: 12px 0 16px;
  font-size: clamp(56px, 14vw, 200px);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.85;
  overflow-wrap: anywhere;
}

.project-summary {
  font-size: 20px;
  line-height: 1.3;
  max-width: 36ch;
}

.project-info {
  display: grid;
  gap: 32px;
  padding: 32px 0 56px;
  border-top: 1px solid var(--line);
}

.meta-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.meta-row dt {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
  padding-top: 2px;
}

.project-description {
  display: grid;
  gap: 16px;
  font-size: 17px;
  max-width: 60ch;
}

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

.gallery-item {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--placeholder);
}

.gallery-item.is-wide {
  aspect-ratio: 3 / 2;
}

.next-project {
  display: block;
  padding: 96px 0;
  text-align: center;
}

.next-title {
  display: block;
  margin-top: 8px;
  font-size: clamp(48px, 11vw, 160px);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.85;
  transition: color 0.2s;
}

.next-project:hover .next-title {
  color: var(--accent);
}

@media (min-width: 768px) {
  .project-info {
    grid-template-columns: 1fr 2fr;
    gap: 64px;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .gallery-item.is-wide {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
  }
}

/* fit: "natural" in projects.js: show each image whole, at its own shape */
.gallery-item.is-natural,
.gallery-item.is-natural.is-wide {
  aspect-ratio: auto;
  background: none;
}

.is-natural img {
  height: auto;
}

/* Sketch sheet: flats with style name and fabric notes, on white */
.gallery-item.is-sheet {
  --sheet-col-gap: 16px;
  aspect-ratio: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px var(--sheet-col-gap);
  padding: 24px 16px;
  background: #ffffff;
}

/* An odd style out (e.g. the 3rd of 3) sits centered under the row above,
   at the same width as the others */
.sheet-style:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc((100% - var(--sheet-col-gap)) / 2);
}

.sheet-media {
  aspect-ratio: 3 / 2;
}

.sheet-media img {
  object-fit: contain;
}

.sheet-style figcaption {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  text-align: center;
}

.sheet-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.sheet-notes {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .gallery-item.is-sheet {
    --sheet-col-gap: 48px;
    gap: 56px var(--sheet-col-gap);
    padding: 56px;
  }

  .sheet-name,
  .sheet-notes {
    font-size: 13px;
  }
}

/* ---------- Fade-in on scroll ---------- */

/* Only hide things when JavaScript is running, so content
   never stays invisible if a script fails. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

.process {
  padding: 96px var(--gutter);
  border-top: 1px solid var(--line);
}

.process-intro {
  display: grid;
  gap: 16px;
  justify-items: start;
  max-width: 44rem;
  margin-bottom: 48px;
}

.process-style {
  /* stays on one line: shrinks on narrow screens instead of wrapping */
  white-space: nowrap;
  font-size: min(clamp(32px, 6vw, 72px), calc((100vw - 2 * var(--gutter)) / 12));
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.9;
}

.process-summary {
  font-size: 18px;
  line-height: 1.35;
  max-width: 40ch;
}

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

.process-step {
  display: grid;
  gap: 20px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
}

.process-index {
  display: block;
  color: var(--accent);
  font-size: 12px;
  margin-bottom: 6px;
}

.process-step h3 {
  font-size: clamp(28px, 4vw, 44px);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.9;
  margin-bottom: 12px;
}

.process-step p {
  font-size: 16px;
  max-width: 42ch;
}

.process-media {
  display: grid;
  gap: 16px;
}

.process-figure {
  background: #ffffff;
  padding: 16px;
}

.process-figure img {
  height: auto;            /* keep each image's natural shape, nothing cropped */
  object-fit: contain;
}

.process-figure.is-narrow {
  max-width: 420px;
  padding: 0;
}

.process-figure figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .process {
    padding: 160px var(--gutter);
  }

  .process-intro {
    margin-bottom: 72px;
  }

  .process-step {
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    padding: 40px 0 64px;
  }
}

/* Phones: tighten the header so all four nav links fit */
@media (max-width: 480px) {
  .site-header {
    font-size: 11.5px;
  }
  .site-nav {
    gap: 12px;
  }
}

/* Very narrow phones: drop the small name in the header (the nav still links home) */
@media (max-width: 359px) {
  .site-header .logo {
    display: none;
  }
  .site-header {
    justify-content: flex-end;
  }
}

/* Several images side by side in one process stage (set with "columns" in process.js) */
@media (min-width: 768px) {
  .process-media {
    grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
    align-items: start;
  }
}

/* "uniform" stages: every image in a same-size white box, two per row on phones */
.process-media.is-uniform {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.process-media.is-uniform .process-figure {
  aspect-ratio: 4 / 5;
  padding: 0;
}

.process-media.is-uniform .process-figure img {
  height: 100%;
}

@media (min-width: 768px) {
  .process-media.is-uniform {
    grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
    gap: 16px;
  }
}

/* ---------- About: headline stats ---------- */

.stats {
  margin-bottom: 56px;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--ink);
}

.stat {
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}

.stat:nth-child(odd) {
  padding-right: 12px;
}

.stat dt {
  font-size: clamp(48px, 13vw, 96px);
  font-stretch: 62%;
  font-weight: 800;
  line-height: 0.9;
  white-space: nowrap;
}

.stat dd {
  margin: 8px 0 0;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.stats-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

@media (min-width: 900px) {
  .stats {
    margin-bottom: 80px;
  }

  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .stat {
    padding: 24px 24px 28px 0;
  }

  .stat dt {
    font-size: clamp(64px, 7vw, 112px);
  }
}
