/* TBIT Design – one stylesheet, no framework.
   Bold in one place (the yellow headline field), quiet everywhere else. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/assets/fonts/archivo-latin-wdth-normal.woff2) format("woff2");
  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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/assets/fonts/archivo-latin-ext-wdth-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/assets/fonts/archivo-latin-wdth-italic.woff2) format("woff2");
  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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --yellow: #ffe100;   /* from the TBIT bubbles */
  --grey: #595959;     /* secondary text, 7:1 on white */
  --rule: #dedede;
  --tile: #f3f3f1;     /* image placeholders */

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --row: 112px;        /* target row height of the work galleries */
  --gap: 6px;
  color-scheme: light;
}
@media (min-width: 700px) { :root { --row: 210px; --gap: 8px; } }
@media (min-width: 1200px) { :root { --row: 250px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--yellow); color: var(--ink); }
h1, h2, h3 { line-height: 1.05; margin: 0; font-weight: 760; font-stretch: 112%; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -100px; background: var(--ink); color: var(--paper); padding: .5em 1em; z-index: 10; }
.skip:focus { top: 8px; }

/* ---------- header */
.site-header { border-bottom: 1px solid var(--rule); }
.home .site-header { border-bottom: 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; flex-wrap: wrap; padding-block: 12px; }
.logo { display: block; line-height: 0; }
.logo img { width: 210px; height: auto; }
@media (min-width: 700px) { .logo img { width: 250px; } }
.site-header nav ul { display: flex; gap: clamp(1rem, 3vw, 2.25rem); list-style: none; margin: 0; padding: 0; }
.site-header nav a { text-decoration: none; font-weight: 600; font-stretch: 110%; }
.site-header nav a:hover, .site-header nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; }

/* ---------- the one loud thing */
.hero { background: var(--yellow); padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 4.25rem);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -.015em;
}

/* ---------- intro */
.intro { padding-block: clamp(2.5rem, 6vw, 5rem) 0; }
.intro-text p:first-child { font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.35; font-weight: 500; font-stretch: 105%; margin-bottom: 1.25em; }
@media (min-width: 900px) {
  .intro-text { columns: 2; column-gap: clamp(2.5rem, 5vw, 5rem); }
  .intro-text p { break-inside: avoid; }
  .intro-text p:first-child { column-span: all; }
}
.mail { color: var(--ink); font-weight: 650; font-stretch: 110%; text-decoration-thickness: 2px; }
.mail:hover { text-decoration-thickness: 4px; background: var(--yellow); }

/* ---------- section blocks */
.block { padding-block: clamp(2.5rem, 6vw, 5rem) 0; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 1.5rem; }
.block-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.9rem); }
.block-head p { margin: 0; color: var(--grey); }
.block-head a { font-weight: 600; }

/* ---------- justified work gallery: rows of equal height, no cropping */
.gallery { display: flex; flex-wrap: wrap; gap: var(--gap); list-style: none; margin: 0; padding: 0; }
.gallery::after { content: ""; flex-grow: 1000000; }
.w { --ar: 1.5; flex: var(--ar) 1 calc(var(--ar) * var(--row)); margin: 0; scroll-margin-top: 2rem; }
.w a { display: block; aspect-ratio: var(--ar); background: var(--tile); overflow: hidden; }
.w img { width: 100%; height: 100%; object-fit: cover; }
.w a:focus-visible { outline-offset: 2px; }
.w a:hover img { opacity: .88; }
.w:target a { outline: 4px solid var(--yellow); outline-offset: 2px; }

/* ---------- client logo slider (two copies of the list loop seamlessly) */
.slider {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.logos { display: flex; flex: none; align-items: center; list-style: none; margin: 0; padding: 0; animation: slide 70s linear infinite; }
.logos li { flex: none; width: 150px; margin-right: 1rem; }
.logos img { width: 100%; mix-blend-mode: multiply; filter: grayscale(1); opacity: .8; transition: opacity .2s, filter .2s; }
.logos img:hover { opacity: 1; filter: none; }
.slider:hover .logos, .slider.paused .logos { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-100%); } }
@media (min-width: 700px) { .logos li { width: 180px; margin-right: 1.5rem; } }
.slider-toggle { font: inherit; font-weight: 600; font-size: .95rem; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); padding: .3em .9em; cursor: pointer; }
.slider-toggle:hover { background: var(--yellow); }

/* ---------- testimonials */
.quotes { columns: 1; column-gap: clamp(2rem, 4vw, 4rem); }
@media (min-width: 700px) { .quotes { columns: 2; } }
@media (min-width: 1100px) { .quotes { columns: 3; } }
.quote { break-inside: avoid; margin: 0 0 2.25rem; padding-top: .9rem; border-top: 1px solid var(--rule); }
.quote blockquote { margin: 0; font-style: italic; font-stretch: 96%; line-height: 1.65; }
.quote blockquote p { margin-bottom: .6em; }
.quote figcaption { font-weight: 700; font-stretch: 110%; font-size: .95rem; }
.more-quotes summary { cursor: pointer; font-weight: 600; display: inline-block; padding: .6em 1.1em; border: 2px solid var(--ink); margin-bottom: 2rem; list-style: none; }
.more-quotes summary::-webkit-details-marker { display: none; }
.more-quotes summary:hover { background: var(--yellow); }
.more-quotes[open] summary { display: none; }

