/* The Library, by Arabella.
   Pinyon Script, Cormorant Garamond, Jost. Ivory, stone, sage.
   Project pages re-light the colour variables via themes.css; the type never changes. */

:root {
  --bg: #F3EFE8;
  --bg-2: #EAE5DC;
  --card: #FAF7F1;
  --card-border: rgba(33, 30, 26, 0.12);
  --ink: #211E1A;
  --ink-2: #6B6359;
  --ink-3: #9C948A;
  --rule: rgba(33, 30, 26, 0.14);
  --rule-strong: rgba(33, 30, 26, 0.3);
  --accent: #6F7D65;
  --accent-soft: #E4E7DE;
  --focus: #211E1A;
  --display: "Cormorant Garamond", Garamond, Georgia, serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --body: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --t-label: 0.6875rem;
  --wrap: 1320px;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --nav-h: 84px;
  --radius: 2px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-weight: 400; font-size: 1.0625rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -3rem; background: var(--ink); color: var(--bg); padding: .5rem .8rem; z-index: 100; }
.skip:focus { top: 1rem; }
.wrap { width: min(100% - 2 * var(--pad), var(--wrap)); margin-inline: auto; }
.label, .eyebrow { font-family: var(--body); font-weight: 500; font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); line-height: 1.5; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--rule); }
.top .wrap { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top .brand { display: inline-flex; align-items: center; line-height: 0; }
.top .brand img { height: 44px; width: auto; }
.top nav { display: flex; gap: clamp(1.25rem, 3vw, 3rem); }
.top nav a { font-weight: 500; font-size: var(--t-label); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); padding: .4rem 0; position: relative; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.top nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .08s linear; }

main { flex: 1; }

/* Index hero */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero .wrap { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2rem; }
.hero .eyebrow { margin: 0 0 1.2rem; }
.hero h1 { font-family: var(--script); font-weight: 400; font-size: clamp(4rem, 10vw, 8.5rem); line-height: 1; margin: 0 0 1.8rem; letter-spacing: 0; }
.hero .stand { max-width: 34rem; margin: 0; font-family: var(--display); font-size: clamp(1.3rem, 1.9vw, 1.6rem); line-height: 1.45; color: var(--ink-2); font-weight: 400; }
.hero .count { text-align: right; white-space: nowrap; border-left: 1px solid var(--rule); padding-left: 2rem; }
.hero .count b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 5vw, 4.5rem); line-height: 1; color: var(--ink); }
.hero .count span { display: block; margin-top: .4rem; }

/* Filters */
.filters { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.filters .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; padding-block: .6rem; }
.pills { display: flex; gap: .35rem; flex-wrap: wrap; }
.pill { font-family: var(--body); font-weight: 500; font-size: var(--t-label); letter-spacing: .12em; text-transform: uppercase; border: 1px solid transparent; background: transparent; color: var(--ink-2); padding: .6rem .9rem; border-radius: var(--radius); cursor: pointer; }
.pill:hover { color: var(--ink); }
.pill[aria-pressed="true"] { color: var(--ink); border-color: var(--rule-strong); background: var(--card); }
.sort { display: inline-flex; align-items: center; gap: .6rem; }
.sort select { font-family: var(--body); font-weight: 500; font-size: var(--t-label); letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--rule-strong); background: var(--card); color: var(--ink); padding: .6rem 2rem .6rem .9rem; border-radius: var(--radius); appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }

