/* Instant Studio Lighting — marketing and legal site.
   The page is lit from one place. Every shadow on it agrees about where. */

:root {
  color-scheme: light;

  /* Ground: a seamless studio sweep, from where the key lands to full falloff. */
  --sweep-key: #3e3f3a;
  --sweep-mid: #23231f;
  --sweep-deep: #0e0e0d;

  /* Paper and ink, taken from the app itself. */
  --paper: #f4f2ed;
  --paper-sunk: #eae7df;
  --ink: #171714;
  --ink-soft: #56544d;
  --rule: #d9d5cc;

  /* Guides. Amber stands in front of the subject, blue behind it. */
  --key: #d7a45b;
  --key-bright: #f0cf98;
  --behind: #9bb2ce;

  /* Where the light is, 0-100 across and down the frame, and its colour. */
  --lx: 26;
  --ly: 20;
  --tint: #ffffff;
  --lit: 26%;
  --spread: 115%;

  /* Shadows fall away from the light. */
  --sh-x: calc((50 - var(--lx)) * 0.26 * 1px);
  --sh-y: calc((50 - var(--ly)) * 0.34 * 1px);

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --col: 72rem;

  --sans: 'Archivo', ui-sans-serif, system-ui, 'Segoe UI', Helvetica, Arial, sans-serif;
  --serif: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: 'wdth' 100, 'wght' 400;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--key);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  z-index: 20;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- type */

h1, h2, h3 {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 144, 'SOFT' 42, 'WONK' 1;
  font-weight: 400;
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2.55rem, 1.4rem + 4.6vw, 4.9rem);
  line-height: 0.99;
  letter-spacing: -0.026em;
}

h2 {
  font-size: clamp(1.95rem, 1.3rem + 2.6vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
}

h3 {
  font-size: 1.32rem;
  line-height: 1.2;
  font-variation-settings: 'opsz' 40, 'SOFT' 30, 'WONK' 0;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.32rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 33rem;
}

.note { font-size: 0.9rem; color: var(--ink-soft); }

.label {
  font-size: 0.76rem;
  line-height: 1.3;
  letter-spacing: 0.045em;
  font-variation-settings: 'wdth' 92, 'wght' 500;
  color: var(--ink-soft);
}

.value {
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 92, 'wght' 500;
  font-size: 0.98rem;
}

/* ------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--col);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: clamp(3.75rem, 9vw, 7.5rem); }
.band-paper { background: var(--paper); color: var(--ink); }
.band-sunk { background: var(--paper-sunk); color: var(--ink); }

.band-dark {
  transition: background 0.55s ease;
  background:
    radial-gradient(var(--spread) calc(var(--spread) * 0.68) at calc(var(--lx) * 1%) calc(var(--ly) * 1%),
      color-mix(in oklab, var(--tint) var(--lit), var(--sweep-key)) 0%,
      var(--sweep-mid) 44%,
      var(--sweep-deep) 92%);
  color: #efece5;
  --ink: #efece5;
  --ink-soft: #a9a69d;
  --rule: #3a3a35;
}

.band-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.band-head p { color: var(--ink-soft); margin-top: 0.85rem; }

/* ------------------------------------------------------------- header */

.site-header {
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.masthead {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block: 1.25rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--sans);
  font-variation-settings: 'wdth' 100, 'wght' 550;
  font-size: 1.06rem;
  letter-spacing: -0.005em;
  line-height: 1.1;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.masthead nav {
  display: flex;
  gap: clamp(0.9rem, 2.4vw, 1.9rem);
  font-size: 0.92rem;
  font-variation-settings: 'wdth' 94, 'wght' 450;
}

.masthead nav a { text-decoration: none; color: var(--ink-soft); }
.masthead nav a:hover,
.masthead nav a[aria-current] { color: var(--ink); }

/* --------------------------------------------------------------- hero */

.hero { padding-bottom: clamp(3.5rem, 8vw, 6.5rem); }

.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.stage {
  display: flex;
  justify-content: flex-start;
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(1.75rem, 4vw, 2.75rem);
}

.stage-inner {
  position: relative;
  /* The frame is as large as the viewport allows, in the shape of the photo.
     No width transition: the swap is a different picture, not a resize. */
  width: min(100%, calc(var(--ar-n, 1.3333) * min(60vh, 34rem)));

}

.plate {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 4 / 3);
  background: #0a0a09;
  overflow: hidden;
  box-shadow:
    calc(var(--sh-x) * 2.2) calc(var(--sh-y) * 2.2) 60px -12px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transition: box-shadow 0.5s ease;
}

.plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.28s ease;
}

.plate img[data-role='before'] { opacity: 0; }
.plate[data-showing='before'] img[data-role='before'] { opacity: 1; }
.plate[data-showing='before'] img[data-role='after'] { opacity: 0; }

