/* ═══════════════════════════════════════════════════════════════
   ÁLBUM DE MEMÓRIAS · base.css
   Design System — Romântico Minimalista
   Papel de alta gramatura · ouro champanhe · rosa antigo · sálvia
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Paleta (claro = rosa suave elegante) ───────────────── */
  --cream:        #FCF5F6;   /* branco-rosado, papel delicado */
  --cream-2:      #F8EBEE;   /* rosa bem suave p/ superfícies  */
  --rose:         #DFA3AE;   /* rosa antigo                    */
  --rose-deep:    #C4708A;   /* rosa profundo (erros/destaque) */
  --rose-soft:    #F6E3E8;
  --gold:         #D4AF37;   /* ouro champanhe                 */
  --gold-soft:    #E8D9A8;
  --sage:         #C2C5AA;   /* verde sálvia                   */
  --ink:          #33272E;   /* carvão com leve tom ameixa     */
  --ink-60:       rgba(51, 39, 46, .60);
  --ink-40:       rgba(51, 39, 46, .40);
  --ink-12:       rgba(51, 39, 46, .12);
  --white-75:     rgba(255, 255, 255, .75);

  /* ── Vidro / sombras ──────────────────────────────────── */
  --glass:        rgba(255, 255, 255, .75);
  --glass-strong: rgba(255, 255, 255, .88);
  --blur:         blur(12px);
  --shadow-soft:  0 10px 30px rgba(0, 0, 0, .03);
  --shadow-lift:  0 18px 44px rgba(0, 0, 0, .07);
  --shadow-card:  0 6px 22px rgba(44, 44, 44, .05);
  --ring-gold:    0 0 0 1px rgba(212, 175, 55, .45), 0 10px 34px rgba(212, 175, 55, .14);

  /* ── Tipografia ───────────────────────────────────────── */
  --serif:   'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --garamond:'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --ui:      'Montserrat', 'Inter', system-ui, -apple-system, sans-serif;
  --script:  'Great Vibes', 'Dancing Script', cursive;

  /* ── Geometria ────────────────────────────────────────── */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 30px;
  --topbar-h: 66px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--ui);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;                 /* as telas gerenciam o próprio scroll */
  letter-spacing: .01em;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; font-family: var(--serif); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--rose-soft); color: var(--ink); }

/* Scrollbar delicada */
* { scrollbar-width: thin; scrollbar-color: rgba(212,175,55,.35) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(212,175,55,.30); border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(212,175,55,.55); }
*::-webkit-scrollbar-track { background: transparent; }

/* ─── Telas ─────────────────────────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;          /* telas inativas nunca interceptam cliques */
  transform: scale(.995);
  transition: opacity .7s var(--ease), transform .7s var(--ease), visibility .7s;
  overflow: hidden auto;
  overscroll-behavior: contain;
}
.screen.is-active { opacity: 1; visibility: visible; transform: none; z-index: 1; pointer-events: auto; }
.screen.is-leaving { z-index: 2; pointer-events: none; }

/* ─── Vidro fosco ───────────────────────────────────────────── */
.glass {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(212, 175, 55, .30);
  box-shadow: var(--shadow-soft);
}

/* ─── Títulos ───────────────────────────────────────────────── */
.script-title {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.9rem, 8vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: .005em;
  color: var(--ink);
}
.script-title.sm { font-size: clamp(1.5rem, 4.4vw, 1.95rem); line-height: 1; }
.serif-title { font-family: var(--serif); font-size: clamp(1.35rem, 4vw, 1.85rem); letter-spacing: .01em; }
.kicker {
  font-size: .68rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--ink-40); font-weight: 400;
}

/* ─── Divisória dourada ─────────────────────────────────────── */
.gold-rule {
  display: flex; align-items: center; gap: 10px;
  margin: 18px auto; max-width: 320px;
}
.gold-rule span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(212,175,55,.65)); }
.gold-rule span:last-child { background: linear-gradient(90deg, rgba(212,175,55,.65), transparent); }
.gold-rule i {
  width: 6px; height: 6px; transform: rotate(45deg);
  background: var(--gold); opacity: .8; border-radius: 1px;
}

