/* ---------------------------------------------------------------------------
   CRT Camera — scanlines.app/crt-camera/
   Self-contained stylesheet. No external fonts, no CDN, no analytics.
   Shared by /crt-camera/ and /crt-camera/privacy/.
   --------------------------------------------------------------------------- */

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

:root {
  /* Surfaces */
  --bg: #050505;
  --bg-elevated: #111214;
  --card: #151619;

  /* Text */
  --text: #f5f5f2;
  --text-muted: #92928d;

  /* Amber */
  --amber: #ffb13b;
  --amber-strong: #ffc061;
  --amber-muted: #8a5818;
  --on-amber: #1a0f00;

  /* Lines */
  --hairline: rgba(255, 255, 255, 0.12);
  --amber-border: rgba(255, 177, 59, 0.55);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Shape */
  --radius-card: 14px;
  --radius-shot: 22px;

  /* Layout */
  --wrap: 1120px;
  --gutter: 24px;
  --header-h: 64px;
}

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--amber-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--amber);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.14;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

:focus-visible {
  outline: 2px solid var(--amber-border);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --- Skip link --------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease-out;
}

.skip-link:focus {
  top: 12px;
  color: var(--on-amber);
}

/* --- Layout primitives -------------------------------------------------- */

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

.section {
  padding: 64px 0;
}

.band {
  background: var(--bg-elevated);
}

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--amber-strong);
}

.section h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 18ch;
}

.lead {
  margin-top: 18px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 60ch;
}

.body-text {
  margin-top: 18px;
  color: var(--text-muted);
  max-width: 60ch;
}

.mono {
  font-family: var(--mono);
  font-size: 0.95em;
  color: var(--amber-strong);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
}

.btn-primary {
  background: var(--amber);
  color: var(--on-amber);
}

.btn-primary:hover {
  background: var(--amber-strong);
  color: var(--on-amber);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--hairline);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--amber-border);
}

/* Shown until the App Store URL exists. See README.md. */
.btn-pending {
  background: transparent;
  color: var(--amber-strong);
  border: 1px dashed var(--amber-border);
  cursor: default;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.cta-note {
  margin-top: 14px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 5, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand-icon {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
}

.anchors {
  display: none;
}

.header-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-end .btn {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.9375rem;
}

.back-link {
  font-size: 0.9375rem;
  text-decoration: none;
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 56px;
  border-bottom: 1px solid var(--hairline);
}

/* Very subtle static scanline texture — the only CRT effect on the page. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05) 0 1px,
    transparent 1px 3px
  );
  opacity: 0.55;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.4rem, 8vw, 4.5rem);
}

.hero h1 .accent {
  display: block;
  color: var(--amber-strong);
}

.hero-media {
  margin-top: 48px;
}

/* --- Device screenshots -------------------------------------------------- */
/* These are cropped from the App Store cards: the iPhone frame is already
   drawn into the image and sits on black, so no border, radius or glow here.
   The crop's own black meets the page background and the phone reads as
   floating on its own. */

.device-shot {
  display: flex;
  justify-content: center;
  margin: 0;
}

.device-shot img {
  display: block;
  width: 100%;
  max-width: 300px;
}

.device-shot.is-wide img {
  max-width: 780px;
}

/* --- Photographs --------------------------------------------------------- */
/* Real captures taken with the app. Framed, unlike the device crops. */

.photo-shot {
  margin: 0;
}

.photo-shot img {
  display: block;
  width: 100%;
  border-radius: var(--radius-shot);
  border: 1px solid var(--hairline);
}

.landscape-head {
  margin-bottom: 48px;
}

/* --- Steps -------------------------------------------------------------- */

.step-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.step {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}

.step-num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--amber-strong);
}

.step h3 {
  font-size: 1.25rem;
}

.step p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

/* --- Feature sections --------------------------------------------------- */

.feature-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.subcard {
  margin-top: 28px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}

.subcard h3 {
  font-size: 1.0625rem;
  letter-spacing: 0;
}

.subcard p {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.state-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.state-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--text-muted);
}

