/* Home seleção de serviço — desktop (min-width via <link media>) */
:root {
  --home-bg: #0a0b0e;
  --home-surface: #14161b;
  --home-surface-2: #1c1f26;
  --home-border: #2a2e38;
  --home-fg: #f5f5f7;
  --home-muted: #a3a7b3;
  --home-gold: #d4a73c;
  --home-gold-soft: #f0cf72;
  --home-violet: #8b5cf6;
}

/* Atmosfera global desktop — vídeo + overlay (home e fluxo) */
body.orc-atmosfera {
  background: var(--home-bg);
  color: var(--home-fg);
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

.orc-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.orc-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1.5px) saturate(1.08);
  transform: scale(1.04);
}

.orc-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(8, 9, 12, calc(var(--orc-veu, 0.48) * 0.458)) 0%, rgba(8, 9, 12, calc(var(--orc-veu, 0.48) * 1.083)) 100%),
    radial-gradient(60% 50% at 80% 0%, rgba(139, 92, 246, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(8, 9, 12, calc(var(--orc-veu, 0.48) * 0.792)) 0%, rgba(8, 9, 12, var(--orc-veu, 0.48)) 40%, rgba(8, 9, 12, calc(var(--orc-veu, 0.48) * 1.333)) 100%);
}

body.orc-bg-modo-imagem .orc-bg-video {
  display: none;
}

body.orc-bg-modo-imagem .orc-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(2px) saturate(1.1);
}

@media (prefers-reduced-motion: reduce) {
  .orc-bg-video {
    display: none;
  }
  .orc-bg {
    background: url("/orcamentoV2/images/home-bg.png") center / cover no-repeat;
    filter: blur(2px) saturate(1.1);
  }
}

body.home-selecao-ativa #app-top-logo,
body.home-selecao-ativa #container-botoes-principais,
body.home-selecao-ativa #conteudo-dinamico,
body.home-selecao-ativa #informacoes-evento {
  display: none !important;
}

#home-selecao {
  display: none;
}

body.home-selecao-ativa #home-selecao {
  display: flex;
}

.home-wrap {
  max-width: min(1840px, 96vw);
  width: 100%;
  margin: 0 auto;
  padding: 24px clamp(20px, 2.5vw, 40px) 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  color: var(--home-fg);
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.home-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: 13px;
  color: var(--home-fg);
  text-decoration: none;
}

.home-logo-img {
  height: 60px;
  width: auto;
  display: block;
}

.home-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--home-gold);
  color: var(--home-gold);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0;
  background: rgba(0, 0, 0, 0.3);
}

.home-main {
  display: grid;
  grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
  gap: clamp(20px, 2.8vw, 48px);
  align-items: start;
  flex: 0 1 auto;
  width: 100%;
  min-height: 0;
  margin-top: auto;
  margin-bottom: auto;
}

/* Poucos cards → intro mais larga; muitos → pick cresce */
.home-main[data-cols="1"],
.home-main[data-cols="2"] {
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 0.58fr);
}

.home-main[data-cols="3"] {
  grid-template-columns: minmax(200px, 0.3fr) minmax(0, 0.7fr);
}

.home-main[data-cols="4"],
.home-main[data-cols="5"] {
  grid-template-columns: minmax(160px, 0.22fr) minmax(0, 0.78fr);
}

.home-intro {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  /* Alinha o hello com o topo dos cards (abaixo do título da coluna pick) */
  padding-top: calc(clamp(28px, 2.8vw, 42px) * 1.05 + 24px);
}

.home-intro .home-side {
  margin-top: clamp(36px, 4.5vh, 64px);
}

.home-pick {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.home-intro .home-hello {
  font-size: 20px;
  color: var(--home-muted);
  margin: 0;
}

.home-intro .home-hello strong {
  color: var(--home-fg);
}

#home-titulo {
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.05;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--home-fg);
}

#home-titulo span {
  color: var(--home-gold);
}

.home-intro p.home-lead {
  color: var(--home-muted);
  line-height: 1.6;
  font-size: 15px;
  max-width: 34ch;
  margin: 0;
}

