:root {
  color-scheme: dark;
  --ink: #f1eee6;
  --muted: #a7a49c;
  --quiet: #73716c;
  --surface: #111315;
  --surface-raised: #191b1d;
  --surface-soft: #202225;
  --line: rgba(241, 238, 230, 0.16);
  --line-strong: rgba(241, 238, 230, 0.28);
  --paper: #f1eee6;
  --paper-ink: #141516;
  --red: #ff4a47;
  --red-dark: #c62f32;
  --red-soft: rgba(255, 74, 71, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: #0a0b0c;
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 74, 71, 0.12), transparent 24rem),
    linear-gradient(180deg, #0a0b0c 0%, #111315 55%, #0a0b0c 100%);
  color: var(--ink);
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #ffb0a7;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.8rem;
  left: 0.8rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: var(--paper);
  color: var(--paper-ink);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #0a0b0c;
}

.brand-mark span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(255, 74, 71, 0.12), 0 0 18px rgba(255, 74, 71, 0.85);
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
}

.brand-name,
.brand-subtitle,
.section-label,
.kicker,
.visual-caption,
.footer,
.source-state,
.optional-pill,
.required-badge,
.preview-ready {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-name {
  font-size: 0.82rem;
  font-weight: 800;
}

.brand-subtitle {
  color: var(--quiet);
  font-size: 0.57rem;
  font-weight: 700;
}

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 32px;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.privacy-chip span {
  color: #73d38c;
  font-size: 0.55rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(3rem, 9vw, 7.2rem) 0 clamp(2.5rem, 6vw, 5rem);
}

.hero-copy {
  max-width: 38rem;
}

.kicker,
.section-label {
  margin: 0 0 0.8rem;
  color: var(--red);
  font-size: 0.66rem;
  font-weight: 800;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.lamp-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 15px rgba(255, 74, 71, 0.95);
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin-top: 0;
  font-weight: 700;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 14ch;
  margin-bottom: 1.4rem;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.98;
}

h1 em {
  color: var(--red);
  font-style: normal;
}

.hero-lead {
  max-width: 35rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin-top: 1.8rem;
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-meta span::before {
  margin-right: 0.5rem;
  color: var(--red);
  content: "—";
}

.hero-visual {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background:
    linear-gradient(140deg, rgba(255, 74, 71, 0.12), transparent 48%),
    #17191b;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-visual::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  opacity: 0.92;
}

.hero-visual.is-missing img {
  display: none;
}

.visual-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 2.5rem, rgba(255, 255, 255, 0.025) 2.5rem, rgba(255, 255, 255, 0.025) 2.55rem),
    radial-gradient(circle at 50% 34%, rgba(255, 74, 71, 0.2), transparent 10rem);
}

.hero-visual:not(.is-missing) .visual-fallback {
  display: none;
}

.fallback-light {
  position: absolute;
  top: 20%;
  left: 24%;
  width: 84px;
  height: 84px;
  border: 12px solid #27292a;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 8px #0e1011, 0 0 75px 26px rgba(255, 74, 71, 0.55);
}

.fallback-panel {
  position: absolute;
  right: 17%;
  bottom: 17%;
  width: 48%;
  height: 31%;
  border: 1px solid rgba(241, 238, 230, 0.25);
  border-radius: 0.45rem;
  background: linear-gradient(145deg, #2d3032, #101112);
  box-shadow: inset 0 0 0 5px #151718, 0 1rem 3rem rgba(0, 0, 0, 0.35);
}

.fallback-line {
  position: absolute;
  right: 21%;
  bottom: 24%;
  width: 32%;
  height: 3px;
  background: linear-gradient(90deg, var(--red), transparent);
}

.visual-caption {
  position: absolute;
  right: 1rem;
  bottom: 0.9rem;
  z-index: 2;
  color: rgba(241, 238, 230, 0.72);
  font-size: 0.58rem;
  font-weight: 800;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.6fr);
  gap: 1rem;
  align-items: stretch;
}

.panel,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(25, 27, 29, 0.86);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.14);
}

.setup-panel,
.status-panel,
.preview-panel {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panel h2,
.detail-card h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2.3vw, 1.7rem);
  line-height: 1.15;
}

.required-badge,
.preview-ready {
  flex: 0 0 auto;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 74, 71, 0.35);
  border-radius: 0.35rem;
  color: #ff9c93;
  font-size: 0.58rem;
  font-weight: 800;
}

.required-badge span {
  margin-right: 0.25rem;
  font-size: 0.5rem;
}

.panel-intro {
  margin: 1.4rem 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.source-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.source-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 64px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(10, 11, 12, 0.3);
  transition: border-color 160ms ease, background 160ms ease;
}

.source-option:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
}

.source-option:has(input:checked) {
  border-color: rgba(255, 74, 71, 0.6);
  background: var(--red-soft);
}

.source-option-required {
  cursor: default;
}

.source-option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--red);
}

.source-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  color: var(--paper);
  font-size: 1rem;
}

.source-text {
  display: grid;
  min-width: 0;
}

.source-title {
  color: var(--paper);
  font-size: 0.93rem;
  font-weight: 700;
}

.source-description {
  overflow-wrap: anywhere;
  color: var(--quiet);
  font-size: 0.73rem;
}

.source-state,
.optional-pill {
  color: var(--quiet);
  font-size: 0.56rem;
  font-weight: 800;
  white-space: nowrap;
}

