/* mfilm.app: a camera maker's product page, dark, quiet, amber only where something can be done.
   DESIGN.md has the system; .impeccable/surfaces has the direction it was built to. */

@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(../fonts/Barlow-Medium.ttf); }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(../fonts/Barlow-SemiBold.ttf); }
@font-face { font-family: Barlow; font-weight: 700; font-display: swap; src: url(../fonts/Barlow-Bold.ttf); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(../fonts/BarlowCondensed-Bold.ttf); }
/* Thai, beside Barlow: Noto Sans Thai's Thai subset only (OFL) */
@font-face {
  font-family: "Noto Sans Thai"; font-weight: 500 600; font-display: swap;
  src: url(../fonts/noto-sans-thai-thai.woff2) format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

:root {
  /* one ramp of warm neutrals, darkest to lightest */
  --bg: #0b0b0a;
  --bg2: #141413;
  --bg3: #1c1b19;
  --line: #2b2a27;
  --line2: #3a3835;
  --faint: #8a847b;
  --muted: #b0a99f;
  --ink: #ece8e1;
  --amber: #eca834;
  --amber-hi: #f4bd5c;
  --amber-ink: #17110a;
  --red: #e0442f;
  --bad: #ff9c8a;
  --radius: 6px;
  --sans: Barlow, "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --wide: 1240px;
  --gut: max(16px, 4vw);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--line2) var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 500 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--amber); color: var(--amber-ink); }
input, textarea { caret-color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 600; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.4vw, 76px); line-height: 1; letter-spacing: -.025em; }
h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -.02em; margin-bottom: 18px; }
h3 { font-size: 22px; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 1em; color: var(--muted); max-width: 64ch; }
:lang(th) h1, :lang(th) h2, :lang(th) h3 { letter-spacing: 0; line-height: 1.25; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.link { color: var(--amber); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 1px solid var(--amber); border-radius: var(--radius);
  background: var(--amber); color: var(--amber-ink);
  font: 600 16px/1 var(--sans); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--amber-hi); border-color: var(--amber-hi); }
.btn:active { background: var(--amber); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 15px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

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

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 0 var(--gut);
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font: 700 20px "Barlow Condensed", var(--sans); letter-spacing: .1em; text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.top nav a:not(.btn) { text-decoration: none; color: var(--muted); transition: color .15s; }
.top nav a:not(.btn):hover { color: var(--ink); }
.lang {
  height: 32px; min-width: 38px; padding: 0 8px; border: 1px solid var(--line2); border-radius: var(--radius);
  background: none; color: var(--muted); font: 600 13px var(--sans); letter-spacing: .06em; cursor: pointer;
}
.lang:hover { color: var(--ink); border-color: var(--ink); }
@media (max-width: 760px) { .top nav a:not(.btn) { display: none; } .top nav { gap: 12px; } }

/* ---------------------------------------------------------------- hero: the camera */

.hero { padding: 48px var(--gut) 40px; text-align: center; }
@media (min-width: 1000px) { .hero h1 br { display: none; } }
.hero-text { max-width: 820px; margin: 0 auto; }
.hero-text .lede { font-size: 19px; margin: 18px auto 0; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }
.stage { max-width: 760px; margin: 36px auto 0; text-align: left; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; }

.picker { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; }
.picker-label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.select { position: relative; display: inline-block; min-width: 0; max-width: 100%; }
.select::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border: solid var(--muted); border-width: 0 1.5px 1.5px 0; rotate: 45deg; pointer-events: none;
}
.select select {
  appearance: none; -webkit-appearance: none; max-width: 100%; text-overflow: ellipsis;
  height: 40px; padding: 0 40px 0 14px; border: 1px solid var(--line2); border-radius: var(--radius);
  background: var(--bg2); color: var(--ink); font: 600 15px var(--sans); cursor: pointer;
}
.select select:hover { border-color: var(--muted); }
.select select option, .select select optgroup { background: var(--bg2); color: var(--ink); }
.select.wide, .select.wide select { width: 100%; }