/* ---------- own projects */
.projects { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--ink); }
.projects li { border-top: 1px solid var(--ink); }
.projects a { display: grid; gap: .25rem 2rem; padding-block: 1.1rem; text-decoration: none; }
.p-name { font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 720; font-stretch: 115%; line-height: 1.15; }
.p-text { color: var(--grey); max-width: 46rem; }
.p-url { font-size: .95rem; text-decoration: underline; text-underline-offset: .18em; }
.projects a:hover .p-name { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .15em; }
@media (min-width: 900px) {
  .projects a { grid-template-columns: minmax(14rem, 22rem) 1fr auto; align-items: baseline; }
}

/* ---------- contact */
.contact { padding-bottom: clamp(3rem, 8vw, 6rem); }
.contact h2 { font-size: clamp(1.9rem, 4.5vw, 3.6rem); max-width: 18ch; margin-bottom: .6em; }
.mail.big { font-size: clamp(1.4rem, 3.5vw, 2.4rem); display: inline-block; margin-top: .25rem; overflow-wrap: anywhere; }

/* ---------- inner pages */
.page-head { padding-block: clamp(2rem, 5vw, 4rem) 1.75rem; }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 4.8rem); font-stretch: 122%; font-weight: 800; margin-bottom: .35em; }
.page-head p { color: var(--grey); max-width: 44rem; }
.crumb { margin-bottom: .75rem !important; }
.crumb a { color: var(--ink); font-weight: 600; }

.cat-list { list-style: none; margin: 0 0 clamp(3rem, 8vw, 6rem); padding: 0 0 1px; }
.cat-list li { border-block: 1px solid var(--ink); margin-bottom: -1px; break-inside: avoid; }
.cat-list a { display: block; padding-block: .45em .5em; text-decoration: none; font-size: clamp(1.5rem, 3.4vw, 2.6rem); font-weight: 720; font-stretch: 118%; line-height: 1.1; }
.cat-list a:hover { background: var(--yellow); }
@media (min-width: 900px) { .cat-list { columns: 2; column-gap: clamp(2rem, 5vw, 5rem); } }

.cat-nav { padding-block: 3rem 4rem; }
.cat-nav ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.cat-nav a { display: inline-block; padding: .35em .8em; border: 1px solid var(--ink); text-decoration: none; font-size: .95rem; }
.cat-nav a span { color: var(--grey); }
.cat-nav a:hover { background: var(--yellow); }
.cat-nav a[aria-current] { background: var(--ink); color: var(--paper); }
.cat-nav a[aria-current] span { color: #bdbdbd; }

.prose { max-width: 46rem; padding-block: clamp(2rem, 5vw, 4rem) 4rem; }
.prose h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-stretch: 120%; font-weight: 800; margin-bottom: 1em; }
.prose h2 { font-size: 1.5rem; margin: 2.2em 0 .6em; }
.prose h3 { font-size: 1.15rem; margin: 1.8em 0 .5em; font-stretch: 105%; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose a { overflow-wrap: anywhere; }

.nf { padding-bottom: 6rem; }

/* ---------- footer */
.site-footer { border-top: 3px solid var(--ink); margin-top: 0; font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem 2rem; padding-block: 1.75rem 2.25rem; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.copy { color: var(--grey); margin: 0; }

/* ---------- lightbox (built by site.js) */
.lb { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgba(255, 255, 255, .97); color: var(--ink); }
.lb::backdrop { background: rgba(255, 255, 255, .97); }
.lb-inner { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 10px var(--gutter); }
.lb-count { color: var(--grey); font-size: .95rem; font-variant-numeric: tabular-nums; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 var(--gutter); }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 0 0 1px var(--rule); }
.lb-cap { padding: 12px var(--gutter) 18px; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: baseline; }
.lb-cap strong { font-stretch: 112%; font-size: 1.15rem; }
.lb-cap span { color: var(--grey); }
.lb button { font: inherit; font-weight: 600; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); padding: .45em .9em; cursor: pointer; }
.lb button:hover { background: var(--yellow); }
.lb-nav { display: flex; gap: .5rem; }
@media (prefers-reduced-motion: no-preference) {
  .lb[open] { animation: lb-in .16s ease-out; }
  @keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
}

/* generated by build.py: one class per thumbnail aspect ratio */
.ar-100{--ar:1.0}
.ar-126{--ar:1.26}
.ar-150{--ar:1.5}
.ar-178{--ar:1.78}
