/* Miner Lands - site de divulgacao (demo) */
@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/Silkscreen-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/Silkscreen-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0b0912;
  --bg-2: #13101f;
  --panel: #1a1629;
  --line: #4a4266;
  --text: #f2eee8;
  --muted: #a69fbd;
  --gold: #ffce40;
  --gold-dark: #7a3e0c;
  --gem: #3ee08c;
  --red: #ff5a3c;
  --radius: 14px;
  --px: "Silkscreen", ui-monospace, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); }
a:hover { color: #ffe28a; }
.pixel { image-rendering: pixelated; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------------------------------------------------------------- topo */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 9, 18, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(74, 66, 102, 0.5);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span { font-family: var(--px); font-weight: 700; font-size: 18px; color: var(--gold); letter-spacing: 1px; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 15px;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.06); }
@media (max-width: 640px) {
  .nav .hide-sm { display: none; }
  .brand span { font-size: 15px; }
}

/* ---------------------------------------------------------------- selos e botoes */
.demo-badge {
  display: inline-block;
  font-family: var(--px); font-weight: 700; letter-spacing: 3px;
  background: var(--red); color: #1a0604;
  border: 3px solid #ffd2c4; border-radius: 6px;
  padding: 4px 12px; font-size: 16px;
  box-shadow: 3px 3px 0 #6a1408, 0 0 22px rgba(255, 90, 60, 0.45);
  transform: rotate(8deg);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px;
  font-family: var(--px); font-weight: 700; font-size: 15px; letter-spacing: 1px;
  text-decoration: none; cursor: pointer;
  border-radius: 10px; border: 3px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(2px); }
.btn-gold { background: var(--gold); color: #2a1604; box-shadow: 0 4px 0 var(--gold-dark); }
.btn-gold:hover { color: #2a1604; box-shadow: 0 4px 0 var(--gold-dark), 0 0 28px rgba(255, 206, 64, 0.45); }
.btn-dark { background: var(--panel); color: var(--text); border-color: var(--line); box-shadow: 0 4px 0 #0a0812; }
.btn-dark:hover { color: var(--text); border-color: var(--gold); }
.btn svg { width: 22px; height: 22px; flex: none; }
.store-btn { flex-direction: column; gap: 0; align-items: flex-start; min-width: 190px; text-align: left; }
.store-btn small { font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: 0; opacity: 0.75; }
.store-row { display: flex; flex-wrap: wrap; gap: 14px; }
.store-btn .row { display: flex; align-items: center; gap: 10px; }

/* ---------------------------------------------------------------- hero com a lanterna */
.hero {
  position: relative; overflow: hidden;
  min-height: min(92vh, 860px);
  display: grid; align-items: end;
  background: #050409;
  cursor: none;
  touch-action: pan-y;
}
.hero-art, .hero-dark {
  position: absolute; inset: 0;
  background-image: url("../img/hero.jpg");
  background-size: cover; background-position: center;
  image-rendering: pixelated;
}
@media (max-aspect-ratio: 1/1) {
  .hero-art, .hero-dark { background-image: url("../img/splash.png"); background-position: center 38%; }
}
.hero-dark { filter: brightness(0.16) saturate(0.6); }
.hero-art {
  --x: 50%; --y: 45%; --r: 230px;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0 45%, rgba(0,0,0,.55) 62%, transparent 100%);
  mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0 45%, rgba(0,0,0,.55) 62%, transparent 100%);
  transition: -webkit-mask-size 0.2s;
}
.hero-glow {
  position: absolute; left: var(--x, 50%); top: var(--y, 45%);
  width: 460px; height: 460px; margin: -230px 0 0 -230px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 200, 110, 0.22), transparent 65%);
  mix-blend-mode: screen;
}
.hero-cursor {
  position: absolute; left: var(--x, 50%); top: var(--y, 45%);
  width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none;
  background: url("../img/s_lampiao.png") 0 0 / 400% 100%;
  image-rendering: pixelated;
  animation: sprite4 0.8s steps(4) infinite;
  filter: drop-shadow(0 0 12px rgba(255, 200, 110, 0.8));
}
@media (hover: none) { .hero-cursor { display: none; } .hero { cursor: auto; } }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 4, 9, 0.2) 0%, transparent 35%, rgba(5, 4, 9, 0.6) 70%, var(--bg) 100%);
}
.hero-content { position: relative; padding: 0 0 56px; pointer-events: none; }
.hero-content .wrap > * { pointer-events: auto; }
.hero h1 {
  margin: 0;
  font-family: var(--px); font-weight: 700;
  font-size: clamp(54px, 11vw, 132px); line-height: 0.92;
  color: var(--gold); letter-spacing: 2px;
  text-shadow: 6px 6px 0 var(--gold-dark), 0 0 44px rgba(255, 190, 70, 0.45);
}
.hero h1 button {
  all: unset; cursor: pointer; display: inline-block;
}
.hero h1 button:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; }
.title-row { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.title-row .demo-badge { margin-top: 10px; }
.hero .lede { max-width: 560px; font-size: clamp(17px, 2.2vw, 20px); color: #e6e0f2; margin: 18px 0 8px; }
.hero .avail { font-family: var(--px); font-size: 14px; letter-spacing: 1px; color: var(--gem); margin: 0 0 22px; }
.hint {
  font-size: 13px; color: var(--muted); margin-top: 16px;
  display: flex; align-items: center; gap: 8px;
}
.hint::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: pulse 1.6s infinite; }

/* ---------------------------------------------------------------- secoes */
section { padding: 88px 0; }
.section-head { margin-bottom: 34px; }
.eyebrow { font-family: var(--px); font-size: 13px; letter-spacing: 3px; color: var(--gem); text-transform: uppercase; }
h2 {
  font-family: var(--px); font-weight: 700; color: var(--gold);
  font-size: clamp(30px, 5vw, 46px); line-height: 1.05; margin: 8px 0 12px;
  text-shadow: 4px 4px 0 var(--gold-dark);
}
.section-head p { color: var(--muted); max-width: 640px; margin: 0; }
.alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 18%, var(--bg-2) 82%, var(--bg) 100%); }

