/* =========================================================
   DECANTARAS CAFÉ — LANDING PAGE MOBILE & TABLET
   Paleta: Café Torrado + Dourado Clássico + Creme Quente
   ========================================================= */

:root {
  --bg: #150F0B;
  --bg-elevated: #211711;
  --bg-card: #271B14;
  --border: rgba(230, 169, 70, 0.22);
  --border-soft: rgba(255, 240, 224, 0.10);
  --gold: #E6A946;
  --gold-bright: #F6C56B;
  --gold-deep: #B97B20;
  --cream: #FAF2E8;
  --muted: #CBBBA9;
  --android-a: #2E9E5B;
  --android-b: #1F7A43;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

/* =========================================================
   CONTROLE DE VISIBILIDADE: DESKTOP vs MOBILE/TABLET
   ========================================================= */

.desktop-gate {
  display: none;
}

.mobile-app {
  display: block;
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg);
}

/* Quando JS detecta Desktop (ou tela larga com mouse) */
body.is-desktop .mobile-app {
  display: none;
}

body.is-desktop .desktop-gate {
  display: flex;
}

/* =========================================================
   TELA TRAVADA PARA PC (DESKTOP)
   ========================================================= */

.desktop-gate {
  position: relative;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: hidden;
}

.desktop-gate__bg {
  position: absolute;
  inset: -24px;
  background: radial-gradient(circle at 30% 20%, #3E2718 0%, #150F0B 72%);
  z-index: 0;
}

.desktop-gate__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.35);
  opacity: 0.9;
}

.desktop-gate__bg img.is-missing {
  display: none;
}

.desktop-gate__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  text-align: center;
  background: rgba(29, 20, 15, 0.9);
  backdrop-filter: blur(16px);
  border: 1.5px solid var(--border);
  border-radius: 28px;
  padding: 40px 34px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}

.brand-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.6rem;
  margin: 14px 0 12px;
  color: var(--cream);
  letter-spacing: -0.02em;
}

.desktop-gate__lead {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--cream);
  margin: 0 0 10px;
}

.desktop-gate__sub {
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 24px;
}

.qr-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  padding: 16px 16px 12px;
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.qr-box img {
  border-radius: 8px;
}

.qr-box__url {
  color: #2A1D15;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.desktop-platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.mini-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  padding: 6px 12px;
  border-radius: 999px;
}

.mini-tag--active {
  color: #A7F3C5;
  background: rgba(46, 158, 91, 0.16);
  border-color: rgba(46, 158, 91, 0.45);
}

/* =========================================================
   COMPONENTES COMPARTILHADOS
   ========================================================= */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
}

.pill--gold {
  color: #1D130C;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

/* Placeholders elegantes para enquanto o usuário gera as imagens */
.media-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(145deg, #2C1E16 0%, #1C130E 100%);
}

.ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.js-art.is-missing {
  opacity: 0;
}

.placeholder-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  gap: 6px;
  background:
    radial-gradient(circle at 50% 30%, rgba(230, 169, 70, 0.16), transparent 65%),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 12px,
      transparent 12px,
      transparent 24px
    ),
    linear-gradient(160deg, #2D1F17 0%, #18110D 100%);
  border: 1.5px dashed rgba(230, 169, 70, 0.42);
  color: var(--cream);
  pointer-events: none;
}

.placeholder-overlay.is-visible {
  display: flex;
}

.ph-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  background: rgba(230, 169, 70, 0.14);
  border: 1px solid rgba(230, 169, 70, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
}

.placeholder-overlay strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cream);
}

.placeholder-overlay span:last-child {
  font-size: 0.78rem;
  color: var(--muted);
}

/* =========================================================
   1. HERO (MOBILE & TABLET)
   ========================================================= */

.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px 28px;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero__media .placeholder-overlay {
  justify-content: flex-start;
  padding-top: 88px;
  border: none;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(21, 15, 11, 0.25) 0%,
    rgba(21, 15, 11, 0.0) 20%,
    rgba(21, 15, 11, 0.0) 54%,
    rgba(21, 15, 11, 0.78) 74%,
    #150F0B 96%
  );
}

.hero__topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(21, 15, 11, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--cream);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3EE07F;
  box-shadow: 0 0 10px rgba(62, 224, 127, 0.8);
}

.status-sep {
  color: var(--gold);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: auto;
  padding-top: 150px;
}

.hero__eyebrow {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  line-height: 1.06;
  margin: 0 0 12px;
  color: var(--cream);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
}

.hero__tagline {
  margin: 0 auto 24px;
  max-width: 36ch;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--muted);
}

/* =========================================================
   BOTÕES DE DOWNLOAD (ANDROID ATIVO + APP STORE / WINDOWS TRAVADOS)
   ========================================================= */

