/* ==========================================================================
   Recado do Noel · base
   Conceito: o escritório do Papai Noel à noite. Fundo verde-noite com luz de
   lareira; tudo o que é do cliente aparece como papel e tinta dourada.
   ========================================================================== */

:root {
  /* cor */
  --noite: #05130e;
  --pinho-900: #0a2118;
  --pinho-800: #0f3024;
  --pinho-700: #17463a;
  --pinho-500: #2f7059;
  --ouro-100: #fff4d2;
  --ouro-300: #f7dc8c;
  --ouro-500: #e8b84a;
  --ouro-700: #a8741f;
  --vermelho-400: #e5484a;
  --vermelho-500: #cf2a2f;
  --vermelho-600: #b01f25;
  --vermelho-800: #6f0f15;
  --brasa: #ff9a3d;
  --papel: #f8efd9;
  --papel-2: #efe1bf;
  --tinta: #2b1b12;
  --tinta-suave: #6a5445;
  --neve: #fdfbf5;
  --texto: #eef3ee;
  --texto-suave: #b9c9bf;
  --linha: rgba(247, 220, 140, 0.22);

  /* tipo */
  --f-titulo: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-corpo: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-letra: "Great Vibes", "Snell Roundhand", "Apple Chancery", cursive;
  --f-carta: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;

  /* medidas */
  --margem: max(20px, env(safe-area-inset-left, 0px));
  --largura: 1120px;
  --raio: 22px;
  --ouro-folha: linear-gradient(100deg, #b98a2c 0%, #f7dc8c 22%, #fffbe8 38%, #e8b84a 52%, #b98a2c 68%, #f7dc8c 86%, #b98a2c 100%);
  --ouro-tinta: linear-gradient(100deg, #7a4f10 0%, #b98428 40%, #dcae4e 52%, #a8741f 64%, #7a4f10 100%);
  --sombra-papel: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 4px 10px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--noite);
  color: var(--texto);
  font-family: var(--f-corpo);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--ouro-300);
  outline-offset: 3px;
  border-radius: 8px;
}

.so-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--largura) + 2 * var(--margem));
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* tipografia ------------------------------------------------------------- */

.titulo {
  font-family: var(--f-titulo);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.titulo--2 { font-size: clamp(1.85rem, 5.4vw, 3rem); }

.titulo em {
  font-style: italic;
  font-weight: 600;
  background: var(--ouro-folha);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: folha 9s linear infinite;
  padding-right: 0.08em;
}

.sobre {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ouro-300);
}
.sobre::before {
  content: "";
  width: 22px;
  height: 1px;
  flex: none;
  background: linear-gradient(90deg, transparent, var(--ouro-300));
}

.lead { color: var(--texto-suave); font-size: 1.1rem; max-width: 54ch; text-wrap: pretty; }

@keyframes folha { to { background-position: -220% 0; } }

/* botões ----------------------------------------------------------------- */

.btn {
  --btn-sombra: var(--vermelho-800);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 58px;
  padding: 0 1.7em;
  border: 0;
  border-radius: 999px;
  font-family: var(--f-corpo);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(180deg, var(--vermelho-400) 0%, var(--vermelho-500) 45%, var(--vermelho-600) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 -2px 0 rgba(0, 0, 0, 0.18) inset,
    0 5px 0 var(--btn-sombra),
    0 16px 30px -8px rgba(207, 42, 47, 0.6);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.5) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: brilho-btn 4.2s ease-in-out infinite;
}
.btn:hover { transform: translateY(-2px); filter: saturate(1.1) brightness(1.05); }
.btn:active {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 1px 0 var(--btn-sombra),
    0 8px 16px -8px rgba(207, 42, 47, 0.6);
}
.btn .ico { transition: transform 0.2s ease; }
.btn:hover .ico { transform: translateX(4px); }
.btn[disabled] { filter: grayscale(0.6) brightness(0.75); cursor: not-allowed; }
.btn[disabled]::after { animation: none; }

.btn--largo { width: 100%; }
.btn--grande { min-height: 66px; font-size: 1.18rem; }

