/* Shared styles for the guide pages (seamless carousel maker, SCRL
   alternative, carousels for photographers). Same darkroom as the home
   page: its tokens, its type, its buttons. The home page keeps its own
   inline stylesheet; nothing here touches it. */

@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-900.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  --well: oklch(14.5% 0.018 170);
  --bg: oklch(19% 0.024 168);
  --surface: oklch(22.5% 0.026 165);
  --surface-2: oklch(27.5% 0.028 163);
  --line: oklch(33% 0.028 162);
  --hairline: oklch(100% 0 0 / 0.09);
  --text: oklch(94% 0.014 150);
  --muted: oklch(76% 0.024 155);
  --accent: oklch(79% 0.135 70);
  --accent-hover: oklch(83% 0.135 72);
  --accent-ink: oklch(22% 0.06 70);
  --guide: oklch(79% 0.135 70 / 0.8);
  --print-shadow: 0 24px 60px oklch(0% 0 0 / 0.5), 0 4px 14px oklch(0% 0 0 / 0.4);

  --gutter: clamp(20px, 4.5vw, 56px);
  --measure: 33em;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-nav: 20;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; scrollbar-color: oklch(30% 0.025 165) transparent; -webkit-text-size-adjust: 100%; }

body {
  background:
    url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxODAiIGhlaWdodD0iMTgwIj48ZmlsdGVyIGlkPSJuIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC45IiBudW1PY3RhdmVzPSIyIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxODAiIGhlaWdodD0iMTgwIiBmaWx0ZXI9InVybCgjbikiIG9wYWNpdHk9IjAuMDQ1Ii8+PC9zdmc+"),
    var(--well);
  color: var(--text);
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(env(safe-area-inset-top) + 14px) var(--gutter) 14px;
  background: oklch(14.5% 0.018 170 / 0.86);
  backdrop-filter: blur(14px);
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 1.35rem; letter-spacing: -0.02em;
  text-decoration: none; line-height: 1;
}
.wordmark svg { width: 22px; height: 22px; }
.wordmark svg rect { fill: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 24px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  transition: transform 200ms var(--ease), background 200ms var(--ease);
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.top .btn { min-height: 42px; padding: 10px 20px; font-size: 0.95rem; }

.textlink {
  color: var(--text); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.textlink:hover { color: var(--accent); }

/* ---------- Page frame ---------- */
main { display: block; }
.frame { max-width: 1320px; margin: 0 auto; padding-inline: var(--gutter); }

.hero { padding-block: clamp(44px, 9vh, 120px) clamp(32px, 6vh, 72px); }
h1 {
  font-size: clamp(2.35rem, 1.2rem + 5.2vw, 5rem);
  font-weight: 900; letter-spacing: -0.03em; line-height: 1.02;
  text-wrap: balance; max-width: 13em;
}
h1 em { font-style: normal; color: var(--accent); }
.lede {
  margin-top: clamp(18px, 2.4vh, 28px); max-width: 34em;
  color: var(--muted); font-size: 1.12em; line-height: 1.65; text-wrap: pretty;
}
.lede strong, .prose strong { color: var(--text); font-weight: 500; }
.actions { margin-top: clamp(26px, 3.5vh, 40px); display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; }

/* ---------- A real export, shown as the strip it is ---------- */
.strip { margin: 0; padding-bottom: clamp(36px, 6vh, 72px); }
.strip-scroll {
  overflow-x: auto; overscroll-behavior-x: contain;
  padding: 26px var(--gutter) 30px;
  scrollbar-width: thin;
}
.strip-inner {
  position: relative; margin-inline: auto;
  /* phone: one page is about four fifths of the screen, so the next
     page's edge always shows and the strip asks to be dragged */
  width: calc(var(--pages) * 78vw);
  box-shadow: var(--print-shadow); border-radius: 4px;
}
.strip-inner img { width: 100%; border-radius: 4px; }
.cut {
  position: absolute; top: -14px; bottom: -14px; width: 0;
  left: calc(var(--i) / var(--pages) * 100%);
  border-left: 1.5px dashed var(--guide);
  pointer-events: none;
}
.cut::after {
  content: attr(data-n);
  position: absolute; top: -12px; left: -13px;
  width: 26px; height: 22px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-size: 0.72rem; font-weight: 700; line-height: 1; border-radius: 7px;
}
.strip figcaption, .viewer figcaption {
  padding-inline: var(--gutter); max-width: calc(35em + 2 * var(--gutter));
  color: var(--muted); font-size: 0.9em; line-height: 1.55; text-wrap: pretty;
}
.strip figcaption .drag { display: block; margin-top: 4px; color: var(--text); font-weight: 500; }

@media (min-width: 900px) {
  .strip-scroll { overflow: visible; padding-block: 34px 34px; }
  .strip-inner { width: min(100%, 1640px); }
  .strip figcaption { margin-inline: auto; max-width: 1320px; padding-inline: var(--gutter); display: grid; grid-template-columns: minmax(0, 35em); }
  .strip figcaption .drag { display: none; }
}

/* ---------- Sections: a label column and a reading column ---------- */
.sec { padding-block: clamp(40px, 7vh, 88px); border-top: 1px solid var(--hairline); }
.hero + .sec, .strip + .sec { border-top: 0; }
.sec > .frame { display: grid; gap: clamp(16px, 2.4vh, 26px); }
h2 {
  font-size: clamp(1.55rem, 1.1rem + 1.9vw, 2.5rem);
  font-weight: 900; letter-spacing: -0.022em; line-height: 1.1; text-wrap: balance;
}
h3 { font-size: 1.12em; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.prose { max-width: var(--measure); color: var(--muted); text-wrap: pretty; }
.prose > * + * { margin-top: 1em; }
.prose a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose ul { padding-left: 1.1em; }
.prose li + li { margin-top: 0.5em; }
.prose li::marker { color: var(--accent); }
.source { font-size: 0.86em; color: var(--muted); }
.after-table { margin-top: 1.4em; }
.body > .source { margin-top: 1.4em; max-width: 35em; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (min-width: 900px) {
  .sec > .frame { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(32px, 5vw, 88px); align-items: start; }
  .sec h2 { position: sticky; top: 96px; max-width: 11em; }
  .sec .body { min-width: 0; }
}

/* ---------- Steps (a real sequence, so real numbers) ---------- */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: clamp(22px, 3vh, 34px); max-width: var(--measure); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4em 1fr; column-gap: 6px; }
.steps li::before {
  content: counter(step);
  font-weight: 900; font-size: 1.9em; line-height: 1; letter-spacing: -0.03em; color: var(--accent);
}
.steps p { color: var(--muted); margin-top: 6px; text-wrap: pretty; }

.with-shot { display: grid; gap: 34px; }
.shot-phone { width: min(64vw, 300px); border-radius: 28px; box-shadow: var(--print-shadow); border: 1px solid var(--line); }
@media (min-width: 1100px) {
  .with-shot { grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(28px, 3vw, 52px); align-items: start; }
  .shot-phone { width: clamp(220px, 14vw, 270px); }
}

/* ---------- Tables ---------- */
.spec { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.spec caption { text-align: left; color: var(--muted); font-size: 0.9em; padding-bottom: 12px; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 14px 18px 14px 0; border-top: 1px solid var(--hairline); }
.spec thead th { border-top: 0; color: var(--muted); font-weight: 500; font-size: 0.86em; padding-top: 0; }
.spec tbody th { font-weight: 700; color: var(--text); white-space: nowrap; padding-right: 28px; }
.spec td { color: var(--muted); }
.spec td b { color: var(--text); font-weight: 500; }
.spec .ours { color: var(--text); }

/* phone: each row becomes its own small block, values labelled */
@media (max-width: 719px) {
  .spec thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .spec, .spec tbody, .spec tr, .spec th, .spec td { display: block; }
  .spec tr { padding-block: 16px; border-top: 1px solid var(--hairline); }
  .spec th, .spec td { border: 0; padding: 0; }
  .spec tbody th { font-size: 1.05em; margin-bottom: 8px; }
  .spec td { display: grid; grid-template-columns: 6.2em 1fr; column-gap: 12px; padding-block: 4px; }
  .spec td::before { content: attr(data-label); color: var(--text); font-weight: 500; font-size: 0.86em; padding-top: 0.12em; }
}

/* ---------- Definition rows (details, questions) ---------- */
.rows { max-width: 40em; }
.rows > div { padding-block: 16px; border-top: 1px solid var(--hairline); display: grid; gap: 4px; }
.rows > div:first-child { border-top: 0; padding-top: 0; }
.rows dt { font-weight: 700; }
.rows dd { color: var(--muted); text-wrap: pretty; }
.rows dd a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
@media (min-width: 720px) {
  .rows.split > div { grid-template-columns: 11em 1fr; column-gap: 24px; }
}

/* ---------- Swipe viewer: one image behind a page-sized window ---------- */
.hero.has-viewer .frame { display: grid; gap: clamp(34px, 5vh, 56px); }
.viewer { margin: 0; width: min(100%, 430px); }
.viewer-window {
  position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden;
  box-shadow: var(--print-shadow); background: var(--surface);
}
.viewer-track {
  display: flex; height: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-track > span {
  flex: 0 0 100%; height: 100%; scroll-snap-align: start;
  background-image: var(--strip); background-repeat: no-repeat;
  background-size: calc(var(--pages) * 100%) 100%;
  background-position: calc(var(--i) / (var(--pages) - 1) * 100%) 0;
}
.viewer-chip {
  position: absolute; top: 12px; right: 12px;
  padding: 4px 10px; border-radius: 999px;
  background: oklch(14.5% 0.018 170 / 0.78); color: var(--text);
  font-size: 0.74rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.4;
}
.viewer-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.viewer-dots { display: flex; gap: 6px; }
.viewer-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background 200ms var(--ease); }
.viewer-dots i.on { background: var(--accent); }
.viewer-btns { display: flex; gap: 8px; }
.viewer-btns button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--text); font: inherit; font-size: 1.1rem; cursor: pointer;
  transition: background 200ms var(--ease), transform 200ms var(--ease);
}
.viewer-btns button:hover { background: var(--surface); }
.viewer-btns button:active { transform: scale(0.95); }
.viewer-btns button:disabled { opacity: 0.35; cursor: default; }
.viewer figcaption { padding-inline: 0; margin-top: 12px; }
@media (min-width: 900px) {
  .hero.has-viewer .frame { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(40px, 6vw, 110px); align-items: center; }
  .viewer { justify-self: end; width: min(100%, 470px); }
}

/* ---------- Maker ---------- */
.maker { display: flex; gap: 18px; align-items: flex-start; max-width: var(--measure); }
.maker img { width: 72px; height: 72px; border-radius: 18px; flex: none; }

/* ---------- Closing call ---------- */
.close { padding-block: clamp(56px, 10vh, 130px); border-top: 1px solid var(--hairline); }
.close h2 { font-size: clamp(1.9rem, 1.2rem + 3.2vw, 3.6rem); max-width: 14em; }
.close p { margin-top: 16px; max-width: 34em; color: var(--muted); text-wrap: pretty; }
.close .actions { margin-top: 28px; }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--hairline);
  padding: 34px var(--gutter) calc(env(safe-area-inset-bottom) + 40px);
  display: grid; gap: 22px;
  color: var(--muted); font-size: 0.9em;
}
.foot .wordmark { font-size: 1.1rem; color: var(--text); }
.foot ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.foot a { color: var(--muted); text-decoration: none; transition: color 200ms var(--ease); }
.foot a:hover, .foot a[aria-current] { color: var(--text); }
@media (min-width: 900px) {
  .foot { grid-template-columns: auto 1fr auto; align-items: start; column-gap: 56px; }
  .foot ul { grid-auto-flow: column; justify-content: start; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .viewer-btns button, .viewer-dots i { transition: none; }
}
