/* =====================================================================
   Cartão NFC v2 · Grafite usina
   Grafite metálico escuro + roxo da marca (#584698) + neon (#C8FF00).
   Mobile first, pensado em 9:16 e esticando bem até 9:20.
   ===================================================================== */

:root{
  color-scheme:dark;
  --bg:#111315;
  --aco1:#3b3f44;        /* aço: luz */
  --aco2:#2c2f33;        /* aço: meio */
  --aco3:#202225;        /* aço: sombra */
  --borda:#464b51;
  --borda-forte:#5a6068;
  --ink:#eceef0;
  --muted:#a9afb6;
  --roxo:#584698;
  --roxo-claro:#7a66d4;
  --roxo-ink:#ab9bef;    /* roxo legível sobre grafite */
  --neon:#c8ff00;
  --neon-ink:#15171a;
  --cw:min(84vw,320px);
  --ch:clamp(318px,54vh,440px);
  --serif:'Cinzel',Georgia,'Times New Roman',serif;
  --sans:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --boost:0;             /* 0..1, sobe quando o carrossel gira (app.js) */
}
@supports (height:1dvh){
  :root{--ch:clamp(318px,54dvh,440px)}
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:var(--bg);-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{
  margin:0;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;
  overflow-x:hidden;color:var(--ink);font:500 14px/1.45 var(--sans);
  background:radial-gradient(120% 80% at 50% 46%,#1e2124 0%,#141618 55%,#0b0c0e 100%) fixed,var(--bg);
}
/* linhas pautadas (referência Gemini) + textura de aço escovado */
body::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;
  background:
    repeating-linear-gradient(to bottom,transparent 0 31px,rgba(255,255,255,.032) 31px 32px),
    repeating-linear-gradient(90deg,rgba(255,255,255,.012) 0 1px,transparent 1px 4px);
}
#fundo{position:fixed;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;display:block}
.sprite{position:absolute;width:0;height:0;overflow:hidden}

/* superfície de aço reaproveitada */
.btn-redondo,.pill,.emblema,.toast{
  background:linear-gradient(160deg,var(--aco1) 0%,var(--aco2) 45%,var(--aco3) 100%);
  border:1px solid var(--borda);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),inset 0 -1px 0 rgba(0,0,0,.45),0 8px 18px -8px rgba(0,0,0,.75);
}

/* ---------- topo ---------- */
.topo{
  position:relative;z-index:5;width:100%;max-width:560px;margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:calc(12px + env(safe-area-inset-top)) 16px 2px;
}
.btn-redondo{
  width:42px;height:42px;flex:none;border-radius:50%;display:grid;place-items:center;padding:0;
  color:var(--roxo-ink);cursor:pointer;transition:transform .15s,border-color .2s,color .2s;
}
.btn-redondo svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.btn-redondo:hover,.pill:hover{border-color:var(--roxo-claro)}
.btn-redondo:active,.pill:active{transform:scale(.94)}
#som .ic-off{display:none}
#som[aria-pressed="false"]{color:var(--muted)}
#som[aria-pressed="false"] .ic-on{display:none}
#som[aria-pressed="false"] .ic-off{display:block}
.pill{
  height:42px;padding:0 16px;border-radius:999px;display:inline-flex;align-items:center;gap:8px;
  color:var(--ink);text-decoration:none;font:700 12.5px var(--sans);letter-spacing:.02em;white-space:nowrap;
  transition:transform .15s,border-color .2s;
}
.pill svg{width:18px;height:18px;fill:none;stroke:var(--neon);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ---------- identidade: montanha do logo + nome ---------- */
.id{position:relative;z-index:5;display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 16px 0}
.emblema{
  flex:none;width:56px;height:56px;border-radius:16px;display:grid;place-items:center;
  border-color:var(--borda-forte);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),inset 0 -2px 8px rgba(0,0,0,.5),0 10px 20px -10px rgba(0,0,0,.85),0 0 0 3px rgba(88,70,152,.22);
}
.m-glow{
  display:block;width:44px;height:21px;
  filter:drop-shadow(0 0 3px rgba(200,255,0,.28));
  filter:drop-shadow(0 0 calc(3px + var(--boost) * 9px) rgba(200,255,0,calc(.28 + var(--boost) * .45)));
  animation:flutua 5s ease-in-out infinite;
}
.montanha{
  display:block;width:100%;height:100%;
  -webkit-mask:url(montanha.svg) center/contain no-repeat;
          mask:url(montanha.svg) center/contain no-repeat;
  background:linear-gradient(110deg,#c9ced3 0%,#f4f6f8 34%,#c8ff00 50%,#f4f6f8 66%,#9ea4aa 100%);
  background-size:260% 100%;background-position:120% 0;
  animation:brilho 6s ease-in-out infinite;
}
@keyframes flutua{0%,100%{transform:translateY(1.5px)}50%{transform:translateY(-1.5px)}}
@keyframes brilho{0%,55%{background-position:120% 0}100%{background-position:-120% 0}}
/* halo escuro: anéis e pontos do fundo passam por trás sem atrapalhar a leitura */
.id-txt,#label{text-shadow:0 0 10px #111315,0 0 4px #111315,0 0 2px #111315}
.id-txt h1{margin:0;font:800 21px/1.1 var(--serif);letter-spacing:.03em}
.id-txt p{margin:5px 0 0;font:700 10.5px/1.2 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--roxo-ink);white-space:nowrap}