/* ─── Botões ────────────────────────────────────────────────── */
.btn {
  --btn-fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, .55);
  background: transparent;
  color: var(--btn-fg);
  font-size: .82rem; font-weight: 400; letter-spacing: .13em; text-transform: uppercase;
  cursor: pointer;
  transition: transform .35s var(--ease), background .35s var(--ease),
              box-shadow .35s var(--ease), border-color .35s var(--ease), color .35s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--ring-gold); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn-gold {
  background: linear-gradient(135deg, rgba(212,175,55,.16), rgba(212,175,55,.05));
  border-color: rgba(212, 175, 55, .7);
}
.btn-gold:hover { background: linear-gradient(135deg, rgba(212,175,55,.28), rgba(212,175,55,.10)); }
.btn-ghost-rose { border-color: rgba(221, 167, 165, .75); color: #8f5f5e; }
.btn-ghost-rose:hover { background: rgba(221, 167, 165, .12); box-shadow: 0 0 0 1px rgba(221,167,165,.4), 0 10px 30px rgba(221,167,165,.16); }
.btn-ghost-gold { border-color: rgba(212, 175, 55, .6); color: #8a7327; }
.btn-ghost-gold:hover { background: rgba(212, 175, 55, .10); }
.btn-sage { border-color: rgba(194, 197, 170, .85); color: #6e7358; }
.btn-sage:hover { background: rgba(194, 197, 170, .18); }
.btn-solid { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn-solid:hover { background: #1c1c1c; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.btn-mini { padding: 8px 16px; font-size: .68rem; letter-spacing: .16em; }
.btn-tiny { padding: 6px 12px; font-size: .62rem; letter-spacing: .14em; }
.btn-block { width: 100%; }

.icon-btn {
  width: 38px; height: 38px; flex: 0 0 38px;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--ink-12);
  background: var(--white-75); color: var(--ink);
  cursor: pointer; transition: .3s var(--ease);
}
.icon-btn:hover { border-color: rgba(212,175,55,.6); color: var(--gold); transform: translateY(-1px); }
.icon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.link-soft {
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  font-size: .7rem; letter-spacing: .12em; text-transform: lowercase;
  color: var(--ink-40); border-bottom: 1px solid transparent; transition: .3s;
}
.link-soft:hover { color: var(--gold); border-bottom-color: rgba(212,175,55,.5); }

/* ─── Formulários ───────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field > label {
  display: block; font-size: .64rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-40); margin-bottom: 7px;
}
.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--ink-12);
  background: rgba(255, 255, 255, .7);
  color: var(--ink);
  font-size: .86rem; font-weight: 300;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: rgba(212, 175, 55, .75);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, .12); background: #fff;
}
.textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, rgba(44,44,44,.45) 50%), linear-gradient(135deg, rgba(44,44,44,.45) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.hint { font-size: .68rem; color: var(--ink-40); line-height: 1.6; margin-top: 6px; }
.hint.warn { color: var(--rose-deep); }

/* ─── Utilitários ───────────────────────────────────────────── */
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.muted { color: var(--ink-40); }
.tiny { font-size: .7rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ─── Transição: dissolução em branco ───────────────────────── */
.flash-white {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background: #fff; opacity: 0; transition: opacity .5s var(--ease);
}
.flash-white.is-on { opacity: 1; }

/* ─── Overlay de carregamento (flor giratória) ──────────────── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 8000;
  display: grid; place-items: center;
  background: rgba(251, 251, 249, .72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .35s var(--ease);
}
/* `display: grid` acima anularia o [hidden] da UA — reafirmamos aqui */
.loading-overlay[hidden] { display: none; }
.loading-card {
  padding: 34px 46px; border-radius: var(--r-lg); text-align: center;
}
.flower-spinner svg { color: var(--rose); animation: bloom 2.6s linear infinite; transform-origin: 50% 50%; }
.flower-spinner ellipse { fill: currentColor; opacity: .8; }
.loading-text { margin-top: 14px; font-family: var(--serif); font-size: 1.02rem; letter-spacing: .02em; }
.loading-sub { margin-top: 4px; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-40); }
@keyframes bloom { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } }

/* ─── Acessibilidade: menos movimento ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ─── Mobile ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .btn { padding: 12px 20px; font-size: .74rem; letter-spacing: .1em; }
  .script-title { font-size: clamp(2.4rem, 12vw, 3.4rem); }
}