.cam-under {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
.status { display: flex; align-items: center; gap: 10px; min-height: 24px; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; transition: background .2s; }
.status.live .dot { background: var(--red); }
.status.work .dot { background: var(--amber); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.wheel-hint { display: flex; align-items: center; gap: 8px; }
.mini {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line2); border-radius: var(--radius); background: none; color: var(--ink); cursor: pointer;
}
.mini svg.i { width: 18px; height: 18px; }
.mini:hover { border-color: var(--ink); }
.lvbtn { font: 600 12px var(--sans); width: auto; padding: 0 12px; letter-spacing: .06em; }
.cam.lv-on ~ .cam-under .lvbtn { border-color: var(--red); color: #ffb3a5; }

/* the four things to try, in one row under the camera; they light up as they are done */
.guide { max-width: 760px; margin: 40px auto 0; text-align: left; }
.steps {
  list-style: none; padding: 0; margin: 0; counter-reset: s;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px;
}
.steps li { counter-increment: s; padding-top: 16px; border-top: 1px solid var(--line2); color: var(--muted); transition: border-color .3s; }
.steps li::before { content: counter(s); display: block; font: 600 14px var(--sans); color: var(--faint); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.steps li b { display: block; color: var(--ink); font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.steps li span { font-size: 14px; line-height: 1.5; }
.steps li.now { border-top-color: var(--amber); }
.steps li.now::before { color: var(--amber); }
.steps li.done { border-top-color: var(--amber); }
.steps li.done::before { color: var(--amber); }
.steps li.done b { color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; } }
.keys { margin-top: 26px; font-size: 14px; color: var(--muted); }
.keys summary { cursor: pointer; color: var(--muted); list-style: none; display: inline-flex; gap: 8px; align-items: center; }
.keys summary::-webkit-details-marker { display: none; }
.keys summary:hover { color: var(--ink); }
.keys[open] summary { color: var(--ink); }
.keys dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 24px; margin: 14px 0 0; }
.keys dl > div { display: flex; gap: 12px; }
.keys dt { color: var(--ink); font-weight: 600; min-width: 72px; }
.keys dd { margin: 0; }

/* ---------------------------------------------------------------- bands */

.band { max-width: var(--wide); margin: 0 auto; padding: 120px var(--gut) 0; }
.band > p { font-size: 18px; }
.band-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: 48px; }
.band-head h2 { margin: 0; }
.band-head p { margin: 0; }
@media (max-width: 860px) { .band-head { grid-template-columns: minmax(0, 1fr); } .band { padding-top: 88px; } }

/* how it works: three columns under one rule, numbered because the order is the point */
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--line2); }
.how-grid > div { padding-top: 26px; }
.how-grid b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 10px; }
.how-grid p { margin: 0; }
@media (max-width: 760px) { .how-grid { grid-template-columns: minmax(0, 1fr); } .how-grid > div { padding: 22px 0; border-bottom: 1px solid var(--line); } }

/* ---------------------------------------------------------------- films: one frame, re-developed per film */

