:root {
  --orange: #e87722;
  --orange-deep: #c45c10;
  --orange-soft: #ffc48a;
  --ink: #2a2724;
  --cream: #fff6ee;
  --paper: #fffdfb;
  --night: #14110f;
  --muted: #6f675f;
  --line: rgba(42, 39, 36, 0.12);
  --shadow: 0 24px 60px rgba(90, 42, 8, 0.16);
  --font: "Outfit", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(232, 119, 34, 0.28), transparent 60%),
    var(--cream);
}

img { max-width: 100%; display: block; }

button, a { font-family: inherit; }

.page-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-home,
.page-show {
  height: 100dvh;
  overflow: hidden;
}

.site-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem clamp(0.75rem, 3vw, 1.6rem);
  background: rgba(255, 246, 238, 0.96);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  flex: none;
}

.brand img {
  width: clamp(68px, 16vw, 92px);
  height: auto;
  mix-blend-mode: multiply;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  min-width: 0;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.8rem, 2.4vw, 0.98rem);
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  white-space: nowrap;
}

.site-nav a[aria-current="page"] {
  background: var(--orange);
  color: white;
}

.site-nav a:hover:not([aria-current="page"]) {
  background: rgba(232, 119, 34, 0.14);
}

.hero {
  flex: 1;
  min-height: 0;
  width: min(1080px, calc(100% - 1.5rem));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.6rem, 2vh, 1.4rem);
  padding: clamp(0.4rem, 1.5vh, 1rem) 0 clamp(0.6rem, 2vh, 1.2rem);
}

.kicker {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--orange-deep);
}

h1 {
  margin: 0.15rem 0 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(2.4rem, 7vh, 5.4rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

h1 em {
  font-style: italic;
  color: var(--orange);
}

.lede {
  margin: 0.55rem 0 0;
  max-width: 34rem;
  font-size: clamp(0.95rem, 2.2vh, 1.12rem);
  line-height: 1.4;
  color: var(--muted);
}

.actions-home {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: clamp(0.7rem, 2vh, 1.3rem);
}

.hero-copy { flex: none; }

.hero-visual {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
}

.glasses {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

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

.btn:focus-visible {
  outline: 3px solid rgba(232, 119, 34, 0.45);
  outline-offset: 3px;
}

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

.btn-primary:hover { background: var(--orange-deep); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(42, 39, 36, 0.2);
}

.btn-danger { color: #8d3a28; }

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.booth {
  width: min(640px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 0.4rem 0 2.5rem;
}

.booth h1 {
  font-size: clamp(2.4rem, 9vw, 3.6rem);
}

.capture {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(52dvh, 460px);
  margin-top: 1.2rem;
  padding: 1.5rem;
  border: 2px dashed rgba(232, 119, 34, 0.7);
  border-radius: 28px;
  background: rgba(255, 253, 251, 0.72);
  text-align: center;
  cursor: pointer;
}

.capture.hot {
  background: rgba(232, 119, 34, 0.12);
  border-color: var(--orange);
}

.capture input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.capture strong {
  display: block;
  margin-top: 0.8rem;
  font-size: 1.25rem;
}

.capture span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
}

.camera {
  width: 54px;
  height: 54px;
  color: var(--orange);
}

.glasses-deco {
  width: min(100%, 280px);
  margin: 1.4rem auto 0;
  border-radius: 20px;
  opacity: 0.95;
}

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

.preview-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: white;
}

.choice {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.status {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  text-align: center;
  color: var(--orange-deep);
  font-weight: 600;
}

.saved-note {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 1.15rem;
}

.page-show {
  color: #f6efe8;
  background:
    radial-gradient(50vw 40vh at 50% 42%, rgba(232, 119, 34, 0.22), transparent 70%),
    var(--night);
}

.page-show .site-header {
  background: var(--cream);
  isolation: isolate;
}

html:fullscreen .site-header,
.page-show.is-fullscreen .site-header {
  display: none;
}

.show-controls {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 0.35rem 1rem 0.75rem;
}

.show-controls[hidden],
.progress[hidden],
section[hidden] {
  display: none;
}

.stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  padding: 0.7rem clamp(0.85rem, 4vw, 3rem);
}

.slide {
  grid-area: 1 / 1;
  justify-self: center;
  align-self: center;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transition: opacity 0.8s ease;
}

.slide.visible { opacity: 1; }

.empty {
  grid-area: 1 / 1;
  justify-self: center;
  align-self: center;
  text-align: center;
  max-width: min(28rem, 100%);
  padding: 1rem;
}

.empty img {
  width: 150px;
  margin: 0 auto 1rem;
  background: white;
  border-radius: 16px;
}

.empty p {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-family: var(--display);
  line-height: 1.25;
}

.icon-btn {
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
}

.icon-btn:hover { background: rgba(232, 119, 34, 0.85); }

.icon-btn svg { width: 1.3rem; height: 1.3rem; }

.count {
  min-width: 4.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: rgba(246, 239, 232, 0.8);
}

.progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--orange);
}

.progress span.run {
  animation: grow 6s linear;
}

@keyframes grow {
  from { width: 0; }
  to { width: 100%; }
}

@media (min-width: 860px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
    justify-content: center;
  }

  .hero-visual {
    height: 100%;
  }

  .actions-home { flex-direction: row; }

  .actions-home .btn { min-width: 12rem; }
}