/* The cube is drawn over the frame and allowed to hang past its edge,
   because a node sitting on a corner is half outside the picture. */
.cube {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}

:is(.cube, .mini) {
  --line-front: var(--key);
  --line-back: var(--behind);
  --dot-front: rgba(255, 244, 216, 0.5);
  --dot-back: rgba(155, 178, 206, 0.5);
  --strut: rgba(215, 164, 91, 0.4);
}

/* Over a photograph the guides need a hairline of shadow to stay readable. */
.cube { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55)); }

.mini {
  --line-front: #b1803a;
  --line-back: #5c7793;
  --dot-front: rgba(23, 23, 20, 0.5);
  --dot-back: rgba(23, 23, 20, 0.22);
  --strut: rgba(23, 23, 20, 0.16);
}

:is(.cube, .mini) .face-front { fill: none; stroke: var(--line-front); stroke-width: 1.15; opacity: 0.85; }
:is(.cube, .mini) .face-back { fill: none; stroke: var(--line-back); stroke-width: 1; stroke-dasharray: 5 5; opacity: 0.65; }
:is(.cube, .mini) .face-mid { fill: none; stroke: var(--line-back); stroke-width: 1; stroke-dasharray: 2 6; opacity: 0.35; }
:is(.cube, .mini) .strut { stroke: var(--strut); stroke-width: 0.9; }
:is(.cube, .mini) .node { fill: var(--dot-front); }
:is(.cube, .mini) .node-back { fill: var(--dot-back); }

.cube .pick {
  pointer-events: auto;
  cursor: pointer;
  fill: transparent;
  stroke: rgba(255, 244, 216, 0.4);
  stroke-width: 1;
  transition: stroke 0.2s ease, fill 0.2s ease;
}
.cube .pick:hover { fill: rgba(255, 244, 216, 0.22); stroke: var(--key-bright); }

.cube .key-glow { fill: var(--tint); opacity: 0.22; }
.cube .key-dot { fill: var(--tint); stroke: rgba(0, 0, 0, 0.35); stroke-width: 0.75; }
.cube .key-ray { stroke: var(--tint); stroke-width: 1; opacity: 0.4; stroke-dasharray: 3 4; }

/* ------------------------------------------------------- hero controls */

.readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 1rem 1.5rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: 44rem;
}

.readout div { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; }
.readout .value { font-size: 1.02rem; }

.subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block: 1.5rem;
  padding: 0;
  list-style: none;
}

.subject {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.85rem 0.42rem 0.42rem;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.88rem;
  font-variation-settings: 'wdth' 94, 'wght' 450;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.subject img { width: 30px; height: 30px; object-fit: cover; }
.subject:hover { border-color: var(--key); color: var(--ink); }
.subject.is-current { border-color: var(--key); color: var(--ink); background: rgba(215, 164, 91, 0.12); }

.compare {
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.92rem;
  font-variation-settings: 'wdth' 94, 'wght' 500;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid var(--key);
  padding-bottom: 2px;
}

.hero-copy { margin-top: clamp(2.5rem, 6vw, 4rem); }
.hero-copy h1 { margin-bottom: 0.55em; }

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.store {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.72rem 1.15rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-variation-settings: 'wdth' 96, 'wght' 500;
  background: var(--key);
  color: #1a1509;
  box-shadow: var(--sh-x) var(--sh-y) 18px -8px rgba(0, 0, 0, 0.6);
  transition: background 0.2s ease;
}
.store:hover { background: var(--key-bright); }
.store-quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: 1px solid var(--rule);
}
.store-quiet:hover { background: transparent; border-color: var(--key); }

/* --------------------------------------------------------- the panel */

.panel { border-top: 1px solid var(--rule); max-width: 58rem; }

.control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem;
  gap: 1.25rem 2rem;
  align-items: center;
  padding-block: clamp(1.5rem, 3vw, 2.1rem);
  border-bottom: 1px solid var(--rule);
}

.control h3 { margin-bottom: 0.35rem; }
.control p { font-size: 0.97rem; color: var(--ink-soft); margin: 0; max-width: 32rem; }
.control figure { margin: 0; justify-self: end; width: 100%; }

.ramp {
  height: 26px;
  border: 1px solid var(--rule);
  background: linear-gradient(90deg, #ffaa4f, #ffcb9b, #ffe5ce, #fff9f5, #ecf7ff, #d1e1ff, #c2d7ff, #b9d1ff, #b2cdff);
}

.scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-variation-settings: 'wdth' 90, 'wght' 450;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 42px;
  border: 1px solid var(--rule);
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--paper) calc(10% - 1px) 10%),
    linear-gradient(90deg, #fbfaf7, var(--ink));
}

.qualities { display: flex; gap: 0.75rem; align-items: flex-end; }
.quality { text-align: center; flex: 1; }