/* ---------- órbita (referência Gemini) ---------- */
.orbita{
  position:relative;z-index:3;flex:1;min-height:calc(var(--ch) + 28px);
  perspective:1150px;touch-action:pan-y;cursor:grab;overflow-x:clip;
}
.orbita:active{cursor:grabbing}
.anel{position:absolute;inset:0;transform-style:preserve-3d}

/* ---------- cartão de aço (100% opaco) ---------- */
.card{
  position:absolute;left:50%;top:50%;width:var(--cw);height:var(--ch);
  margin-left:calc(var(--cw) / -2);margin-top:calc(var(--ch) / -2);
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:12px;
  padding:20px 18px 18px;border-radius:22px;overflow:hidden;text-align:center;
  color:var(--ink);text-decoration:none;will-change:transform;
  background:
    repeating-linear-gradient(90deg,rgba(255,255,255,.02) 0 1px,transparent 1px 3px),
    linear-gradient(160deg,#3a3e43 0%,#2c2f33 40%,#222528 100%);
  border:1.5px solid var(--borda);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),inset 0 -1px 0 rgba(0,0,0,.45),0 22px 44px -14px rgba(0,0,0,.8);
  transition:border-color .35s,box-shadow .35s;
}
/* profundidade sem transparência: escurece com uma camada sólida da cor do fundo */
.card::after{content:"";position:absolute;inset:0;border-radius:inherit;background:#111315;opacity:var(--dim,0);pointer-events:none}
.card.is-front{
  border-color:var(--roxo-claro);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 26px 52px -12px rgba(0,0,0,.85),0 0 0 2px rgba(88,70,152,.45),0 0 36px -6px rgba(88,70,152,.6);
}
.card:focus-visible{outline:2px solid var(--neon);outline-offset:3px}

.c-topo{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px}
.led{flex:none;width:7px;height:7px;transform:rotate(45deg);background:var(--roxo);opacity:.75;transition:background-color .3s,box-shadow .3s}
.card.is-front .led{background:var(--neon);opacity:1;box-shadow:0 0 8px rgba(200,255,0,.75)}
.badge{
  max-width:calc(100% - 40px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font:700 10px/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--roxo-ink);
  background:rgba(88,70,152,.24);border:1px solid rgba(171,155,239,.3);border-radius:999px;padding:6px 11px;
}
/* ícone + texto ficam juntos no centro; o botão vai para o pé do cartão */
.c-ico,.cta{margin-top:auto}
.c-ico{
  width:60px;height:60px;border-radius:17px;display:grid;place-items:center;color:var(--roxo-ink);
  background:linear-gradient(160deg,#1d1f22,#2a2d31);border:1px solid #3c4046;
  box-shadow:inset 0 2px 6px rgba(0,0,0,.55),0 1px 0 rgba(255,255,255,.06);
  transition:color .3s;
}
.card.is-front .c-ico{color:var(--neon)}
.c-ico svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.c-txt{display:flex;flex-direction:column;gap:6px;padding:0 2px}
.c-txt h2{margin:0;font:700 18px/1.2 var(--serif);letter-spacing:.02em}
.c-txt p{margin:0;font:500 13px/1.5 var(--sans);color:var(--muted)}
.cta{
  width:100%;height:46px;flex:none;border-radius:13px;display:flex;align-items:center;justify-content:center;gap:8px;
  background:var(--neon);color:var(--neon-ink);font:800 12px var(--sans);letter-spacing:.08em;text-transform:uppercase;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),inset 0 -2px 0 rgba(0,0,0,.18);
}
.card.is-front .cta{box-shadow:0 8px 22px -6px rgba(200,255,0,.5),inset 0 1px 0 rgba(255,255,255,.45),inset 0 -2px 0 rgba(0,0,0,.18)}
.cta svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}

