/* Paleta provisória — trocar quando existir identidade visual definitiva do Memb */
:root {
  --bg: #000000;
  --bg-alt: #0a0a0a;
  --ink: #f8f8f8;
  --ink-soft: rgba(248, 248, 248, 0.58);
  --accent: #f2540d;
  --accent-bright: #ff6a1f;
  --accent-soft: rgba(242, 84, 13, 0.75);
  --accent-glow: rgba(242, 84, 13, 0.28);
  --metal-border: rgba(200, 200, 205, 0.35);
  --line: rgba(248, 248, 248, 0.08);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur: 0.25s;
}

/* Fonte Geist (SIL OFL), self-hosted — evita depender de CDN externo em produção */
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist/Geist-Variable.woff2") format("woff2-variations"),
       url("/fonts/geist/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Playfair Display (SIL OFL), self-hosted, mesmo motivo do Geist acima —
   usada no masthead "MEMB MAGAZINE" (tela Magazine), reproduzindo a
   fonte da imagem de referência do usuário (mesma referência visual de
   antes do rebranding Alstok -> Memb, ver Referências/Alstok Magazine.jpeg). */
@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair-display/PlayfairDisplay-Variable.woff2") format("woff2-variations"),
       url("/fonts/playfair-display/PlayfairDisplay-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 1.2rem 6vw 0;
  pointer-events: none;
}

.site-header-inner {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.6rem;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* Logo real (2026-08-09) — mesmo arquivo/motivo de app-base.css (ver lá o
   comentário completo): a troca por texto foi engano meu (usuário pediu
   texto só na capa do Magazine, não aqui), revertido. */
.logo {
  height: 34px; /* +20% a pedido do usuário 2026-08-09 (era 28px) */
  width: auto;
  display: block;
}

.fold {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 6vw;
  overflow: hidden;
}

.fold-hero {
  background: var(--bg);
  align-items: center;
  text-align: center;
}

/* Glow ambiente em camadas — remete à "transformação" sem ser literal */
.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(75% 55% at 50% 18%, var(--accent-glow) 0%, transparent 58%),
    radial-gradient(90% 60% at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 55%),
    radial-gradient(100% 80% at 50% 100%, rgba(242, 84, 13, 0.06) 0%, transparent 50%);
}

/* Grid de pontos sutil, esmaecido nas bordas */
.hero-dot-grid {
  position: absolute;
  z-index: 0;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(880px, 92vw);
  height: min(480px, 72vh);
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.28) 0.7px, rgba(255, 255, 255, 0.06) 1px, transparent 1.3px);
  background-size: 20px 20px;
  mask-image: radial-gradient(100% 100%, #000 0%, rgba(0, 0, 0, 0.88) 22%, rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.22) 62%, rgba(0, 0, 0, 0.06) 78%, transparent 100%);
  -webkit-mask-image: radial-gradient(100% 100%, #000 0%, rgba(0, 0, 0, 0.88) 22%, rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.22) 62%, rgba(0, 0, 0, 0.06) 78%, transparent 100%);
}

.wordmark,
.fold-hero h1,
.fold-hero .subtitle,
.fold-hero .cta {
  position: relative;
  z-index: 1;
}

.wordmark {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 2rem;
  opacity: 0;
  animation: rise 0.7s ease-out 0.05s forwards;
}

h1 {
  width: 100%;
  font-size: clamp(2rem, 7.5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 1.4rem;
  opacity: 0;
  animation: rise 0.7s ease-out 0.15s forwards;
}

.hero-accent {
  display: inline-block;
  margin-top: 0.3rem;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  background: linear-gradient(105deg, #4a1a05 0%, var(--accent) 16%, #ffb385 32%, #6b2400 48%, var(--accent-bright) 64%, #ffc79e 80%, #4a1a05 100%);
  background-size: 220% 100%;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 20px var(--accent-glow));
  animation: shimmer 7s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.subtitle {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 32rem;
  margin: 0 auto 2.4rem;
  opacity: 0;
  animation: rise 0.7s ease-out 0.28s forwards;
}

.fold-how h2,
.fold-install h2 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.fold-install > p {
  color: var(--ink-soft);
  max-width: 32rem;
}

.fold-how {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  justify-content: flex-start;
  align-items: center;
  text-align: center;
}

.fold-how h2 {
  max-width: 40rem;
  margin: 0 auto 3rem;
}

.section-kicker {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 1rem;
}

.how-steps {
  position: relative;
  width: 100%;
  max-width: 42rem;
}

/* Traçado decorativo tipo circuito, alusivo ao fluxo — não é um conector preciso entre cards */
.how-steps-trace {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0.55;
  pointer-events: none;
}

.how-steps-trace path {
  fill: none;
  stroke: url(#trace-gradient);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px var(--accent-glow));
}

.how-step {
  position: relative;
  z-index: 1;
  width: min(20rem, 78%);
  margin-bottom: 2.6rem;
  text-align: left;
  background: linear-gradient(180deg, rgba(248, 248, 248, 0.06) 0%, rgba(248, 248, 248, 0.02) 100%);
  border: 1px solid rgba(242, 84, 13, 0.22);
  border-radius: 20px;
  padding: 1.8rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 1px rgba(255, 255, 255, 0.04);
}

.how-step:nth-of-type(odd) {
  margin-right: auto;
}

.how-step:nth-of-type(even) {
  margin-left: auto;
}

.how-step:nth-of-type(2) {
  margin-top: 1.6rem;
}

.how-step:nth-of-type(3) {
  margin-top: 3.2rem;
}

.how-step:nth-of-type(4) {
  margin-top: 4.8rem;
}

.how-step-badge {
  display: inline-flex;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  background: rgba(242, 84, 13, 0.1);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 1rem;
}

@media (max-width: 700px) {
  .how-steps-trace {
    display: none;
  }

  .how-step,
  .how-step:nth-of-type(odd),
  .how-step:nth-of-type(even),
  .how-step:nth-of-type(2),
  .how-step:nth-of-type(3),
  .how-step:nth-of-type(4) {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 1.4rem;
  }
}

.how-step-number {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.6rem;
  color: var(--accent-soft);
  margin-bottom: 0.8rem;
}

.how-step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.how-step p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-accent { animation: none; background-position: 50% 50%; }
  .wordmark, h1, .subtitle { animation: none; opacity: 1; }
}

.cta {
  align-self: center;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 1rem 2.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.15), 0 1px 24px rgba(0, 0, 0, 0.3);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  opacity: 0;
  animation: rise 0.7s ease-out 0.4s forwards;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.15), 0 0 32px 2px var(--accent-glow);
}

.cta:active {
  transform: translateY(0) scale(0.97);
}

/* Mockups de celular alusivos ao fluxo (foto -> gerado por IA) — sem simular tela real do app */
.hero-phones {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  margin-top: 3.6rem;
  opacity: 0;
  animation: rise 0.7s ease-out 0.5s forwards;
}

.phone-mock {
  width: 130px;
  height: 264px;
  border: 2px solid var(--metal-border);
  border-radius: 32px;
  background: linear-gradient(180deg, #111 0%, #050505 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px rgba(255, 255, 255, 0.06);
  padding: 0.5rem;
  position: relative;
}

.phone-mock--before {
  transform: rotate(-6deg);
}

.phone-mock--after {
  transform: rotate(6deg);
  border-color: rgba(242, 84, 13, 0.45);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px var(--accent-glow), inset 0 1px rgba(255, 255, 255, 0.06);
}

.phone-notch {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 6px;
  border-radius: 999px;
  background: #000;
}

.phone-screen {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  border-radius: 24px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 60%), #0a0a0a;
  color: var(--ink-soft);
}

.phone-screen svg {
  width: 34px;
  height: 34px;
}

.phone-screen--after {
  color: var(--accent-bright);
}

.phone-screen-label {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-align: center;
  padding: 0 0.6rem;
}

.phone-screen-label--after {
  color: var(--accent-soft);
}

.phone-arrow {
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.phone-arrow svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 560px) {
  .hero-phones {
    gap: 0.8rem;
  }
  .phone-mock {
    width: 100px;
    height: 204px;
  }
  .phone-arrow svg {
    width: 20px;
    height: 20px;
  }
}

.fold-install {
  background: var(--bg);
  border-top: 1px solid var(--line);
  justify-content: flex-start;
  text-align: left;
}

.instructions {
  counter-reset: step;
  background: linear-gradient(180deg, rgba(248, 248, 248, 0.05) 0%, rgba(248, 248, 248, 0.02) 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem 1.6rem 1.6rem 1.8rem;
  margin-top: 1.2rem;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.instructions h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.instructions p {
  color: var(--ink-soft);
  margin: 0;
}

.instructions ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.instructions li {
  counter-increment: step;
  position: relative;
  padding-left: 2.2rem;
  color: var(--ink-soft);
}

.instructions li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(242, 84, 13, 0.16);
  border: 1px solid var(--metal-border);
  color: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instructions li + li {
  margin-top: 0.9rem;
}

.instructions strong {
  color: var(--ink);
}

.fold-cta {
  min-height: auto;
  background: var(--bg);
  border-top: 1px solid var(--line);
  align-items: center;
  text-align: center;
  padding: 9vh 6vw;
}

.cta-band-wordmark {
  display: block;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1rem;
}

.fold-cta .subtitle {
  margin: 0 auto;
  animation: none;
  opacity: 1;
}

/* ==========================================================================
   Intro animado do app -- "take de abertura" (pedido do usuário
   2026-08-05), mostrado só quando isStandalone (app instalado, ver
   pwa.js) cobre a home institucional acima antes do redirect pro
   login/timeline. Reaproveita o MESMO gesto de virar página do Magazine
   (flip-magazine.js/magazine.css: dobradiça na borda esquerda, rotateY
   3D) como uma capa de revista se abrindo -- linguagem visual
   consistente com o resto do app, não um efeito solto. Paleta igual à
   do app real (app-base.css: --app-bg/--app-gold/--app-cream), não a
   desta página institucional (preta/laranja) -- este overlay cobre a
   home antes do usuário perceber ela, então usa a paleta de quem o
   usuário está de fato prestes a ver.
   ========================================================================== */
.app-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0e0c0a;
  opacity: 1;
  transition: opacity 0.32s ease;
}

.app-intro.app-intro--saindo {
  opacity: 0;
}

.app-intro-perspective {
  position: relative;
  width: 220px;
  height: 300px;
  perspective: 1400px;
  animation: app-intro-entrada 0.4s var(--ease) both;
}

@keyframes app-intro-entrada {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.app-intro-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.app-intro-marca {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 44px;
  font-weight: 320;
  letter-spacing: 0.06em;
  color: #f3ecdf;
}

.app-intro-linha {
  width: 64px;
  height: 2px;
  margin: 14px 0;
  border: none;
  background: rgba(243, 236, 223, 0.55);
}

.app-intro-tag {
  font-family: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #c9a266;
}

/* A "capa" cobre o miolo (.app-intro-reveal) por cima até o flip
   começar -- por isso vive DEPOIS dele no DOM (empilha acima por
   ordem, sem precisar de z-index próprio). transform-origin na borda
   esquerda + rotateY é o mesmíssimo cálculo de flip-magazine.js, só
   que fixo via CSS (sem gesto de arrasto -- aqui é decorativo, não
   interativo). */
.app-intro-cover {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  background: linear-gradient(155deg, #18140f, #0e0c0a 70%);
  border: 1px solid rgba(201, 162, 102, 0.55);
  border-radius: 10px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: app-intro-abrir 0.7s 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.app-intro-cover-icone {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  animation: app-intro-icone-sumir 0.35s 0.3s ease both;
}

@keyframes app-intro-abrir {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(-110deg); }
}

/* Some antes do meio da virada (90deg) -- passado isso, sem
   backface-visibility:hidden, o ícone apareceria espelhado por um
   instante. Mais simples sumir cedo do que lidar com a imagem
   espelhada. */
@keyframes app-intro-icone-sumir {
  to { opacity: 0; }
}
