/* ---------------------------------------------------------------
   Photoboothvintage.re — design tokens
   Sampled from assets/logo.png + assets/colors.png (see project docs)
   --------------------------------------------------------------- */
:root {
  /* Base */
  --bg: #fbf0df;
  --surface: #fdf6ea;
  --text: #272621;
  --muted: #6b6259;
  --border: #e5d3bc;

  /* Brand */
  --primary: #e8602f;
  --primary-hover: #cf4e20;
  --on-primary: #ffffff;
  --terracotta: #a1533e;
  --sage: #739c8f;

  /* Retro rainbow */
  --r1: #f05d49;
  --r2: #f8b938;
  --r3: #59a775;
  --r4: #2caec4;
  --r5: #209fe9;

  /* Shape */
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -24px rgba(39, 38, 33, 0.5);
  --shadow-sm: 0 8px 22px -16px rgba(39, 38, 33, 0.55);

  /* Type */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* subtle paper grain */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(232, 96, 47, 0.06), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(115, 156, 143, 0.08), transparent 46%);
  background-attachment: fixed;
}

/* Rainbow rule across the top */
.rainbow-stripe {
  height: 6px;
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--r1) 0 20%,
    var(--r2) 20% 40%,
    var(--r3) 40% 60%,
    var(--r4) 60% 80%,
    var(--r5) 80% 100%
  );
}

.page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: clamp(20px, 6vw, 40px) clamp(16px, 5vw, 24px) 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---------- Brand ---------- */
.brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.brand__logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.brand__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 6vw, 2rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.brand__tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 5vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--terracotta);
}

/* ---------- Dropzone ---------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: clamp(28px, 8vw, 44px) 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.dropzone:hover,
.dropzone:focus-within {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
}

.dropzone.is-dragover {
  border-color: var(--primary);
  background: rgba(232, 96, 47, 0.08);
  transform: scale(1.01);
}

.dropzone__icon {
  color: var(--primary);
  line-height: 0;
}

.dropzone__label {
  font-weight: 600;
  color: var(--text);
}

.dropzone__hint {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Preview ---------- */
.preview {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.preview img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

/* ---------- Buttons ---------- */
.actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.12s ease, box-shadow 0.18s ease;
}

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

.btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 10px 20px -12px rgba(232, 96, 47, 0.9);
}

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

.btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

/* ---------- Status ---------- */
.status {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.status__text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

.status.is-done .status__text {
  color: var(--r3);
  font-weight: 600;
}

.status.is-error .status__text {
  color: var(--r1);
  font-weight: 600;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--r1), var(--r2), var(--r3), var(--r4), var(--r5));
  transition: width 0.4s ease;
}

/* ---------- Footer ---------- */
.foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.foot p {
  margin: 0;
}

.foot__star {
  color: var(--primary);
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