/* ---------- rodapé ---------- */
.base{
  position:relative;z-index:5;width:100%;max-width:460px;margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:2px 18px calc(14px + env(safe-area-inset-bottom));
}
.base-meio{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0}
.dots{display:flex;align-items:center}
.dot{width:20px;height:22px;border:0;padding:0;background:none;display:grid;place-items:center;cursor:pointer;transition:width .3s}
.dot::before{content:"";width:8px;height:8px;border-radius:99px;background:var(--roxo);opacity:.55;transition:width .3s,background-color .3s,opacity .3s,box-shadow .3s}
.dot.on{width:32px}
.dot.on::before{width:22px;background:var(--neon);opacity:1;box-shadow:0 0 8px rgba(200,255,0,.5)}
.dot:focus-visible{outline:2px solid var(--neon);outline-offset:-2px;border-radius:8px}
.btn-redondo:focus-visible,.pill:focus-visible{outline:2px solid var(--neon);outline-offset:2px}
#label{font:600 11.5px var(--sans);letter-spacing:.04em;color:var(--muted);white-space:nowrap}

/* ---------- aviso ---------- */
.toast{
  position:fixed;left:50%;top:calc(64px + env(safe-area-inset-top));transform:translate(-50%,-6px);z-index:20;
  display:flex;align-items:center;gap:8px;padding:9px 16px;border-radius:999px;border-color:var(--roxo-claro);
  color:var(--ink);font:700 12px var(--sans);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;
}
.toast::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--neon);box-shadow:0 0 8px rgba(200,255,0,.7)}
.toast.on{opacity:1;transform:translate(-50%,0)}

/* ---------- celulares bem estreitos ---------- */
@media (max-width:359px){
  :root{--cw:min(84vw,300px)}
  .topo{padding-left:12px;padding-right:12px}
  .pill{padding:0 13px;font-size:12px}
  .emblema{width:50px;height:50px;border-radius:14px}
  .m-glow{width:40px;height:19px}
  .id-txt h1{font-size:18px}
  .id-txt p{font-size:9px;letter-spacing:.08em}
  .card{padding:18px 15px 15px}
  .c-txt h2{font-size:16.5px}
  .c-txt p{font-size:12.5px}
}

/* ---------- telas altas (9:20): o cartão cresce junto ---------- */
@media (min-height:760px){
  .emblema{width:62px;height:62px;border-radius:18px}
  .m-glow{width:48px;height:23px}
  .id-txt h1{font-size:23px}
  .c-ico{width:68px;height:68px;border-radius:19px}
  .c-ico svg{width:32px;height:32px}
  .c-txt h2{font-size:20px}
  .c-txt p{font-size:14px}
  .cta{height:50px}
}

/* ---------- telas grandes ---------- */
@media (min-width:768px){
  :root{--cw:320px}
}

@media (prefers-reduced-motion:reduce){
  .m-glow,.montanha{animation:none}
  .card,.dot,.dot::before,.toast,.btn-redondo,.pill{transition:none}
}
