:root {
  --ink: #111111;
  --paper: #ffffff;
  --accent: rgba(17,17,17,0.6);
  --accent-2: rgba(17,17,17,0.6);
  --faint: rgba(17,17,17,0.45);
  --word-red: #c43d45;
  --word-orange: #c87518;
  --word-engineering: #173a8a;
  --word-manufacture: #1975ad;
  --word-purple: #7042a4;
  --word-product: #168a78;
  --word-visualisation: #168a78;
  --word-electronics-software: #f2c900;
  --word-three-d: #2b8c9d;
  --word-brand: #b34b87;
  --word-identity: #53823d;
  --word-product-visualisation: #168a78;
  --word-brand-identity: #d94f9a;
  --pad: clamp(12px, 1.5vw, 24px);
  --body-size: clamp(1rem, 1.1vw, 1.125rem);
}

/* Inter (variable, 100-900), self-hosted. SIL Open Font License: fonts/Inter-OFL.txt */
@font-face {
  font-family: 'Inter';
  src: url('./fonts/Inter-Variable-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  src: url('./fonts/Inter-Variable-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: rgba(17,17,17,0.6);
  font-weight: 400;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: rgba(17,17,17,0.6); text-decoration: none; transition: color 150ms ease; }
a:hover { color: var(--ink); }

.page {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

.content {
  display: flex;
  flex-direction: column;
  width: 50vw;
  padding: var(--pad);
  padding-top: 12px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  z-index: 2;
}

.index {
  margin-top: clamp(1.2rem, 4vh, 2rem);
  padding-right: clamp(1.5rem, 4vw, 3.5rem);
}

.header-info {
  margin-right: clamp(1.5rem, 4vw, 3.5rem);
}

.index-group + .index-group {
  margin-top: 1rem;
}

.index-title {
  color: var(--faint);
  font-size: 12px;
  line-height: 1.4;
}

.index-list {
  margin-top: 0.9rem;
}

header{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  padding:28px 0;
}

.wordmark{ display:inline-flex; gap:6px; font-size:12px; letter-spacing:1px; margin:0; padding:0; }
.wordmark span{ animation:breathe 1.8s infinite ease-in-out; display:inline-block; }
.wordmark span:nth-child(2){ animation-delay:.25s; }
.wordmark span:nth-child(3){ animation-delay:.5s; }
@keyframes breathe{
  0%,60%,100%{ opacity:1; transform:translateY(0); }
  30%{ opacity:.35; transform:translateY(-1px); }
}

.tagline{ color:var(--faint); font-size:12px; }

/* Header action text links (right side) */
.header-actions{ display:flex; gap:18px; align-items:center; }
.pill {
  appearance:none;
  border:0;
  background: transparent;
  color: var(--faint);
  padding: 0;
  border-radius: 0;
  font-size:12px;
  line-height:1;
  cursor:pointer;
  transition: color 200ms ease, transform 300ms cubic-bezier(.2,.8,.3,1);
  font-family: inherit;
}
.pill:hover{ color: var(--ink); transform: translateY(-2px); }
.pill:focus{ outline:2px solid rgba(17,17,17,0.12); outline-offset:3px; }

.index ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--body-size);
  line-height: 1.4;
}
.index .index-list {
  margin-top: 0.9rem;
}
.index ul li {
  width: 100%;
  margin-bottom: 0.35rem;
}
.index ul li a {
  color: rgba(17,17,17,0.6);
  transition: color 150ms ease;
}
.index ul li a:hover {
  color: var(--ink);
}

/* Project index rows: name + year, aligned like a table */
.index ul li .project-row {
  display: flex;
  align-items: baseline;
  column-gap: clamp(0.75rem, 1.5vw, 1.25rem);
  width: 100%;
}
.index ul li .project-row {
  position: relative;
}
.index ul li .project-row::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 7rem;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.72) 48%, var(--paper));
  pointer-events: none;
}

