/* Man Decor — hotel-masculine, trades-credible. Not SaaS purple. */
:root {
  --bg: #0E0D0C;
  --bg-2: #161412;
  --bg-3: #1F1C18;
  --bg-4: #26221C;
  --line: #2E2A24;
  --line-2: #3A342C;
  --text: #EDE6D9;
  --muted: #9A9184;
  --faint: #6E675C;
  --brass: #C4A36A;
  --brass-dim: #8D7344;
  --brass-ink: #1A140C;
  --rust: #B85A42;
  --olive: #6E6B48;
  --ok: #7A8F6A;
  --font-d: "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-b: "Barlow", "Segoe UI", system-ui, sans-serif;
  --pad: 20px;
  --radius: 10px;
  --top: 52px;
  --dock: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
html { background: #070706; }
body {
  font-family: var(--font-b);
  background: #070706;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}
button, input { font-family: inherit; }
button { cursor: pointer; }
img, video, canvas { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
::selection { background: var(--brass); color: var(--brass-ink); }

#app {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px #1a1815, 0 40px 80px rgba(0,0,0,.55);
  overflow-x: hidden;
}

/* ----- top bar ----- */
.topbar {
  height: var(--top);
  padding: 0 var(--pad);
  padding-top: env(safe-area-inset-top, 0);
  display: grid;
  grid-template-columns: 40px 1fr 72px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(to bottom, #0E0D0C 70%, rgba(14,13,12,0));
}
.brand {
  font-family: var(--font-d);
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  color: var(--text);
  white-space: nowrap;
}
.brand-lockup { justify-self: center; }
.icon-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  display: grid; place-items: center;
  border-radius: 8px;
  padding: 0;
}
.icon-btn[hidden] { visibility: hidden; display: grid; }
.dots {
  display: flex; gap: 5px; justify-content: flex-end;
}
.dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--line-2);
}
.dots span.on { background: var(--brass); }
.dots span.done { background: var(--brass-dim); }

/* ----- screens ----- */
.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: calc(100dvh - var(--top));
}
.screen.active { display: flex; animation: rise .38s ease; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen.active { animation: none; }
}
.screen-body {
  flex: 1;
  padding: 8px var(--pad) 16px;
}
.screen-body h2 {
  font-family: var(--font-d);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 6px 0 10px;
  text-transform: uppercase;
}
.kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
}
.lede {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.45;
}

