@font-face {
  font-family: Instrument;
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: Editorial;
  src: url("/assets/fonts/instrument-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url("/assets/fonts/plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
html {
  --bg: #fafaf8;
  --ink: #171a19;
  --muted: #535955;
  --line: #d3d5ce;
  --accent: #6430c8;
  --button: #6930cf;
  --button-ink: #fff;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #101211;
  --ink: #eeefe8;
  --muted: #b8bcb5;
  --line: #373c37;
  --accent: #bf99ff;
  --button: #b991ff;
  --button-ink: #21112f;
  color-scheme: dark;
}
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--bg);
  color: var(--ink);
  font:
    400 16px/1.48 Instrument,
    Arial,
    sans-serif;
  overflow: hidden;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
a,
button {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.mast {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 65px;
  border-bottom: 1px solid var(--line);
  padding: 0 max(4vw, env(safe-area-inset-right)) 0 max(4vw, env(safe-area-inset-left));
}
.mast a {
  text-decoration: none;
}
.mast .owner-login {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, currentColor 48%, transparent);
  border-radius: 6px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 550;
}
.mast .owner-login:hover { color: var(--accent); }
.wordmark {
  font-weight: 700;
  font-size: clamp(25px, 2.45vw, 38px);
  letter-spacing: -0.065em;
  line-height: 1;
  white-space: nowrap;
  margin-right: auto;
}
.wordmark span,
.gallery-intro h1 span {
  color: var(--accent);
}
.mast nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: clamp(14px, 2.2vw, 39px);
}
.mast nav a {
  display: grid;
  align-items: center;
  position: relative;
  font-weight: 570;
  font-size: 0.94rem;
}
.mast nav a[aria-current] {
  color: var(--accent);
}
.mast nav a[aria-current]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: currentColor;
}
#theme-toggle {
  background: none;
  border: 0;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
}
#theme-toggle i {
  width: 18px;
  height: 18px;
  border: 1.6px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
}
.scroll {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.wrap {
  width: min(1390px, 100%);
  margin: auto;
  padding: clamp(26px, 4.7vw, 78px) clamp(20px, 5vw, 78px) max(42px, env(safe-area-inset-bottom));
}
.gallery-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin: 0 0 clamp(28px, 4vw, 56px);
}
h1,
h2,
p {
  margin: 0;
}
.gallery-intro h1 {
  font:
    550 clamp(56px, 7vw, 105px)/0.99 Instrument,
    Arial,
    sans-serif;
  letter-spacing: -0.078em;
}
.gallery-intro p {
  max-width: 53ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.5;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 11px 18px;
  min-height: 45px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 650;
  white-space: nowrap;
}
.button.primary {
  background: var(--button);
  color: var(--button-ink);
}
.primary:hover {
  filter: brightness(1.08);
}
.button.text {
  padding-inline: 6px;
  color: var(--accent);
}
.collection {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(18px, 2.1vw, 32px);
  row-gap: 36px;
}
.build-card {
  text-decoration: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cover {
  background: var(--sheet);
  aspect-ratio: 3/2;
  overflow: hidden;
}
.cover img,
.app-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 15px 0 14px;
  border-bottom: 1px solid var(--line);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sector {
  text-transform: uppercase;
  font:
    400 11px/1.5 Plex,
    monospace;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.card-body h2 {
  font:
    400 clamp(27px, 2.7vw, 44px)/1.05 Editorial,
    Georgia,
    serif;
  letter-spacing: -0.03em;
  margin: 8px 0 14px;
}
.card-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}
.arrow {
  color: var(--accent);
  font-size: 1.3rem;
}
.build-card:hover h2,
.back:hover,
.files a:hover,
.next-case a:hover {
  text-decoration: underline;
  text-underline-offset: 0.13em;
}
.case {
  padding-top: 20px;
}
.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 0 clamp(14px, 2vw, 30px);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.lead {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(24px, 5vw, 90px);
}
.copy h1 {
  font:
    400 clamp(50px, 5.3vw, 91px)/0.98 Editorial,
    Georgia,
    serif;
  letter-spacing: -0.049em;
  max-width: 13ch;
  margin: 15px 0 17px;
}
.copy .intro {
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 21px);
  max-width: 39ch;
  line-height: 1.45;
}
.sector span {
  margin-inline: 3px;
}
.lead-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 22px 0 12px;
}
.credit {
  color: var(--muted);
  font-size: 0.8rem;
}
.app-shot {
  background: var(--sheet);
  border: 0;
  padding: 0;
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
}
.shot-link {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--case-ink);
  color: white;
  padding: 5px 11px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 650;
}
.below {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(24px, 5vw, 90px);
  margin-top: clamp(28px, 5vw, 68px);
  border-block-start: 1px solid var(--line);
  padding-top: 25px;
}
.below h2 {
  font-size: 1.25rem;
  letter-spacing: -0.045em;
}
.below p {
  margin-top: 8px;
  max-width: 53ch;
  color: var(--muted);
}
.files {
  display: flex;
  gap: 3px 19px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 9px;
}
.files :is(a, button),
.next-case a {
  color: var(--accent);
  font:
    600 0.9rem/1.3 Instrument,
    sans-serif;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  padding: 0;
}
#copy-status {
  display: block;
  color: var(--muted);
}
.next-case {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 12px;
}
dialog {
  color: var(--ink);
  background: var(--bg);
  padding: 0;
  width: min(1360px, 96vw);
  height: min(920px, 94dvh);
  max-height: 100dvh;
  border: 1px solid var(--line);
  border-radius: 12px;
}
dialog[open] {
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
}
dialog::backdrop {
  background: #101318bb;
}
dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 0 16px;
  border-bottom: 1px solid var(--line);
}
dialog strong {
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
dialog header button {
  min-height: 44px;
  border: 0;
  background: none;
  font-size: 0.88rem;
  padding: 0 10px;
}
dialog header span {
  font-size: 1.2em;
  margin-left: 4px;
}
dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}
@media (max-width: 960px) {
  .collection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .copy h1 {
    font-size: clamp(43px, 6.8vw, 65px);
  }
}
@media (max-width: 670px) {
  .wrap {
    padding: 24px 20px 36px;
  }
  .gallery-intro {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }
  .gallery-intro h1 {
    font-size: 57px;
  }
  .gallery-intro p {
    margin-top: 10px;
  }
  .collection {
    gap: 27px 15px;
  }
  .card-body h2 {
    font-size: 29px;
  }
  .lead,
  .below {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .case {
    padding-top: 8px;
  }
  .back {
    margin-bottom: 7px;
  }
  .copy h1 {
    font-size: clamp(47px, 11.5vw, 65px);
    margin: 9px 0 13px;
  }
  .copy .intro {
    font-size: 17px;
  }
  .lead-buttons {
    margin: 15px 0 8px;
  }
  .below {
    margin-top: 24px;
  }
  .app-shot {
    max-width: 100%;
  }
  .next-case {
    flex-wrap: wrap;
  }
  .mast {
    display: grid;
    grid-template-columns: 1fr auto 44px;
    grid-template-rows: 40px 41px;
    gap: 0;
    padding: 0 max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
  }
  .mast nav {
    grid-row: 2;
    grid-column: 1/-1;
    justify-content: space-between;
    gap: 6px;
  }
  .mast nav a {
    font-size: 0.87rem;
  }
  .mast .owner-login {
    grid-row: 1;
    grid-column: 2;
  }
  .mast #theme-toggle {
    grid-row: 1;
    grid-column: 3;
  }
  .scroll {
    scrollbar-gutter: auto;
  }
  dialog {
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: 100%;
    max-height: 100%;
    border: 0;
    border-radius: 0;
  }
  dialog[open] {
    grid-template-rows: calc(47px + env(safe-area-inset-top)) minmax(0, 1fr);
  }
  dialog header {
    padding-top: env(safe-area-inset-top);
  }
}
@media (max-width: 490px) {
  .collection {
    grid-template-columns: minmax(0, 1fr);
  }
  .card-body h2 {
    font-size: 35px;
  }
  .sector {
    font-size: 10px;
  }
  .gallery-intro {
    margin-bottom: 24px;
  }
  .cover {
    aspect-ratio: 1.65;
  }
}
@media (max-height: 510px) and (orientation: landscape) {
  .mast {
    min-height: 43px;
  }
  .gallery-intro {
    margin-bottom: 20px;
  }
  .wrap {
    padding-block: 16px;
  }
  .case .back {
    margin: 0;
  }
  .copy h1 {
    font-size: 42px;
  }
  .lead-buttons {
    margin-block: 10px;
  }
  .lead {
    align-items: start;
  }
}
@media (forced-colors: active) {
  .button,
  .cover,
  .app-shot,
  .shot-link {
    border: 1px solid ButtonText;
  }
}

