/* NICK™ HQ v006 — based on preview 005.1. System type, paper ground, editorial grid. */

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-field,
  .floating-top { transition: none; }
}

body {
  margin: 0;
  background: #f5f4ef;
  color: #171717;
  font: 16px/1.5 Arial, Helvetica, sans-serif;
  overflow-x: clip;
}

a { color: inherit; }

/* Skip link */
.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 200;
  padding: 12px 16px;
  background: #171717;
  color: #fff;
  text-decoration: none;
  font: 11px/1.5 monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
  transform: translateY(-150%);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.shell {
  max-width: 1440px;
  margin: auto;
  padding-inline: clamp(24px, 7vw, 104px);
  min-width: 0;
}

header,
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 36px;
  flex-wrap: wrap;
}

header {
  border-bottom: 1px solid #222;
}

footer {
  border-top: 1px solid #222;
}

.brand {
  display: inline-flex;
  align-items: flex-start;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  font-kerning: normal;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}
.brand .wordmark { display: inline-flex; align-items: baseline; }
.brand .n { margin-right: -.025em; }
.brand .i { margin-right: -.045em; }
.brand .c { margin-right: -.035em; }
.brand sup {
  font-size: .43em;
  line-height: 1;
  letter-spacing: 0;
  margin-left: .16em;
  margin-top: .04em;
}
.brand:hover { text-decoration: none; opacity: .75; }

small,
.meta {
  font: 11px/1.5 monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}

header nav {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

header a { text-decoration: none; }
header a:hover,
header nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
}
header a:focus-visible,
.brand:focus-visible,
.gallery-tile:focus-visible,
.back-top:focus-visible,
.button:focus-visible,
.content-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.hero {
  padding-block: clamp(88px, 14vw, 184px) clamp(88px, 10vw, 144px);
  border-bottom: 1px solid #222;
}
/* Interior page titles use the 005.1 section size. The oversized
   headline is reserved for the home hero. */
h1,
h2 {
  font-size: clamp(24px, 4vw, 44px);
  letter-spacing: -.06em;
  margin: 0;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(56px, 11vw, 164px);
  line-height: .86;
  letter-spacing: -.085em;
  margin: 24px 0 48px;
  font-weight: 700;
}

p { max-width: 480px; margin: 0; }

.section {
  padding-block: clamp(48px, 6vw, 88px) clamp(80px, 9vw, 128px);
  min-width: 0;
  max-width: 100%;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 40px;
}

.intro { margin: 24px 0 40px; max-width: 640px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  min-width: 0;
  max-width: 100%;
}
.wide { grid-column: 1 / -1; }

.label {
  display: flex;
  justify-content: space-between;
  padding-block: 20px;
  border-bottom: 1px solid #aaa;
  gap: 20px;
}

.case { border-top: 0; scroll-margin-top: 32px; }

/* Project palettes stay on the work, never on global chrome. */
.project-pez {
  --project-ink: #455541;
  --project-paper: #dce2d8;
  --project-rule: #a6b39e;
}
.project-summer {
  --project-ink: #764b3d;
  --project-paper: #e8d9ce;
  --project-rule: #c8a390;
}

.project-pez .label,
.project-summer .label { border-color: var(--project-rule); }
.project-pez .label small,
.project-summer .label small { color: var(--project-ink); }
.project-pez .label strong::before,
.project-summer .label strong::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--project-ink);
  margin-right: 10px;
  vertical-align: 2px;
}

.portfolio-image {
  margin: 0;
  background: #eeede7;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 56px);
}
.portfolio-image img,
.portfolio-image picture {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}
.portfolio-image img {
  max-height: 850px;
  object-fit: contain;
}
.pez-lead .portfolio-image {
  background: #e0e5db;
  padding: clamp(20px, 5vw, 72px);
}
.pez-lead .portfolio-image img { max-height: 640px; }

.project-pez .section-heading h1,
.project-pez .section-heading h2 { letter-spacing: -.055em; }