.btn--ouro {
  --btn-sombra: #6b4a12;
  color: #2b1b06;
  background: linear-gradient(180deg, #fff0b8 0%, var(--ouro-300) 40%, var(--ouro-500) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 5px 0 var(--btn-sombra),
    0 16px 30px -10px rgba(232, 184, 74, 0.55);
}

.btn--fantasma {
  min-height: 48px;
  padding: 0 1.2em;
  font-size: 0.95rem;
  color: var(--ouro-100);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 1px var(--linha) inset;
}
.btn--fantasma::after { display: none; }
.btn--fantasma:hover { background: rgba(247, 220, 140, 0.1); }
.btn--fantasma:active { transform: translateY(1px); box-shadow: 0 0 0 1px var(--linha) inset; }

@keyframes brilho-btn {
  0%, 62% { transform: translateX(-120%); }
  82%, 100% { transform: translateX(120%); }
}

/* suporte pelo WhatsApp e avisos rápidos --------------------------------- */

.zap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  color: #05301c;
  background: linear-gradient(180deg, #6fe69b 0%, #2cc873 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 4px 0 #128a48, 0 14px 26px -10px rgba(44, 200, 115, 0.6);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}
.zap .ico { width: 1.35em; height: 1.35em; stroke-width: 2; }
.zap:hover { transform: translateY(-2px); }
.zap:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 1px 0 #128a48; }

.aviso {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  color: var(--tinta);
  background: linear-gradient(175deg, #fdf6e3, #f0e0b9);
  box-shadow: 0 0 0 1px #d6b25c, 0 20px 40px -12px rgba(0, 0, 0, 0.8);
  transform: translateX(-50%);
  animation: aviso 3.6s ease both;
}
@keyframes aviso {
  0% { opacity: 0; transform: translate(-50%, 14px); }
  8%, 88% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 8px); }
}

/* efeitos de fundo -------------------------------------------------------- */

.fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 40;
  pointer-events: none;
}