.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 40px; align-items: start; }
.view { margin: 0; }
.view-frame { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--bg2); cursor: zoom-in; aspect-ratio: 3 / 2; overflow: hidden; }
.view-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.view-frame img.developing { animation: develop 1.1s linear both; }
.view-frame img.redeveloping { animation: redevelop .42s linear both; }
/* a print in the developer: it starts as bare paper and the image comes up, steadily, the ease in the values */
@keyframes develop {
  0% { filter: brightness(2.100) contrast(0.350) saturate(0.000); }
  10% { filter: brightness(1.872) contrast(0.484) saturate(0.207); }
  20% { filter: brightness(1.673) contrast(0.602) saturate(0.388); }
  30% { filter: brightness(1.502) contrast(0.703) saturate(0.544); }
  40% { filter: brightness(1.358) contrast(0.789) saturate(0.675); }
  50% { filter: brightness(1.239) contrast(0.859) saturate(0.782); }
  60% { filter: brightness(1.147) contrast(0.913) saturate(0.867); }
  70% { filter: brightness(1.078) contrast(0.954) saturate(0.929); }
  80% { filter: brightness(1.032) contrast(0.981) saturate(0.971); }
  90% { filter: brightness(1.007) contrast(0.996) saturate(0.994); }
  100% { filter: brightness(1.000) contrast(1.000) saturate(1.000); }
}
/* picking another film: the same gesture, short and light, so two films can still be compared */
@keyframes redevelop {
  0% { filter: brightness(1.250) contrast(0.800) saturate(0.500); }
  17% { filter: brightness(1.174) contrast(0.861) saturate(0.653); }
  33% { filter: brightness(1.111) contrast(0.911) saturate(0.778); }
  50% { filter: brightness(1.062) contrast(0.950) saturate(0.875); }
  67% { filter: brightness(1.028) contrast(0.978) saturate(0.944); }
  83% { filter: brightness(1.007) contrast(0.994) saturate(0.986); }
  100% { filter: brightness(1.000) contrast(1.000) saturate(1.000); }
}
.view figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding: 18px 0 0; border-top: 1px solid var(--line); margin-top: 18px; }
.view figcaption b { font-size: 24px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.view figcaption .spec { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; align-self: center; white-space: nowrap; }
.view figcaption p { grid-column: 1 / -1; margin: 6px 0 0; font-size: 15px; }
.view figcaption .state { color: var(--faint); font-size: 14px; }
.shelf { min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.tabs button {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 0 0 12px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted);
  font: 600 15px var(--sans); cursor: pointer; transition: color .15s, border-color .15s;
}
.tabs button span { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--amber); }
.films { list-style: none; margin: 0; padding: 0 0 48px; max-height: 560px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 56px), transparent); mask-image: linear-gradient(#000 calc(100% - 56px), transparent); }
.film {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2px 14px; align-items: center; width: 100%;
  padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
.film img { grid-row: span 2; width: 64px; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: var(--bg3); opacity: .75; transition: opacity .15s; }
.film b { font-size: 16px; font-weight: 600; line-height: 1.3; }
.film span { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.film:hover img, .film.on img { opacity: 1; }
.film.on b { color: var(--amber); }
.films-notes { margin-top: 28px; }
.films-notes p { font-size: 15px; }
@media (max-width: 900px) {
  .viewer { grid-template-columns: minmax(0, 1fr); }
  .shelf { margin-top: 28px; }
  .films { max-height: 380px; }
}

.lightbox {
  position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
  background: rgba(5, 5, 5, .96); padding: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; min-width: 0; }
.lightbox img { max-width: 100%; max-height: 80vh; }
.lightbox figcaption { margin-top: 14px; color: var(--muted); font-size: 15px; }
.lightbox figcaption b { color: var(--ink); font-size: 18px; margin-right: 8px; }
.lb-nav, .lb-x { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.lb-nav svg.i, .lb-x svg.i { width: 28px; height: 28px; stroke-width: 1.4; }
.lb-x { position: absolute; top: 12px; right: 12px; }
.lb-nav:hover, .lb-x:hover { color: var(--ink); }
@media (max-width: 600px) { .lightbox { grid-template-columns: 40px 1fr 40px; padding: 8px; } }
body.noscroll { overflow: hidden; }

/* ---------------------------------------------------------------- cameras: a spec table */

.cam-table-wrap { overflow-x: auto; border-top: 1px solid var(--line2); }
.cam-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cam-table th { text-align: left; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
:lang(th) .cam-table th { letter-spacing: 0; text-transform: none; font-size: 14px; }
.cam-table th, .cam-table td { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cam-table td:first-child { min-width: 180px; }
.fw-m { display: none; }
.cam-table td:first-child b { font-weight: 600; }
.cam-table td:nth-child(2) { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cam-table .note { color: var(--muted); font-size: 14px; min-width: 280px; line-height: 1.55; }
.cam-table .note a { color: var(--amber); }
.cam-table code { font-size: 12px; color: var(--ink); }
.st { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 600; color: var(--ink); }
.st i { width: 9px; height: 9px; border-radius: 50%; flex: none; border: 1.5px solid var(--ink); }
.st.working i, .st.nodark i { background: var(--ink); }                                   /* filled: works */
.st.issues i { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }     /* half: works, with a problem */
.st.testing, .st.testing i { color: var(--muted); border-color: var(--muted); }           /* open ring: nobody has tried */
@media (max-width: 640px) {
  .cam-table .note, .cam-table th:last-child, .cam-table th:nth-child(2), .cam-table td:nth-child(2) { display: none; }
  .cam-table td:first-child { min-width: 0; }
  .fw-m { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
}
.later { font-size: 15px; color: var(--muted); margin-top: 20px; }
.later b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- Darkrooms */

.dr-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px 64px; align-items: start; }
@media (max-width: 900px) { .dr-head { grid-template-columns: minmax(0, 1fr); } }
.os-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 14px; }
.prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line2); }
.price { padding: 22px 20px 0 0; }
.price + .price { padding-left: 20px; border-left: 1px solid var(--line); }
.price b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.price span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.5; }
@media (max-width: 520px) {
  .prices { grid-template-columns: minmax(0, 1fr); }
  .price, .price + .price { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; margin-top: 64px; }
@media (max-width: 640px) { .shots { grid-template-columns: minmax(0, 1fr); } }
.shots figure { margin: 0; }
.shots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--bg2); }
.shots figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* ---------------------------------------------------------------- download, FAQ */

.get-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: start; }
@media (max-width: 860px) { .get-grid { grid-template-columns: minmax(0, 1fr); } }
.install { list-style: none; counter-reset: in; padding: 0; margin: 0; border-top: 1px solid var(--line2); }
.install li { counter-increment: in; display: grid; grid-template-columns: 36px minmax(0, 1fr); padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.install li::before { content: counter(in); color: var(--amber); font-weight: 600; font-variant-numeric: tabular-nums; }
.get-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.faq details { border-bottom: 1px solid var(--line); max-width: 860px; }
.faq details:first-of-type { border-top: 1px solid var(--line2); }
.faq summary {
  cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 18px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 14px; height: 14px; flex: none;
  background: linear-gradient(var(--muted), var(--muted)) center / 14px 1.5px no-repeat,
              linear-gradient(var(--muted), var(--muted)) center / 1.5px 14px no-repeat;
  transition: transform .25s var(--out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover::after { background-color: transparent; }
.faq details p { margin: 0 0 22px; }

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

footer { margin-top: 140px; padding: 56px var(--gut) 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--faint); }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; max-width: var(--wide); margin: 0 auto; }
@media (max-width: 680px) { .foot-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot-cols > div:first-child { grid-column: 1 / -1; } }
.foot-cols b { display: block; color: var(--ink); margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.foot-cols a:not(.brand) { display: block; text-decoration: none; color: var(--muted); padding: 4px 0; }
.foot-cols a:not(.brand):hover { color: var(--ink); }
.foot-cols p { font-size: 14px; margin-top: 10px; }
.foot-small { max-width: var(--wide); margin: 40px auto 0; font-size: 13px; }
.foot-small a { color: var(--muted); }

/* ---------------------------------------------------------------- the download dialog */

.dl {
  width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line2); border-radius: 10px;
  background: var(--bg2); color: var(--ink); box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}
.dl[open] { animation: rise .3s var(--out); }
@keyframes rise { from { opacity: 0; translate: 0 12px; } }
.dl::backdrop { background: rgba(0, 0, 0, .72); }
.dl-in { position: relative; padding: 32px 28px 26px; }
.dl h2 { font-size: 30px; margin-bottom: 22px; }
.dl-x {
  position: absolute; right: 14px; top: 14px; display: grid; place-items: center; width: 36px; height: 36px;
  padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer;
}
.dl-x:hover { color: var(--ink); background: var(--bg3); }
.field { display: block; margin-bottom: 18px; }
.field > span:first-child { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.dl-note { font-size: 14px; color: var(--muted); margin: -6px 0 14px; }
.dl-note:empty { display: none; }
.price-pick {
  display: flex; align-items: baseline; gap: 6px; padding: 4px 16px;
  border: 1px solid var(--line2); border-radius: var(--radius); background: var(--bg);
}
.price-pick:focus-within { border-color: var(--amber); }
.price-pick .cur { font: 600 30px var(--sans); color: var(--amber); }
.price-pick input {
  flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); outline: none;
  font: 600 42px var(--sans); font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.price-pick input::-webkit-inner-spin-button, .price-pick input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.price-pick .cur-tail { font-size: 14px; color: var(--faint); }
#dl-range { width: 100%; margin: 16px 0 12px; accent-color: var(--amber); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.presets button {
  flex: 1; min-width: 56px; height: 38px; border-radius: var(--radius); border: 1px solid var(--line2);
  background: none; color: var(--muted); font: 600 15px var(--sans); font-variant-numeric: tabular-nums; cursor: pointer;
}
.presets button:hover { color: var(--ink); border-color: var(--muted); }
.presets button.on { border-color: var(--amber); color: var(--amber); }
.dl-go { width: 100%; }
.dl-go:disabled { opacity: .6; cursor: wait; }
.dl-err { color: var(--bad); font-size: 14px; margin: 12px 0 0; padding: 10px 12px; border: 1px solid #6b2a20; background: #1f1210; border-radius: var(--radius); }
.dl-err:empty { display: none; }
.dl-err a, .dl-small a { color: var(--amber); }
.dl-small { font-size: 13px; color: var(--faint); margin: 16px 0 0; }
.dl-small a { display: block; margin-top: 4px; }
.dl-thanks .btn { margin: 8px 0 6px; }

/* Thai has no capitals: no tracking for it */
:lang(th) .field > span:first-child, :lang(th) .picker-label { letter-spacing: 0; text-transform: none; font-size: 14px; }

/* ---------------------------------------------------------------- install.html: the guide as a form */

.ig { max-width: 860px; margin: 0 auto; padding: 72px var(--gut) 0; }
.ig-head h1 { font-size: clamp(38px, 5vw, 60px); }
.ig-head .lede { font-size: 18px; margin: 18px 0 30px; }
.ig-status { max-width: none; font-size: 15px; line-height: 1.55; padding: 14px 16px; margin: 18px 0 0; border: 1px solid var(--line2); border-radius: var(--radius); background: var(--bg2); color: var(--muted); }
.ig-status:empty { display: none; }
.ig-status.issues, .ig-status.testing { color: var(--ink); }

.ig-need { margin: 40px 0 0; }
.ig-need[hidden] { display: none; }
.ig-need h2 { font-size: 24px; margin-bottom: 14px; }
.need { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--line2); }
.need li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.need li svg.i { color: var(--amber); margin-top: 2px; }
.need li b { color: var(--ink); font-weight: 600; }
@media (max-width: 620px) { .need { grid-template-columns: minmax(0, 1fr); } }

/* the step count, the progress line and the one Back and Next: it stays under the header as the page scrolls,
   so Next is always where it was, whatever the height of the step */
.ig-progress { position: sticky; top: 64px; z-index: 5; display: flex; align-items: center; gap: 18px; margin: 48px 0 0; padding: 14px 0; background: var(--bg); border-bottom: 1px solid var(--line2); }
.ig-progress[hidden] { display: none; }
.ig-nav-top { display: flex; gap: 8px; flex: none; }
.ig-nav-top .btn[hidden] { display: none; }
.ig-count { font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ig-dots { display: flex; gap: 4px; flex: 1; }
.ig-dots button { position: relative; flex: 1; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.ig-dots button::after { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--line2); transition: background .3s; }
.ig-dots button.on::after { background: var(--amber); }
.ig-dots button:hover::after { background: var(--muted); }
.ig-dots button.on:hover::after { background: var(--amber-hi); }
/* on a phone: the count and the line on one row, Back and Next under them */
@media (max-width: 620px) {
  .ig-progress { flex-wrap: wrap; gap: 10px 14px; }
  .ig-nav-top { flex-basis: 100%; order: 3; justify-content: flex-end; }
}

.ig-steps { list-style: none; counter-reset: ig; padding: 0; margin: 40px 0; }
.ig-steps > li { counter-increment: ig; position: relative; padding: 0 0 48px 64px; }
.ig-steps > li::before {
  content: counter(ig); position: absolute; left: 0; top: -2px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--amber); color: var(--amber);
  font: 600 18px var(--sans); font-variant-numeric: tabular-nums;
}
.ig-steps.wizard { margin: 0; padding: 40px 0 8px; }
.ig-steps.wizard > li { padding-bottom: 8px; min-height: 220px; }
.ig-steps.wizard > li::before { content: attr(data-n); }
/* the step's number turns up like a frame counter */
.ig-steps.wizard > li.shown::before { animation: counter .5s var(--out) both; }
@keyframes counter { from { transform: translateY(-40%); opacity: 0; } }
@media (max-width: 620px) {
  .ig-steps.wizard { padding: 28px 0 4px; }
  .ig-steps > li { padding-left: 0; padding-top: 56px; }
}
.ig-steps h3 { font-size: 26px; margin: 4px 0 12px; }
.ig-steps p { margin: 0 0 16px; }

.path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 16px; }
.path > .has-i { display: inline-flex; align-items: center; gap: 6px; }
.path .has-i svg.i { width: 16px; height: 16px; color: var(--muted); }
.path > span {
  font: 600 14px var(--sans); padding: 7px 12px; border-radius: var(--radius);
  background: var(--bg3); border: 1px solid var(--line2); color: var(--ink);
}
.path i { font-style: normal; color: var(--faint); }
.need-fw { display: inline-flex; align-items: baseline; gap: 14px; margin: 4px 0 16px; padding: 12px 18px; border-radius: var(--radius); border: 1px solid var(--amber); }
.need-fw b { font-size: 34px; font-weight: 600; color: var(--amber); font-variant-numeric: tabular-nums; }
.tip { font-size: 15px; color: var(--muted); }
.trees { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0 16px; }
@media (max-width: 620px) { .trees { grid-template-columns: minmax(0, 1fr); } }
.tree { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; align-items: center; padding: 14px 0 0; border-top: 1px solid var(--line2); }
.tree b { font-size: 15px; font-weight: 600; color: var(--ink); }
.tree code { grid-column: 1 / -1; margin-top: 8px; }
.tree svg.i { width: 18px; height: 18px; }
.tree code { font: 500 14px/1.9 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); }
.tree .in { padding-left: 1.6em; display: inline-block; }
.tree.ok svg.i { color: var(--ink); }
.tree.bad, .tree.bad svg.i, .tree.bad b { color: var(--muted); }
.tree.bad code { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line2); }
#ig-dl code { font-size: 13px; opacity: .75; margin-left: 4px; }