/* Reserved application fields — numerals at full ink for contrast. */
.art-field {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 4 / 3;
  padding: clamp(20px, 4vw, 56px);
  background: var(--project-paper, #e6e5df);
  color: var(--project-ink, #333);
  overflow: hidden;
}
.art-index {
  font-size: clamp(42px, 9vw, 124px);
  line-height: 1;
  letter-spacing: -.055em;
  font-weight: 700;
  opacity: 1;
  color: var(--project-ink, #333);
}
.art-caption {
  font: 11px/1.5 monospace;
  text-transform: uppercase;
  letter-spacing: .07em;
  max-width: 28em;
  color: var(--project-ink, #333);
}
.wide .art-field { aspect-ratio: 2.4 / 1; }

.continuation {
  margin-top: clamp(64px, 10vw, 140px);
  padding-top: 32px;
  border-top: 1px solid #222;
}

/* Home / more-work gallery — 005.1 four-column system */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
  min-width: 0;
  max-width: 100%;
}
.gallery-tile {
  display: block;
  position: relative;
  text-decoration: none;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.gallery-field {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--project-paper, #e6e5df);
  color: var(--project-ink, #333);
  font-size: clamp(19px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: -.045em;
  text-align: center;
  transition: filter .15s;
}
.gallery-tile:hover .label { text-decoration: underline; }
.gallery-tile:hover .gallery-field { filter: brightness(.94); }
.gallery-tile:focus-visible { outline-offset: 4px; }

.gallery-number {
  font-size: clamp(30px, 5vw, 76px);
  line-height: 1;
  letter-spacing: -.06em;
  font-weight: 700;
  color: var(--project-ink, #333);
}

.gallery-study {
  width: 90%;
  height: 90%;
  max-height: 160px;
}

.study-index {
  position: absolute;
  bottom: 9px;
  left: 12px;
  font: 11px/1.3 monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--project-ink, #333);
}

.gallery-tile .label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
}
.gallery-tile .label small { color: var(--project-ink); }
.gallery-tile .soon {
  display: block;
  color: var(--project-ink);
}

.next-actions {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.content-link,
.next-actions a,
.back-link,
.shop-cta {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.content-link:hover,
.next-actions a:hover,
.back-link:hover,
.shop-cta:hover { text-decoration-thickness: 2px; }

.shop-cta { display: inline-block; margin-top: 16px; }

.coming-soon-note {
  margin-top: 24px;
  font: 11px/1.5 monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.back-link {
  display: inline-block;
  margin-top: 32px;
  font: 11px/1.5 monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* Contact form */
.contact-form {
  margin-top: 40px;
  max-width: 640px;
  display: grid;
  gap: 24px;
}
.contact-form .field { display: grid; gap: 8px; }
.contact-form label,
.contact-form .field-label {
  font: 11px/1.5 monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font: 16px/1.5 Arial, Helvetica, sans-serif;
  color: #171717;
  background: #f5f4ef;
  border: 1px solid #222;
  border-radius: 0;
  padding: 12px 14px;
  width: 100%;
  appearance: none;
  box-shadow: none;
}
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.contact-form .error {
  font: 13px/1.4 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: #6b2a24;
  min-height: 1.2em;
}
.contact-form .field[data-invalid="true"] input,
.contact-form .field[data-invalid="true"] textarea,
.contact-form .field[data-invalid="true"] select {
  border-color: #6b2a24;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.button {
  font: 11px/1.5 monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 12px 18px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  width: fit-content;
}
.button:hover,
.button:focus-visible {
  background: #171717;
  color: #fff;
}
.button:disabled { opacity: .55; cursor: not-allowed; }
.form-status {
  font: 16px/1.5 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  max-width: 40em;
  min-height: 1.5em;
}
.form-status[data-state="ok"] { color: #455541; }
.form-status[data-state="wait"] { color: #555; }
.form-status[data-state="error"] { color: #6b2a24; }

.form-note {
  margin-top: 16px;
  max-width: 640px;
}

/* Back to top */
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid #aaa;
}
.back-top:hover { border-color: currentColor; }

.floating-top {
  position: fixed;
  right: clamp(16px, 3vw, 40px);
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  padding: 12px 16px;
  background: #f5f4ef;
  color: #171717;
  border: 1px solid #b6b5ae;
  box-shadow: 0 3px 16px #00000012;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s;
}
.floating-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.floating-top:hover {
  background: #171717;
  color: #fff;
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .shell { padding-inline: 24px; }
  header, footer { padding-block: 24px; }
  header nav { gap: 16px; }
  .hero { padding-block: 72px 80px; }
  .hero h1 { margin-bottom: 32px; }
  h1 { letter-spacing: -.075em; }
  .section { padding-block: 48px 72px; }
  .section-heading { margin-bottom: 28px; flex-wrap: wrap; }
  .grid { grid-template-columns: 1fr; gap: 32px; }
  .wide .art-field { aspect-ratio: 4 / 3; }
  .label { padding-block: 16px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .floating-top {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 10px 12px;
  }
}