/* demo */
.demo-strip {
  margin-top: -20px;
  border: 2px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(255, 90, 60, 0.12), rgba(255, 206, 64, 0.06));
  padding: 18px 22px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.demo-strip p { margin: 0; flex: 1 1 320px; }
.demo-strip strong { color: var(--gold); }

/* video que troca de formato */
.video-frame {
  position: relative; margin-inline: auto;
  border-radius: 18px; overflow: hidden;
  border: 3px solid var(--line);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 8px rgba(255, 206, 64, 0.05);
}
.video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-frame .v-portrait { display: none; }
.video-frame { aspect-ratio: 16 / 9; width: 100%; }
@media (max-aspect-ratio: 4/5), (max-width: 640px) {
  .video-frame { aspect-ratio: 9 / 16; width: min(100%, 420px); }
  .video-frame .v-landscape { display: none; }
  .video-frame .v-portrait { display: block; }
}
.video-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(5, 4, 9, 0.35); border: 0; cursor: pointer; color: var(--text);
  transition: opacity 0.25s;
}
.video-play span {
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); box-shadow: 0 6px 0 var(--gold-dark), 0 0 40px rgba(255, 206, 64, 0.5);
}
.video-play svg { width: 38px; height: 38px; margin-left: 6px; fill: #2a1604; }
.video-frame.playing .video-play { opacity: 0; pointer-events: none; }

/* mecanicas: cartoes com sprite animado */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); }
.card h3 { font-family: var(--px); font-size: 17px; margin: 14px 0 6px; color: var(--text); letter-spacing: 1px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.sprite {
  width: 64px; height: 64px;
  background-size: 400% 100%; background-repeat: no-repeat;
  image-rendering: pixelated;
  animation: sprite4 0.9s steps(4) infinite;
}
.sprite.big { width: 96px; height: 96px; }
.sprite.still { animation: none; background-size: 100% 100%; }
.card:hover .sprite { animation-duration: 0.45s; }
@keyframes sprite4 { from { background-position: 0 0; } to { background-position: 133.333% 0; } }
@keyframes pulse { 50% { opacity: 0.35; } }

/* lanterna: slider interativo */
.lantern {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center;
}
@media (max-width: 820px) { .lantern { grid-template-columns: 1fr; } }
.lantern-view {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 3px solid var(--line);
  aspect-ratio: 896 / 640; background: #000;
}
.lantern-view img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated; opacity: 0; transition: opacity 0.35s ease;
}
.lantern-view img.on { opacity: 1; }
.tiers { display: flex; gap: 10px; margin: 18px 0; }
.tier {
  flex: 1; display: grid; place-items: center; gap: 4px;
  padding: 12px 6px; border-radius: 12px; cursor: pointer;
  background: var(--panel); border: 2px solid var(--line); color: var(--muted);
  font-family: var(--px); font-size: 12px;
}
.tier[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 24px rgba(255, 206, 64, 0.25); }
.tier .sprite { width: 48px; height: 48px; }
input[type="range"].lamp {
  width: 100%; accent-color: var(--gold);
}

