@font-face {
  font-family: "Instrument Sans";
  src: url("./fonts/instrument-sans-name.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Fahkwang";
  src: url("./fonts/fahkwang-light-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Fahkwang";
  src: url("./fonts/fahkwang-regular-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #070910;
  --ink: #efeee9;
  --body: #c6cbd2;
  --muted: #a0a7b2;
  --rule: #343b46;
  --body-sans: "Fahkwang", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-family: var(--body-sans);
  background: var(--night);
  color: var(--body);
  line-height: 1.6;
}

* { box-sizing: border-box; }
body, h1, h2, figure, p { margin: 0; }
[hidden] { display: none !important; }
::selection { color: #f3f3ee; background: #37444e; }
.lens-stage, .lens-stage *, .optical-name, .optical-name * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.lens-stage::selection, .lens-stage *::selection, .optical-name::selection, .optical-name *::selection {
  background: transparent;
}
.page {
  --gutter: clamp(1.35rem, 5vw, 5.25rem);
  --mast-height: clamp(3.75rem, calc(3rem + 2.3vw), 5.75rem);
  padding-bottom: 2.8rem;
}

.ruled-section, .developer {
  width: min(calc(100% - 2 * var(--gutter)), calc(78rem - 2 * var(--gutter)));
  margin-inline: auto;
}

.ruled-section {
  display: grid;
  grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr);
  column-gap: clamp(2rem, 5vw, 4.7rem);
}

.opening { position: relative; isolation: isolate; }
.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: calc(var(--mast-height) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  background: #1b1b1c linear-gradient(to bottom, #1b1b1c, #161617);
  border-bottom: 1px solid #2b2b2c;
}
h1, h2 {
  color: var(--ink);
  font-family: var(--body-sans);
  font-weight: 400;
}
.studio-name {
  flex: 0 1 auto;
  min-width: 0;
  width: clamp(16rem, calc(12.6rem + 23vw), 29rem);
  margin-inline-start: -.32rem;
  font: 400 clamp(1.2rem, 2vw, 1.6rem)/1 "Instrument Sans", sans-serif;
  letter-spacing: .045em;
}
.studio-home, .contact-link { min-height: 44px; display: inline-flex; align-items: center; }
.studio-home { width: 100%; position: relative; text-decoration: none; }
.optical-name {
  position: relative; display: block; width: 100%; pointer-events: none;
  --edge-sheet: url("./wordmark-480.webp");
}
@supports (background-image: image-set(url("./wordmark-480.webp") 1x)) {
  .optical-name {
    --edge-sheet: image-set(url("./wordmark-480.webp") 1x, url("./wordmark-720.webp") 1.5x,
                            url("./wordmark-960.webp") 2x, url("./wordmark-1440.webp") 3x);
  }
  @media (max-width: 46rem) {
    .optical-name {
      --edge-sheet: image-set(url("./wordmark-300.webp") 1x, url("./wordmark-480.webp") 1.5x,
                              url("./wordmark-720.webp") 2x, url("./wordmark-960.webp") 3x);
    }
  }
}
.optical-name svg { display: block; width: 100%; height: auto; }
.optical-name svg path { stroke: #202021; }
.masthead .contact-link {
  flex: none;
  white-space: nowrap;
  color: #c9c8c6;
  text-decoration-color: #787776;
  font-size: .88rem;
  text-underline-offset: .28em;
}
.mark-light {
  position: absolute;
  inset: 0;
  isolation: isolate;
  mix-blend-mode: screen;
  background: var(--edge-sheet) center top / 100% 500% no-repeat;
}
.mark-light > span {
  position: absolute;
  inset: 0;
  overflow: hidden;
  mix-blend-mode: plus-lighter;
  -webkit-mask: var(--edge-sheet) center var(--row) / 100% 500% no-repeat;
  mask: var(--edge-sheet) center var(--row) / 100% 500% no-repeat;
}
@supports not ((mask-image: linear-gradient(black, black)) or (-webkit-mask-image: linear-gradient(black, black))) {
  .mark-light { display: none; }
  .optical-name svg path { stroke: #49484b; }
}
.rim-nw { --row: 25%; --crest: 47%; --strength: .98; --still: .82; }
.rim-ne { --row: 50%; --crest: 41.4%; --strength: 1; --still: .94; }
.rim-se { --row: 75%; --crest: 36%; --strength: .85; --still: .44; }
.rim-sw { --row: 100%; --crest: 31.2%; --strength: .60; --still: .29; }
.mark-light > span::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f7f6f7;
  opacity: var(--still);
}
@media screen and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  /* Translate one soft light profile past the fixed contours. The offset at
     each normal lets the crest turn around a bowl or pass inside a counter. */
  .mark-light > span::before {
    right: auto;
    width: 320%;
    opacity: var(--strength);
    background: linear-gradient(90deg,
      transparent calc(var(--crest) - 24%),
      rgb(247 246 248 / .03) calc(var(--crest) - 18%),
      rgb(247 246 248 / .15) calc(var(--crest) - 12%),
      rgb(247 246 248 / .53) calc(var(--crest) - 6%),
      rgb(247 246 248 / .91) calc(var(--crest) - 2.5%),
      #f9f8f9 var(--crest),
      rgb(247 246 248 / .84) calc(var(--crest) + 2.5%),
      rgb(247 246 248 / .43) calc(var(--crest) + 5.5%),
      rgb(247 246 248 / .09) calc(var(--crest) + 10%),
      transparent calc(var(--crest) + 16%)) 0 50% / 50% 100% repeat-x;
    animation: rim-sweep 8s linear -5.12s infinite;
    animation-play-state: paused;
  }
  .page:has(#orbit-playback[data-paused="false"]) .mark-light > span::before {
    animation-play-state: running;
  }
}
@keyframes rim-sweep {
  from { transform: translate3d(-50%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}
@media (max-width: 36rem) {
  .masthead {
    gap: .5rem;
    padding-inline: max(.875rem, env(safe-area-inset-left)) max(.875rem, env(safe-area-inset-right));
  }
}
@media (forced-colors: active), print {
  .optical-name { display: none; }
  .studio-name .name-text {
    position: static; height: auto; width: auto; margin: 0; overflow: visible; clip-path: none;
  }
}
.studio-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
  padding: clamp(.75rem, 2.5svh, 1.8rem) max(var(--gutter), env(safe-area-inset-right)) clamp(.65rem, 2.2svh, 1.55rem) max(var(--gutter), env(safe-area-inset-left));
}
.about {
  max-width: 52ch;
  color: var(--ink);
  font: 300 clamp(1.25rem, 2.1vw, 2rem)/1.42 var(--body-sans);
  letter-spacing: -.018em;
  text-wrap: balance;
}
.instruments-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  max-width: 100%;
  font-size: clamp(.9rem, 1.15vw, 1rem);
  line-height: 1.4;
}
.instruments-destination { white-space: nowrap; }
.link-arrow { width: .86em; height: .86em; margin-inline-start: .45em; vertical-align: -.035em; }
.opening {
  display: grid;
  grid-template-rows: auto minmax(20rem,1fr);
  min-height: calc(100vh - var(--mast-height));
  min-height: calc(100svh - var(--mast-height) - env(safe-area-inset-top, 0px));
}
.lens-stage {
  --axis: 50%; --gate-width: 167.4cqw; --gate-height: 139.5cqw;
  position: relative; isolation: isolate; overflow: hidden; margin: 0; container-type: size;
}
.lens-space { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background: var(--night); }
.lens-space::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--night), transparent 4%, transparent 96%, var(--night));
}
.lens-exposure, .lens-movie, .lens-static, .lens-canvas {
  display: block; position: absolute; top: 50%; left: var(--axis);
  width: min(var(--gate-width),165.6cqh); height: min(var(--gate-height),138cqh);
  aspect-ratio: 6 / 5; transform: translate(-50%, -50%);
}
.lens-exposure img { display: block; width: 100%; height: 100%; }
.lens-movie, .lens-canvas { opacity: 0; }
/* Fade the last few codec levels at the edge of the otherwise empty film gate. */
.lens-movie {
  -webkit-mask-image: radial-gradient(circle closest-side, black 91%, transparent);
  mask-image: radial-gradient(circle closest-side, black 91%, transparent);
}
.lens-stage.has-movie .lens-movie, .lens-stage.has-glass .lens-canvas { opacity: 1; }
.lens-stage.has-glass .lens-movie { visibility: hidden; }
.lens-stage.has-movie.grade-film .lens-movie { filter: url(#film-light-grade); }
.lens-stage.from-movie .lens-canvas { transition: none; }
@media (prefers-reduced-motion:no-preference) {
  .lens-canvas,.lens-movie { transition: opacity .28s ease; }
}
@supports not (width:1cqw) {
  .lens-exposure,.lens-movie,.lens-static,.lens-canvas { width: min(167.4vw,144vh); height: min(139.5vw,120vh); }
  @media (min-width:58rem) {
    .lens-exposure,.lens-movie,.lens-static,.lens-canvas { width: min(113.832vw,144vh); height: min(94.86vw,120vh); }
  }
}
.orbit-playback:focus-visible {
  outline: 1px solid #afbccd;
  outline-offset: -5px;
}

.orbit-playback {
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  bottom: 0;
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #a8b1bc;
  cursor: pointer;
  touch-action: manipulation;
}
.orbit-playback::after {
  content: "";
  display: block;
  width: 4px;
  height: 9px;
  margin: auto;
  border-inline: 1.5px solid;
}
.orbit-playback[data-paused="true"]::after {
  width: 0;
  height: 0;
  border: solid transparent;
  border-width: 5px 0 5px 7px;
  border-left-color: currentColor;
}
@media (hover: hover) {
  .orbit-playback { opacity: 0; transition: opacity .18s; }
  .lens-stage:hover .orbit-playback, .lens-stage:focus-within .orbit-playback { opacity: 1; }
}

.ruled-section {
  padding-block: clamp(1.65rem, 3.1vw, 2.45rem);
  border-top: 1px solid var(--rule);
}

h2 {
  font-size: clamp(1.52rem, 2.45vw, 1.86rem);
  letter-spacing: -.015em;
  line-height: 1.2;
}


a {
  color: #d9dfe2;
  text-decoration-color: #748087;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  overflow-wrap: anywhere;
}
a:hover, a:active { color: white; text-decoration-color: #dbe3ed; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.studio-footer { align-items: start; padding-block: 1.12rem 0; }
.footer-contact { font-size: .9375rem; line-height: 1.55; }
.footer-contact p { color: var(--ink); }
.registration { max-width: 62ch; font-size: .875rem; line-height: 1.5; color: var(--muted); }
.registration p + p { margin-top: .14rem; }
.registration a { color: inherit; text-underline-offset: .17em; }
.company-number { white-space: nowrap; }
.sr-only {
  position: absolute;
  height: 1px;
  width: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media screen and (min-width: 58rem) {
  .opening {
    grid-template-columns: minmax(0,.32fr) minmax(0,.68fr);
    grid-template-rows: minmax(28rem,1fr);
  }
  .studio-info {
    grid-area: 1 / 1;
    z-index: 1;
    align-self: center;
    padding: 0 .5rem 3vh var(--gutter);
    gap: .8rem;
  }
  .about { font-size: clamp(1.4rem,1.95vw,2.25rem); line-height: 1.38; }
  .lens-stage {
    grid-area: 1 / 1 / 2 / -1;
    --axis: 66%; --gate-width: 113.832cqw; --gate-height: 94.86cqw;
  }
  .lens-space::after {
    background: linear-gradient(to right, var(--night) 13%, transparent 33%),
                linear-gradient(to bottom, var(--night), transparent 4%, transparent 96%, var(--night));
  }
}
@media (max-width: 48rem) {
  .ruled-section { grid-template-columns: 1fr; gap: .85rem; }
  .opening { grid-template-rows: auto minmax(18rem,1fr); }
  .studio-info { padding-block: .7rem .5rem; }
  .about { max-width: 43ch; text-wrap: pretty; }
}

@media (max-width: 36rem) and (orientation: portrait) {
  .opening { grid-template-rows: auto minmax(100vw,1fr); }
}
@media (max-height: 30rem) and (max-width: 57.99rem) and (orientation: landscape) {
  .opening { grid-template-rows: auto minmax(16rem,1fr); }
}
.dev-status { margin-block: 1rem 0; color: var(--muted); }

/* Studio enquiries use the same email handoff as Bubblebow. */
.enquiry {
  box-sizing: border-box; color: var(--body); background: #0d1119;
  width: min(31rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); max-height: calc(100dvh - 2rem);
  padding: 0; overflow: auto; overscroll-behavior: contain;
  border: 1px solid #48525f; border-radius: .4rem; margin: auto;
}
.enquiry::backdrop { background: rgb(4 7 13 / .77); }
.enquiry-inner { padding: clamp(1.15rem, 4vw, 2rem); }
.enquiry-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.enquiry-heading h2 { font: 300 clamp(1.75rem, 4vw, 2.3rem)/1.2 var(--body-sans); }
.enquiry-close, .enquiry-copy { min-height: 44px; padding: .25rem 0; border: 0; background: none; color: var(--body); font: inherit; text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }
#enquiry-description { margin: .3rem 0 1.35rem; font-size: 1rem; line-height: 1.45; }
.enquiry-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .85rem 1rem; }
.enquiry-form label { display: grid; gap: .32rem; font-size: .91rem; }
.enquiry-form input, .enquiry-form textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: .6rem .7rem;
  font-family: inherit; font-size: 1rem; line-height: 1.4; color: var(--ink);
  background: #090d14; border: 1px solid #515b66; border-radius: .2rem;
}
.enquiry-form textarea { resize: vertical; min-height: 5.4rem; }
.enquiry-message, .enquiry-delivery, .enquiry-actions, .enquiry-status { grid-column: 1 / -1; }
.enquiry-delivery, .enquiry-status { font-size: .89rem; line-height: 1.5; }
.enquiry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.enquiry-primary { min-height: 44px; padding: .55rem 1rem; border: 1px solid #ccd6d8; border-radius: .2rem; background: #dbe2e0; color: #10141a; font: inherit; cursor: pointer; }
.enquiry :focus-visible { outline: 2px solid #b4d5df; outline-offset: 3px; }
.enquiry-status:empty { display: none; }
@media (max-width: 27rem) { .enquiry-form { grid-template-columns: 1fr; } }
@media print { .enquiry, .enquiry::backdrop { display: none; } }
/* Available only in the development view. */
.developer { margin-block: .8rem 1.6rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .9rem; }
.developer summary { cursor: pointer; color: var(--ink); width: fit-content; }
.dev-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem,100%),1fr)); gap: 1.4rem 3rem; margin-top: 1rem; }
.dev-groups fieldset { min-width: 0; padding: 0; border: 0; }
.dev-groups legend { margin-bottom: .4rem; color: var(--ink); padding: 0; }
.dev-groups label { display: grid; grid-template-columns: 6.8rem minmax(3rem,1fr) 3rem; align-items: center; gap: .45rem; min-height: 2.35rem; }
.dev-groups label.dev-toggle { display: flex; gap: .6rem; }
.dev-groups input { min-width: 0; accent-color: #adc0ca; }
.dev-groups output { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.dev-groups select, .dev-button { font: inherit; color: var(--body); background: #11161d; border: 1px solid var(--rule); padding: .28rem .5rem; border-radius: .2rem; }
.dev-groups select { grid-column: 2 / -1; }
.dev-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.dev-button { cursor: pointer; }
.dev-button:disabled { opacity: .45; cursor: default; }
/* Keep the live glass in view while editing a slider. Closing the development
   panel restores the public page composition. */
@media screen {
  .page.tuning-glass { height: 100vh; height: 100svh; padding-bottom: 0; overflow: hidden; overflow: clip; }
  .tuning-glass .studio-footer { display: none; }
  .tuning-glass main {
    display: grid; grid-template-rows: minmax(10rem, .53fr) minmax(10rem, .47fr);
    height: calc(100vh - var(--mast-height)); height: calc(100svh - var(--mast-height) - env(safe-area-inset-top, 0px));
    min-height: 21rem;
  }
  .tuning-glass .opening { display: grid; grid-template: 1fr / 1fr; min-height: 0; }
  .tuning-glass .studio-info { display: none; }
  .tuning-glass .lens-stage { grid-area: 1 / 1; --axis: 50%; --gate-width: 167.4cqw; --gate-height: 139.5cqw; }
  .tuning-glass .lens-space::after { background: linear-gradient(to bottom, var(--night), transparent 4%, transparent 96%, var(--night)); }
  .tuning-glass .developer {
    box-sizing: border-box; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
    width: auto; margin: 0 var(--gutter); padding: .6rem .4rem 1.25rem 0;
  }
  .tuning-glass .dev-groups { grid-template-columns: 1fr; gap: .85rem; }
  .tuning-glass .developer summary { margin-bottom: .25rem; }
}
@media screen and (min-width: 58rem), screen and (orientation: landscape) and (max-height: 30rem) {
  .tuning-glass main { grid-template: 1fr / minmax(0,1fr) minmax(16rem, min(30vw,26rem)); min-height: 16rem; }
  .tuning-glass .developer { margin: .75rem var(--gutter) .85rem .3rem; }
}
@media (pointer: coarse) {
  .dev-groups label, .dev-groups input[type="range"], .dev-button { min-height: 2.75rem; }
}
@media print { .developer { display: none; } }

@media print {
  :root { color-scheme: light; color: #222; background: #fff; }
  .page { max-width: none; padding: 0; }
  .lens-stage { display: none; }
  h1, h2, a, .registration, .footer-contact p { color: inherit; }
  .opening { display: block; height: auto; min-height: 0; }
  .masthead { position: static; background: transparent; border: 0; }
  .studio-info { display: block; }
  .about, .masthead .contact-link { color: inherit; }
}