.offer-line,
.gallery-intro .offer-line {
  color: var(--muted);
  font:
    500 13px/1.4 Instrument,
    sans-serif;
  margin: 3px 0 5px;
}
.gallery-offer {
  flex-shrink: 0;
}
.gallery-offer .offer-line {
  margin-top: 9px;
}
.film-button {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--accent);
  padding: 0;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.film-button span {
  margin-left: 4px;
}
#reel-dialog {
  width: min(435px, 100vw);
  height: min(91dvh, 780px);
  background: #111;
}
#reel-dialog header {
  background: var(--bg);
}
#reel-dialog video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 670px) {
  #reel-dialog {
    height: min(94dvh, 850px);
  }
  .from-instagram .gallery-intro {
    margin-bottom: 10px;
    gap: 8px;
  }
  .from-instagram .gallery-intro p:not(.offer-line) {
    font-size: 15px;
  }
  .from-instagram .collection {
    display: block;
  }
  .from-instagram .build-card {
    padding: 10px 0;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }
  .from-instagram .cover {
    aspect-ratio: 1.15;
  }
  .from-instagram .card-body {
    padding: 0;
    border: 0;
  }
  .from-instagram .card-body h2 {
    font-size: 23px;
    margin: 3px 0;
  }
  .from-instagram .card-line {
    font-size: 12px;
  }
  .from-instagram .arrow {
    font-size: 14px;
  }
}