.quality span {
  display: block;
  width: 100%;
  height: 42px;
  border: 1px solid var(--rule);
}
.quality[data-q='soft'] span { background: linear-gradient(90deg, #fff 4%, var(--ink) 96%); }
.quality[data-q='hard'] span { background: linear-gradient(90deg, #fff 34%, var(--ink) 66%); }
.quality[data-q='sharp'] span { background: linear-gradient(90deg, #fff 49.4%, var(--ink) 50.6%); }

.quality small {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.72rem;
  font-variation-settings: 'wdth' 90;
  color: var(--ink-soft);
}

.sizes { display: flex; align-items: flex-end; gap: 0.9rem; }
.sizes span { border: 1px solid var(--ink); display: block; }
.sizes span[data-s='standard'] { width: 34px; height: 34px; }
.sizes span[data-s='high'] { width: 62px; height: 62px; }
.sizes small { font-size: 0.72rem; color: var(--ink-soft); font-variation-settings: 'wdth' 90; }
.sizes div { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }

.mini { width: 100%; height: auto; }

/* -------------------------------------------------------- the gallery */

.pairs { display: grid; gap: clamp(2.75rem, 6vw, 4.5rem); }

.pair {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.pair figure { margin: 0; }
.pair img { width: auto; height: auto; background: #111; }
.pair .original img { max-height: 10.5rem; }
.pair .relit img { max-height: 25rem; box-shadow: var(--sh-x) var(--sh-y) 44px -16px rgba(0, 0, 0, 0.75); }

.pair figcaption {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-variation-settings: 'wdth' 92;
}

.pair-meta {
  flex-basis: 100%;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.75rem;
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  font-size: 0.84rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 92;
}

.pair-meta b {
  color: var(--ink);
  font-variation-settings: 'wdth' 92, 'wght' 500;
  font-weight: 400;
}

/* ----------------------------------------------------------- specifics */

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}

.facts { margin: 0; border-top: 1px solid var(--rule); }

.facts > div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.35rem 1.5rem;
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--rule);
}

.facts dt { color: var(--ink-soft); font-size: 0.88rem; font-variation-settings: 'wdth' 92, 'wght' 450; }
.facts dd { margin: 0; font-size: 0.97rem; }

.price {
  margin-bottom: 0.12em;
  font-family: var(--serif);
  font-variation-settings: 'opsz' 144, 'SOFT' 42, 'WONK' 1;
  font-size: clamp(2.6rem, 2rem + 3vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  display: block;
}

/* ------------------------------------------------------------- footer */

.footer { background: var(--sweep-deep); color: #cfccc4; padding-block: 3.25rem 2.5rem; }
.footer a { color: #efece5; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: start;
}

.footer nav { display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.95rem; }
.footer small { font-size: 0.82rem; color: #85837c; display: block; margin-top: 1.1rem; }

/* --------------------------------------------------------- doc pages */

.doc { max-width: 40rem; margin-inline: 0; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem); }
.doc h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.5rem); margin-bottom: 0.4em; }
.doc h2 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.85rem); margin-top: 2.4rem; margin-bottom: 0.5rem; }
.doc h3 { margin-top: 1.9rem; margin-bottom: 0.35rem; }
.doc p, .doc li { max-width: 38rem; }
.doc ul { padding-left: 1.15rem; margin: 0 0 1.1em; }
.doc li { margin-bottom: 0.4em; }
.doc .stamp { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 2.5rem; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: 0.88rem;
}

.doc caption { text-align: left; color: var(--ink-soft); font-size: 0.85rem; padding-bottom: 0.6rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--rule); }
.doc th { font-variation-settings: 'wdth' 92, 'wght' 500; font-weight: 400; }

.scroller { overflow-x: auto; }

.callout {
  border-left: 2px solid var(--key);
  padding: 0.15rem 0 0.15rem 1.15rem;
  margin: 1.75rem 0;
}

/* ------------------------------------------------------------ narrow */

@media (min-width: 1000px) {
  .editor { grid-template-columns: minmax(0, 1fr) 13.5rem; }

  .editor .readout {
    grid-template-columns: 1fr;
    gap: 0;
    border: 0;
    padding-block: 0;
    margin-top: clamp(1.5rem, 4vw, 3rem);
    max-width: none;
  }

  .editor .readout div {
    border-top: 1px solid var(--rule);
    padding-block: 0.7rem 0.85rem;
  }
}

@media (max-width: 760px) {
  .control { grid-template-columns: 1fr; }
  .control figure { justify-self: start; max-width: 15rem; }
  .pair .original img { max-height: 7rem; }
  .pair .relit img { max-height: 17rem; }
  .facts > div { grid-template-columns: 1fr; }
  .masthead { padding-block: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