.home-divider {
  height: 1px;
  margin: 28px 0;
  background: linear-gradient(90deg, var(--home-violet), rgba(139, 92, 246, 0));
}

.home-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  color: #d0d3db;
  margin: 0;
  padding: 0;
}

.home-perks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.home-perks svg {
  flex: none;
  color: var(--home-gold);
  margin-top: 2px;
}

.home-options,
.home-footer-wrap,
#home-titulo {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  box-sizing: border-box;
}

.home-options {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: clamp(12px, 1.2vw, 20px);
  min-width: 0;
}

.home-main[data-cols="4"] .home-card,
.home-main[data-cols="5"] .home-card {
  max-height: min(54vh, 480px);
}

.home-card {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: min(62vh, 560px);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--home-border);
  background: var(--home-surface);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  padding: 0;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 20px 50px -25px rgba(0, 0, 0, 0.9);
}

.home-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
  filter: saturate(0.9) brightness(0.85);
}

.home-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.85) 72%, #000 100%);
}

.home-card:hover,
.home-card:focus-visible {
  transform: translateY(-6px);
  border-color: #4a4f5c;
  outline: none;
}

.home-card:focus-visible {
  box-shadow: 0 0 0 2px var(--home-bg), 0 0 0 4px var(--home-gold);
}

.home-card:hover img {
  transform: scale(1.05);
  filter: saturate(1.05) brightness(1);
}

.home-card[aria-pressed="true"] {
  border-color: var(--home-gold);
  box-shadow: 0 0 0 1px var(--home-gold), 0 20px 60px -20px rgba(212, 167, 60, 0.45);
}

.home-card[aria-pressed="true"] img {
  filter: saturate(1.1) brightness(1);
}

.home-check {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.home-check svg {
  opacity: 0;
  transition: opacity 0.2s;
}

.home-card[aria-pressed="true"] .home-check {
  background: var(--home-gold);
  border-color: var(--home-gold);
}

.home-card[aria-pressed="true"] .home-check svg {
  opacity: 1;
}

.home-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 22px;
}

.home-card-body h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
  color: var(--home-fg);
}

.home-card-body p {
  font-size: 14px;
  color: #c4c7cf;
  margin-top: 6px;
  margin-bottom: 0;
}

/* wide legado: mantém lado a lado (nunca empilha no desktop) */
.home-main[data-layout="wide"] {
  grid-template-columns: minmax(160px, 0.22fr) minmax(0, 0.78fr);
  gap: clamp(20px, 2.8vw, 48px);
  align-items: start;
}

