/* ═══════════════════════════════════════════════════
   Fotobuckets — Design Tokens
   Tema claro em :root · tema escuro em [data-theme="dark"]
   ═══════════════════════════════════════════════════ */

:root {
  /* ── Superfície / tinta ───────────────────────── */
  --cream:      #faf7f2;
  --cream-2:    #f3ede3;
  --cream-3:    #e8ddc8;
  --ink:        #16140f;
  --ink-2:      #2a2620;
  --ink-soft:   #4a443a;

  /* ── Acento dourado ───────────────────────────── */
  --gold:       #c9a66b;
  --gold-deep:  #a6864c;

  /* ── Linhas (sempre semi-transparentes) ──────── */
  --line:       rgba(22, 20, 15, 0.12);
  --line-soft:  rgba(22, 20, 15, 0.06);

  /* ── Famílias tipográficas ────────────────────── */
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --mono:  ui-monospace, 'SFMono-Regular', 'Courier New', monospace;

  /* ── Escala de texto ──────────────────────────── */
  --t-display: clamp(48px, 7vw, 80px);
  --t-h1: clamp(36px, 5vw, 56px);
  --t-h2: clamp(28px, 4vw, 40px);
  --t-h3: clamp(20px, 3vw, 28px);
  --t-h4: 20px;
  --t-body: 16px;
  --t-small: 14px;
  --t-caption: 13px;
  --t-eyebrow: 11px;

  /* ── Espaçamento (grid 8px) ───────────────────── */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 56px;
  --s-9: 64px;  --s-10: 96px;

  /* ── Raios ────────────────────────────────────── */
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   14px;
  --r-xl:   18px;
  --r-2xl:  22px;
  --r-pill: 999px;

  /* ── Sombras (usadas com parcimônia) ─────────── */
  --sh-button: 0 12px 28px -16px rgba(22, 20, 15, 0.4);
  --sh-card:   0 4px 24px -8px rgba(22, 20, 15, 0.08);
  --sh-paper:  0 30px 50px -30px rgba(0, 0, 0, 0.35);

  /* ── Transição base ───────────────────────────── */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --tr:   background 0.25s ease, color 0.2s ease,
          border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── Tema escuro ──────────────────────────────────── */
[data-theme="dark"] {
  --cream:      #0c1424;
  --cream-2:    #131e34;
  --cream-3:    #1c2944;
  --ink:        #f1ead4;
  --ink-2:      #e6dcb8;
  --ink-soft:   #9fb0c8;
  --gold:       #d4af6a;
  --gold-deep:  #e6c285;
  --line:       rgba(241, 234, 212, 0.14);
  --line-soft:  rgba(241, 234, 212, 0.07);
  --sh-button:  0 12px 28px -16px rgba(0, 0, 0, 0.6);
  --sh-card:    0 4px 24px -8px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════════════════
   Reset e Base
   ═══════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.2s ease;
}

/* ═══════════════════════════════════════════════════
   Tipografia
   ═══════════════════════════════════════════════════ */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
h1 { font-size: var(--t-h1); letter-spacing: -0.025em; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); }

/* Palavra em itálico dourado dentro de headings */
h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}

p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: var(--t-body);
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

/* ═══════════════════════════════════════════════════
   Eyebrow (label monospace acima dos títulos)
   ═══════════════════════════════════════════════════ */
.eyebrow {
  font-family: var(--mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   Botões
   ═══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.2s ease,
              box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  letter-spacing: 0.01em;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--ink-2);
  box-shadow: var(--sh-button);
  color: var(--cream);
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}
.btn-gold:hover {
  background: var(--gold-deep);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  background: var(--cream-2);
  border-color: var(--gold);
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ═══════════════════════════════════════════════════
   Cards e Painéis
   ═══════════════════════════════════════════════════ */
.card {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: var(--s-6);
  transition: var(--tr);
}

.card-surface {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-5);
}

