/*
 * Tokens, reset e atmosfera.
 * Paleta do scrapbook: azul-marinho, amarelo, azul-petróleo, kraft e creme.
 */

:root {
  --navy-1000: #07111a;
  --navy-950: #0b1822;
  --navy-900: #0f2030;
  --navy-850: #132839;
  --navy-800: #183249;
  --navy-700: #234563;
  --navy-600: #31597e;

  --teal-300: #7fd3e6;
  --teal-400: #38b9d6;
  --teal-500: #22a2c1;
  --teal-700: #176c80;

  --gold-300: #f8cf7a;
  --gold-400: #f2b84b;
  --gold-500: #e5a02f;
  --gold-600: #c47f17;
  --gold-700: #8f5a0c;

  --kraft-300: #e3c08b;
  --kraft-400: #d3a76b;
  --kraft-500: #b88a52;

  --paper-50: #fffaf0;
  --paper-100: #fbf0db;
  --paper-200: #f2e2c2;
  --paper-300: #e6d1a8;

  --ink-900: #0f1c27;
  --ink-700: #2a3a48;
  --ink-500: #55646f;

  --coral-300: #f09a82;
  --coral-500: #e2674a;
  --cream: #fbf4e6;

  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --shadow-lift: 0 18px 34px rgba(0, 0, 0, 0.38);
  --gutter: clamp(16px, 3vw, 40px);

  /* granulado de papel (escuro) e de poeira de luz (claro) */
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font: 500 18px/1.45 var(--font-body);
  color: var(--cream);
  background: radial-gradient(120% 80% at 50% -10%, var(--navy-800) 0%, var(--navy-950) 55%, var(--navy-1000) 100%);
  background-color: var(--navy-950);
  overflow-x: hidden;
  touch-action: manipulation; /* sem zoom por duplo toque nos botões grandes */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* grade de pontos de planta baixa, some para baixo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(rgba(251, 244, 230, 0.09) 1.3px, transparent 1.7px) 0 0 / 30px 30px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
}

/* bokeh quente das luzinhas da festa */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.backdrop::before {
  content: '';
  position: absolute;
  inset: -6%;
  background:
    radial-gradient(circle at 7% 22%, rgba(255, 200, 110, 0.26), transparent 5.5vmax),
    radial-gradient(circle at 14% 66%, rgba(255, 200, 110, 0.15), transparent 7vmax),
    radial-gradient(circle at 31% 14%, rgba(255, 200, 110, 0.13), transparent 4.5vmax),
    radial-gradient(circle at 46% 90%, rgba(255, 200, 110, 0.17), transparent 6vmax),
    radial-gradient(circle at 63% 30%, rgba(56, 185, 214, 0.13), transparent 7.5vmax),
    radial-gradient(circle at 78% 74%, rgba(255, 200, 110, 0.2), transparent 6.5vmax),
    radial-gradient(circle at 91% 18%, rgba(255, 200, 110, 0.2), transparent 5vmax),
    radial-gradient(circle at 96% 58%, rgba(56, 185, 214, 0.11), transparent 8vmax);
  animation: drift 42s ease-in-out infinite alternate;
}

.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grain-light);
  opacity: 0.035;
}

@keyframes drift {
  to {
    transform: translate3d(-1.6%, 1.8%, 0) scale(1.05);
  }
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 4px solid var(--teal-400);
  outline-offset: 3px;
}

/* em superfícies claras (papel, bilhete kraft) o anel azul some: usa o tom de tinta */
.card :focus-visible,
.modal :focus-visible {
  outline-color: var(--ink-900);
}

::selection {
  background: var(--gold-400);
  color: var(--ink-900);
}

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

.eyebrow {
  font: 600 13px/1.2 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* entrada escalonada ao carregar */
.rise {
  animation: rise 0.7s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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