.ig-help { margin-top: 120px; }
.ig-help h2 { font-size: 30px; }

/* ---------------------------------------------------------------- install onto the card from this page */

.ig-easy { margin: 8px 0 24px; padding: 24px 0; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line); }
.ig-easy[hidden] { display: none; }
.ig-easy-t { display: block; color: var(--ink); font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.ig-easy > p { font-size: 15px; }
.ig-easy-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ig-meter { position: relative; height: 2px; margin: 22px 0 0; background: var(--line2); overflow: hidden; }
.ig-meter[hidden] { display: none; }
.ig-meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--amber); transition: width .2s linear; }
.ig-meter.wait i { width: 30%; animation: sweep 1.1s ease-in-out infinite; }
@keyframes sweep { from { translate: -100% 0; } to { translate: 340% 0; } }
.ig-e-msg { display: flex; gap: 10px; align-items: flex-start; max-width: none; margin: 16px 0 0; font-size: 15px; color: var(--ink); }
.ig-e-msg:empty { display: none; }
.ig-e-msg svg.i { margin-top: 2px; }
.ig-e-msg.bad { color: var(--bad); } .ig-e-msg.warn, .ig-e-msg.ok { color: var(--ink); }
.ig-e-msg.warn svg.i, .ig-e-msg.ok svg.i { color: var(--amber); }
.ig-e-or { margin: 32px 0 12px; color: var(--ink); font-weight: 600; }
.ig-e-or[hidden] { display: none; }