/* ═══════════════════════════════════════════════════
   Formulários
   ═══════════════════════════════════════════════════ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--s-4);
}

.field label {
  font-family: var(--mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea,
.coupon-row input {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: var(--t-small);
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color 0.2s ease, background 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a443a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

[data-theme="dark"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239fb0c8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.coupon-row input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--gold) 15%, transparent);
}

.field input::placeholder,
.coupon-row input::placeholder { color: var(--ink-soft); opacity: 0.5; }

/* Checkbox customizado */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkmark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  position: relative;
  margin-top: 2px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.checkbox-row input:checked ~ .checkmark {
  background: var(--gold);
  border-color: var(--gold);
}
.checkmark::after {
  content: '';
  position: absolute;
  display: none;
  width: 5px;
  height: 10px;
  border: 2px solid var(--cream);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  top: 2px;
  left: 6px;
}
.checkbox-row input:checked ~ .checkmark::after { display: block; }
.checkbox-label {
  font-size: var(--t-caption);
  color: var(--ink-soft);
  line-height: 1.5;
}
.checkbox-label a {
  color: var(--gold);
  border-bottom: 1px solid color-mix(in oklab, var(--gold) 40%, transparent);
  transition: border-color 0.2s;
}
.checkbox-label a:hover { border-color: var(--gold); }

/* ═══════════════════════════════════════════════════
   Badges / Pills
   ═══════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in oklab, var(--gold) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--gold) 35%, transparent);
  color: var(--gold);
  font-family: var(--mono);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--r-pill);
}

.badge-live {
  background: color-mix(in oklab, #4ade80 12%, transparent);
  border-color: color-mix(in oklab, #4ade80 30%, transparent);
  color: #16a34a;
}
[data-theme="dark"] .badge-live { color: #4ade80; }

.badge-warn {
  background: color-mix(in oklab, #fb923c 12%, transparent);
  border-color: color-mix(in oklab, #fb923c 30%, transparent);
  color: #c2410c;
}
[data-theme="dark"] .badge-warn { color: #fb923c; }

/* ═══════════════════════════════════════════════════
   Divisor
   ═══════════════════════════════════════════════════ */
.divider {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-4) 0;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.divider span {
  font-family: var(--mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════
   Barra de progresso
   ═══════════════════════════════════════════════════ */
.progress-wrap { margin-top: var(--s-4); }
.progress-track {
  height: 5px;
  background: var(--cream-3);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-bottom: var(--s-2);
}
.progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: var(--r-pill);
  width: 0%;
  transition: width 0.3s ease;
}
.progress-label {
  font-family: var(--mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-align: center;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════
   Toggle de Tema
   ═══════════════════════════════════════════════════ */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--cream-2);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background 0.25s ease, border-color 0.2s ease, transform 0.15s ease;
  box-shadow: var(--sh-card);
}
.theme-toggle:hover {
  transform: scale(1.05);
  border-color: var(--gold);
}

/* ═══════════════════════════════════════════════════
   Animações
   ═══════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--gold) 45%, transparent); }
  60%       { box-shadow: 0 0 0 14px transparent; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════
   Utilitários
   ═══════════════════════════════════════════════════ */
.anim-fade-up  { animation: fadeUp  0.7s var(--ease) both; }
.anim-fade-in  { animation: fadeIn  0.5s ease both; }
.anim-delay-1  { animation-delay: 0.1s; }
.anim-delay-2  { animation-delay: 0.2s; }
.anim-delay-3  { animation-delay: 0.3s; }
.anim-delay-4  { animation-delay: 0.4s; }
.anim-delay-5  { animation-delay: 0.5s; }

.text-gold     { color: var(--gold); }
.text-soft     { color: var(--ink-soft); }
.text-center   { text-align: center; }
.text-italic   { font-style: italic; }

.wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Micro-responsivo compartilhado */
@media (max-width: 480px) {
  .card { padding: var(--s-5); }
  h1 { font-size: clamp(28px, 9vw, 40px); }
}
