/* ==========================================================
   Serrano — Design que impressiona
   Papel recortado azul-marinho + ouro polido.
   ========================================================== */

@property --l {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

:root {
  --navy: #01325a;
  --navy-deep: #011d38;
  --ink: #1b1d1a;

  /* Ouro metálico */
  --gold-1: #9c6c18;
  --gold-2: #cf9f33;
  --gold-3: #efcd74;
  --gold-4: #fff4c2;
  --gold-text: #e3c062;

  --font: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);

  color-scheme: dark;
  scrollbar-color: var(--gold-2) var(--navy-deep);
}

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

html, body { margin: 0; }

body {
  min-height: 100svh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--gold-3);
  color: #01264a;
}

/* ---------- Página e fundo ---------- */

.page {
  position: relative;
  min-height: 100svh;
  overflow: hidden;

  /* deslocamento da paralaxe, alimentado pelo script.js */
  --px: 0;
  --py: 0;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.bg--landscape { display: none; }

@media (min-aspect-ratio: 1/1) and (min-width: 700px) {
  .bg--portrait  { display: none; }
  .bg--landscape { display: block; }
}

/* Cada lâmina se move numa profundidade diferente */
.layer {
  transform: translate3d(
    calc(var(--px) * var(--d) * 1px),
    calc(var(--py) * var(--d) * 1px),
    0
  );
  transition: transform .9s var(--ease-out);
}

/* Entrada: as lâminas encaixam como papel sendo assentado */
.sheet {
  animation: sheet-in 1.4s var(--ease-expo) both;
}

.sheet--panel  { --from: translate(0, 40px);      animation-delay: 0s; }
.sheet--right  { --from: translate(90px, -30px);  animation-delay: .08s; }
.sheet--top    { --from: translate(-70px, -80px); animation-delay: .14s; }
.sheet--bottom { --from: translate(0, 110px);     animation-delay: .2s; }

/* ---------- Coluna de conteúdo ---------- */

.column {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  min-height: 100svh;
  margin-inline: auto;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 9svh 16px max(13svh, env(safe-area-inset-bottom));

  --btn-w: clamp(232px, 56cqw, 330px);
  --btn-h: clamp(48px, 9.6cqw, 58px);
}

@media (max-height: 640px) {
  .column { padding-top: 6svh; padding-bottom: 7svh; }
}

/* ---------- Marca ---------- */

.brand {
  width: clamp(220px, 58cqw, 343px);
  text-align: center;
}

.logo { margin: 0; line-height: 0; }

.logo img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 8, 20, .5));
  animation: logo-in 1.1s .45s var(--ease-expo) both;
}

.tagline {
  margin: 2.6svh 0 0;
  font-size: clamp(11px, 2.8cqw, 14px);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-right: -.22em; /* compensa o tracking do último caractere */
  color: var(--gold-text);
  animation: rise .9s .75s var(--ease-expo) backwards;
}

/* ---------- Frase do cliente ---------- */

.slogan {
  margin: 5.5svh 0 0;
  font-size: clamp(22px, 6.6cqw, 30px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-align: center;
  text-wrap: balance;
  color: #f5f2ea;
  text-shadow: 0 2px 10px rgba(0, 8, 20, .45);
  animation: rise 1s .85s var(--ease-expo) backwards;
}

.slogan span,
.slogan em { display: block; }

.slogan em {
  font-family: "Bodoni Moda", "Didot", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.3em;
  letter-spacing: -.015em;
  color: var(--gold-3);
}

/* ---------- Links ---------- */

.links {
  width: var(--btn-w);
  margin-top: 3.8svh;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8svh, 16px);
}

/* ---------- Botão de ouro ---------- */