.source-state {
  color: #ff9c93;
}

.consent-note {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.55rem;
  background: rgba(241, 238, 230, 0.05);
  color: var(--muted);
  font-size: 0.75rem;
}

.consent-note p {
  margin: 0;
}

.note-symbol {
  display: grid;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--paper);
  font-size: 0.68rem;
  font-weight: 800;
}

.action-row,
.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.action-row {
  margin-top: 1.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.72rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:not(:disabled):hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.45;
}

.button-primary {
  background: var(--paper);
  color: var(--paper-ink);
}

.button-primary:not(:disabled):hover {
  background: #fffdf6;
}

.button-stop {
  background: var(--red);
  color: #1b0808;
}

.button-secondary,
.button-quiet {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--paper);
}

.button-secondary:hover,
.button-quiet:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.05);
}

.button-lamp,
.stop-square {
  display: inline-block;
  flex: 0 0 auto;
}

.button-lamp {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px rgba(255, 74, 71, 0.8);
}

.stop-square {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #210707;
}

.status-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background:
    linear-gradient(145deg, rgba(255, 74, 71, 0.12), transparent 45%),
    rgba(25, 27, 29, 0.86);
}

.status-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-topline .section-label {
  margin: 0;
}

.status-light {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #5d5d59;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.03);
}

.status-light.is-recording {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(255, 74, 71, 0.1), 0 0 20px rgba(255, 74, 71, 0.9);
}

.status-heading {
  margin: 2.5rem 0 0.65rem;
  color: var(--quiet);
  font-size: 0.78rem;
}

.status-message {
  max-width: 22rem;
  min-height: 5.2rem;
  margin: 0;
  color: var(--paper);
  font-size: clamp(1.05rem, 2vw, 1.38rem);
  font-weight: 700;
  line-height: 1.25;
}

.timer {
  margin: auto 0 0.5rem;
  color: var(--paper);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.06em;
}

.timer span {
  color: var(--quiet);
  font-size: 0.48em;
  letter-spacing: 0;
}

.status-rule {
  width: 100%;
  height: 1px;
  margin: 0.7rem 0;
  background: var(--line);
}

.status-footnote {
  margin: 0;
  color: var(--quiet);
  font-size: 0.72rem;
}

.message-box {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid;
  border-radius: 0.65rem;
  font-size: 0.86rem;
}

.message-box-warning {
  border-color: rgba(255, 196, 104, 0.45);
  background: rgba(255, 196, 104, 0.08);
  color: #ffd89a;
}

.message-box-error {
  border-color: rgba(255, 74, 71, 0.5);
  background: rgba(255, 74, 71, 0.1);
  color: #ffb1a9;
}

.preview-panel {
  margin-top: 1rem;
}

.preview-heading {
  align-items: center;
}

.preview-ready {
  border-color: rgba(115, 211, 140, 0.36);
  color: #91e6a5;
}

.preview-frame {
  display: grid;
  min-height: 220px;
  margin: 1.3rem 0 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #050606;
  place-items: center;
}

.preview-frame video {
  display: block;
  width: 100%;
  max-height: 70vh;
  background: #050606;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.preview-note {
  margin: 0.9rem 0 0;
  color: var(--quiet);
  font-size: 0.75rem;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
}

.detail-card {
  padding: 1.2rem;
  background: rgba(17, 19, 21, 0.62);
}

.detail-card .section-label {
  margin-bottom: 0.7rem;
  color: var(--quiet);
  font-size: 0.58rem;
}

.detail-card h2 {
  font-size: 1.08rem;
}

.detail-card p:last-child {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 2rem 0 2.5rem;
  color: var(--quiet);
  font-size: 0.58rem;
}

.footer p {
  margin: 0;
}

.footer-accent {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

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

  .hero-copy {
    max-width: 42rem;
  }

  .hero-visual {
    min-height: 220px;
  }

  .hero-visual img {
    min-height: 220px;
  }

  .studio-grid {
    grid-template-columns: 1fr;
  }

  .status-panel {
    min-height: 250px;
  }

  .status-heading {
    margin-top: 1.5rem;
  }

  .timer {
    margin-top: 1rem;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 1.1rem, 1180px);
  }

  .topbar {
    min-height: 68px;
  }

  .privacy-chip {
    padding-inline: 0.5rem;
    font-size: 0.62rem;
  }

  .privacy-chip span {
    display: none;
  }

  .hero {
    gap: 1.7rem;
    padding: 2.8rem 0 2.2rem;
  }

  h1 {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .hero-visual,
  .hero-visual img {
    min-height: 190px;
  }

  .panel-heading,
  .preview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-option {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .source-state,
  .optional-pill {
    grid-column: 3;
    grid-row: 2;
    justify-self: start;
    margin-top: -0.45rem;
  }

  .source-option input {
    grid-row: span 2;
  }

  .source-icon {
    grid-row: span 2;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .preview-actions .button-quiet {
    order: 3;
  }
}

@media (max-width: 360px) {
  .site-shell {
    width: calc(100% - 0.8rem);
  }

  .brand-subtitle {
    display: none;
  }

  .brand-name {
    font-size: 0.73rem;
  }

  .privacy-chip {
    max-width: 8.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .setup-panel,
  .status-panel,
  .preview-panel {
    padding: 1rem;
  }

  .source-option {
    gap: 0.55rem;
    padding-inline: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