.index ul li span.project-row {
  cursor: default;
}
.index ul li span.project-row:hover {
  color: var(--faint);
}
.project-row .project-name {
  min-width: clamp(9rem, 16vw, 14rem);
  display: inline-block;
}
.project-row .project-description {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
  text-align: left;
}
.project-row .project-description > span {
  display: inline-block;
  white-space: nowrap;
}
.content .index-list li:hover .project-row .project-name,
.content .index-list li:hover .project-row .project-description,
.content .index-list li:hover .project-row .project-year {
  color: var(--ink);
}
.content .project-row .word-strategy,
.content .project-row .word-engineering,
.content .project-row .word-manufacture,
.content .project-row .word-electronics-software,
.content .project-row .word-design,
.content .project-row .word-concept,
.content .project-row .word-product,
.content .project-row .word-visualisation,
.content .project-row .word-three-d,
.content .project-row .word-brand,
.content .project-row .word-identity,
.content .project-row .word-product-visualisation,
.content .project-row .word-brand-identity,
.content .project-row .word-three-d-brand-identity {
  color: var(--faint);
  transition: color 180ms ease;
}
.content .index-list li:hover .word-strategy { color: var(--word-red); }
.content .index-list li:hover .word-engineering { color: var(--word-engineering); }
.content .index-list li:hover .word-manufacture { color: var(--word-manufacture); }
.content .index-list li:hover .word-electronics-software { color: var(--word-electronics-software); }
.content .index-list li:hover .word-design,
.content .index-list li:hover .word-concept { color: var(--word-purple); }
.content .index-list li:hover .word-product { color: var(--word-product); }
.content .index-list li:hover .word-visualisation { color: var(--word-visualisation); }
.content .index-list li:hover .word-three-d { color: var(--word-three-d); }
.content .index-list li:hover .word-brand { color: var(--word-brand); }
.content .index-list li:hover .word-identity { color: var(--word-identity); }
.content .index-list li:hover .word-product-visualisation { color: var(--word-product-visualisation); }
.content .index-list li:hover .word-brand-identity,
.content .index-list li:hover .word-three-d-brand-identity { color: var(--word-brand-identity); }
.content .project-row .project-description .project-character {
  display: inline-block;
  color: inherit;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .content .index-list li:hover .project-character {
    animation: project-character-lift 520ms cubic-bezier(.2,.8,.3,1) both;
    animation-delay: calc(var(--character-index) * 24ms);
  }
}
@keyframes project-character-lift {
  45% { opacity: .92; transform: translateY(-2px); }
  100% { opacity: 1; transform: translateY(0); }
}
.content .index-list li:hover .word-strategy,
.content .index-list li:hover .word-engineering,
.content .index-list li:hover .word-manufacture,
.content .index-list li:hover .word-electronics-software,
.content .index-list li:hover .word-design,
.content .index-list li:hover .word-concept,
.content .index-list li:hover .word-product,
.content .index-list li:hover .word-visualisation,
.content .index-list li:hover .word-three-d,
.content .index-list li:hover .word-brand,
.content .index-list li:hover .word-identity,
.content .index-list li:hover .word-product-visualisation,
.content .index-list li:hover .word-brand-identity,
.content .index-list li:hover .word-three-d-brand-identity {
  font-weight: 500 !important;
}
.project-row .project-year {
  position: relative;
  z-index: 2;
  margin-left: auto;
  color: var(--faint);
}

.enquiries {
  margin-top: auto;
  max-width: 62ch;
  line-height: 1.4;
}

.chromatic-email > span {
  display: inline-block;
  transition: color 150ms ease;
}

.content .chromatic-email:hover > span {
  color: var(--word-orange);
  animation: breathe 1.8s infinite ease-in-out;
}

.about {
  margin-top: auto;
  max-width: 62ch;
  font-size: var(--body-size);
  line-height: 1.35;
}

.about p {
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.about p + p {
  margin-top: 0.8em;
}

/* Make most page text match the tagline style: subtle and small */
.content :is(p, li, address, div, span, h2, h3, h4, h5, a) {
  color: var(--faint);
  font-size: 12px;
  transition: color 150ms ease;
}
.content :is(p, li, address, div, span, h2, h3, h4, h5, a):hover {
  color: var(--ink);
}

.about strong {
  color: var(--accent);
  font-weight: 400;
}

/* Force regular weight for all content elements to avoid bold text */
.content * {
  font-weight: 400 !important;
}

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: clamp(2rem, 4vh, 3rem);
  max-width: 62ch;
  font-size: var(--body-size);
  line-height: 1.5;
  font-style: normal;
}

