/* ============================================================
   gatinha — shared styles (Cozy Letter)
   Tokens locked in BRANDING.md. Mobile-first; default = 375px.
   ============================================================ */

:root {
  --bg:           #2A1B14;
  --bg-alt:       #3A2820;
  --honey:        #D4A574;
  --paper:        #FBF3E8;
  --terracotta:   #C68A6F;
  --paper-muted:  #BFA890;

  --font-serif:      'Fraunces', Georgia, serif;
  --font-body:       'Newsreader', Georgia, serif;
  --font-script:     'Caveat', cursive;
  --font-script-alt: 'Patrick Hand', cursive;

  --shadow-glow: 0 0 18px rgba(212, 165, 116, 0.35);
}

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

html, body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.55;
}

body {
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  background-image:
    radial-gradient(circle at 30% 20%, rgba(212,165,116,0.10) 0%, transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(198,138,111,0.08) 0%, transparent 50%);
  background-attachment: fixed;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
}

button, a, .tappable {
  touch-action: manipulation;
  font-family: inherit;
}

button {
  background: transparent;
  color: inherit;
  border: 1px solid var(--honey);
  border-radius: 999px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 15px;
  color: var(--honey);
  min-height: 44px;
  cursor: pointer;
  transition: background .2s ease;
}
button:hover { background: rgba(212,165,116,0.12); }
button:active { transform: scale(0.97); }

a { color: var(--honey); text-decoration: none; }

.wrap     { max-width: 600px;  margin: 0 auto; width: 100%; flex: 1; }
.hub-wrap { max-width: 1100px; margin: 0 auto; width: 100%; flex: 1; }

/* ============================================================
   Voice styling — selected via [data-voice="..."] on .citation
   ============================================================ */
.citation {
  padding: 16px 0;
  line-height: 1.4;
  min-height: 4rem;
}
[data-voice="arthur"] {
  font-family: var(--font-script);
  font-size: 1.75rem;
  transform: rotate(-2deg);
  color: var(--paper);
  text-align: center;
}
[data-voice="nina"] {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--paper-muted);
  text-align: center;
}
[data-voice="voce"] {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.375rem;
  text-align: center;
  color: var(--paper);
  font-style: italic;
}
[data-voice="panqueca"] {
  font-family: var(--font-script-alt);
  font-size: 1.5rem;
  transform: rotate(2deg);
  color: var(--paper);
  text-align: center;
}
[data-voice="household"] {
  font-family: var(--font-serif);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-align: center;
  color: var(--honey);
}

/* ============================================================
   Reusable animations
   ============================================================ */
@keyframes bounce-in {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.10); opacity: 1; }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}
@keyframes fade-up {
  0%   { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes fade-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-3px); }
  75%      { transform: translateX(3px); }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; transform: scale(1.02); }
}

/* ============================================================
   Trophy
   ============================================================ */
.trophy {
  margin: 16px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 160px;
  height: 160px;
}
.trophy img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 0 18px rgba(212, 165, 116, 0.35));
}
.trophy .trophy-emoji {
  font-size: 5.5rem;
  filter: drop-shadow(0 0 18px rgba(212,165,116,0.35));
}
.trophy.bounce-in {
  animation: bounce-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@media (min-width: 1024px) {
  .trophy { width: 220px; height: 220px; }
  .trophy .trophy-emoji { font-size: 7rem; }
}

/* ============================================================
   Generic show/hide animation classes
   ============================================================ */
.fade-up   { animation: fade-up 0.5s ease both; }
.fade-in   { animation: fade-in 0.6s ease both; }
.show      { animation: fade-up 0.5s ease both; }

[hidden] { display: none !important; }

/* ============================================================
   Accessibility — focus visible + reduced motion
   ============================================================ */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 3px;
  border-radius: 4px;
}
button:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 3px;
}
a:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
