@import url("https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@300;400&family=Inter:wght@300;400;500&display=swap");
/* Soft-black top bar for sketch pages: in flow (not sticky), drops down on hover.
   Logo, label and arrow reuse the home page's .logo / .hb-label / .nav-ptr styles. */
:root { --nav-h: 80px; }
/* Same bar as the home page: condensed name, then "Tools: [Tool Name]" in small letter-spaced caps */
.site-nav { --soft: #181716; --cond: "Barlow Semi Condensed", "Helvetica Neue", Arial, sans-serif; --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif; --grey: #989898; }
.site-nav .hb-bar { display: flex; align-items: baseline; height: auto; padding: 0; gap: 48px; white-space: nowrap; }
.site-nav .logo { transform: none; font: 400 29px/1 var(--cond); letter-spacing: -.02em; color: #fff; }
.site-nav .hb-label { display: flex; gap: 32px; margin: 0; font: 400 12px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--grey); }
.site-nav .hb-label a { transition: color .2s; }
.site-nav .hb-label a:hover { color: #fff; }
.site-nav .hb-label .tn-m { display: none; }
.site-nav .hb-label b { font-weight: 400; color: #fff; }
.site-nav .hb-toggle { display: none; }
.site-nav { position: relative; z-index: 200; height: var(--nav-h); background: var(--soft, #181716); color: #fff; display: flex; align-items: flex-start; padding: 24px 30px 0; }

/* Touch: canvases handle their own gestures, so the page should not scroll or zoom under a finger */
canvas.p5Canvas { touch-action: none; }
html, body { overscroll-behavior: none; }

/* Phones: like the home nav. Row 1 is the name; row 2 has the current tool on the left and "All Tools" on the right, which goes back to the home page. The bar is the same 80px as on desktop (72px bar + the 8px gap the home page leaves under its nav). */
@media (max-width: 600px) {
  header.site-nav { padding: 18px 30px 0; align-items: flex-start; }
  header.site-nav .hb-bar { display: grid; grid-template-columns: 1fr auto auto; column-gap: 20px; row-gap: 8px; align-items: baseline; width: 100%; height: auto; min-width: 0; padding: 0; }
  header.site-nav .hb-bar > .logo { grid-column: 1 / -1; height: auto; font-size: 22px; }
  header.site-nav .hb-bar > .hb-label { display: contents; height: auto; }
  header.site-nav .hb-label b { grid-row: 2; grid-column: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  header.site-nav .hb-label a { grid-row: 2; grid-column: 2; display: inline-flex; align-items: center; gap: 6px; color: #fff; }
  header.site-nav .hb-label .hb-contact { grid-column: 3; }
  /* phone: "Interactive Brand Tools" (home link) under the name, Contact on the right; no All Tools / tool name */
  header.site-nav .hb-label b { display: none; }
  header.site-nav .hb-label a:not(.hb-contact) { grid-column: 1; }
  header.site-nav .hb-label .tn-d { display: none; }
  header.site-nav .hb-label .tn-m { display: inline; }
  header.site-nav .hb-bar > .tools { grid-column: 1 / -1; }
}

/* About this project: soft black section under each tool, same split and type as the home page's About and Contact */
html.has-about { overflow-y: auto !important; overflow-x: hidden !important; }
html.has-about body { overflow: visible !important; }   /* the body keeps its own height, so tools that fill the page keep their size */
#toolAfter { position: absolute; left: 0; right: 0; top: 100vh; z-index: 100; }
.about-project { --soft: #181716; --grey: #989898; --mid-grey: #6b6b6b; --line: rgba(255,255,255,.1); --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif; --cond: "Barlow Semi Condensed", "Helvetica Neue", Arial, sans-serif;
  position: relative; z-index: 100; box-sizing: border-box; display: grid; grid-template-columns: 5fr 9fr; gap: 72px 8px; padding: 72px 8px 120px; background: var(--soft); color: #fff; border-top: 1px solid var(--line); font: 400 20px/1.25 var(--sans); -webkit-font-smoothing: auto; }
.about-project *, .about-project *::before, .about-project *::after { box-sizing: border-box; }
.about-project h2, .about-project h3, .about-project p { margin: 0; font-weight: inherit; }
.about-project a { color: inherit; text-decoration: none; }
.ap-head { padding-left: 22px; display: grid; gap: 14px; align-content: start; }
.ap-label { font: 400 12px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--grey); }
.ap-head h2 { font: 300 40px/1.1 var(--cond); letter-spacing: -0.03em; text-wrap: balance; }
.ap-body { display: grid; gap: 56px; min-width: 0; padding-right: 12px; align-content: start; }
.ap-body > p { max-width: 35em; font: 300 20px/27px var(--sans); color: #fff; }
.ap-rows { display: grid; }
.ap-row { display: grid; grid-template-columns: 4fr 5fr; gap: 8px; padding: 12px 0 28px; border-top: 1px solid var(--line); }
.ap-row h3 { font-size: 20px; }
.ap-row > div { color: var(--grey); font-weight: 300; }
.ap-row a { transition: color .2s; }
.ap-row a:hover { color: #fff; }
@media (max-width: 899px) { .about-project { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; } .ap-body { padding-left: 22px; } }
@media (max-width: 639px) { .ap-head h2 { font-size: 30px; } .ap-row { grid-template-columns: 1fr 1fr; } }

/* Contact + footer under each tool: same layout and type as the home page's Contact section */
.contact-project { --soft: #181716; --grey: #989898; --mid-grey: #6b6b6b; --line: rgba(255,255,255,.1); --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif; --cond: "Barlow Semi Condensed", "Helvetica Neue", Arial, sans-serif;
  position: relative; z-index: 100; box-sizing: border-box; display: flex; flex-direction: column; padding: 24px 8px 72px; background: var(--soft); color: #fff; border-top: 1px solid var(--line); font: 400 20px/1.25 var(--sans); -webkit-font-smoothing: auto; }
.contact-project *, .contact-project *::before, .contact-project *::after { box-sizing: border-box; }
.contact-project h2, .contact-project h3 { margin: 0; font-weight: inherit; }
.contact-project a { color: inherit; text-decoration: none; }
.cp-grid { display: grid; grid-template-columns: 1fr; gap: 48px; padding-top: 24px; }
.cp-head { padding-left: 22px; display: grid; gap: 14px; align-content: start; }
.cp-label { font: 400 12px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--grey); }
.cp-head h2 { font: 300 40px/1.1 var(--cond); letter-spacing: -0.03em; max-width: 20ch; text-wrap: balance; }
.cp-rows { display: grid; }
.cp-row { display: grid; grid-template-columns: 4fr 5fr; gap: 8px; padding: 12px 0 36px; border-top: 1px solid var(--line); }
.cp-row h3 { font-size: 20px; }
.cp-row > div { display: grid; gap: 2px; justify-items: start; color: var(--grey); font-weight: 300; }
.cp-row a { transition: color .2s; }
.cp-row a:hover { color: #fff; }
@media (min-width: 900px) { .cp-grid { grid-template-columns: 5fr 9fr; gap: 8px; } .cp-grid .cp-rows { grid-column: 2; } }
@media (max-width: 639px) { .cp-head h2 { font-size: 30px; } .cp-row { grid-template-columns: 1fr 1fr; } }

/* ?embed=1 (home page hero): just the tool */
html.embed { --nav-h: 0px; }
html.embed .site-nav, html.embed .about-project, html.embed .contact-project { display: none !important; }

/* All Tools + the copyright footer under the contact block: same card list as the home page's All Tools */
.tools-project { --soft: #181716; --grey: #989898; --mid-grey: #6b6b6b; --line: rgba(255,255,255,.1); --off-black: #252423; --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif; --cond: "Barlow Semi Condensed", "Helvetica Neue", Arial, sans-serif;
  position: relative; z-index: 100; box-sizing: border-box; display: grid; grid-template-columns: 1fr; padding: 72px 0 96px; margin: 0; background: var(--soft); color: #fff; border-top: 1px solid var(--line); font: 400 20px/1.25 var(--sans); -webkit-font-smoothing: auto; }
.tools-project *, .tools-project *::before, .tools-project *::after { box-sizing: border-box; }
.tools-project h2, .tools-project h3, .tools-project p { margin: 0; font-weight: inherit; }
.tools-project a { color: inherit; text-decoration: none; }
.tools-project img { display: block; max-width: 100%; }
.tp-side { padding: 0 0 24px 30px; }
.tp-side h2 { font: 300 40px/1.1 var(--cond); letter-spacing: -0.03em; }
.tp-list { display: grid; grid-template-columns: 1fr; }
.tp-card { border-top: 1px solid var(--line); }
.tp-card:first-child { border-top: 0; }
.tp-card a { display: flex; flex-direction: column; gap: 10px; padding: 12px; transition: opacity .17s linear; }
.tp-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: var(--off-black); }
.tp-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tp-meta { position: relative; padding: 0 20px 4px 0; }
.tp-meta h3 { font-size: 20px; }
.tp-meta p { color: var(--grey); font-size: 20px; font-weight: 300; }
.tp-arrow { position: absolute; top: 5px; right: 0; color: var(--grey); transition: color .2s; }
.tp-card a:hover .tp-arrow { color: #fff; }
@media (min-width: 700px) {
  .tools-project { grid-template-columns: calc(25.45% - 12px) 1fr; gap: 12px; padding-left: 8px; padding-right: 8px; }
  .tp-side { padding-left: 22px; }
  .tp-list { grid-template-columns: 1fr 1fr; }
  .tp-card:nth-child(2) { border-top: 0; }
  .tp-card:nth-child(even) { border-left: 1px solid var(--line); }
  .tp-list:has(> .tp-card:last-child:nth-child(odd))::after { content: ""; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }   /* closes the grid when the count is odd */
  .tp-card a { padding: 12px 12px 16px; }
  .tp-list:hover .tp-card a { opacity: .35; }
  .tp-list .tp-card a:hover { opacity: 1; }
}
@media (max-width: 639px) { .tp-side h2 { font-size: 30px; } .tp-side { padding-left: 22px; } }
.foot-project { position: relative; z-index: 100; box-sizing: border-box; display: flex; justify-content: space-between; padding: 24px 12px 20px 30px; background: #181716; color: #6b6b6b; border-top: 1px solid rgba(255,255,255,.1); font: 400 12px/1.3 "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.foot-project a { color: inherit; text-decoration: none; transition: color .2s; }
.foot-project a:hover { color: #fff; }

/* p5 canvases are inline by default, which leaves a few pixels under them where the page background shows */
canvas.p5Canvas { display: block; }

/* the current tool in All Tools: blurred, with an eye icon and "Viewing" over it (like the current card on the portfolio) */
.tp-card.is-current a { cursor: default; pointer-events: none; }
.tp-card.is-current .tp-media img { filter: blur(14px) brightness(.45); transform: scale(1.12); }
.tp-viewing { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff; background: rgba(0,0,0,.25); font: 400 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
@media (min-width: 700px) { .tp-list:hover .tp-card.is-current a { opacity: 1; } }

/* stacked layouts (phones and tablets): the Contact row lines up with the heading above it */
@media (max-width: 899px) { .cp-row h3 { padding-left: 22px; } .cp-rows { padding-right: 12px; } }