.download-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.btn-store {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-store--android {
  padding: 15px 18px;
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--android-a) 0%, var(--android-b) 100%);
  border: 1.5px solid rgba(167, 243, 197, 0.45);
  box-shadow: 0 12px 30px rgba(31, 122, 67, 0.45);
}

.btn-store--android:active {
  transform: scale(0.985);
}

.btn-store__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-store__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.btn-store__kicker {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.btn-store__label {
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.25;
}

.btn-store__meta {
  font-size: 0.76rem;
  opacity: 0.88;
  margin-top: 2px;
}

.btn-store__arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}

.locked-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-store--locked {
  padding: 12px 13px;
  color: rgba(250, 242, 232, 0.55);
  background: rgba(39, 27, 20, 0.72);
  border: 1px solid var(--border-soft);
  cursor: not-allowed;
  gap: 10px;
}

.btn-store--locked .btn-store__label {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(250, 242, 232, 0.68);
}

.locked-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
  opacity: 0.85;
  margin-top: 2px;
}

.hero__note {
  margin: 14px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* =========================================================
   SEÇÕES
   ========================================================= */

.section {
  padding: 36px 20px 8px;
}

.section__head {
  margin-bottom: 18px;
}

.section__eyebrow {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.section__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  margin: 0;
  color: var(--cream);
}

.section__hint {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* =========================================================
   1.5 CÓDIGOS DE CONVITE ALPHA
   ========================================================= */

.invites-box {
  background: linear-gradient(160deg, #2A1D15 0%, #1B120D 100%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow);
}

.invites-box__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.invites-box__desc {
  margin: 0 0 14px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
}

.invites-summary {
  margin-bottom: 14px;
}

.btn-refresh {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}

.btn-refresh:active {
  transform: scale(0.96);
}

.invites-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(46, 158, 91, 0.38);
}

.invite-row--used {
  background: rgba(0, 0, 0, 0.22);
  border-color: var(--border-soft);
  opacity: 0.76;
}

.invite-row__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--cream);
}

.invite-row--used .invite-code {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 0.9rem;
}

.invite-status {
  font-size: 0.76rem;
  font-weight: 600;
  color: #7EE8A8;
}

.invite-row--used .invite-status {
  color: var(--gold);
}

.btn-copy-code {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  color: #1D130C;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}

.btn-copy-code:active {
  transform: scale(0.96);
}

.btn-copy-code.is-copied {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--android-a), var(--android-b));
}

.invite-used-pill {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  padding: 5px 10px;
  border-radius: 999px;
}

.invites-loading,
.invites-error {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--muted);
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(230, 169, 70, 0.25);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================================
   2. CARDS DE DESTAQUES
   ========================================================= */

.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .feature-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.feature-card__body {
  padding: 16px 18px 20px;
}

.feature-card__body h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--cream);
}

.feature-card__body p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

/* =========================================================
   3. GALERIA DESLIZÁVEL
   ========================================================= */

.gallery-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}

.gallery-track::-webkit-scrollbar {
  height: 5px;
}

.gallery-track::-webkit-scrollbar-thumb {
  background: rgba(230, 169, 70, 0.35);
  border-radius: 999px;
}

.gallery-item {
  flex: 0 0 82%;
  max-width: 340px;
  scroll-snap-align: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
}

/* =========================================================
   4. PASSO A PASSO DE INSTALAÇÃO
   ========================================================= */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 15px 16px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.92rem;
  color: #1D130C;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

.step-card h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 700;
}

.step-card p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.48;
  color: var(--muted);
}

/* =========================================================
   5. NOTAS DA VERSÃO & FEEDBACK
   ========================================================= */

.release-card {
  background: linear-gradient(160deg, #2A1D15 0%, #1C130E 100%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow);
}

.release-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.release-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.release-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.38rem;
  margin: 0 0 10px;
}

.release-card__body {
  margin: 0 0 20px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
  white-space: pre-line;
}

.release-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-solid,
.btn-outline {
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
}

.btn-solid {
  color: #1D130C;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

.btn-outline {
  color: var(--cream);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

/* =========================================================
   RODAPÉ
   ========================================================= */

.footer {
  text-align: center;
  padding: 36px 20px calc(env(safe-area-inset-bottom, 0px) + 34px);
  color: var(--muted);
}

.footer__brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  color: var(--cream);
  margin: 0 0 6px;
}

.footer__copy {
  margin: 3px 0;
  font-size: 0.78rem;
  opacity: 0.85;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 7, 5, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(39, 27, 20, 0.9);
  color: var(--cream);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__img {
  max-height: 78vh;
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.lightbox__caption {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}
