@font-face {
  font-family: Swizzy;
  src: url("assets/swizzy-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Neue Montreal Mono";
  src: url("assets/montreal-mono.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Kode Mono";
  src: url("assets/kode-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-size: clamp(16px, 1.058201vw, 20.31746px);
  --ink: #141414;
  --paper: #fff;
  --grid-paper: #f5f5f5;
  --grid-line: #1414141a;
  --grid-cell-size: 2rem;
  --mono: "Neue Montreal Mono", monospace;
  --nav-type: .75rem;
  --nav-button-height: 1.5rem;
  --search-type: clamp(.6875rem, calc(.625rem + .3125vw), 1rem);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
main { overflow: clip; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.container {
  width: 100%;
  max-width: 1920px;
  padding-inline: 1.5rem;
  margin-inline: auto;
}

.site-header { background: #f9f9f9; }

.navigation {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 3.625rem;
}

.navigation, .board-action.board-new {
  font: var(--nav-type)/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.board-action.board-new,
.embed-cta,
#reference-form button[type="submit"],
#product-link-form button[type="submit"] { font-family: "Kode Mono", var(--mono); }

.nav-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a, .menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding-block: .375rem;
}

.triangle {
  display: inline-block;
  width: .375rem;
  height: .65rem;
  flex: none;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.nav-links a:not([aria-current]) .triangle { opacity: 0; margin-left: -.875rem; }
.nav-links a:hover .triangle, .nav-links a:focus-visible .triangle { opacity: 1; margin-left: 0; }
.menu-toggle { display: none; }

.account-links { display: flex; align-items: center; gap: .625rem; }
.nav-button { height: var(--nav-button-height); padding: 0 .375rem; white-space: nowrap; border-radius: .25rem; }
.nav-signup { color: var(--paper); background: var(--ink); }

.landing-hero {
  position: relative;
  --stage-height: 32.5rem;
  --stage-center: 16.25rem;
}

.hero-intro {
  display: grid;
  gap: 1.5rem;
}

.hero-grid-fade {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(10, var(--grid-cell-size));
  grid-auto-rows: var(--grid-cell-size);
  overflow: hidden;
  pointer-events: none;
}

.hero-grid-fade span {
  --grid-edge: rgb(20 20 20 / calc(.008 + var(--grid-tone) * .006));
  background: rgb(20 20 20 / calc(var(--grid-tone) * .012));
  box-shadow: inset 1px 0 0 var(--grid-edge), inset 0 -1px 0 var(--grid-edge);
}

.wordmark {
  position: relative;
  z-index: 1;
  place-self: start;
  margin: 0;
  font: 500 clamp(2.75rem, 10.5vw, 10.5rem)/.9 "Instrument Sans", Arial, sans-serif;
  letter-spacing: -.047em;
  transform-origin: left top;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 3.25rem;
}

.tagline {
  position: relative;
  z-index: 0;
  margin: 0;
  font: 500 clamp(1rem, calc(.8rem + 1vw), 1.745rem)/1 Swizzy, Arial, sans-serif;
  letter-spacing: -.02em;
}

.tagline-detail { display: block; margin-top: .65rem; max-width: 25rem; font: 1rem/1.4 "Instrument Sans", Arial, sans-serif; color: #505050; }

.search-stage {
  position: relative;
  overflow: hidden;
  height: var(--stage-height);
  background-color: var(--grid-paper);
  background-image: linear-gradient(0deg, var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 100% var(--grid-cell-size), var(--grid-cell-size) 100%;
  background-position: 0 .8rem, 0 0;
  background-repeat: repeat-y, repeat-x;
}

.stills, .still-group { position: absolute; inset: 0; pointer-events: none; }

.still-connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--board-accent);
  stroke-width: 1.5;
  stroke-dasharray: .7 4.8;
  stroke-linecap: round;
  opacity: .62;
  transition: opacity .3s ease-out;
}

.stills.is-editing .still-connections { opacity: 0; }

.still-group > .home-project-tile {
  position: absolute;
  left: calc(50% + var(--x, 0px));
  top: calc(var(--stage-center) + var(--y));
  width: var(--width);
  height: auto;
  border-radius: 1rem;
  opacity: 0;
  translate: -50% -50%;
  scale: 0;
  transition: opacity .7s cubic-bezier(.55, 0, 1, .45), scale .7s cubic-bezier(.55, 0, 1, .45);
  transition-delay: var(--delay);
}

.still-group.is-current > .home-project-tile {
  opacity: 1;
  scale: 1;
  transition-timing-function: cubic-bezier(.22, .61, .36, 1);
}

.stills.is-editing .home-project-tile { transition-delay: 0s; }

.search-bar {
  position: absolute;
  top: var(--stage-center);
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: .5rem;
  width: min(50rem, calc(100% - 3rem));
  padding: .5rem .5rem .5rem 2rem;
  border-radius: 10rem;
  background: #dfdfdf;
  font: var(--search-type)/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.search-field { flex: 1; min-width: 0; position: relative; display: flex; }
.search-field input, .search-bar button { letter-spacing: inherit; text-transform: inherit; border: 0; }
.search-field input { width: 100%; padding: 0; background: transparent; outline: 0; }
.search-bar:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 4px; }

.search-example {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: start;
  pointer-events: none;
  white-space: nowrap;
}

.search-field input:focus + .search-example, .search-field input:not(:placeholder-shown) + .search-example { visibility: hidden; }

.search-bar button {
  flex: none;
  height: 3.5rem;
  padding: .5rem 1.25rem;
  border-radius: 4rem;
  background: var(--ink);
  color: var(--paper);
}

.search-bar button:not(:disabled):hover, .embed-cta:hover { background: #30302e; }

#reference-form button:disabled {
  background: #c8c8c8;
  color: #4a4a4a;
  cursor: default;
}
.shortcut { margin-left: .125rem; }

.upload-alternative {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font: var(--search-type)/1 var(--mono);
}

.upload-entry {
  min-height: 2.25rem;
  padding: 0 .25rem;
  border-radius: .375rem;
  background: var(--paper);
}

.upload-action:is(.upload-entry, .dialog-link) {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  text-decoration: none;
  white-space: nowrap;
}

.upload-action.dialog-link { min-height: 44px; }
.upload-action svg { flex: none; }
.upload-action span { text-decoration: underline; text-underline-offset: .2em; }
.upload-entry:hover { background: var(--grid-paper); }

@media (min-width: 992px) {
  .landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
    max-width: 1920px;
    margin-inline: auto;
    --stage-height: clamp(35rem, calc(100svh - 3.625rem), 54rem);
    --stage-center: 50%;
  }

  .landing-hero .hero-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(1.5rem, 4vh, 2.5rem);
    padding: clamp(2rem, 6vh, 4rem) clamp(1.5rem, 3.35vw, 3.75rem);
  }

  .hero-grid-fade {
    inset: 0 0 auto auto;
    max-height: clamp(3rem, calc(40svh - 10.4rem), 12rem);
    mask-image: linear-gradient(#000 90%, transparent);
  }

  .landing-hero .hero-copy { width: min(100%, 32rem); gap: 1.25rem; }
  .landing-hero .tagline { line-height: 1.06; }
  .landing-hero .reference-entry { width: 100%; margin-top: .375rem; }
  .landing-hero .upload-alternative { margin: .4rem 0 0 .5rem; }
  .landing-hero .search-bar {
    position: static;
    transform: none;
    width: 100%;
    padding: .375rem .375rem .375rem 1.25rem;
    font-size: clamp(.6875rem, .92vw, .875rem);
  }
  .landing-hero .search-bar button { height: 3rem; padding-inline: 1rem; }
  .landing-hero .search-stage {
    height: auto;
    min-height: var(--stage-height);
    background-position: 0 0;
  }

}

@media (width < 992px) {
  .container { padding-inline: .75rem; }
  .navigation { justify-content: space-between; height: 3.625rem; }
  .menu-toggle { display: inline-flex; border: 0; padding-inline: 0; background: transparent; text-transform: inherit; letter-spacing: inherit; }
  .menu-toggle[aria-expanded="true"] .triangle { rotate: 90deg; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: .75rem; background: #f9f9f9; }
  .nav-links.is-open { display: grid; grid-template-columns: 1fr; gap: .75rem; }
  .hero-intro { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: .75rem 1.5rem; }
  .hero-grid-fade {
    inset: auto 0 var(--stage-height) auto;
    width: min(45%, calc(6 * var(--grid-cell-size)));
    height: calc(3.5 * var(--grid-cell-size));
    justify-content: end;
    transform: scaleY(-1);
    mask-image: linear-gradient(to left, #000 48%, transparent), linear-gradient(#000 48%, transparent);
    mask-composite: intersect;
  }
  .landing-hero .search-stage { background-position: right top; }
  .wordmark, .hero-copy { grid-column: 1 / -1; }
  .reference-entry { position: absolute; inset-inline: 0; bottom: var(--stage-height); z-index: 1; }
  .upload-alternative { position: absolute; top: calc(var(--stage-center) + 2.15rem); left: 50%; transform: translateX(-50%); }
  .search-bar { width: min(70%, 41rem); padding-left: 1.5rem; }
  .search-bar button { height: 2.5rem; padding-inline: 1rem; }
}

@media (max-width: 767px) {
  .search-bar { width: calc(100% - 1.5rem); }
  .shortcut { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .still-connections, .still-group > .home-project-tile { transition: none; }
}

/* Compact, self-contained project widget showcase. */
.embed-showcase { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 5rem; padding-block: 6rem; border-top: 1px solid #dedede; font-family: "Instrument Sans", Arial, sans-serif; }
.embed-copy { max-width: 29rem; }
.embed-eyebrow { margin: 0 0 1.5rem; font: .875rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #506355; }
.embed-copy h2 { margin: 0 0 1.5rem; font-size: clamp(2.5rem, 4.3vw, 4.5rem); line-height: .98; font-weight: 500; letter-spacing: -.05em; }
.embed-copy > p:not(.embed-eyebrow) { font-size: 1.125rem; line-height: 1.5; }
.embed-cta { margin-top: .75rem; padding: .9rem 1.25rem; border: 0; border-radius: .35rem; background: var(--ink); color: white; font-size: 1rem; }
.embed-example { min-width: 0; }
.embed-example iframe { display: block; width: 100%; height: 415px; border: 1px solid #d7dcd7; border-radius: .75rem; background: #f5f5f5; box-shadow: 0 12px 32px #14141408; }
.site-footer { padding: 1rem 1.25rem 1.5rem; color: #575c57; text-align: center; font: .875rem/1.4 "Instrument Sans", Arial, sans-serif; }
#home-screen[hidden] + .site-footer { display: none; }

.projects-screen {
  min-height: calc(100svh - 3.625rem);
  padding-block: clamp(2.5rem, 5vw, 5rem) 4rem;
  padding-inline: clamp(1rem, 3.35vw, 3.25rem);
  font-family: "Instrument Sans", Arial, sans-serif;
}

.projects-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin-bottom: clamp(2rem, 5.6vw, 5.5rem);
}

.projects-heading h1 {
  margin: 0;
  font-size: clamp(2.625rem, 4.45vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.055em;
}

.projects-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem clamp(.8rem, 2vw, 2rem);
}

.projects-search {
  display: flex;
  align-items: center;
  flex: 1 1 13rem;
  gap: .65rem;
  min-width: 0;
  padding-inline: .8rem;
  border: 1px solid #777;
  border-radius: .5rem;
  font-size: clamp(1rem, 1.35vw, 1.3rem);
}

.projects-search svg { flex: none; }

.projects-search input {
  width: clamp(11rem, 23vw, 22rem);
  min-width: 0;
  min-height: 2.75rem;
  padding: .4rem 0;
  border: 0;
  background: transparent;
  outline: 0;
}

.projects-search:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }

.projects-sort { position: relative; font: clamp(.875rem, 1.35vw, 1.25rem)/1.2 var(--mono); }

.projects-sort select {
  appearance: none;
  min-height: 2.75rem;
  padding: .4rem 1.6em .4rem .15rem;
  border: 0;
  border-radius: .25rem;
  color: inherit;
  background: var(--paper);
  font: inherit;
  cursor: pointer;
}

.projects-sort::after {
  content: "";
  position: absolute;
  top: 50%;
  right: .35em;
  width: .5em;
  height: .5em;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}

.project-items { list-style: none; margin: 0; padding: 0; }
.project-entry {
  position: relative;
  display: grid;
  grid-template-columns: clamp(5rem, 12vw, 12rem) minmax(0, 1fr) minmax(8rem, 28%) 2.75rem 1.8rem;
  grid-template-areas: "date title state delete arrow";
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: clamp(5.5rem, 8vw, 8rem);
  padding: .7rem clamp(.75rem, 1.65vw, 1.6rem);
  border-bottom: 1px solid #14141435;
  background: transparent;
  text-align: left;
}

.project-entry:is(:hover, :focus-within),
.project-items:not(:has(.project-entry:is(:hover, :focus-within))) .project-entry:first-child {
  background-color: #f7f7f7;
  background-image: linear-gradient(to right, #14141409 1px, transparent 1px), linear-gradient(to bottom, #14141409 1px, transparent 1px);
  background-size: .8rem .8rem;
}

.project-entry-date, .project-entry-state { font: clamp(.875rem, 1.48vw, 1.4rem)/1.25 var(--mono); }
.project-entry-date { grid-area: date; }
.project-entry-state { grid-area: state; }
.project-entry-meta { display: contents; }
.project-entry-divider { display: none; }

.project-entry-title {
  grid-area: title;
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 2vw, 2rem);
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.375rem, 2.85vw, 2.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.project-entry-image {
  display: none;
  flex: none;
  width: clamp(3.5rem, 7.1vw, 6.8rem);
  aspect-ratio: 1;
  object-fit: contain;
  background: #e9e9e9;
}

@media (width >= 440px) {
  .project-entry:is(:hover, :focus-within) .project-entry-image:not([hidden]),
  .project-items:not(:has(.project-entry:is(:hover, :focus-within))) .project-entry:first-child .project-entry-image:not([hidden]) { display: block; }
}

.project-entry-open,
.project-entry-delete {
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
}
.project-entry-open { grid-area: arrow; }
.project-entry-open::after { position: absolute; inset: 0; content: ""; }
.project-entry-open:focus-visible { outline: 0; }
.project-entry-open:focus-visible::after { outline: 2px solid var(--ink); outline-offset: -2px; }
.project-entry-arrow { display: block; width: 100%; }

.project-entry-delete {
  grid-area: delete;
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 6px;
}
.project-entry-delete svg { width: 1.125rem; height: 1.125rem; }
.project-entry-delete:hover { background-color: #e8e8e8; }

@media (hover: hover) and (pointer: fine) {
  .project-entry-delete { opacity: 0; pointer-events: none; }
  .project-entry:is(:hover, :focus-within) .project-entry-delete { opacity: 1; pointer-events: auto; }
}
.projects-empty { margin: 0; padding-block: 1.25rem; border-top: 1px solid #14141435; color: #555; }

@media (width < 700px) {
  .projects-tools { width: 100%; }
  .projects-search input { width: 100%; }
  .project-entry {
    grid-template-columns: minmax(0, 1fr) 2.75rem 1.15rem;
    grid-template-areas: "title delete arrow" "meta meta meta";
    align-content: center;
    gap: .3rem .6rem;
  }
  .project-entry:has(.project-entry-image:not([hidden])) {
    grid-template-columns: clamp(2.65rem, 13vw, 3rem) minmax(0, 1fr) 2.75rem 1.15rem;
    grid-template-areas: "image title delete arrow" "image meta meta meta";
  }
  .project-entry-title { display: contents; }
  .project-entry-name {
    grid-area: title;
    min-width: 0;
    font-size: 1.35rem;
  }
  .project-entry-image:not([hidden]) { display: block; grid-area: image; width: 100%; }
  .project-entry-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .3rem; }
  .project-entry-meta > * { font: clamp(.6875rem, 3.3vw, .75rem)/1.25 var(--mono); white-space: nowrap; }
  .project-entry-divider { display: inline; }
}

@media (max-width: 760px) { .embed-showcase { grid-template-columns: 1fr; gap: 2rem; padding-block: 3.5rem; } .embed-example iframe { height: 510px; } }

/* Each landing collage is a cohesive, bag-specific project. */
.landing-hero .still-group > .home-project-tile {
  display: flex; flex-direction: column; align-items: stretch; gap: 0; overflow: hidden;
  padding: 9px; height: auto; aspect-ratio: 1;
  border: 1px solid #e0e0de; border-radius: 15px;
  background: #fff; box-shadow: 0 2px 5px #00000003;
  font-family: "Instrument Sans", Arial, sans-serif;
}
.home-tile-label { display: block; flex: 0 0 auto; margin: 1px 2px 7px; font-size: clamp(10px, .92vw, 13px); font-weight: 550; line-height: 1.15; letter-spacing: -.02em; }
.home-tile-note { flex: 0 0 auto; display: block; margin: 6px 2px 0; color: #777; font-size: clamp(8px, .69vw, 10px); line-height: 1.15; }
.home-photo { flex: 1; min-height: 0; border-radius: 8px; background-color: #ebebeb; background-repeat: no-repeat; background-position: center; background-size: contain; }
[data-project="mini"] .home-photo { background-position: 50% 81%; background-size: cover; }
.home-pattern { flex: 1; min-height: 0; display: flex; align-items: center; padding: 5px 0; }
.home-pattern > svg { display: block; width: 100%; height: 100%; }
.home-model-tile canvas { display: block; width: 100%; height: 0; min-height: 0; flex: 1; border-radius: 8px; }
.landing-hero .still-group > .home-materials-tile { aspect-ratio: auto; }
.home-materials-tile .swatches { gap: 5px; }
.home-materials-tile .swatch-sample { height: clamp(45px, 5.2vw, 68px); border-radius: 7px; }
.home-materials-tile .swatch-label { display: block; padding-top: 4px; color: #555; text-align: center; font-size: clamp(9px, .92vw, 11px); line-height: 1.2; }
@media (min-width: 992px) {
  .landing-hero .still-group > .home-reference-tile { --x: -29%; --y: -19%; --width: min(29%, 15rem, calc(var(--stage-height) * .38)); aspect-ratio: .83; }
  .landing-hero .still-group > .home-pattern-tile { --x: 13%; --y: -17%; --width: min(46%, 24rem, calc(var(--stage-height) * .55)); aspect-ratio: 1.55; }
  .landing-hero .still-group > .home-materials-tile { --x: -22%; --y: 23%; --width: min(36%, 17rem, calc(var(--stage-height) * .41)); }
  .landing-hero .still-group > .home-model-tile { --x: 24%; --y: 24%; --width: min(27%, 15rem, calc(var(--stage-height) * .32)); aspect-ratio: 1.12; }
}
@media (max-width: 991px) {
  .landing-hero .still-group > .home-project-tile { padding: 6px; border-radius: 10px; }
  .home-tile-label { font-size: 10px; margin-bottom: 5px; }
  .home-tile-note { font-size: 8px; margin-top: 4px; }
  .landing-hero .still-group > .home-reference-tile { --x: -32%; --y: -135px; --width: min(31%, 11rem); aspect-ratio: .77; }
  .landing-hero .still-group > .home-pattern-tile { --x: 16%; --y: -128px; --width: min(55%, 14rem); aspect-ratio: 1.4; }
  .landing-hero .still-group > .home-materials-tile { --x: -24%; --y: 146px; --width: min(44%, 14rem); }
  .landing-hero .still-group > .home-model-tile { --x: 24%; --y: 143px; --width: min(41%, 12rem); aspect-ratio: 1.04; }
}

.analytics-choice,
.analytics-settings {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 40;
}
.analytics-choice {
  box-sizing: border-box;
  width: min(295px, calc(100vw - 28px));
  padding: 14px 16px;
  border: 1px solid #c9c7c1;
  border-radius: 6px;
  background: #f8f7f3;
  color: #272624;
  box-shadow: 0 2px 8px #28252116;
}
.analytics-choice p {
  margin: 0 0 12px;
  font-size: 14px;
}
.analytics-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.analytics-settings {
  background: #f8f7f3;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 11px;
}
body:has(#board-screen:not([hidden])) .analytics-choice {
  bottom: max(70px, calc(env(safe-area-inset-bottom) + 60px));
}