@media (max-width: 670px) {
  .from-instagram .wrap:has(.collection) {
    display: flex;
    flex-direction: column;
  }
  .from-instagram .gallery-intro {
    display: contents;
  }
  .from-instagram .gallery-intro > div:first-child {
    order: 0;
  }
  .from-instagram .gallery-intro h1 {
    font-size: clamp(35px, 8.5vw, 47px);
    letter-spacing: -0.06em;
  }
  .from-instagram .gallery-intro p:not(.offer-line) {
    margin: 5px 0 12px;
  }
  .from-instagram .collection {
    order: 1;
  }
  .from-instagram .gallery-offer {
    order: 2;
    margin-top: 17px;
  }
  .from-instagram .build-card {
    min-height: 78px;
  }
  .from-instagram .gallery-offer .button {
    width: 100%;
  }
}

.intro-app-link {
  display: none;
}
.from-instagram .intro-app-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  min-height: 44px;
  margin-top: 6px;
  color: var(--accent);
  font-size: 14px;
  order: 3;
}
.share-address {
  display: block;
  width: 100%;
  margin: 2px 0 6px;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: inherit;
  font: inherit;
}
.share-address[hidden] { display: none; }

@media (forced-colors: active) {
  .button.primary {
    forced-color-adjust: none;
    color: ButtonText;
    background: ButtonFace;
    border: 1px solid ButtonText;
  }
}