/* Right panel: draggable photo stack, centred. overflow:hidden keeps
   dragged cards inside the right half. */
.hero {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  overflow: hidden;
  z-index: 1;
}

@media (max-width: 900px) {
  .page { display: block; }
  .content { width: 100%; min-height: auto; }
  .content > header { order: 0; }
  .about { order: 1; margin-top: 1.5rem; padding-top: 0; }
  .index { order: 2; margin-top: 2rem; }
  .enquiries { order: 3; margin-top: 1.5rem; }
  .content > footer { order: 4; }
  .hero {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    padding-top: 1rem;
  }
  .content.content--overlay { background: var(--paper); pointer-events: auto; }
  .content.content--wall { width: 100%; }
  .project-summary { margin-top: 1rem; max-width: 100%; }
  .content .statement { max-width: 52ch; padding-bottom: 1.5rem; font-size: 1.25rem !important; }
  .index ul li .project-row { column-gap: 0.5rem; }
  .project-row .project-name { min-width: 0; flex: 1; }
  .project-row .project-description { display: none; }
  .index ul li .project-row::after { display: none; }
}

/* Project pages (e.g. Camroll): the photo stack fills the whole page as a
   full-bleed background layer, with the text content overlaid on top
   (transparent background) instead of confined to its own half. */
.hero.hero--full {
  left: 0;
  right: 0;
  width: 100vw;
}

.content.content--overlay {
  background: transparent;
  /* The text box's own (invisible) padding/whitespace would otherwise sit on
     top of the photo stack and block clicks from ever reaching it. Let clicks
     pass straight through the box, and only re-enable them on actual links. */
  pointer-events: none;
}

.content.content--wall {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: calc(46ch + 2 * var(--pad));
  font-size: 12px;
  background: var(--paper);
}

@media (max-width: 900px) {
  .content.content--wall {
    width: 100%;
    min-width: 0;
  }
}

.content.content--overlay a {
  pointer-events: auto;
}

/* ---------------------------------- */
/* Project detail page (long scroll)   */
/* ---------------------------------- */

.project-page {
  padding: var(--pad);
  padding-top: 12px;
}

.information-page {
  padding-top: 12px;
}

.project-body {
  max-width: 1100px;
  margin: 0 auto;
}

.information-body {
  max-width: 1200px;
}

.statement {
  max-width: 30ch;
  margin: 0;
  padding: 0 0 clamp(3rem, 6vw, 6rem);
  font-size: clamp(1rem, 2vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-align: left;
  align-self: flex-start;
}

.information-body {
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.info-table {
  width: 100%;
}

.info-table .row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 0 clamp(1rem, 2vw, 2.5rem);
  align-items: start;
}

.info-table .table-head {
  color: var(--faint);
  padding-bottom: 1.4rem;
}

.info-table .section {
  padding-bottom: clamp(3rem, 6vw, 6rem);
  transition: opacity 220ms ease;
}

.info-table .subrow {
  padding-bottom: clamp(1.5rem, 3vw, 3rem);
  transition: opacity 220ms ease;
}

.info-table .subrow:last-child {
  padding-bottom: 0;
}

.info-table .row-label {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
}

.info-table h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--ink);
}

.info-table p,
.info-table li,
.info-table .clients li,
.info-table .row-label,
.info-table .table-head,
.info-table .stack,
.info-table .row > p,
.info-table .row > h2,
.info-table .row > h3 {
  font-size: 12px;
  line-height: 1.5;
}

.info-table .stack {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--faint);
}

.info-table .clients {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(1rem, 2vw, 2.5rem);
}

.info-table .clients ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-table .clients li {
  margin-bottom: 0.2rem;
  color: var(--ink);
}

.info-table .row > p {
  color: var(--ink);
  max-width: 38ch;
}

.info-table .row > p a {
  color: var(--ink);
}

.info-table:hover .section:not(:hover) {
  opacity: 0.42;
}

.info-table .section:hover .subrow:not(:hover) {
  opacity: 0.42;
}

.info-table .section:hover .row:not(:hover) {
  opacity: 0.42;
}