/* canario interativo */
.canary-box {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px;
  margin-top: 26px;
}
.canary-box .sprite { width: 112px; height: 112px; }
.canary-box p { margin: 0 0 12px; color: var(--muted); }
.canary-box .state { font-family: var(--px); color: var(--gem); font-size: 14px; letter-spacing: 1px; }
.canary-box.alert .state { color: var(--red); }

/* modos (abas) */
.tabs { display: inline-flex; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 26px; }
.tab {
  font-family: var(--px); font-size: 14px; letter-spacing: 1px; cursor: pointer;
  border: 0; border-radius: 8px; padding: 10px 16px; background: transparent; color: var(--muted);
}
.tab[aria-selected="true"] { background: var(--gold); color: #2a1604; }
.mode { display: none; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.mode.on { display: grid; }
@media (max-width: 820px) { .mode.on { grid-template-columns: 1fr; } }
.mode img { border-radius: var(--radius); border: 3px solid var(--line); width: 100%; }
.mode ul { padding-left: 20px; color: var(--muted); }
.mode li { margin: 6px 0; }
.mode h3 { font-family: var(--px); color: var(--text); font-size: 22px; margin: 0 0 10px; }

/* galeria arrastavel */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(260px, 70%);
  gap: 16px; overflow-x: auto; padding: 6px 4px 22px;
  scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  cursor: grab;
}
.gallery.dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img {
  width: 100%; border-radius: 16px; border: 3px solid var(--line);
  aspect-ratio: 3 / 4; object-fit: cover; object-position: center top;   /* todas no formato da menor (iPad); a imagem inteira aparece ao ampliar */
  transition: transform 0.2s ease, border-color 0.2s;
  user-select: none; -webkit-user-drag: none;
}
.gallery figure:hover img { transform: translateY(-4px); border-color: var(--gold); }
.gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.gallery-nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: -8px; }
.gallery-nav button {
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  background: var(--panel); border: 2px solid var(--line); color: var(--text); font-size: 20px;
}
.gallery-nav button:hover { border-color: var(--gold); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  background: rgba(5, 4, 9, 0.92); padding: 24px;
}
.lightbox.on { display: grid; }
.lightbox img { max-height: 90vh; width: auto; border-radius: 16px; border: 3px solid var(--line); }
.lightbox button {
  position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--panel); color: var(--text); border: 2px solid var(--line); font-size: 22px; cursor: pointer;
}

