:root {
  --bg: #12091f;                 /* backgroundColor */
  --bg-raised: #1c0d33;
  --panel: rgba(209, 168, 255, 0.08);
  --panel-border: rgba(209, 168, 255, 0.18);
  --lavender: #d1a8ff;           /* selectedControlColor */
  --violet: #a86bff;             /* accentColor */
  --magenta: #db6bff;            /* recordingColor */
  --amber: #ffb833;              /* framingTargetColor */
  --fg: #f2e8ff;                 /* foregroundColor */
  --fg-dim: rgba(242, 232, 255, 0.65);
  --fg-faint: rgba(242, 232, 255, 0.4);
  --active-fg: #170926;          /* activeControlForegroundColor */

  --font-body: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-osd: "Bitcount Single", monospace;
}

@font-face {
  font-family: "Bitcount Single";
  src: url("/vloggie/fonts/BitcountSingle-VF.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

/* Column layout so a short page still pins the footer to the bottom of
   the viewport (see .page-wrapper / .vloggie-footer below). */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-wrapper {
  flex: 1 0 auto;
}

/* CRT scanlines over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.11) 0px,
    rgba(0, 0, 0, 0.11) 1px,
    transparent 1px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 999;
}

img {
  max-width: 100%;
}

a {
  color: var(--lavender);
}

::selection {
  background: var(--violet);
  color: var(--fg);
}

/* Retro camcorder OSD text */
.osd {
  font-family: var(--font-osd);
  font-variation-settings: "CRSV" 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =====================================================================
   HERO
===================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vh, 6rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 7vh, 5rem);
  /* On a tall viewport the leftover room goes above and below the section
     rather than pooling between it and the footer. */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 120vw);
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(168, 107, 255, 0.22), transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  /* width:100% — auto side margins alone would leave these flex children
     sized to their content instead of the column width. */
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-eyebrow {
  color: var(--magenta);
  font-size: 1.25rem;
}

/* Above body::after (z-index 999), like .vf-scene, so the CRT scanlines
   run behind the headline rather than across it. */
.hero-title {
  position: relative;
  z-index: 1000;
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  line-height: 1.12;
  font-weight: 700;
  margin: 0.75rem 0 1rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  color: var(--fg-dim);
  font-size: 1.125rem;
  max-width: 32rem;
  margin-bottom: 2rem;
}

.hero-cta-note {
  margin-top: 0.8rem;
  color: var(--fg-faint);
  font-size: 0.9rem;
}

/* CTA button, lavender like the app's selected controls. Also lifted above
   the scanline overlay so the fill stays flat. */
.cta-btn {
  display: inline-block;
  position: relative;
  z-index: 1000;
  background: var(--lavender);
  color: var(--active-fg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: none;
  border-radius: 14px;
  padding: 0.9rem 1.8rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  box-shadow: 0 0 0 rgba(209, 168, 255, 0);
}

.cta-btn:hover {
  background: #e0c3ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(168, 107, 255, 0.45);
}

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

.viewfinder {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  /* The lit background the cut-out sits on. It lives here rather than on
     the image so the image's filter can't touch it. */
  background:
    radial-gradient(ellipse at 62% 55%, rgba(168, 107, 255, 0.24), transparent 64%),
    linear-gradient(180deg, #2e1a4c, #24143a);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Film grain over the shot, generated by an inline SVG turbulence tile —
   no image asset, no JS. It rides above the grade so photo and backdrop
   pick up the same noise. */
.viewfinder::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1002;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.16;
  mix-blend-mode: overlay;
}

.viewfinder::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1001;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 58% 48%, rgba(255, 255, 255, 0) 52%, rgba(14, 6, 26, 0.45) 100%),
    linear-gradient(155deg, rgba(168, 107, 255, 0.55), rgba(219, 107, 255, 0.3) 55%, rgba(18, 9, 31, 0.5));
  mix-blend-mode: soft-light;
}

.vf-scene {
  display: block;
  /* Sits above body::after (z-index 999) so the CRT scanlines don't fall
     across the photo. The cut-out's transparent areas still show the
     scanlines painted on the frame underneath. */
  position: relative;
  z-index: 1000;
  width: 100%;
  height: auto;
  aspect-ratio: 1.4970034247;
  object-fit: contain;
  object-position: right center;
  /* Cool the shot down a touch, then bloom violet light off the cut-out —
     drop-shadow follows the alpha, so the glow hugs the hand instead of
     boxing it. The colour grade itself is on .viewfinder::after. */
  filter:
    saturate(0.82) brightness(0.94) contrast(1.03)
    drop-shadow(0 0 2.5rem rgba(168, 107, 255, 0.4));
}

.hero-notes {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: clamp(2.5rem, 7vh, 4.5rem) auto 0;
  padding-top: clamp(2rem, 5vh, 3rem);
  border-top: 1px solid var(--panel-border);
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
}

@media (max-width: 520px) {
  .hero-notes {
    grid-template-columns: 1fr;
  }
}

.note-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.note-body {
  color: var(--fg-dim);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* =====================================================================
   Support, privacy, terms
===================================================================== */

.content-section {
  padding: clamp(2.5rem, 7vh, 5rem) clamp(1rem, 4vw, 2.5rem);
}

.content-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.content-inner.narrow {
  max-width: 720px;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.page-subtitle {
  color: var(--fg-dim);
}

/* Legal documents */
.legal-content h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.6rem;
}

.legal-content h3 {
  font-size: 1.15rem;
  margin: 1.4rem 0 0.5rem;
}

.legal-content p,
.legal-content ul {
  margin-bottom: 0.9rem;
  color: var(--fg-dim);
}

.legal-content ul {
  padding-left: 1.4rem;
}

.legal-content strong,
.legal-content b {
  color: var(--fg);
}

/* Support form */
.support-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-weight: 500;
  font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
  font: inherit;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--violet);
}

.form-select option {
  color: initial;
  background: initial;
}

.form-textarea {
  min-height: 10rem;
  resize: vertical;
}

.support-form .cta-btn {
  align-self: flex-start;
}

.message-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  font-size: 1.1rem;
}

/* =====================================================================
   FOOTER
===================================================================== */

.vloggie-footer {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--panel-border);
  background: #0d0617;
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--fg);
  font-family: var(--font-osd);
  font-variation-settings: "CRSV" 0;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.footer-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.footer-links a,
.footer-links .language-picker {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--lavender);
}

.footer-credits {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.footer-autorelease a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg-faint);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-autorelease img {
  height: 20px;
  width: auto;
  opacity: 0.7;
}

/* =====================================================================
   RESPONSIVE
===================================================================== */

@media (max-width: 820px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

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

  .cta-btn {
    transition: none;
  }
}