.grao::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' 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 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* guirlanda de luzes */
.guirlanda {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  pointer-events: none;
  z-index: 2;
  background: repeat-x 0 0 / 160px 48px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='48' viewBox='0 0 160 48'%3E%3Cpath d='M0 2 Q80 46 160 2' fill='none' stroke='%231d3b2e' stroke-width='2'/%3E%3C/svg%3E");
}
.lampada {
  --cor: var(--ouro-300);
  position: absolute;
  width: 9px;
  height: 13px;
  margin-left: -4.5px;
  border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
  background: radial-gradient(circle at 40% 35%, #fff 0 12%, var(--cor) 45%);
  box-shadow: 0 0 10px 2px var(--cor), 0 0 26px 6px color-mix(in srgb, var(--cor) 55%, transparent);
  animation: pisca 2.6s ease-in-out infinite alternate;
}
.lampada::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 1.5px;
  background: #1d3b2e;
}
.lampada:nth-child(4n + 1) { --cor: #ff6b5e; }
.lampada:nth-child(4n + 2) { --cor: var(--ouro-300); }
.lampada:nth-child(4n + 3) { --cor: #7ee0a4; }
.lampada:nth-child(4n + 4) { --cor: #9fd3ff; }

@keyframes pisca {
  0%, 30% { opacity: 0.38; filter: saturate(0.7); }
  100% { opacity: 1; filter: saturate(1.15); }
}

/* nome escrito em ouro ----------------------------------------------------- */

.ouro {
  position: relative;
  display: inline-block;
  font-family: var(--f-letra);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
}
.ouro__txt {
  display: inline-block;
  padding: 0.12em 0.3em 0.2em;
  margin: -0.12em -0.3em -0.2em;
  background: var(--ouro-folha);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0.03em 0 rgba(60, 35, 0, 0.55)) drop-shadow(0 0 0.35em rgba(232, 184, 74, 0.35));
  animation: folha 7s linear infinite;
  -webkit-mask: linear-gradient(90deg, #000 0 44%, transparent 56% 100%) 0 0 / 240% 100% no-repeat;
  mask: linear-gradient(90deg, #000 0 44%, transparent 56% 100%) 0 0 / 240% 100% no-repeat;
}
.ouro--tinta .ouro__txt {
  background-image: var(--ouro-tinta);
  filter: none;
  animation-duration: 11s;
}
.ouro__pena {
  position: absolute;
  top: 50%;
  left: -20%;
  width: 0.5em;
  height: 0.5em;
  margin: -0.25em 0 0 -0.25em;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, rgba(255, 236, 170, 0.9) 30%, rgba(232, 184, 74, 0) 70%);
  opacity: 0;
  pointer-events: none;
}
.ouro.escrevendo .ouro__txt {
  animation: folha 7s linear infinite, escrever var(--dur, 1.5s) cubic-bezier(0.45, 0.05, 0.35, 1) both;
}
.ouro.escrevendo .ouro__pena {
  animation: pena var(--dur, 1.5s) cubic-bezier(0.45, 0.05, 0.35, 1) both;
}

@keyframes escrever {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to { -webkit-mask-position: 0% 0; mask-position: 0% 0; }
}
@keyframes pena {
  0% { left: -20%; opacity: 0; transform: scale(0.6); }
  16% { opacity: 1; transform: scale(1.5); }
  50% { transform: scale(1.1) translateY(-12%); }
  84% { opacity: 1; transform: scale(1.5) translateY(8%); }
  100% { left: 120%; opacity: 0; transform: scale(0.6); }
}

/* cenas do vídeo ----------------------------------------------------------- */

.cena {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: var(--raio);
  overflow: hidden;
  container-type: inline-size;
  background: #2a1a10;
  isolation: isolate;
}
.cena__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cena::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
}
.cena__txt {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #2e1a0c;
  font-family: var(--f-carta);
  font-style: italic;
  font-weight: 600;
  line-height: 1.15;
}
.cena__txt > * { mix-blend-mode: multiply; }
.cena .ouro { mix-blend-mode: normal; }
.cena .letra { font-family: var(--f-letra); font-style: normal; font-weight: 400; }

/* livro dourado */
.cena--livro .cena__txt {
  left: 65.5%;
  top: 52%;
  width: 37cqw;
  transform: translate(-50%, -50%) matrix(0.94, 0.33, -0.56, 0.83, 0, 0);
  gap: 0.6cqw;
}
.livro__rot { font-size: 3.1cqw; color: #6e4c20; letter-spacing: 0.02em; }
.cena--livro .ouro { font-size: min(11.5cqw, calc(86cqw / var(--len, 6))); margin-block: 0.4cqw; }
.livro__idade { font-size: 4.3cqw; color: #4a2c10; }
.livro__ano { font-size: 2.9cqw; color: #6e4c20; }

/* carta */
.cena--carta .cena__txt {
  left: 20%;
  right: 20%;
  top: 14%;
  height: 59%;
}
.carta__ola { align-self: flex-start; font-size: 5.3cqw; color: #4a2c10; }
.carta__corpo {
  margin-top: 5cqw;
  font-size: 8.1cqw;
  line-height: 1.22;
  text-wrap: balance;
}
.carta__corpo.longo { font-size: 6.9cqw; }
.carta__fim { align-self: flex-end; margin-top: auto; font-size: 4.9cqw; color: #4a2c10; padding-right: 2cqw; }
.carta__quem { align-self: flex-end; font-size: 7cqw; color: #8b1a1a; line-height: 1.1; }

/* lista de presentes */
.cena--lista .cena__txt {
  left: 28.5%;
  right: 23%;
  top: 10.5%;
  height: 73%;
}
.lista__rot { font-size: 4.9cqw; color: #8b1a1a; }
.cena--lista .ouro { font-size: min(10.5cqw, calc(104cqw / var(--len, 6))); margin-top: 2.5cqw; }
.lista__pedido {
  margin-top: 6.5cqw;
  font-size: 6.2cqw;
  line-height: 1.18;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.lista__pedido.longo { font-size: 5.2cqw; }
.lista__ok {
  margin-top: auto;
  font-size: 10cqw;
  color: #b01e1e;
  transform: rotate(-5deg);
}
.lista__nota { margin-top: 3cqw; font-size: 3.7cqw; color: #4a2c10; }

/* cartão do combinado */
.cena--cartao .cena__txt {
  left: 26%;
  right: 25%;
  top: 22.5%;
  height: 55%;
}
.cartao__rot { font-size: 10.6cqw; color: #9e1b1b; line-height: 1; }
.cartao__txt {
  margin-top: 5.5cqw;
  font-size: 5.7cqw;
  line-height: 1.22;
  text-wrap: balance;
}
.cartao__txt.longo { font-size: 5cqw; }
.cartao__dia { font-size: 5.7cqw; }
.cartao__noel { margin-top: auto; font-size: 7.6cqw; }
.cartao__noel .ouro__txt { -webkit-mask: none; mask: none; }

/* tinta aparecendo */
.tinta { animation: tinta 0.7s ease both; animation-delay: var(--atraso, 0s); }
@keyframes tinta {
  from { opacity: 0; filter: blur(3px); }
  to { opacity: 1; filter: blur(0); }
}
.carimbo { animation: carimbo 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; animation-delay: var(--atraso, 0s); }
@keyframes carimbo {
  from { opacity: 0; transform: rotate(-5deg) scale(1.9); }
  to { opacity: 1; transform: rotate(-5deg) scale(1); }
}

/* marca ---------------------------------------------------------------------- */

.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  text-decoration: none;
  font-family: var(--f-titulo);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--ouro-100);
}
.marca svg { width: 32px; height: 32px; flex: none; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)); }
.marca span span { color: var(--ouro-300); font-style: italic; }

/* página de erro (404) ----------------------------------------------------- */

.erro {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 40px max(20px, env(safe-area-inset-left, 0px));
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(247, 220, 140, 0.14), transparent 70%),
    linear-gradient(180deg, #061711 0%, #0c2a1f 100%);
}
.erro__dentro { position: relative; z-index: 1; display: grid; gap: 22px; justify-items: center; text-align: center; max-width: 520px; }
.erro .lead { max-width: 40ch; }

/* movimento reduzido ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .lampada { opacity: 0.9; }
}
