/* Photisan website. Same identity as the app (crates/editor-app/src/theme.rs):
   neutral graphite (R = G = B: a tinted background changes how a photo's
   colours are seen) and the amber of the darkroom safelight, kept for what
   asks for action or attention. The app itself, in screenshots, carries the
   page; the safelight glows behind it. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --ground: #181818;
  --band: #1f1f1f;
  --canvas: #262626;
  --panel: #2f2f2f;
  --raised: #3a3a3a;
  --line: #333333;
  --line-strong: #444444;
  --text: #ececec;
  --quiet: #b3b3b3;
  --faint: #808080;
  --amber: #f0a63a;
  --amber-hi: #f6b85c;
  --on-amber: #1c1c1c;
  /* The three layers of a colour negative, as a datasheet draws them. */
  --layer-r: #d9705f;
  --layer-g: #79b07e;
  --layer-b: #7193d4;

  --measure: 62ch;
  --page: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --space: clamp(80px, 11vw, 144px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 1.0625rem/1.62 "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-weight: 600; margin: 0; }
p { margin: 0; }
figure { margin: 0; }
img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Headings kept for screen readers and the outline only. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Header */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(24, 24, 24, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.top {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { width: 24px; height: 24px; display: block; }
.top nav { display: flex; gap: 28px; margin-left: auto; align-items: center; }
.top nav a { color: var(--quiet); text-decoration: none; font-size: 0.9375rem; }
.top nav a:hover { color: var(--text); }
.top nav .lang { border-left: 1px solid var(--line-strong); padding-left: 28px; }
@media (max-width: 760px) {
  .top nav a:not(.btn):not(.lang) { display: none; }
  .top nav .lang { border-left: 0; padding-left: 0; }
}

/* ---------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.btn:hover { background: var(--raised); border-color: #555; }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--on-amber); }
.btn.primary:hover { background: var(--amber-hi); border-color: var(--amber-hi); }
.top .btn { min-height: 36px; padding: 0 14px; font-size: 0.875rem; border-radius: 7px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------- Intro */

/* The opening: what it is, then the app itself, large. */
.intro { padding-top: clamp(56px, 10vw, 128px); }
.intro-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.intro h1 {
  max-width: 15ch;
  font-size: clamp(2.5rem, 6.4vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lede {
  margin-top: 28px;
  max-width: 38em;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--quiet);
  text-wrap: pretty;
}
.intro .actions { justify-content: center; margin-top: 36px; }
.req { margin-top: 18px; font-size: 0.875rem; color: var(--faint); }

/* The app's window, lit from behind by the safelight (never over it: the
   photo's colours stay as they are). */
.hero-shot {
  position: relative;
  isolation: isolate;
  max-width: 1360px;
  margin: clamp(64px, 9vw, 104px) auto 0;
  padding: 0 var(--gutter);
}
.hero-shot::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 4%;
  right: 4%;
  top: -14%;
  height: 72%;
  background: radial-gradient(50% 55% at 50% 45%, rgba(240, 166, 58, 0.26), rgba(240, 166, 58, 0) 72%);
  filter: blur(18px);
  pointer-events: none;
}
.window {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: var(--canvas);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 40px 120px rgba(0, 0, 0, 0.55), 0 12px 32px rgba(0, 0, 0, 0.35);
}
.window img { display: block; width: 100%; height: auto; }

/* The window settles flat as it scrolls into view (where supported; never
   with reduced motion). */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .hero-shot .window {
      transform-origin: 50% 100%;
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 35%;
    }
  }
}
@keyframes settle {
  from { transform: perspective(1600px) rotateX(10deg) scale(0.94); opacity: 0.55; }
  to { transform: none; opacity: 1; }
}

/* ---------------------------------------------------------------- Bands and sections */

.section { padding-top: var(--space); padding-bottom: var(--space); }
.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.intro + .band { margin-top: var(--space); }
.section-head h2, .stance h2, .faq h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.section-head h2 { max-width: 18ch; }
.section-head p { margin-top: 20px; color: var(--quiet); max-width: var(--measure); font-size: 1.125rem; }

/* The stance on AI. */
.stance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 32px clamp(32px, 7vw, 112px);
  padding-top: clamp(64px, 9vw, 112px);
  padding-bottom: clamp(64px, 9vw, 112px);
}
.stance h2 { max-width: 16ch; }
.stance h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-bottom: 28px;
  background: var(--amber);
  border-radius: 2px;
}
.stance-text p { font-size: clamp(1.125rem, 1.7vw, 1.3125rem); line-height: 1.6; }
.stance-text p + p { margin-top: 18px; color: var(--quiet); }
@media (max-width: 900px) {
  .stance-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Features */

.copy h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -0.02em; max-width: 20ch; }
.copy p { margin-top: 18px; color: var(--quiet); max-width: 52ch; }
.copy p:first-of-type { color: var(--text); }
.copy .detail { font-size: 0.9375rem; color: var(--faint); }

.crop {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--canvas);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.crop img { display: block; width: 100%; height: auto; }

/* Text beside a picture. */
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px clamp(32px, 7vw, 112px);
  align-items: center;
}
.pair + .wide, .wide + .pair, .pair + .tools { margin-top: var(--space); }
.crop-tall { max-width: 380px; justify-self: center; width: 100%; }

