@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal;
}

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

:root {
  /* monday CRM palette (from client Brand Guidelines) */
  --teal:      #00D2D2;
  --blue-900:  #003EA8;
  --blue-500:  #1E88FD;
  --blue-200:  #CEE5FE;
  --blue-100:  #EFF5FD;
  --yellow:    #FFCC00;
  --orange:    #FF6B10;
  --green-500: #00BA5F;
  --ink:       #14151A;
  --gray:      #6B7280;
  --field-bg:  #F3F5F6;
  --border:   #E5E7EB;
  --white:    #FFFFFF;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

html, body {
  height: 100%;
  background: var(--white);
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

/* ── App shell — sized for iPad Air portrait (820x1180pt logical) ── */
.app {
  width: 100%;
  max-width: 820px;
  min-height: 100svh;
  min-height: -webkit-fill-available;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding: 48px;
}

/* ── Header: logo lockup + step dots ───────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--teal);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-icon::before, .logo-icon::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}
.logo-icon::before { width: 16px; height: 16px; left: 6px; top: 6px; background: #fff; }
.logo-icon::after  { width: 13px; height: 13px; left: 10px; top: 4px; background: var(--teal); }

.logo-text { font-weight: 700; font-size: 20px; }
.logo-text span { font-weight: 400; color: var(--gray); margin-left: 4px; }

.step-dots { display: flex; gap: 6px; align-items: center; }
.step-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #E0E1E8; display: block;
}
.step-dots i.on { background: var(--teal); }

/* ── Content ───────────────────────────────── */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 26px;
  align-self: flex-start;
}
.badge + .badge { margin-top: 12px; }
.badge-blue   { background: var(--blue-900); color: #fff; }
.badge-yellow { background: var(--yellow);   color: var(--ink); }

.lede {
  margin-top: 28px;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.5;
}
.lede.dim { color: var(--gray); margin-top: 16px; }

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
}
.page-title.tight { max-width: 90%; }

/* ── Hero card (welcome / result) ───────────── */
.hero-card {
  margin-top: 28px;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at 50% 20%, rgba(0,210,210,0.35), rgba(11,12,16,0) 65%), #0B0C10;
  aspect-ratio: 724 / 620;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 1;
}
.hero-card img { width: 62%; object-fit: contain; }

/* ── Form fields ────────────────────────────── */
.field {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 17px;
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  outline: none;
  margin-top: 16px;
  transition: border-color .15s;
}
.field::placeholder { color: #9CA3AF; }
.field:focus { border-color: var(--teal); }
.field:first-of-type { margin-top: 36px; }

/* ── Viewfinder (take photo) ───────────────── */
.viewfinder {
  margin-top: 40px;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  align-self: center;
  border: 2.5px dashed var(--teal);
  background: var(--blue-100);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.viewfinder img, .viewfinder video { width: 100%; height: 100%; object-fit: cover; display: none; }
.viewfinder.has-image img { display: block; }
.viewfinder svg { width: 72px; height: 72px; stroke: var(--teal); }
.viewfinder.has-image svg { display: none; }

/* ── Photo / design preview rect ───────────── */
.preview-rect {
  margin-top: 32px;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 288 / 407;
  align-self: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #F6F7F8;
  flex: 1;
}
.preview-rect img { width: 100%; height: 100%; object-fit: cover; display: none; }
.preview-rect.has-image img { display: block; }
.preview-rect svg { width: 110px; height: 110px; stroke: #9CA3AF; }
.preview-rect.has-image svg { display: none; }

/* ── Buttons ───────────────────────────────── */
.actions {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  gap: 16px;
}
.actions.center { justify-content: center; }

.btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 64px;
  border-radius: 999px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--blue-900);
  color: #fff;
  max-width: 420px;
}
.btn-secondary {
  background: #fff;
  color: var(--blue-900);
  border: 1.5px solid var(--blue-900);
  flex: 0 0 auto;
  padding: 0 28px;
}

.actions.single .btn-primary { max-width: none; width: 100%; }

/* ── Thank-you screen ───────────────────────── */
.check-circle {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--teal);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}
.check-circle svg { width: 48px; height: 48px; stroke: #fff; }

.centered {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

/* ── Spinner (generating) ──────────────────── */
.spinner-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}
.spinner {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 5px solid var(--blue-100);
  border-top-color: var(--blue-900);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#fileInput { display: none; }

.error-banner {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #FEF2F2;
  color: #B91C1C;
  font-size: 14px;
  display: none;
}
.error-banner.visible { display: block; }