.btn {
  --pad: calc(var(--btn-h) * .14);
  /* posição da luz especular, alimentada pelo script.js */
  --mx: 50%;
  --my: 0%;
  --l: var(--near, 0);

  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--btn-h);
  padding: 0 var(--pad);
  border-radius: 999px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  font-size: clamp(17px, 4.9cqw, 22px);
  font-weight: 400;
  letter-spacing: -.01em;

  background:
    radial-gradient(9em 6em at var(--mx) var(--my),
      rgb(255 255 255 / calc(var(--l) * .6)),
      rgb(255 250 225 / calc(var(--l) * .18)) 45%,
      transparent 70%),
    linear-gradient(100deg,
      var(--gold-1) 0%,
      var(--gold-2) 15%,
      var(--gold-3) 36%,
      var(--gold-4) 50%,
      var(--gold-3) 64%,
      var(--gold-2) 85%,
      var(--gold-1) 100%);
  background-size: 100% 100%, 190% 100%;
  background-position: 0 0, 50% 0;

  box-shadow:
    inset 0 1px 0 rgba(255, 251, 228, .9),
    inset 0 -2px 3px rgba(105, 66, 4, .5),
    0 2px 3px rgba(0, 10, 25, .35),
    0 8px 18px -4px rgba(0, 10, 25, .55);

  transition:
    transform .5s var(--ease-expo),
    box-shadow .5s var(--ease-expo),
    background-position 1.1s var(--ease-expo),
    --l .5s var(--ease-out);

  animation: rise .9s calc(1s + var(--i, 0) * .09s) var(--ease-expo) backwards;
}

/* Reflexo: passa uma vez quando o botão chega; no Atendimento, repete devagar */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg,
    transparent 40%,
    rgba(255, 255, 255, .2) 46%,
    rgba(255, 255, 255, .9) 50%,
    rgba(255, 255, 255, .2) 54%,
    transparent 60%);
  background-size: 300% 100%;
  background-position: 120% 0;
  mix-blend-mode: soft-light;
  animation: glint 1.2s calc(1.6s + var(--i, 0) * .14s) var(--ease-out) both;
  pointer-events: none;
}

.btn--primary::after {
  animation: glint-idle 7s 1.6s var(--ease-out) infinite;
}

.btn__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(var(--btn-h) * .7);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #34352f, #121310 70%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 225, 140, .16),
    0 1px 2px rgba(80, 50, 0, .45);
  transition: transform .6s var(--ease-expo);
}

.btn__icon svg {
  width: 56%;
  height: 56%;
  fill: var(--gold-text);
}

.btn__label {
  flex: 1;
  text-align: center;
  padding-right: calc(var(--pad) * .6);
  white-space: nowrap;
}

.btn__go {
  flex: none;
  width: calc(var(--btn-h) * .36);
  height: calc(var(--btn-h) * .36);
  margin-right: calc(var(--pad) * .3);
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .75;
  transition: transform .5s var(--ease-expo), opacity .3s;
}

/* Interações */
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    --l: 1;
    transform: translateY(-3px);
    background-position: 0 0, 15% 0;
    box-shadow:
      inset 0 1px 0 rgba(255, 251, 228, .95),
      inset 0 -2px 3px rgba(105, 66, 4, .5),
      0 4px 6px rgba(0, 10, 25, .3),
      0 18px 30px -8px rgba(0, 10, 25, .7);
  }

  .btn:hover .btn__icon { transform: rotate(-8deg) scale(1.06); }
  .btn:hover .btn__go   { transform: translate(2px, -2px); opacity: 1; }
}

.btn:active,
.btn.is-pressed {
  --l: 1;
  transform: translateY(0) scale(.975);
  box-shadow:
    inset 0 1px 0 rgba(255, 251, 228, .8),
    inset 0 -1px 2px rgba(105, 66, 4, .5),
    0 1px 2px rgba(0, 10, 25, .4),
    0 4px 10px -4px rgba(0, 10, 25, .5);
  transition-duration: .12s;
}

.btn:focus-visible {
  outline: 2px solid var(--gold-4);
  outline-offset: 4px;
}

/* ---------- Animações ---------- */

@keyframes sheet-in {
  from { transform: var(--from); }
  to   { transform: none; }
}

@keyframes logo-in {
  from { opacity: 0; transform: translateY(10px) scale(.97); clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}

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

@keyframes glint {
  from { background-position: 120% 0; }
  to   { background-position: -20% 0; }
}

@keyframes glint-idle {
  0%        { background-position: 120% 0; }
  16%, 100% { background-position: -20% 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}