.home-footer-wrap {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.home-footer-wrap .home-footer,
.home-footer-wrap .home-hint {
  width: 50%;
  max-width: 50%;
  box-sizing: border-box;
}

.home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 18px;
  border: 1px solid var(--home-border);
  border-radius: 14px;
  background: rgba(20, 22, 27, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.home-status {
  font-size: 16px;
  color: var(--home-muted);
  margin: 0;
}

.home-status strong {
  color: var(--home-fg);
  font-size: 1.05em;
}

.home-actions {
  display: flex;
  gap: 10px;
}

.home-btn {
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  border-radius: 10px;
  padding: 12px 22px;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid var(--home-border);
  background: var(--home-surface-2);
  color: var(--home-fg);
  transition: all 0.2s;
}

.home-btn:hover {
  border-color: #4a4f5c;
}

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

.home-btn-primary {
  position: relative;
  border-radius: 999px;
  color: #221600;
  background:
    linear-gradient(
      145deg,
      rgba(247, 212, 126, 0.95) 0%,
      rgba(233, 180, 76, 0.92) 48%,
      rgba(154, 111, 30, 0.88) 100%
    );
  border-color: rgba(247, 212, 126, 0.55);
  box-shadow:
    0 8px 28px rgba(233, 180, 76, 0.32),
    0 0 0 1px rgba(233, 180, 76, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  gap: 8px;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.home-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 12px 32px rgba(233, 180, 76, 0.4),
    0 0 0 1px rgba(247, 212, 126, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.home-btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.home-btn-primary:disabled {
  transform: none;
  filter: none;
  background: var(--home-surface-2);
  border-color: var(--home-border);
  color: #5c606b;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  cursor: not-allowed;
}

.home-btn-primary.is-home-attention {
  z-index: 2;
  animation: home-btn-pulse 1.8s ease-in-out infinite;
}

.home-btn-primary.is-home-attention::before,
.home-btn-primary.is-home-attention::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(212, 167, 60, 0.28);
}

.home-btn-primary.is-home-attention::before {
  animation: home-btn-radar 1.8s ease-out infinite;
}

.home-btn-primary.is-home-attention::after {
  animation: home-btn-radar 1.8s ease-out 0.5s infinite;
}

@keyframes home-btn-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

@keyframes home-btn-radar {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 167, 60, 0.32);
    opacity: 1;
  }
  100% {
    box-shadow: 0 0 0 12px rgba(212, 167, 60, 0);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-btn-primary.is-home-attention,
  .home-btn-primary.is-home-attention::before,
  .home-btn-primary.is-home-attention::after {
    animation: none;
  }
  .home-btn-primary:hover,
  .home-btn-primary:active {
    transform: none;
  }
}

.home-hint {
  font-size: 11px;
  color: #7a7e89;
  text-align: center;
  margin-top: 6px;
  margin-bottom: 0;
}

.home-hint kbd {
  font-family: inherit;
  font-size: 11px;
  border: 1px solid var(--home-border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--home-muted);
}

/* Modal: painel central (não imita página full-bleed) */
#modal-selecao-servico.home-modal-overlay {
  background: rgba(0, 0, 0, 0.88) !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}

#modal-selecao-servico .home-modal-shell {
  max-width: 520px;
  width: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 22px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #16181f;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  max-height: min(92vh, 900px);
  overflow: auto;
  box-sizing: border-box;
}

#modal-selecao-servico .home-modal-intro {
  text-align: center;
}

#modal-selecao-servico .home-modal-intro .home-hello {
  font-size: 15px;
  color: var(--home-muted);
  margin: 0 0 8px;
}

#modal-selecao-servico .home-modal-intro .home-hello strong {
  color: var(--home-fg);
}

#modal-selecao-servico .home-modal-intro h1 {
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--home-fg);
}

#modal-selecao-servico .home-modal-intro h1 span {
  color: var(--home-gold);
}

#modal-selecao-servico .home-modal-intro .home-lead {
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
  font-size: 0.82rem;
  margin: 0;
}

#modal-selecao-servico .home-options {
  grid-template-columns: 1fr;
  gap: 10px;
}

#modal-selecao-servico .home-card {
  aspect-ratio: auto;
  max-height: none;
  min-height: 72px;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: stretch;
  border-radius: 14px;
}

#modal-selecao-servico .home-card::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.75) 100%);
}

#modal-selecao-servico .home-card img {
  position: relative;
  inset: auto;
  width: 72px;
  height: 100%;
  min-height: 72px;
  object-fit: cover;
  filter: saturate(0.95) brightness(0.9);
}

#modal-selecao-servico .home-card:hover {
  transform: none;
}

#modal-selecao-servico .home-card:hover img {
  transform: none;
}

#modal-selecao-servico .home-check {
  top: 50%;
  left: auto;
  right: 12px;
  transform: translateY(-50%);
}

#modal-selecao-servico .home-card-body {
  position: relative;
  inset: auto;
  padding: 14px 44px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

#modal-selecao-servico .home-card-body h2 {
  font-size: 0.95rem;
}

#modal-selecao-servico .home-card-body p {
  font-size: 0.78rem;
  margin-top: 3px;
}

#modal-selecao-servico .home-footer {
  padding: 14px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

#modal-selecao-servico .home-actions {
  width: 100%;
}

#modal-selecao-servico .home-btn-primary {
  width: 100%;
  justify-content: center;
}

#modal-selecao-servico .home-hint {
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .home-card,
  .home-card img,
  .home-check,
  .home-btn {
    transition: none !important;
  }
}