/* aviso "em breve" das lojas */
.soon {
  border: 3px solid var(--gold); border-radius: 18px; background: var(--panel); color: var(--text);
  padding: 28px 24px 24px; width: min(360px, calc(100vw - 32px)); text-align: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}
.soon::backdrop { background: rgba(5, 4, 9, 0.85); }
.soon[open] { animation: soon-in 0.18s ease-out; }
@keyframes soon-in { from { transform: scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
.soon .sprite { width: 64px; height: 64px; margin: 0 auto 10px; background-size: cover; image-rendering: pixelated; }
.soon-eyebrow { margin: 0; font-family: var(--px); font-size: 12px; color: var(--gem); letter-spacing: 1px; text-transform: uppercase; }
.soon h2 { margin: 6px 0 10px; font-family: var(--px); font-size: 30px; color: var(--gold); }
.soon p#soon-text { margin: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.soon .btn { width: 100%; justify-content: center; }

/* chamada final */
.cta {
  text-align: center; position: relative; overflow: hidden;
  border: 2px solid var(--line); border-radius: 24px; padding: 56px 22px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 206, 64, 0.16), transparent 60%), var(--panel);
}
.cta .store-row { justify-content: center; margin-top: 24px; }
.cta img.icon { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); }
.cta p { color: var(--muted); max-width: 560px; margin: 0 auto; }

/* ---------------------------------------------------------------- paginas de texto (termos, suporte) */
.page-head { padding: 64px 0 24px; }
.page-head h1 {
  font-family: var(--px); color: var(--gold); margin: 6px 0 8px;
  font-size: clamp(32px, 6vw, 52px); line-height: 1.05; text-shadow: 4px 4px 0 var(--gold-dark);
}
.page-head p { color: var(--muted); margin: 0; }
.doc { max-width: 760px; padding-bottom: 80px; }
.doc h2 { font-size: 22px; text-shadow: 3px 3px 0 var(--gold-dark); margin-top: 40px; }
.doc p, .doc li { color: #ddd7e8; }
.doc .note {
  border-left: 4px solid var(--gold); background: var(--panel); padding: 14px 18px; border-radius: 0 10px 10px 0;
}
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 10px; }
.toc a { font-size: 14px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--text); border-color: var(--gold); }

/* formulario de suporte */
.support { display: grid; grid-template-columns: 1.35fr 1fr; gap: 32px; padding-bottom: 90px; align-items: start; }
@media (max-width: 860px) { .support { grid-template-columns: 1fr; } }
.form-card { background: var(--panel); border: 2px solid var(--line); border-radius: 18px; padding: clamp(20px, 4vw, 34px); }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-family: var(--px); font-size: 14px; letter-spacing: 1px; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--text);
  background: #0f0c18; border: 2px solid var(--line); border-radius: 10px;
  padding: 14px 14px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 180px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 206, 64, 0.15); }
.field .err { color: var(--red); font-size: 14px; min-height: 0; display: none; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--red); }
.field.invalid .err { display: block; }
.count { font-size: 13px; color: var(--muted); text-align: right; margin-top: -4px; }
.form-msg { margin-top: 16px; padding: 14px 16px; border-radius: 10px; display: none; }
.form-msg.ok { display: block; background: rgba(62, 224, 140, 0.12); border: 2px solid var(--gem); }
.form-msg.fail { display: block; background: rgba(255, 90, 60, 0.12); border: 2px solid var(--red); }
.side-card { background: var(--panel); border: 2px solid var(--line); border-radius: 18px; padding: 24px; }
.side-card h2 { font-size: 20px; margin-top: 0; text-shadow: 3px 3px 0 var(--gold-dark); }
details { border-top: 1px solid var(--line); padding: 12px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 8px 0 0; }

/* ---------------------------------------------------------------- rodape */
footer { border-top: 1px solid rgba(74, 66, 102, 0.6); padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--gold); }

/* aparecer ao rolar */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