/* ---------------------------------------------------------------- motion off */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .view-frame img.developing, .view-frame img.redeveloping { animation: none; }
}

/* ================================================================ the camera
   Positions are in % of the body drawing (img/eosm-back.svg, 1100 x 740):
   x / 1100 and y / 740, so a photo can replace the drawing. */


.cam {
  position: relative;
  aspect-ratio: 1100 / 740;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55));
}
.cam .body { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.screen {
  position: absolute;
  overflow: hidden; background: #000; border-radius: 2px;
}
.screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: auto; object-fit: contain; }
.blackout { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.blackout.on { animation: blackout .18s ease-out; }
@keyframes blackout { 0% { opacity: 1; } 60% { opacity: 1; } 100% { opacity: 0; } }
.loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: 14px; background: #050505; transition: opacity .4s;
}
.loading.gone { opacity: 0; pointer-events: none; }

.ctl {
  --x: 50; --y: 50; --d: 5;
  position: absolute;
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: calc(var(--d) * 1%); aspect-ratio: 1;
  translate: -50% -50%;
  border: 0; padding: 0; cursor: pointer;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #4a4744, #2b2927 60%, #1b1a19);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .18), 0 1px 2px rgba(0, 0, 0, .6);
  color: #d8d2ca; font: 700 clamp(6px, 1.05vw, 11px) Barlow, sans-serif; letter-spacing: .04em;
  transition: filter .08s, transform .08s;
}
.ctl:hover { filter: brightness(1.25); }
.ctl.down, .ctl:active { transform: scale(.94); filter: brightness(.85); }
.ctl:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.ctl.play  { color: #9fd29a; font-size: clamp(7px, 1.3vw, 14px); }
.ctl.menu, .ctl.info { font-size: clamp(5px, .85vw, 10px); }
.ctl.home  { font-size: clamp(7px, 1.2vw, 13px); }
.ctl.q     { font: 700 clamp(7px, 1.25vw, 15px) Georgia, 'Times New Roman', serif; }
.ctl.pill  { aspect-ratio: 2.1; border-radius: 999px; }
.ctl.deco  { cursor: default; font-size: clamp(5px, .7vw, 9px); color: #a8a29a; }
.ctl.deco:active { transform: none; filter: none; }
.ctl.rec   { cursor: default; }
.ctl.lv { font-size: 0; }
.ctl.lv::after { content: ""; position: absolute; inset: 34%; border-radius: 50%; background: var(--red); opacity: .55; }
.cam.lv-on .ctl.lv::after { opacity: 1; }
.ctl.rec::after { content: ""; position: absolute; inset: 32%; border-radius: 50%; background: var(--red); }

/* top plate: the shutter button's chrome cap is drawn by the button */
.ctl.shutter {
  aspect-ratio: 2.4; border-radius: 10px 10px 4px 4px; background: transparent; box-shadow: none;
}
.ctl.shutter span {
  position: absolute; inset: 18% 8% 10%; border-radius: 9px 9px 3px 3px;
  background: linear-gradient(#b9b4ad, #6e6a65); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .06s;
}
.ctl.shutter.half span { transform: translateY(12%); }
.ctl.shutter.down span { transform: translateY(26%); }
.ctl.shutter::before {
  content: "SHUTTER"; position: absolute; left: 50%; bottom: 120%; translate: -50% 0;
  font-size: clamp(7px, .9vw, 10px); color: var(--amber); letter-spacing: .14em; white-space: nowrap;
  animation: nudge 2.4s ease-in-out infinite;
}
.cam.shot-once .ctl.shutter::before { display: none; }
@keyframes nudge { 0%, 100% { opacity: .9; } 50% { opacity: .35; } }
.ctl.power { aspect-ratio: 2.6; border-radius: 6px; background: linear-gradient(#8a8580, #4f4c48); }
.cam.off .ctl.power { background: linear-gradient(#55524e, #34322f); }

/* the Quick Control Dial: turn it (drag, wheel), press its edges, SET */
.dial {
  position: absolute; aspect-ratio: 1;
  translate: -50% -50%; border-radius: 50%; touch-action: none;
}
.dial-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    repeating-conic-gradient(from var(--turn, 0deg), #3b3936 0 3deg, #262422 3deg 6deg),
    #2a2826;
  -webkit-mask: radial-gradient(circle, transparent 57%, #000 58%);
          mask: radial-gradient(circle, transparent 57%, #000 58%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  cursor: grab;
}
.dial.turning .dial-ring { cursor: grabbing; }
.ctl.dpad {
  --d: 22; aspect-ratio: 1; background: transparent; box-shadow: none; border-radius: 30%;
}
.ctl.dpad::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1;
  translate: -50% -50%; border-radius: 50%; background: #8d877f; opacity: .7;
}
.ctl.dpad.up    { --x: 50; --y: 10; }
.ctl.dpad.down  { --x: 50; --y: 90; }
.ctl.dpad.left  { --x: 10; --y: 50; }
.ctl.dpad.right { --x: 90; --y: 50; }
.ctl.dpad:hover::after { background: var(--amber); opacity: 1; }
.ctl.set { --x: 50; --y: 50; --d: 38; font-size: clamp(6px, 1vw, 12px); }


/* ---------------------------------------------------------------- touch: bigger targets */

@media (pointer: coarse) {
  .ctl:not(.shutter)::before { content: ""; position: absolute; inset: -35%; }
}

/* ---------------------------------------------------------------- the other cameras (js/bodies.js) */

/* Rebels: cross keys round SET, no dial to turn */
.dial.cross::before {
  content: ""; position: absolute; inset: 4%; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #3a3836, #232120 70%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .14), 0 1px 3px rgba(0, 0, 0, .6);
}
.dial.cross .ctl.dpad::after { width: 0; height: 0; aspect-ratio: auto; border-radius: 0; background: none; opacity: .8;
  border: 5px solid transparent; }
.dial.cross .ctl.dpad.up::after { border-bottom: 7px solid #b9b3aa; translate: -50% -80%; }
.dial.cross .ctl.dpad.down::after { border-top: 7px solid #b9b3aa; translate: -50% -20%; }
.dial.cross .ctl.dpad.left::after { border-right: 7px solid #b9b3aa; translate: -80% -50%; }
.dial.cross .ctl.dpad.right::after { border-left: 7px solid #b9b3aa; translate: -20% -50%; }
.dial.cross .ctl.dpad:hover::after { background: none; }
.dial.cross .ctl.set { --d: 44; }

/* the multi-controller of the 5D Mark II and III and the 50D */
.dial.stick::before {
  content: ""; position: absolute; inset: 18%; border-radius: 50%;
  background: repeating-radial-gradient(circle, #4a4744 0 2px, #2a2826 2px 4px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .7), inset 0 1px 1px rgba(255, 255, 255, .2);
}
.dial.stick .ctl.dpad { --d: 34; }
.dial.stick .ctl.dpad::after { width: 14%; opacity: .5; }
.dial.stick .ctl.set { --d: 40; background: transparent; box-shadow: none; }

/* the main dial on top, by the shutter button: either half turns it a click */
.topdial {
  position: absolute; aspect-ratio: 3.4; translate: -50% -50%; display: flex; border-radius: 8px; overflow: hidden;
  background: repeating-linear-gradient(90deg, #4c4946 0 3px, #2a2826 3px 7px);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .15), 0 2px 3px rgba(0, 0, 0, .6);
}
.topdial .ctl { position: static; translate: none; flex: 1; width: auto; height: 100%; aspect-ratio: auto;
  border-radius: 0; background: transparent; box-shadow: none; }
.topdial .ctl:hover { background: rgba(236, 168, 52, .18); }

/* a DSLR's screen: black, the top plate or the film OS on it, LiveView only with LV on */
.cam.dslr:not(.lv-on) .screen canvas.lv { visibility: hidden; }
.screen.flip-2 { transform: rotate(180deg); }
.screen.flip-3 { transform: scaleX(-1); }
.lvbtn { font: 700 12px Barlow, sans-serif; width: auto; padding: 0 12px; border-radius: 999px; }
.cam.lv-on ~ .cam-under .lvbtn { border-color: var(--red); color: #ffb3a5; }

/* a photo of the camera's back: the buttons are the photo's own, the page's sit over them
   unseen, and light up as they are pointed at or pressed */
.cam.photo .ctl:not(.shutter):not(.dpad):not(.set),
.cam.photo .dial.ring .ctl.set, .cam.photo .dial.cross .ctl.set, .cam.photo .dial.stick .ctl.set {
  background: transparent; box-shadow: none; color: transparent;
}
.cam.photo .ctl:not(.shutter):not(.dpad):not(.set):hover, .cam.photo .ctl:not(.shutter):not(.dpad):not(.set):focus-visible,
.cam.photo .dial .ctl.set.set:hover, .cam.photo .dial .ctl.set.set:focus-visible {
  filter: none; box-shadow: 0 0 0 2px rgba(236, 168, 52, .8);
}
.cam.photo .ctl:not(.shutter):not(.dpad):not(.set):active, .cam.photo .ctl.down:not(.shutter):not(.dpad):not(.set),
.cam.photo .dial .ctl.set.set:active, .cam.photo .dial .ctl.set.set.down {
  transform: none; filter: none; background: rgba(236, 168, 52, .28);
}
.cam.photo .ctl.dpad:hover { box-shadow: none; }
.cam.photo .ctl.dpad::after { opacity: 0; }
.cam.photo .ctl.dpad:hover::after { opacity: .9; }
.cam.photo .dial.cross::before, .cam.photo .dial.stick::before { display: none; }
.cam.photo .dial-ring { background: transparent; box-shadow: none; }
.cam.photo .dial.ring .ctl.set { --d: 34; }
.cam.photo .ctl.power { background: transparent; }
.cam.photo .ctl.lv::after { opacity: 0; }
.cam.photo.lv-on .ctl.lv::after { opacity: .9; inset: 40%; }
.cam.photo .ctl.pill { aspect-ratio: 1.6; border-radius: 18px; }
/* the EOS M's trash is printed on its dial's lower edge: there it opens Home, over the dial */
.cam.photo .ctl.home { z-index: 2; }

/* the screen's glass: a faint sheen over whatever is on it */
.screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .02) 32%, transparent 33%, transparent 100%);
}