/* Card shelf */
.scroller { position: relative; padding: clamp(2rem, 4vw, 3rem) 0 1rem; }
.scroller .head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.arrows, .thumbs-nav { display: flex; gap: .35rem; }
.arrows button, .thumbs-nav button, .lightbox button { width: 42px; height: 42px; border-radius: var(--radius); border: 1px solid var(--rule-strong); background: transparent; color: var(--ink); cursor: pointer; display: inline-grid; place-items: center; font-family: var(--display); font-size: 20px; line-height: 1; }
.arrows button:hover, .thumbs-nav button:hover { background: var(--card); }
.arrows button:disabled { opacity: .3; cursor: default; }
.track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(300px, 27vw, 380px); gap: 1.25rem;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad);
  padding: .25rem var(--pad) 1.5rem; margin-inline: calc(-1 * var(--pad)); scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent;
}
.track::-webkit-scrollbar { height: 4px; }
.track::-webkit-scrollbar-thumb { background: var(--ink-3); }
.card {
  scroll-snap-align: start; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; min-height: 560px;
  transition: transform .4s cubic-bezier(.22,.61,.36,1), border-color .3s;
}
.card:hover, .card:focus-visible { transform: translateY(-3px); border-color: var(--rule-strong); }
.card[hidden] { display: none; }
.card .shot { aspect-ratio: 4 / 3; background: #fff; overflow: hidden; border-bottom: 1px solid var(--card-border); }
.card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card .shot.logo { display: grid; place-items: center; padding: 12%; }
.card .shot.logo img { object-fit: contain; height: 100%; }
.card .body { padding: 1.25rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.card .num { font-family: var(--body); font-weight: 500; font-size: var(--t-label); letter-spacing: .16em; color: var(--ink-3); }
.status { display: inline-flex; align-items: center; font-family: var(--body); font-weight: 500; font-size: 0.625rem; letter-spacing: .16em; text-transform: uppercase; padding: .4rem .65rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); color: var(--ink-2); white-space: nowrap; line-height: 1; }
.card h3 { font-family: var(--display); font-weight: 500; font-size: 1.85rem; line-height: 1.1; margin: .35rem 0 .1rem; }
.card p { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.6; }
.card .go { margin-top: auto; padding-top: 1rem; display: flex; justify-content: space-between; align-items: center; font-weight: 500; font-size: var(--t-label); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.card .go span:last-child { font-family: var(--display); font-size: 1.3rem; line-height: 1; transition: transform .3s; }
.card:hover .go span:last-child { transform: translateX(4px); }
.empty { padding: 2rem 0; color: var(--ink-2); }
.empty[hidden] { display: none; }

/* Footer */
.foot { border-top: 1px solid var(--rule); margin-top: clamp(3rem, 7vw, 6rem); }
.foot .wrap { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.2rem; font-weight: 500; font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot .mid { text-align: center; font-family: var(--display); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 1.15rem; font-weight: 400; }

/* Project page */
.pp-top .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 1.6rem; }
.pp-top a { font-weight: 500; font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); }
.pp-top a:hover { color: var(--ink); }
.pp-hero { text-align: center; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.pp-hero .eyebrow { margin: 0 0 2rem; }
.pp-hero .mark { display: flex; justify-content: center; margin: 0 auto 2.2rem; }
.pp-hero .mark img { max-height: clamp(140px, 22vw, 300px); width: auto; max-width: min(86vw, 680px); object-fit: contain; }
.pp-hero .mark.panel { background: #fff; border: 1px solid var(--card-border); padding: clamp(1.5rem, 4vw, 3rem) clamp(2rem, 6vw, 4rem); max-width: min(92vw, 760px); }
.pp-hero .mark.panel img { max-height: clamp(120px, 18vw, 240px); }
.pp-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; margin: 0 auto .8rem; max-width: 20ch; }
.pp-hero h1.sr { margin: 0; }
.pp-hero .tag { font-family: var(--display); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.7rem); color: var(--ink-2); max-width: 44ch; margin: 0 auto; line-height: 1.4; }

/* Particulars */
.meta { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.meta .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 2.5rem; }
.meta .cell { padding: 1.3rem 0; }
.meta .cell + .cell { border-left: 1px solid var(--rule); padding-left: 2.5rem; margin-left: -2.5rem; }
.meta dt { font-weight: 500; font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .35rem; }
.meta dd { margin: 0; font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.meta dd a { text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* Device */
.device-wrap { padding: clamp(2.5rem, 6vw, 5rem) 0 0; }
.device { position: relative; margin: 0 auto; background: var(--card); border: 1px solid var(--rule-strong); border-radius: 3px; overflow: hidden; max-width: 1200px; box-shadow: 0 30px 60px -40px rgba(0,0,0,.35); }
.device .bar { display: flex; align-items: center; gap: 1rem; height: 44px; padding: 0 1.1rem; border-bottom: 1px solid var(--rule); background: var(--bg-2); }
.device .bar .url { flex: 1; font-weight: 500; font-size: var(--t-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device .bar a.open { font-weight: 500; font-size: 0.625rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); padding: .45rem .7rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.device .bar a.open:hover { color: var(--ink); background: var(--card); }
.device iframe { display: block; width: 100%; height: min(78vh, 840px); border: 0; background: #fff; }
.device .logo-stage { display: grid; place-items: center; padding: clamp(2rem, 8vw, 6rem); background: #fff; min-height: 380px; }
.device .logo-stage img { max-width: min(72vw, 680px); max-height: 340px; object-fit: contain; }
.device.phone { max-width: 414px; border-radius: 40px; padding: 12px; background: #16140F; border-color: #16140F; box-shadow: 0 40px 80px -30px rgba(0,0,0,.55); }
.device.phone .bar { display: none; }
.device.phone iframe { height: min(82vh, 860px); border-radius: 30px; }
.device-note { text-align: center; margin: 1.2rem auto 0; max-width: 64ch; color: var(--ink-2); font-size: .95rem; }
.device-note a { text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* Screens */
.thumbs { padding: clamp(2rem, 5vw, 4rem) 0 0; }
.thumbs .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.thumbs .track { grid-auto-columns: clamp(240px, 25vw, 340px); gap: 1rem; padding-bottom: 1rem; }
.thumb { scroll-snap-align: start; border: 1px solid var(--card-border); background: var(--card); border-radius: var(--radius); overflow: hidden; padding: 0; cursor: zoom-in; display: block; text-align: left; color: inherit; font: inherit; }
.thumb img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; object-position: top; }
.thumb.tall img { object-fit: contain; background: var(--bg-2); }
.thumb figcaption { padding: .7rem .9rem; font-weight: 500; font-size: 0.625rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); border-top: 1px solid var(--card-border); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1400px); width: auto; }
.lightbox::backdrop { background: rgba(20, 17, 14, .88); }
.lightbox img { max-height: 88vh; width: auto; max-width: 100%; }
.lightbox .close { position: fixed; top: 1rem; right: 1rem; background: #fff; color: #111; border: 0; }
.lightbox p { color: #fff; text-align: center; font-weight: 500; font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; margin: .9rem 0 0; }

/* Three columns */
.cols { padding: clamp(3rem, 7vw, 6rem) 0 0; }
.cols .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 5vw, 4.5rem); }
.col .eyebrow { margin: 0 0 .6rem; color: var(--ink-3); }
.col h2 { font-family: var(--display); font-weight: 400; font-size: 2.1rem; line-height: 1.1; margin: 0 0 1.1rem; }
.col p { margin: 0 0 1rem; color: var(--ink-2); font-size: 1rem; }
.col p:last-child { margin-bottom: 0; }
.col ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.col li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .5rem; padding: .75rem 0; border-bottom: 1px solid var(--rule); font-size: 1rem; line-height: 1.5; }
.col li i { font-style: normal; font-weight: 500; font-size: var(--t-label); letter-spacing: .12em; color: var(--ink-3); padding-top: .35rem; }

/* Next */
.nextbar { margin-top: clamp(3rem, 7vw, 6rem); }
.nextbar .wrap { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; padding: 1.8rem 2.2rem; background: var(--accent-soft); border: 1px solid var(--card-border); }
.nextbar .eyebrow { color: var(--ink-2); }
.nextbar p { margin: 0; font-family: var(--display); font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 400; line-height: 1.35; }

/* Prev / next */
.pn { margin-top: clamp(3rem, 7vw, 6rem); border-top: 1px solid var(--rule); }
.pn .wrap { display: grid; grid-template-columns: 1fr 1fr; }
.pn a { text-decoration: none; padding: 1.8rem 0; display: flex; flex-direction: column; gap: .4rem; }
.pn a + a { text-align: right; border-left: 1px solid var(--rule); padding-left: 2rem; }
.pn a:first-child { padding-right: 2rem; }
.pn .ttl { font-family: var(--display); font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 400; line-height: 1.2; }
.pn a:hover .ttl { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* About */
.about { padding: clamp(3.5rem, 8vw, 6rem) 0 0; }
.about .wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: clamp(2.5rem, 7vw, 6rem); }
.about .eyebrow { margin: 0 0 1.2rem; }
.about h1 { font-family: var(--script); font-weight: 400; font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1.05; margin: 0 0 2rem; }
.about h2 { font-family: var(--display); font-weight: 400; font-size: 1.9rem; margin: 2.2rem 0 .6rem; }
.about p { font-size: 1.0625rem; color: var(--ink-2); max-width: 60ch; }
.about aside { background: var(--card); border: 1px solid var(--card-border); padding: 1.8rem 2rem; align-self: start; position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.about dl { margin: 0; }
.about dt { font-weight: 500; font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.about dt:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.about dd { margin: .3rem 0 0; font-size: .98rem; }
.about aside .logo { height: 40px; width: auto; margin-bottom: 1.4rem; }

/* Responsive */
@media (max-width: 960px) {
  .meta .wrap { grid-template-columns: 1fr 1fr; }
  .meta .cell:nth-child(3) { border-left: 0; padding-left: 0; margin-left: 0; }
  .cols .wrap { grid-template-columns: 1fr; }
  .about .wrap { grid-template-columns: 1fr; }
  .about aside { position: static; }
}
@media (max-width: 640px) {
  :root { --nav-h: 68px; }
  .top .brand img { height: 34px; }
  .top nav { gap: 1rem; }
  .hero .wrap { grid-template-columns: 1fr; align-items: start; }
  .hero .count { text-align: left; border-left: 0; padding-left: 0; }
  .track { grid-auto-columns: min(86vw, 360px); }
  .card { min-height: 0; }
  .nextbar .wrap { grid-template-columns: 1fr; gap: .6rem; padding: 1.4rem 1.4rem; }
  .pn .wrap { grid-template-columns: 1fr; }
  .pn a + a { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; text-align: left; }
  .device iframe { height: 70vh; }
  .device.phone { max-width: 100%; }
  .meta .wrap { grid-template-columns: 1fr; }
  .meta .cell { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
  .meta .cell + .cell { border-left: 0; padding-left: 0; margin-left: 0; }
  .meta .cell:last-child { border-bottom: 0; }
}
