/* B Roll's website: the home and support page, and the document pages (privacy).
   Dark like the app's camera screen. No framework, no build step.

   Document pages use this shape, styled at the bottom of this file:
     <header class="site-header"><a class="site-logo" href="./">…</a></header>
     <main class="doc"> h1, h2, p, ul/li, a, strong, small </main>
     <footer class="site-footer">: a nav.footer-links (© line, Privacy, Support,
       Careers with a .badge) and a p.built-with, the same on every page. */

@font-face {
  font-family: "Permanent Marker";
  src: url("assets/PermanentMarker-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #f5f1e8;          /* warm white, like the app's text on black */
  --ink-soft: #b9b4aa;     /* secondary text, still AA on the background */
  --paper: #000;
  --raised: #141414;       /* FAQ rows and the pill */
  --line: #2a2a2a;
  --spark: #ffd65c;        /* the yellow of the logo */
  --sky: #8ec8ea;          /* sky blue, for links */
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --marker: "Permanent Marker", "Marker Felt", cursive;
  --gutter: 20px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--rounded);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sky); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--spark); outline-offset: 3px; border-radius: 6px; }

/* ---------- The spark: the logo ---------- */

/* The mark's PNG is the mask, so the logo draws at any size, in yellow or with
   a photo showing through it. */
.spark {
  display: block;
  aspect-ratio: 1;
  background: var(--spark);
  -webkit-mask: url("assets/mark.png") center / contain no-repeat;
  mask: url("assets/mark.png") center / contain no-repeat;
}

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px var(--gutter) 48px;
}

/* The app icon: the yellow spark on a black tile. It's a button: each tap shows
   the next B Roll photo through the spark, as through a camera's aperture. */
.spark-button {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  padding: 0;
  border-radius: 22.5%;
  background: #000;
  cursor: pointer;
  width: min(44vw, 200px);
  margin-bottom: 28px;
  -webkit-tap-highlight-color: transparent;
}
.spark-button .spark { position: relative; width: 66%; }

/* The photos seen through the spark: two layers that take turns, so each one
   dissolves into the next. */
.spark-photo {
  position: absolute;
  inset: 0;
  background: center / cover;
  opacity: 0;
  transition: opacity 400ms ease;
}
.spark-photo.is-shown { opacity: 1; }

