:root {
  color-scheme: light;
  --bg: #f4efe7;
  --panel: rgba(255, 252, 247, 0.92);
  --text: #1f1d1a;
  --muted: #6f685e;
  --line: rgba(67, 55, 42, 0.14);
  --primary: #1b6b5d;
  --primary-strong: #145247;
  --accent: #b55d34;
  --shadow: 0 18px 48px rgba(49, 38, 25, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.75), transparent 36%),
    linear-gradient(180deg, #ece4d8 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 90%);
}

.app-shell {
  width: min(960px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero {
  padding: 1rem 0 1.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.2rem, 7vw, 4.9rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.intro {
  max-width: 44rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.camera-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.camera-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: #171717;
}

.camera-frame video,
.camera-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame-overlay {
  position: absolute;
  inset: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.25rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

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

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

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

.button.primary:hover {
  background: var(--primary-strong);
}

.button.secondary {
  color: var(--text);
  background: rgba(24, 20, 15, 0.08);
}

.button.accent {
  color: white;
  background: var(--accent);
}

.status {
  margin: 0;
  padding-top: 1rem;
  color: var(--muted);
  min-height: 1.5rem;
}

.status[data-error="true"] {
  color: #9d2f1d;
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100vw - 1rem, 960px);
    padding-top: 1rem;
  }

  .camera-card {
    padding: 0.75rem;
    border-radius: 22px;
  }

  .frame-overlay {
    inset: 0.75rem;
  }

  .button {
    flex: 1 1 100%;
  }
}