/* Text over a wide picture. */
.wide .copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 16px clamp(32px, 7vw, 112px);
  align-items: start;
  margin-bottom: 40px;
}
.wide .copy p { margin-top: 0; }

/* The film conversion: a real sequence. */
.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  border-left: 1px solid var(--line-strong);
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 0 14px 32px;
  font-size: 1.125rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--ground);
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 0.8125rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}

/* Three short notes. */
.tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 56px);
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.tools h3 { font-size: 1.1875rem; letter-spacing: -0.01em; }
.tools p { margin-top: 12px; color: var(--quiet); font-size: 1rem; }

@media (max-width: 860px) {
  .pair, .wide .copy, .tools { grid-template-columns: 1fr; }
  .crop-tall { justify-self: start; max-width: 320px; }
}

/* ---------------------------------------------------------------- Films */

.films-show {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 32px clamp(32px, 6vw, 80px);
  align-items: center;
  margin-top: 56px;
}
.crop-menu { max-width: 340px; width: 100%; }

.curve svg { display: block; width: 100%; height: auto; }
.curve .grid { stroke: var(--line-strong); stroke-width: 1; }
.curve .axis { fill: var(--faint); font-size: 13px; font-family: "IBM Plex Sans", sans-serif; }
.curve .layer { fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.curve .r { stroke: var(--layer-r); }
.curve .g { stroke: var(--layer-g); }
.curve .b { stroke: var(--layer-b); }
.curve .tag { font-size: 13px; font-family: "IBM Plex Sans", sans-serif; }
.curve .tag.r { fill: var(--layer-r); stroke: none; }
.curve .tag.g { fill: var(--layer-g); stroke: none; }
.curve .tag.b { fill: var(--layer-b); stroke: none; }
.curve figcaption { margin-top: 14px; font-size: 0.875rem; color: var(--faint); max-width: 52ch; }
@media (max-width: 600px) {
  .curve .axis, .curve .tag { font-size: 19px; }
}

.films-list {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.4fr;
  gap: 32px clamp(24px, 4vw, 56px);
  margin-top: 64px;
}
.films-list h3 { font-size: 1rem; color: var(--quiet); font-weight: 600; padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); }
.films-list ul { list-style: none; margin: 14px 0 0; padding: 0; }
.films-list li { padding: 4px 0; }
.films-list .maker { color: var(--faint); }
.films-note { margin-top: 32px; color: var(--quiet); font-size: 0.9375rem; max-width: var(--measure); }
@media (max-width: 860px) {
  .films-show, .films-list { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Price */

.price {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px clamp(32px, 7vw, 112px);
  align-items: start;
}
.offer {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(180deg, #2a2a2a, var(--canvas));
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.amount { font-size: clamp(3rem, 6vw, 4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.amount small { font-size: 1rem; font-weight: 400; color: var(--quiet); letter-spacing: 0; margin-left: 8px; }
.once { margin-top: 10px; color: var(--quiet); }
.offer ul { margin: 28px 0 0; padding: 0; list-style: none; }
.offer li { padding: 12px 0 12px 28px; border-top: 1px solid var(--line); position: relative; }
.offer li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.15em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(-45deg);
}
.offer .actions { margin-top: 28px; }
.fine { margin-top: 18px; font-size: 0.875rem; color: var(--faint); max-width: 50ch; }
@media (max-width: 900px) {
  .price { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Questions */

.faq > * { max-width: 800px; }
.faq h2 { margin-bottom: 36px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 36px 22px 0;
  font-weight: 600;
  font-size: 1.0625rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--quiet);
  border-bottom: 2px solid var(--quiet);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 150ms ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 24px; color: var(--quiet); max-width: var(--measure); }

/* ---------------------------------------------------------------- Download */

.download { position: relative; }
.download p { margin-top: 16px; color: var(--quiet); max-width: var(--measure); }
.download .soon { margin-top: 28px; color: var(--text); }

/* Rules that stop at the content's edge, not the page padding. */
.download::before, .foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------- Footer */

.foot {
  position: relative;
  padding-top: 36px;
  padding-bottom: 56px;
  color: var(--faint);
  font-size: 0.875rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 48px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.foot nav a { color: var(--quiet); text-decoration: none; }
.foot nav a:hover { color: var(--text); }
.foot .made { grid-column: 1 / -1; color: var(--quiet); }
.foot .marks { grid-column: 1 / -1; max-width: 90ch; }
@media (max-width: 640px) {
  .foot { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Legal pages */

.doc { max-width: 720px; padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(72px, 10vw, 120px); }
.doc h1 { font-size: clamp(2.25rem, 4.5vw, 3rem); letter-spacing: -0.025em; line-height: 1.08; }
.doc .updated { margin-top: 12px; color: var(--faint); font-size: 0.9375rem; }
.doc h2 { font-size: 1.25rem; margin-top: 44px; letter-spacing: -0.01em; }
.doc p, .doc ul { margin-top: 14px; max-width: 68ch; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc .lead { margin-top: 28px; font-size: 1.125rem; color: var(--quiet); }

/* Data still to be decided (visible only so they can't be missed). */
.pending {
  outline: 1px dashed var(--amber);
  outline-offset: 2px;
  border-radius: 2px;
  color: var(--amber);
}