.wordmark {
  margin: 0;
  font-size: clamp(56px, 16vw, 96px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 16px 0 0;
  font-size: clamp(21px, 5.4vw, 28px);
  font-weight: 700;
  line-height: 1.25;
}

.lede {
  margin: 10px auto 0;
  max-width: 30ch;
  color: var(--ink-soft);
  font-size: 18px;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* Not Apple's badge: the app isn't live yet, and the real badge has to be
   Apple's own artwork. Swap this for the badge and the store link at launch. */
.store-pill {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 15px;
  background: var(--ink);
  color: #000;
  font-weight: 700;
  text-decoration: none;
}
.store-pill:hover { color: #000; background: var(--spark); }

.round-link {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--ink);
}
.round-link:hover { color: #000; background: var(--spark); border-color: var(--spark); }
.round-link svg { width: 22px; height: 22px; }

/* The collage behind the hero: columns of prints drifting up and down at
   different slow speeds. Each track holds its photos three times, so moving it
   by a third brings the same picture back to the same place. */
.collage {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: flex;
  gap: 14px;
  padding: 0 7px;
  /* Fades the prints out before the hero ends, so no edge of them shows. */
  -webkit-mask: linear-gradient(#000 60%, transparent 92%);
  mask: linear-gradient(#000 60%, transparent 92%);
}
/* Dims the prints so the logo and words read over them, then fades into the page. */
.collage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.66);
}
.collage-column { flex: 1; min-width: 0; }
.collage-column:nth-child(n + 4) { display: none; }   /* three columns on a phone */
.collage-track {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: drift-up var(--drift, 90s) linear infinite;
  will-change: transform;
}
.collage-column:nth-child(even) .collage-track { animation-name: drift-down; }
.collage-column:nth-child(2) { --drift: 110s; }
.collage-column:nth-child(3) { --drift: 80s; }
.collage-column:nth-child(4) { --drift: 120s; }
.collage-column:nth-child(5) { --drift: 95s; }
.collage-column:nth-child(6) { --drift: 105s; }
@keyframes drift-up { from { transform: translateY(0); } to { transform: translateY(-33.3333%); } }
@keyframes drift-down { from { transform: translateY(-33.3333%); } to { transform: translateY(0); } }

/* Each photo as a print, with a cream border. */
.collage img {
  display: block;
  width: 100%;
  height: auto;
  padding: 5px;
  background: var(--ink);
  border-radius: 2px;
}

@media (min-width: 700px) {
  .collage { gap: 20px; padding: 0 10px; }
  .collage-track { gap: 20px; }
  .collage-column:nth-child(n + 4) { display: block; }
  .collage img { padding: 8px; }
}

/* ---------- Home: the cameras ---------- */

.section {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px var(--gutter);
}

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 6.5vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.section > p { margin: 0; color: var(--ink-soft); }

/* Hand-written labels, like the tape on a film canister. */
.labels {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 12px;
}
.labels li {
  padding: 6px 14px 4px;
  background: var(--ink);
  color: #111;
  font-family: var(--marker);
  font-size: 19px;
  line-height: 1.3;
  border-radius: 3px;
  transform: rotate(var(--tilt, -2deg));
}
.labels li:nth-child(3n + 2) { --tilt: 1.5deg; background: var(--spark); }
.labels li:nth-child(3n) { --tilt: -0.5deg; background: var(--sky); }
.labels li:nth-child(4n) { --tilt: 2.5deg; }

.points {
  margin: 36px 0 0;
  display: grid;
  gap: 20px;
}
.points h3 { margin: 0 0 2px; font-size: 19px; }
.points p { margin: 0; color: var(--ink-soft); }

/* ---------- Home: support ---------- */

.support { border-top: 1px solid var(--line); }

.support .ask {
  margin: 12px 0 0;
  font-size: 19px;
  color: var(--ink);
}
.support .ask a { font-weight: 700; overflow-wrap: anywhere; }

.faq { margin-top: 32px; display: grid; gap: 10px; }

.faq details {
  background: var(--raised);
  border-radius: 16px;
  padding: 0 20px;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--spark);
  font-size: 22px;
  line-height: 1;
  transition: transform 200ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--ink-soft); }

/* ---------- Every page: header and footer ---------- */

/* As wide as a document's text, so the logo lines up with it. */
.site-header {
  max-width: 65ch;
  margin: 0 auto;
  padding: 20px var(--gutter);
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
}
.site-logo .spark { width: 34px; }
.site-logo:hover { color: var(--spark); }

.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 32px;
  color: var(--ink-soft);
  font-size: 15px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 18px;
}
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--spark); }
.built-with { margin: 0; }
.heart { color: #ff5a6e; }

/* A small yellow tag beside a link, like "Hiring" next to Careers. */
.badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--spark);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: 1px;
}

/* ---------- Document pages (privacy) ---------- */

.doc {
  max-width: 65ch;
  margin: 0 auto;
  padding: 24px var(--gutter) 40px;
  line-height: 1.65;
}
.doc h1 {
  margin: 16px 0 6px;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.doc small {
  display: block;
  margin-bottom: 32px;
  color: var(--ink-soft);
  font-size: 15px;
}
.doc h2 {
  margin: 40px 0 8px;
  font-size: 22px;
  line-height: 1.25;
}
.doc p, .doc ul { margin: 0 0 16px; }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--spark); }
.doc strong { color: var(--ink); font-weight: 700; }
.doc a { overflow-wrap: anywhere; }

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