/* ----- hero (bedroom backdrop — home screen only) ----- */
#app.on-hero {
  background-color: var(--bg);
}
/* Topbar floats over the photo — no solid black bar */
#app.on-hero .topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(14,13,12,.22) 0%, rgba(14,13,12,.06) 60%, rgba(14,13,12,0) 100%);
}
#screen-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--bg);
  min-height: 100dvh; /* full-bleed under transparent topbar */
  padding-top: calc(var(--top) + env(safe-area-inset-top, 0px));
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 40%;
  z-index: 0;
  pointer-events: none;
}
#screen-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  /* light overlay — bedroom must stay unmistakable (~0.1 top → ~0.35 bottom) */
  background: linear-gradient(
    to bottom,
    rgba(14, 13, 12, 0.10) 0%,
    rgba(14, 13, 12, 0.18) 45%,
    rgba(14, 13, 12, 0.35) 100%
  );
}
#screen-hero > *:not(.hero-bg) {
  position: relative;
  z-index: 2;
}
.hero {
  flex: 1;
  padding: 28px var(--pad) 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-name {
  font-family: var(--font-d);
  font-size: 42px;
  font-weight: 500;
  letter-spacing: 0.12em;
  margin: 8px 0 0;
  line-height: 1;
  white-space: nowrap;
}
.hero-headline {
  font-size: 20px;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 14px;
  font-weight: 500;
  max-width: 22em;
}
.hero .kicker { font-size: 12px; }
.brass-rule {
  width: 56px;
  height: 2px;
  background: var(--brass);
  margin: 22px 0 18px;
}
.hero-sub {
  font-size: 16px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0 0 32px;
  font-weight: 400;
}
.hero-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.hero-steps span {
  color: var(--brass);
  margin-right: 8px;
  font-family: var(--font-d);
  letter-spacing: 0.06em;
}

/* ----- dock / buttons ----- */
.dock {
  padding: 8px var(--pad) calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn {
  appearance: none;
  border: 1px solid transparent;
  height: 52px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: grid;
  place-items: center;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: 0.38; cursor: not-allowed; }
.btn-primary {
  background: var(--brass);
  color: var(--brass-ink);
  border-color: var(--brass);
}
.btn-primary:not(:disabled):active { filter: brightness(0.92); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}
.btn-ghost:active { background: var(--bg-2); }
.file-btn { cursor: pointer; }
.fineprint {
  margin: 4px 0 0;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
}

/* ----- tiles ----- */
.tile-list { display: flex; flex-direction: column; gap: 10px; }
.tile {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 0;
  text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 92px;
  padding: 0;
  color: var(--text);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.tile:active { transform: scale(0.995); }
.tile.is-on {
  border-color: var(--brass);
  background: #1a1713;
  box-shadow: inset 0 0 0 1px var(--brass);
}
.tile-swatch { display: block; min-height: 100%; }
.tile-copy {
  padding: 18px 18px 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.tile-name {
  font-family: var(--font-d);
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.tile-meta {
  color: var(--muted);
  font-size: 13.5px;
  letter-spacing: 0.04em;
}
.swatch-bed { background: linear-gradient(180deg, #3a322c, #1c1814 55%, #C4A36A); }
.swatch-kit { background: linear-gradient(180deg, #2a2c2c, #111 50%, #8a8e86); }
.swatch-great { background: linear-gradient(180deg, #4a3424, #1a1410 55%, #B85A42); }
.swatch-bath { background: linear-gradient(180deg, #3a3e42, #1a1c1e 55%, #8a8e86); }
.swatch-office { background: linear-gradient(180deg, #2a322c, #141814 55%, #C4A36A); }
.swatch-garage { background: linear-gradient(180deg, #4a4e52, #1c1e20 50%, #8A6A40); }
.swatch-ind { background: linear-gradient(180deg, #6a6e72, #2a2c2e 40%, #8a4a32); }
.swatch-mid { background: linear-gradient(180deg, #6b4a28, #c4a36a 55%, #6e6b48); }
.swatch-dark { background: linear-gradient(180deg, #1a1a1a, #2a2622 50%, #C4A36A); }
.swatch-farm { background: linear-gradient(180deg, #6B4A28, #C4A882 50%, #3A3228); }
.tile-theme { min-height: 108px; }

/* ----- capture ----- */
.viewfinder {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: 46dvh;
  background: #090807;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 4px 0 12px;
}
.viewfinder video,
.viewfinder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.viewfinder-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
  background:
    linear-gradient(180deg, rgba(14,13,12,.2), rgba(14,13,12,.45)),
    repeating-linear-gradient(90deg, #141210 0 24px, #12100e 24px 48px);
}
.viewfinder-empty[hidden],
.viewfinder video:not(.live) { }
.viewfinder video { opacity: 0; }
.viewfinder video.live { opacity: 1; }
.viewfinder.has-live .viewfinder-empty,
.viewfinder.has-shot .viewfinder-empty { display: none; }
.vf-frame {
  pointer-events: none;
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(196,163,106,.28);
}
.vf-frame::before, .vf-frame::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border-color: var(--brass);
  border-style: solid;
}
.vf-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.vf-frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.cam-status {
  min-height: 1.2em;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.cam-status.bad { color: var(--rust); }
.shutter-row {
  display: flex;
  justify-content: center;
  padding: 4px 0 10px;
}
.shutter {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid var(--brass);
  background: radial-gradient(circle at 50% 50%, #f3ead8 54%, #d9c49a 55%);
  box-shadow: 0 0 0 6px #0E0D0C, 0 0 0 7px var(--line-2);
  padding: 0;
}
.shutter:active { transform: scale(0.96); }
.capture-actions { display: flex; flex-direction: column; gap: 10px; }
.capture-actions[hidden] { display: none; }
.dock:has(#capture-actions:not([hidden])) > .file-btn,
.dock:has(#capture-actions:not([hidden])) > #btn-sample { display: none; }

/* ----- results ----- */
.results-body { padding-bottom: 32px; }
.photo-stage {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 10px 0 18px;
  background: #090807;
}
.photo-stage img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.callout {
  position: absolute;
  transform: translate(-4px, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 62%;
  pointer-events: none;
}
.callout .dot {
  width: 9px; height: 9px; flex: 0 0 9px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(196,163,106,.25);
}
.callout .label {
  background: rgba(14,13,12,.82);
  border: 1px solid rgba(196,163,106,.45);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 8px;
  line-height: 1.25;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.badge {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid var(--line-2);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 2px;
}
.badge.gold { color: var(--brass); border-color: var(--brass-dim); }

.palette {
  display: flex;
  gap: 8px;
  margin: 0 0 22px;
  flex-wrap: wrap;
}
.swatch-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.swatch-chip i {
  width: 22px; height: 22px;
  border-radius: 2px;
  border: 1px solid var(--line-2);
  display: block;
  font-style: normal;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 16px 16px 18px;
  margin: 0 0 10px;
}
.card .num {
  font-family: var(--font-d);
  color: var(--brass);
  font-size: 13px;
  letter-spacing: 0.16em;
  margin: 0 0 6px;
}
.card h3 {
  font-family: var(--font-d);
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 8px;
  font-weight: 500;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}
.card.keep { border-left: 3px solid var(--ok); }
.card.kill { border-left: 3px solid var(--rust); }
.card.dont {
  border-color: #4a2a22;
  background: #1a1210;
}
.card.dont .num { color: var(--rust); }
.card.dont h3 { color: #f0d2c8; }

.section-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 700;
  margin: 26px 0 10px;
}
.buy {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.buy li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 13px 14px;
  border-top: 1px solid var(--line);
  list-style: none;
  align-items: baseline;
}
.buy { padding: 0; margin: 0 0 8px; }
.buy li:first-child { border-top: 0; }
.buy .pname { font-size: 14.5px; font-weight: 600; }
.buy .pnote { display: block; color: var(--faint); font-size: 12px; font-weight: 400; margin-top: 2px; }
.buy .price {
  font-variant-numeric: tabular-nums;
  color: var(--brass);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.example-note {
  color: var(--faint);
  font-size: 12.5px;
  margin: 0 0 22px;
  line-height: 1.4;
}

.results-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.colophon {
  margin: 28px 0 8px;
  text-align: center;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}


/* ----- preview look (mock concept) ----- */
.look-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 10px;
}
.look-pane {
  margin: 0;
  min-width: 0;
}
.look-pane figcaption {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 6px;
}
.look-pane-preview figcaption { color: var(--brass); }
.look-thumb {
  margin: 0;
}
.look-thumb img,
.look-stage img {
  aspect-ratio: 3 / 4;
}
.look-stage {
  margin: 0;
}

.look-stage.is-loading .ai-look-loading {
  display: grid;
}
.look-stage.is-loading img {
  opacity: 0.35;
  filter: grayscale(0.2);
}
.ai-look-loading {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14,13,12,0.15), rgba(14,13,12,0.55));
}
.ai-look-loading span {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brass);
  padding: 10px 14px;
  border: 1px solid var(--brass-dim);
  background: #1a1713;
  border-radius: 2px;
}
.look-stage { position: relative; }
.mock-note.is-error {
  border-left-color: var(--danger, #E07A5F);
  color: var(--cream, #E6DCC8);
}

.look-stage .callout .label {
  font-size: 9.5px;
  padding: 4px 7px;
  letter-spacing: 0.1em;
  max-width: 100%;
}
.look-stage .callout {
  max-width: 88%;
}
.mock-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--brass);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.look-chip-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.look-chip-list li {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brass);
  border: 1px solid var(--brass-dim);
  padding: 5px 9px;
  border-radius: 2px;
  background: #1a1713;
}
@media (max-width: 360px) {
  .look-compare { grid-template-columns: 1fr; }
}
/* utility */
[hidden] { display: none !important; }
.icon-btn[hidden] { display: grid !important; visibility: hidden; }

/* Organization punch-list (garage focus) */
.org-block {
  margin: 0.75rem 0 1.25rem;
  display: grid;
  gap: 0.65rem;
}
.org-item {
  border: 1px solid rgba(196, 163, 106, 0.28);
  border-left: 3px solid #C4A36A;
  background: rgba(20, 18, 16, 0.65);
  padding: 0.85rem 1rem;
}
.org-item h3 {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  color: #E6DCC8;
}
.org-item p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(230, 220, 200, 0.82);
}


/* ----- Full Plan paywall ----- */
.paywall {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: linear-gradient(165deg, #1F1C18 0%, #161412 55%, #12100E 100%);
  padding: 20px 18px 18px;
  margin: 8px 0 22px;
  box-shadow: inset 0 1px 0 rgba(196,163,106,.12);
}
.paywall-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 700;
}
.paywall-title {
  margin: 0 0 8px;
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.paywall-price {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.paywall-price span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 6px;
}
.paywall-copy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}
.paywall-unlock {
  display: flex;
  width: 100%;
  text-align: center;
  justify-content: center;
  text-decoration: none;
  margin-bottom: 10px;
}
.paywall-unlock[disabled],
.paywall-unlock:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.paywall-helper {
  margin: 0 0 12px;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.4;
}
.paywall-helper code {
  font-size: 11.5px;
  color: var(--brass-dim);
}
.unlocked-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--ok);
  color: var(--ok);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  vertical-align: middle;
}
.affiliate-note {
  margin: 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.4;
}
.affiliate-note.muted {
  opacity: 0.72;
  margin-top: 4px;
}

/* ----- Embedded Stripe checkout form ----- */
.checkout-form {
  margin: 4px 0 12px;
  min-height: 48px;
}
.paywall-helper.is-error {
  color: #E07A5F;
}


/* ----- Hero pay-first gate ----- */
#hero-dock .paywall-unlock {
  margin-bottom: 0;
}
#hero-affiliate {
  margin: 8px 0 0;
  text-align: center;
}
#hero-gate-copy {
  text-align: center;
}