@media (max-width: 900px) {
  .information-body {
    max-width: 100%;
  }

  .info-table .row {
    grid-template-columns: 1fr;
    gap: 0.5rem 0;
  }

  .info-table .table-head {
    display: none;
  }

  .info-table .row-label {
    color: var(--faint);
    margin-bottom: 0.25rem;
  }

  .info-table .clients {
    grid-column: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1.5rem;
  }

  .info-table .section {
    padding-bottom: 3rem;
  }

  .info-table .subrow {
    padding-bottom: 1.75rem;
  }
}

/* Previous / Next project links (built by project-nav.js) */
.project-nav {
  position: fixed;
  left: var(--pad);
  bottom: var(--pad);
  z-index: 1000;
  display: flex;
  gap: 1.2em;
  font-size: 12px;
  line-height: 1.3;
}

.project-nav__link {
  color: var(--faint);
}

.project-nav__link:hover {
  color: var(--ink);
  font-weight: 500;
}

.project-nav .project-character {
  display: inline-block;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .project-nav__link:hover .project-character {
    animation: project-character-lift 520ms cubic-bezier(.2,.8,.3,1) both;
    animation-delay: calc(var(--character-index) * 24ms);
  }
}

@media (max-width: 900px) {
  /* Stay pinned bottom-left as on desktop: below the fold it can't be reached,
     because the photo row only scrolls sideways. */
  .project-nav {
    left: 0;
    bottom: 0;
    padding: 10px var(--pad) 12px;
    background: var(--paper);
    border-top-right-radius: 8px;
    font-size: 11px;
  }

  body:has(.project-nav) {
    padding-bottom: 44px;
  }
}

/* Information page: bio + clients + contact on the left, portrait on the right */
.info-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(2rem, 6vw, 8rem);
  margin-top: clamp(2.5rem, 6vh, 4rem);
}

.info-text {
  max-width: 62ch;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
}

.info-text p {
  margin-bottom: 1.2em;
}

.info-services {
  margin-top: 2.4em;
}

.info-services .index-title {
  margin-bottom: 0.9rem;
}

.info-services .word-strategy { color: var(--word-red); }
.info-services .word-concept,
.info-services .word-design { color: var(--word-purple); }
.info-services .word-engineering { color: var(--word-engineering); }
.info-services .word-electronics-software { color: var(--word-electronics-software); }
.info-services .word-manufacture { color: var(--word-manufacture); }
.info-services .word-three-d-brand-identity { color: var(--word-brand-identity); }
.info-services .word-visualisation { color: var(--word-visualisation); }
.info-services .word-product-visualisation { color: var(--word-product-visualisation); }

.info-services .project-character {
  display: inline-block;
  color: inherit;
}

/* Each letter is its own inline-block (for the lift animation), which would
   otherwise let a service break mid-word; keep each service in one piece so
   lines only break between services. */
.info-services p > span {
  white-space: nowrap;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .info-services p:hover .project-character {
    animation: project-character-lift 520ms cubic-bezier(.2,.8,.3,1) both;
    animation-delay: calc(var(--character-index) * 24ms);
  }
}

.info-text a {
  color: var(--faint);
  text-decoration: none;
}

.info-text a:hover {
  color: var(--ink);
}

.info-heading {
  margin-top: 2.4em;
  margin-bottom: 1.2em;
  font-size: inherit;
  font-weight: 400;
}

.info-links {
  list-style: none;
  margin-top: 2.4em;
}

.info-links li {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin-bottom: 1em;
}

.info-links svg {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.info-portrait {
  flex: none;
  position: relative;
  width: clamp(220px, 22vw, 380px);
}

.info-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #eeeeee;
}

/* Revealed when the portrait is hovered. Padding rather than a gap above it,
   so moving the pointer down onto the email doesn't lose the hover. */