.state-list .state-name {
  flex: none;
  min-width: 108px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

/* --- Privacy summary ---------------------------------------------------- */

.privacy-card {
  padding: 32px 24px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}

.check-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text-muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--amber);
}

.link-arrow {
  display: inline-block;
  margin-top: 26px;
  font-weight: 600;
  min-height: 44px;
  line-height: 44px;
}

/* --- Scope -------------------------------------------------------------- */

.scope-list {
  margin: 36px 0 0;
  border-top: 1px solid var(--hairline);
}

.scope-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}

.scope-row dt {
  font-weight: 600;
}

.scope-row dd {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.9375rem;
}

/* --- Support / FAQ ------------------------------------------------------ */

.support-inner {
  max-width: 720px;
}

.faq-list {
  margin-top: 36px;
  border-top: 1px solid var(--hairline);
}

.faq {
  border-bottom: 1px solid var(--hairline);
}

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-size: 1.375rem;
  line-height: 1.2;
  color: var(--amber-strong);
}

.faq[open] summary::after {
  content: "\2212";
}

.faq-body {
  padding: 0 0 20px;
  max-width: 66ch;
}

.faq-body p {
  color: var(--text-muted);
}

.contact-card {
  margin-top: 44px;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}

.contact-card h3 {
  font-size: 1.25rem;
}

.contact-card p {
  margin-top: 10px;
  color: var(--text-muted);
}

.mail-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  font-size: 1.125rem;
  font-weight: 600;
  word-break: break-word;
}

.version-meta {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 0.9375rem;
}

.version-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: space-between;
  padding: 6px 0;
}

.version-row dt {
  color: var(--text-muted);
}

.version-row dd {
  margin: 0;
  font-family: var(--mono);
}

/* --- Prose (privacy policy) --------------------------------------------- */

.doc-header {
  padding: 56px 0 8px;
}

.doc-header h1 {
  font-size: clamp(2rem, 6vw, 3rem);
}

.doc-meta {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.prose {
  max-width: 680px;
  padding-bottom: 72px;
}

.prose section {
  margin-top: 40px;
}

.prose h2 {
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose p {
  margin: 14px 0 0;
}

.prose ul {
  margin: 14px 0 0;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.callout {
  margin-top: 24px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}

.callout ul {
  margin: 0;
  padding-left: 20px;
}

.callout li:last-child {
  margin-bottom: 0;
}

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

.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--hairline);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: 24px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.footer-name {
  color: var(--text);
  font-weight: 600;
}

.footer-legal {
  margin-top: 8px;
}

.footer-legal a {
  color: var(--text-muted);
}

.footer-legal a:hover {
  color: var(--amber-strong);
}

/* --- Motion ------------------------------------------------------------- */
/* .reveal is visible by default. The pre-animation state is only applied when
   script.js adds .js-motion to <html>, so content can never be trapped hidden
   with JavaScript disabled. */

.js-motion .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.24s ease-out, transform 0.24s ease-out;
}

.js-motion .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Responsive --------------------------------------------------------- */

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }

  .section {
    padding: 96px 0;
  }

  .hero {
    padding: 80px 0 96px;
  }

  .hero .wrap {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
  }

  .hero-media {
    margin-top: 0;
  }

  .hero .photo-shot img {
    max-width: 100%;
  }

  .anchors {
    display: flex;
    gap: 28px;
    margin-left: auto;
    font-size: 0.9375rem;
  }

  .anchors a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-muted);
    text-decoration: none;
  }

  .anchors a:hover {
    color: var(--text);
  }

  .anchors + .header-end {
    margin-left: 28px;
  }

  .step-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .feature-grid.is-reversed .feature-media {
    order: -1;
  }

  .privacy-card {
    padding: 48px;
  }

  .scope-list {
    max-width: 720px;
  }

  .contact-card {
    padding: 36px 40px;
  }

  .doc-header {
    padding: 72px 0 8px;
  }
}

@media (min-width: 1120px) {
  .device-shot.is-wide img {
    max-width: 880px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero::before {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js-motion .reveal {
    opacity: 1;
    transform: none;
  }
}
