@font-face { font-family: "DM Sans"; src: url("./assets/dm-sans.woff2") format("woff2"); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Allura"; src: url("./assets/allura-subtitle.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
:root { --u: clamp(.65px, calc((100vw - 15px) / 1536), 1.17px); }
body { font-family: "DM Sans", Arial, sans-serif; }
#app:not(.scene-ready) .project-card, #app:not(.scene-ready) .card-screen { transition: none !important; }
.site-shell { position: relative; isolation: isolate; background: none; }
.site-shell::before { content: ""; position: absolute; z-index: -2; pointer-events: none; top: 0; left: 0; right: 0; height: max(1024px, calc(var(--u) * 1050)); background: linear-gradient(to bottom, transparent 88%, #0b0f14 100%), url("./assets/studio-backdrop.jpg") center top / cover no-repeat; }
.case-notes .project-tags, .case-notes .project-kind, .case-notes .note-long-copy { display: none; }
.detail-links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 14px; }
.detail-links button, .secondary-note-button { border: 1px solid #92a8b77a; border-radius: 5px; background: #101c2670; color: #f2f5f8; padding: 9px 14px; font: inherit; line-height: 1.35; }
.detail-links button:hover, .secondary-note-button:hover { color: var(--blue); border-color: var(--blue); }
.project-navigation { position: relative; z-index: 20; display: flex; justify-content: center; align-items: center; gap: 30px; margin: 36px auto 0; }
.project-navigation .project-selector { margin: 0; }
.project-more { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; min-height: 44px; padding: 10px 18px; border: 1px solid #92a8b77a; border-radius: 5px; background: #101c2670; font-size: 14px; line-height: 1.35; color: #e0e7ed; }
.project-more:hover { color: var(--blue); border-color: var(--blue); background: #79d7ff0c; }
.case-dialog { width: min(640px, calc(100% - 36px)); padding: 45px; border: 1px solid #9bb8ce66; border-radius: 16px; background: #121d27; color: #f2f6fa; box-shadow: 0 30px 100px #0009; }
.case-dialog::backdrop { background: #02060bc9; backdrop-filter: blur(8px); }
.case-dialog .dialog-close { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 5px; background: transparent; color: #e9f0f6; font-size: 28px; }
.case-dialog h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.035em; margin: 14px 0 24px; }
.case-dialog > p:not(.eyebrow) { color: #c2ced8; font-size: 18px; line-height: 1.7; }
.dialog-actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.case-dialog .project-tags { font-size: 12px; margin-bottom: 26px; }
.secondary-note-button { min-height: 40px; }

@media (min-width: 1101px) {
  .site-shell::before { height: calc(var(--u) * 1050); }
  .site-header { width: min(1800px, calc(100% - var(--u) * 96)); min-height: calc(var(--u) * 60); height: calc(var(--u) * 60); border: 0; gap: calc(var(--u) * 40); }
  .brand { font-size: calc(var(--u) * 25); font-weight: 700; line-height: 1.12; letter-spacing: .075em; gap: .3em; }
  .site-nav { font-size: calc(var(--u) * 20); gap: calc(var(--u) * 48); }
  .header-cta { min-height: calc(var(--u) * 40); padding: calc(var(--u) * 6) calc(var(--u) * 22); border-color: #edf4fac2; border-radius: calc(var(--u) * 5); font-size: calc(var(--u) * 20); }
  .header-cta > span { display: none; }
  .portfolio-section { max-width: 1800px; padding: 0 calc(var(--u) * 48) calc(var(--u) * 54); }
  .portfolio-section::before { display: none; }
  .portfolio-topbar { position: absolute; top: calc(var(--u) * 15); left: calc(var(--u) * 48); right: calc(var(--u) * 48); min-height: calc(var(--u) * 32); z-index: 30; }
  .back-button { min-height: 44px; padding: calc(var(--u) * 8) calc(var(--u) * 14); font-size: calc(var(--u) * 20); line-height: 1.4; color: #f3f5f8; }
  .view-indicator { display: none; }
  .project-heading { margin: 0; padding: calc(var(--u) * 16) 0 calc(var(--u) * 12); }
  .project-heading .eyebrow { font-family: "DM Sans", Arial, sans-serif; font-weight: 500; font-size: calc(var(--u) * 14); line-height: calc(var(--u) * 22); letter-spacing: .39em; gap: calc(var(--u) * 34); color: #edf1f5; }
  .project-heading .eyebrow::before, .project-heading .eyebrow::after { width: calc(var(--u) * 145); background: linear-gradient(90deg, transparent, #e0e8ee88); }
  .project-heading h1 { margin-top: calc(var(--u) * 5); font-size: calc(var(--u) * 48); line-height: 1.1; font-weight: 700; letter-spacing: -.035em; }
  .portfolio-layout { display: grid; grid-template-columns: calc(var(--u) * 214) minmax(0, 1fr) calc(var(--u) * 216); column-gap: calc(var(--u) * 16); row-gap: 0; align-items: start; }
  .stage-wrap { grid-column: auto; grid-row: auto; width: 100%; margin: 0; }
  .stage { perspective: calc(var(--u) * 1900); isolation: auto; transform-style: preserve-3d; }
  .stage::before { padding-top: calc(56.25% + var(--u) * 56); }
  .stage-floor { left: -44%; right: -44%; bottom: calc(var(--u) * -24); height: calc(var(--u) * 90); opacity: .8; filter: blur(calc(var(--u) * 15)); transform: none; background: radial-gradient(ellipse, #91e0ff69 0, #62c7fa26 22%, transparent 68%); }
  .project-card { transform-origin: 50% 100%; transition: transform 170ms var(--ease), opacity 120ms var(--ease); }
  /* Layout changes once; JS moves the selected card using a transform only. */
  #app:not([data-view="collection"]) .project-card { transition: opacity 120ms var(--ease); }
  .project-card.is-active, #app[data-view="live"] .project-card.is-active { left: 0; top: 0; width: 100%; transform: none; }
  .card-shell { position: relative; z-index: 1; padding: calc(var(--u) * 1) calc(var(--u) * 8) calc(var(--u) * 8); border: 1px solid #c0cdd8d4; border-radius: calc(var(--u) * 20); background: linear-gradient(135deg, #a7b7c354 0, #24313d 3%, #121b23 40%, #2d414f 96%, #93c7df 100%); box-shadow: inset 0 1px 2px #f0f7ff80, inset 0 -1px 1px #c6ebfc66, 0 20px 35px #0005; }
  .is-active .card-shell { border-color: #d2e1edcb; box-shadow: inset 0 2px 1px #f0f7ff77, inset 0 -1px 2px #c4edff, 0 3px 2px #b1eafff2, 0 9px 20px #64d0ff4d, 0 25px 55px #0006; }
  .card-toolbar { height: calc(var(--u) * 54); padding: 0 calc(var(--u) * 25); gap: calc(var(--u) * 16); background: linear-gradient(105deg, #6b7c8824, #10171f90 55%, #17232d40); border: 0; }
  .card-title { font-size: calc(var(--u) * 22); font-weight: 650; }
  .preview-badge { font-size: calc(var(--u) * 17); border-color: #eef4f8b3; padding: calc(var(--u) * 4) calc(var(--u) * 13); gap: calc(var(--u) * 10); border-radius: calc(var(--u) * 6); color: #f7fafc; }
  .preview-badge::before { content: ""; display: block; width: calc(var(--u) * 17); height: calc(var(--u) * 10); border: 1.5px solid currentColor; border-radius: 50%; background: radial-gradient(circle, currentColor 0 25%, transparent 28%); }
  .card-exit { font-size: calc(var(--u) * 15); min-height: calc(var(--u) * 36); }
  .card-screen { aspect-ratio: 16 / 9; border: 1px solid #adc2d338; border-radius: calc(var(--u) * 12); }
  .project-image { border-radius: inherit; }
  .project-card::after { content: ""; position: absolute; pointer-events: none; left: 1%; right: 1%; top: calc(100% + var(--u) * 9); height: calc(var(--u) * 112); background: var(--card-image) center bottom / 100% auto no-repeat; opacity: .12; transform: scaleY(-1); filter: blur(calc(var(--u) * 5)); mask-image: linear-gradient(to bottom, transparent, #000b 75%, #000); }
  .project-card:not(.is-active)::after { opacity: .16; height: calc(var(--u) * 65); }
  .case-notes, #app:not([data-view="collection"]) .case-notes { align-self: start; gap: calc(var(--u) * 72); padding: calc(var(--u) * 59) 0 0; opacity: 1; }
  #app:not([data-view="collection"]) .case-notes.right { padding-left: 0; }
  .note-label, .note-block h2 { font-size: calc(var(--u) * 26); line-height: 1.2; font-weight: 650; letter-spacing: -.025em; }
  .note-block p { font-size: calc(var(--u) * 20); line-height: 1.35; margin-top: calc(var(--u) * 13); color: #f0f3f6; text-wrap: pretty; }
  .case-notes.left .note-block p { max-width: calc(var(--u) * 200); }
  .case-notes.left .note-block::after { display: none; }
  .case-notes.left .note-label { display: flex; align-items: center; gap: calc(var(--u) * 14); }
  .case-notes.left .note-label::after { content: ""; flex: 1; height: 1px; background: #e2eaf2a6; }
  .case-notes.right .note-block::before { top: calc(var(--u) * 16); left: calc(var(--u) * -38); width: calc(var(--u) * 24); background: #d8e4efad; }
  .detail-links { gap: calc(var(--u) * 13); margin-top: calc(var(--u) * 13); font-size: calc(var(--u) * 20); }
  .player-actions, .live-controls { gap: calc(var(--u) * 54); margin: calc(var(--u) * 35) auto 0; }
  .primary-button { min-width: calc(var(--u) * 245); min-height: calc(var(--u) * 48); padding: calc(var(--u) * 9) calc(var(--u) * 24); border-radius: calc(var(--u) * 7); font-size: calc(var(--u) * 20); font-weight: 650; line-height: 1.35; }
  .text-link, .secondary-note-button { font-size: calc(var(--u) * 20); line-height: 1.35; min-height: max(44px, calc(var(--u) * 39)); padding: calc(var(--u) * 9) calc(var(--u) * 20); }
  .project-navigation { width: calc(100% + var(--u) * 400); max-width: none; margin: calc(var(--u) * 50) calc(var(--u) * -200) 0; gap: calc(var(--u) * 40); }
  .project-navigation .project-selector { gap: calc(var(--u) * 28); width: auto; max-width: none; }
  .project-tab { min-height: calc(var(--u) * 49); padding: calc(var(--u) * 10) calc(var(--u) * 10) calc(var(--u) * 16); font-size: calc(var(--u) * 20); color: #f0f3f6; }
  .project-tab::after { left: calc(var(--u) * 10); right: calc(var(--u) * 10); height: 3px; }
  .tab-index { display: none; }
  .project-more { font-size: calc(var(--u) * 20); }
  .player-hint { display: none; }
  #app[data-view="collection"] .portfolio-topbar { display: none; }
  #app[data-view="collection"] .collection-intro { max-width: none; margin: 0 0 calc(var(--u) * 36); padding-top: calc(var(--u) * 24); }
  #app[data-view="collection"] .collection-intro h1 { font-size: calc(var(--u) * 66); }
  #app[data-view="collection"] .collection-intro p { font-size: calc(var(--u) * 21); }
  #app[data-view="collection"] .portfolio-layout { display: block; }
  #app[data-view="collection"] .stage-wrap { width: calc(var(--u) * 860); margin-inline: auto; }
  #app[data-view="collection"] .project-card { left: 0; width: 100%; }
  #app[data-view="collection"] .project-card.is-active { transform: rotateY(-3deg) scale(.94); }
  #app[data-view="collection"] .stage-caption h2 { font-size: calc(var(--u) * 29); }
  #app[data-view="collection"] .stage-caption p { font-size: calc(var(--u) * 16); }
}
/* Project thumbnails occupy a real row within the preview column. The
   three-column case-study layout can then reserve its text lanes completely. */
@media (min-width: 721px) {
  #app[data-view="project"] .stage {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 24px;
    padding-bottom: 8px;
    isolation: isolate;
  }
  #app[data-view="project"] .stage::before { display: none; }
  #app[data-view="project"] .project-card {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
  }
  #app[data-view="project"] .project-card.is-active {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
  }
  #app[data-view="project"] .project-card:not(.is-active) {
    grid-row: 2;
    justify-self: center;
    width: min(100%, 180px);
    opacity: .82;
    transform: translateZ(-8px) rotateY(calc(var(--rear-turn) * .4)) rotateZ(calc(var(--rear-roll) * .5));
  }
  #app[data-view="project"] .project-card:not(.is-active) .card-shell {
    padding: 1px 5px 5px;
    border-radius: 8px;
    border-color: #a9c3d3a8;
    box-shadow: inset 0 1px 1px #fff6, 0 6px 18px #0005;
  }
  #app[data-view="project"] .project-card:not(.is-active) .card-toolbar { height: 28px; padding-inline: 6px; }
  #app[data-view="project"] .project-card:not(.is-active) .card-title { font-size: 12px; }
  #app[data-view="project"] .project-card:not(.is-active) .preview-badge { display: none; }
  #app[data-view="project"] .project-card:not(.is-active) .card-screen { aspect-ratio: 16 / 9; border-radius: 5px; }
  #app[data-view="project"] .project-card::after { display: none; }
}
#app[data-view="live"] .project-card:not(.is-active) { display: none; }
.case-notes, .note-block { min-width: 0; }
.case-notes .note-block { overflow-wrap: break-word; }
.project-heading h1 { overflow-wrap: break-word; text-wrap: balance; }
/* Reveal the notes after the incoming preview has reached its column. */
#app.is-selecting .case-notes { visibility: hidden; pointer-events: none; }
@media (max-width: 1100px) {
  .site-shell::before { height: 1100px; opacity: .8; background-size: auto 1100px; }
  .project-navigation { display: flex; overflow-x: auto; justify-content: flex-start; gap: 22px; width: 100%; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: #8edbfb66 transparent; }
  .project-navigation .project-selector { width: max-content; max-width: none; flex: 0 0 auto; overflow: visible; padding-bottom: 0; }
  .project-more { flex: 0 0 auto; font-size: 12px; }
  .detail-links { font-size: 16px; gap: 9px; }
  .detail-links button { min-height: 44px; }
  .case-notes .note-block p { color: #dbe3ea; }
  .case-notes, #app:not([data-view="collection"]) .case-notes { padding: 0; }
  .case-dialog { padding: 38px 25px 28px; }
}
/* Keep movement on the outer layer; soften only the static screenshot beneath it. */
.project-card { transition: transform 170ms var(--ease), opacity 120ms var(--ease); }
#app .project-card,
#app[data-view="collection"] .project-card,
#app:not([data-view="collection"]) .project-card:not(.is-active) { filter: none; }
.project-card:not(.is-active) .project-image { filter: blur(.65px) saturate(.72); }
#app[data-view="collection"] .project-card:not(.is-active) .project-image { filter: saturate(.85); }
.project-card.is-active .project-image { filter: none; }
.card-screen { contain: paint; }
/* Swiping the preview cards should never select their labels or screenshots. */
#app:not([data-view="live"]) #project-stage,
#app:not([data-view="live"]) #project-stage * { -webkit-user-select: none; user-select: none; }
.project-image { -webkit-user-drag: none; }
/* The controls stay inside the selected screenshot; neighbors keep their own hit areas. */
.project-arrow {
  position: absolute;
  z-index: 7;
  top: 50%;
  width: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid #a8e6ff69;
  border-radius: 5px;
  color: #d8f4ffcf;
  background: linear-gradient(135deg, #1c3446e8, #0d1b28d9);
  box-shadow: 0 0 15px #79d7ff36, inset 0 0 10px #9fe4ff24;
  font: 500 12px/1.2 "DM Sans", Arial, sans-serif;
  opacity: .72;
  transition: opacity 140ms ease, background-color 140ms ease, scale 140ms ease;
}
.project-arrow.is-previous { left: 12px; }
.project-arrow.is-next { right: 12px; }
.project-arrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}
.project-arrow.is-previous::before { transform: rotate(225deg); }
.project-arrow:hover, .project-arrow:focus-visible { opacity: 1; background-color: #153748a3; }
.project-arrow:focus-visible { outline-offset: -4px; }
.project-arrow:active { scale: .94; }
.card-shell { transition: transform 150ms var(--ease), border-color 150ms ease; }
.project-tab .tab-name { display: inline-block; transition: transform 140ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  #app:not([data-view="live"]):not(.is-selecting) .project-card:hover .card-shell { transform: translateY(-5px) scale(1.008); border-color: #b8eaff; }
  #app:not([data-view="live"]):not(.is-selecting) .project-card:not(.is-active):hover .card-shell { transform: translateY(-8px) scale(1.025); }
  .project-tab:hover .tab-name { transform: translateY(-3px); }
}
.project-tab:focus-visible .tab-name { transform: translateY(-3px); }
#app.is-selecting .project-card::after,
#app[data-view="live"] .project-card::after { visibility: hidden; }
#app[data-view="live"] .stage-floor { filter: none; }

/* An embedded page can respond before its final image finishes loading. */
#app[data-view="live"] .preview-status {
  inset: 12px auto auto 12px;
  display: block;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  border: 1px solid #9cdfff38;
  border-radius: 7px;
  background: #101821e8;
  box-shadow: 0 3px 16px #0003;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
}
#app[data-view="live"] .preview-status p { max-width: 100%; margin: 0; }

#app[data-view="collection"] .portfolio-topbar { display: none; }
#app[data-view="collection"] .collection-intro {
  max-width: none;
  margin: 0 0 8px;
  padding-top: 8px;
  text-align: center;
}
#app[data-view="collection"] .stage { margin-top: 0; }
/* A level front window keeps both navigation buttons aligned horizontally. */
#app[data-view="collection"] .project-card.is-active { transform: scale(.94); }
#app[data-view="collection"] .collection-intro h1 {
  max-width: none;
  margin-top: 7px;
  font-size: clamp(24px, 3.3vw, 60px);
  line-height: 1.12;
  white-space: nowrap;
}
#app[data-view="collection"] .collection-intro p {
  width: fit-content;
  font-family: "Allura", "Segoe Script", cursive;
  font-size: clamp(38px, 3.3vw, 52px);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--blue);
  line-height: 1.05;
  margin: 4px auto 0;
  padding-inline: 8px;
}
@media (min-width: 1101px) {
  #app:not([data-view="collection"]) .project-card:not(.is-active) .project-image { filter: blur(calc(var(--u) * .65)); }
}
@media (max-width: 720px) {
  .project-card { transition: opacity 120ms var(--ease); }
  #app[data-view="collection"] .collection-intro h1 { font-size: clamp(30px, 7.7vw, 40px); white-space: normal; }
  #app[data-view="collection"] .collection-intro { padding-top: 0; margin-bottom: 14px; }
  #app[data-view="collection"] .collection-intro p { font-size: 38px; margin-top: 6px; }
  #app[data-view="collection"] .project-card.is-active { transform: none; }
  .project-arrow.is-previous { left: 8px; }
  .project-arrow.is-next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-card, .card-screen, .card-shell, .project-arrow, .project-tab .tab-name { transition: none !important; }
  #app .project-card .card-shell, .project-tab .tab-name { transform: none !important; }
}

/* Follow the hand directly, then settle into the next project. */
#app:not([data-view="live"]) #project-stage,
#app:not([data-view="live"]) #project-stage .card-choose { cursor: grab; }
#app.is-dragging #project-stage,
#app.is-dragging #project-stage * { cursor: grabbing; }
#app.is-dragging .project-card,
#app.is-gliding .project-card { transition: none !important; will-change: transform, opacity; }
#app.is-dragging .card-shell,
#app.is-gliding .card-shell { transform: none !important; transition: none; }
#app.is-dragging .project-card::after,
#app.is-gliding .project-card::after { visibility: hidden; }
#app.is-dragging[data-view="collection"] .project-card,
#app.is-gliding[data-view="collection"] .project-card {
  visibility: visible;
  opacity: var(--carousel-opacity, 1) !important;
}
#app.is-dragging[data-view="collection"] .project-card { pointer-events: none; }
#app[data-view="collection"] .player-hint {
  display: block;
  border: 0;
  margin-top: 16px;
  padding-top: 0;
  color: #afc6d3;
  font-size: 12px;
  text-align: center;
}