.info-portrait figcaption {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding-top: 10px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.info-portrait:hover figcaption {
  opacity: 1;
  pointer-events: auto;
}

.info-portrait figcaption a {
  color: var(--faint);
}

.info-portrait figcaption a:hover {
  color: var(--ink);
}

/* Touch screens can't hover, so show it there */
@media (hover: none) {
  .info-portrait figcaption {
    position: static;
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 900px) {
  .info-layout {
    flex-direction: column;
    gap: 2.4rem;
  }

  .info-portrait {
    width: min(100%, 320px);
    margin-bottom: var(--pad);
  }

  /* The portrait sits below the bio here, so keep room for the caption */
  .info-portrait figcaption {
    position: static;
  }

  /* Let the services list wrap naturally instead of at the desktop break,
     adding the comma the break stood in for */
  .info-services br {
    display: none;
  }

  .info-services p > span:has(+ br)::after {
    content: ",";
    margin-right: 0.28em;
    color: var(--faint);
  }
}

.project-footer {
  margin-top: clamp(3rem, 6vh, 5rem);
  padding: 24px 0 40px;
}

/* Project detail page (50/50 split, same layout as the homepage) */
.project-summary {
  margin-top: clamp(1.2rem, 4vh, 2rem);
  max-width: 46ch;
}

/* .statement is defined for the information page; this reasserts its look
   when reused inside .content, whose catch-all text rule would otherwise
   shrink it back down to the faint 12px body style. */
.content .statement {
  color: var(--ink) !important;
  font-size: clamp(1rem, 2vw, 2rem) !important;
}

/* Links inside a statement (agency/client credits) match the statement size. */
.content .statement a {
  font-size: inherit;
}

/* Detailed project summary: large statement, then the project's coloured
   service tags (same words and colours as the homepage index). */
.content .project-summary--detailed {
  max-width: none;
}

.content .project-summary--detailed .statement {
  max-width: 28ch;
  padding-bottom: 0;
  font-size: clamp(0.8rem, 1.6vw, 1.6rem) !important;
  /* Evens out the right edge; project-summary.js refines this for any
     number of lines. */
  text-wrap: balance;
}

/* Same size as the homepage index tags. */
.content .project-summary--detailed .project-tags {
  margin-top: 1.5rem;
  font-size: 12px;
  line-height: 1.3;
}

/* Project year, one line below the tags (years match the homepage list) */
.content .project-summary--detailed .project-year-note {
  margin-top: 1.3em;
  font-size: 12px;
  line-height: 1.3;
  color: var(--faint);
}

.content .project-tags > span {
  display: inline-block;
  font-size: inherit;
  margin-right: 0.6em;
  cursor: default;
  /* The overlay ignores the pointer (so the photo stack stays draggable);
     re-enable it on the tags so they can react to hover. */
  pointer-events: auto;
}

.content .project-tags > span:hover {
  font-weight: 500 !important;
}

.content .project-tags .project-character {
  display: inline-block;
  font-size: inherit;
  color: inherit;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .content .project-tags > span:hover .project-character {
    animation: project-character-lift 520ms cubic-bezier(.2,.8,.3,1) both;
    animation-delay: calc(var(--character-index) * 24ms);
  }
}

.content .project-tags .word-strategy { color: var(--word-red); }
.content .project-tags .word-engineering { color: var(--word-engineering); }
.content .project-tags .word-manufacture { color: var(--word-manufacture); }
.content .project-tags .word-electronics-software { color: var(--word-electronics-software); }
.content .project-tags .word-design,
.content .project-tags .word-concept { color: var(--word-purple); }
.content .project-tags .word-visualisation { color: var(--word-visualisation); }
.content .project-tags .word-product-visualisation { color: var(--word-product-visualisation); }
.content .project-tags .word-three-d-brand-identity { color: var(--word-brand-identity); }

@media (max-width: 900px) {
  .content .project-summary--detailed .statement {
    max-width: 40ch;
    padding-bottom: 0;
    font-size: 14px !important;
  }

  .content .project-summary--detailed .project-tags,
  .content .project-summary--detailed .project-year-note {
    font-size: 11px;
  }

  .content .project-summary--detailed {
    padding-bottom: 1.5rem;
  }
}

@media (max-width: 900px) {
  .content.content--overlay {
    background: var(--paper);
    pointer-events: auto;
  }

  .content :is(p, li, address, div, span, h2, h3, h4, h5, a) {
    font-size: 11px;
  }

  .content .statement {
    font-size: 14px !important;
  }
}
