/* ==========================================================================
   VibeTech|CMD — Sala de Demonstração Interativa (Studio Preview)
   ========================================================================== */

:root {
  --black: #030712;
  --navy: #071426;
  --navy-2: #0a1b34;
  --blue: #075BCE;
  --electric: #087BFF;
  --cyan: #00D9F5;
  --teal: #00D6A0;
  --steel: #AAB5C4;
  --silver: #DCE4ED;
  --white: #F8FAFC;
  --muted: #9eb0c8;
  --line: rgba(120, 170, 235, .18);
  --font-display: Montserrat, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* ---------- Layout principal da Sala ---------- */
.studio-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(8, 123, 255, .16), transparent 65%),
    radial-gradient(ellipse 50% 40% at 10% 100%, rgba(0, 214, 160, .08), transparent 65%),
    linear-gradient(180deg, var(--black) 0%, #050f20 100%);
}

/* ---------- Barra Superior Oficial VibeTech|CMD ---------- */
.studio-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
  background: rgba(3, 7, 18, .92);
  border-bottom: 1px solid rgba(0, 217, 245, .20);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  flex-wrap: wrap;
}

.bar-left, .bar-center, .bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(220, 228, 237, .04);
  color: var(--silver);
  font-size: .82rem;
  font-weight: 600;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.back-btn:hover {
  border-color: rgba(0, 217, 245, .55);
  background: rgba(0, 217, 245, .09);
  color: var(--white);
}

.bar-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-left: 6px;
}
.bar-brand img { width: 30px; height: 30px; display: block; }

.wm {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: -.025em;
  line-height: 1;
  white-space: nowrap;
}
.wm > span { -webkit-background-clip: text; background-clip: text; color: transparent; }
.wm-vibe { background-image: linear-gradient(95deg, var(--electric), var(--cyan)); }
.wm-tech { background-image: linear-gradient(180deg, var(--white) 10%, var(--steel) 100%); }
.wm-sep {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin: 0 .32em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--teal)) !important;
  color: initial !important;
}
.wm-cmd { background-image: linear-gradient(180deg, var(--silver), #8794a8); font-weight: 600; }

.studio-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 217, 245, .08);
  border: 1px solid rgba(0, 217, 245, .26);
  color: #b8f3fc;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.studio-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

/* Seletor de Projetos e Viewports */
.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7, 20, 38, .85);
  gap: 3px;
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all .2s ease;
}
.seg-btn svg { width: 15px; height: 15px; }
.seg-btn:hover { color: var(--white); }
.seg-btn.active {
  background: linear-gradient(100deg, rgba(8, 123, 255, .32), rgba(0, 217, 245, .20));
  border-color: rgba(0, 217, 245, .52);
  color: var(--white);
  box-shadow: 0 0 14px rgba(0, 217, 245, .18);
}

.cta-wa {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .24);
  background: linear-gradient(100deg, #00D6A0, #1DE9B6);
  color: #031510;
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 214, 160, .28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cta-wa:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0, 214, 160, .42); }

/* ---------- Sub-barra contextual do projeto ativo ---------- */
.project-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: rgba(7, 20, 38, .62);
  border-bottom: 1px solid rgba(120, 170, 235, .12);
}
.project-subbar-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.project-subbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(0, 214, 160, .12);
  border: 1px solid rgba(0, 214, 160, .30);
  color: #9cf5da;
}
.status-chip.is-dev {
  background: rgba(8, 123, 255, .15);
  border-color: rgba(0, 217, 245, .32);
  color: #b8ebff;
}
.status-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.project-subbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.protection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 217, 245, .42);
  background: rgba(0, 217, 245, .10);
  color: #c8f5fc;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
}
.protection-pill svg { width: 14px; height: 14px; color: var(--teal); flex: none; }

/* ---------- Palco Principal ---------- */
.studio-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  position: relative;
}

/* Modo 1: Frame Interativo ao Vivo */
.live-wrapper {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.device-frame {
  position: relative;
  width: 100%;
  max-width: 1440px;
  height: calc(100dvh - 168px);
  min-height: 540px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 217, 245, .28);
  background: #030712;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .62), 0 0 50px rgba(8, 123, 255, .14);
  transition: max-width .35s cubic-bezier(.22, 1, .36, 1), border-radius .3s ease;
  display: flex;
  flex-direction: column;
}
.device-frame.vp-tablet { max-width: 820px; border-radius: 26px; }
.device-frame.vp-mobile { max-width: 405px; border-radius: 34px; border-width: 2px; }

.device-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(7, 20, 38, .94);
  border-bottom: 1px solid rgba(120, 170, 235, .14);
  flex: none;
}
.chrome-dots { display: inline-flex; gap: 6px; }
.chrome-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(220, 228, 237, .24); display: block; }
.chrome-address {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(3, 7, 18, .78);
  border: 1px solid rgba(120, 170, 235, .16);
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--silver);
}
.chrome-address svg { width: 12px; height: 12px; color: var(--teal); }
.chrome-vp-label { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }

.iframe-viewport {
  position: relative;
  flex: 1;
  width: 100%;
  background: #030712;
}
.iframe-viewport iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #030712;
}

/* Marca d'água suave opcional (pointer-events: none para não travar a navegação!) */
.live-watermark {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background-image: url('../assets/vibetech-watermark.svg');
  background-repeat: repeat;
  background-size: 240px 140px;
  opacity: 0;
  transition: opacity .28s ease;
}
.live-watermark.is-active { opacity: .48; }

/* Selo discreto da assinatura VibeTech no canto */
.corner-signature {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 8;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(3, 7, 18, .84);
  border: 1px solid rgba(0, 217, 245, .36);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
  font-size: .73rem;
  font-weight: 700;
  color: var(--silver);
}
.corner-signature img { width: 18px; height: 18px; display: block; }

/* ---------- Modo 2: Página de Apresentação Visual (Estudo de Caso) ---------- */
.case-view {
  width: min(1140px, 100%);
  margin-inline: auto;
  display: grid;
  gap: 24px;
  padding: 8px 0 36px;
}

.case-hero {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 32px;
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(10, 28, 52, .78), rgba(3, 7, 18, .88));
  box-shadow: 0 26px 70px rgba(0, 0, 0, .45);
}
.case-kicker {
  display: inline-block;
  color: var(--cyan);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.case-hero h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.04em;
}
.case-hero p { margin: 0 0 20px; color: var(--muted); font-size: .98rem; line-height: 1.65; }

.case-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.case-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(8, 123, 255, .12);
  border: 1px solid rgba(0, 217, 245, .24);
  font-size: .78rem;
  font-weight: 600;
  color: #bceeff;
}

.case-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(170, 181, 196, .28);
  background: rgba(220, 228, 237, .04);
  color: var(--white);
  font-size: .86rem;
  font-weight: 700;
  transition: all .2s ease;
}
.btn-outline:hover { border-color: var(--cyan); background: rgba(0, 217, 245, .09); }

/* Palco visual de telas do estudo de caso */
.case-stage-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 217, 245, .28);
  background: #040c1a;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .5);
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
}
.case-stage-wm {
  position: absolute;
  inset: 0 0 42px 0;
  z-index: 4;
  pointer-events: none;
  background-image: url('../assets/vibetech-watermark.svg');
  background-repeat: repeat;
  background-size: 210px 122px;
  opacity: 0;
  transition: opacity .25s ease;
}
.case-stage-wm.is-active { opacity: .68; }

.case-mock-shell {
  padding: 20px;
  flex: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.case-stage-footer {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(3, 7, 18, .94);
  border-top: 1px solid rgba(120, 170, 235, .16);
}
.stage-signature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--silver);
}
.stage-signature img { width: 18px; height: 18px; display: block; }
.stage-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: .04em;
}

/* Tema editorial 4Ever Cerimonial */
.theme-4ever {
  background:
    radial-gradient(circle at 80% 18%, rgba(212, 185, 138, .28), transparent 55%),
    radial-gradient(circle at 12% 90%, rgba(16, 62, 48, .55), transparent 60%),
    linear-gradient(155deg, #0b1d17 0%, #163329 52%, #0a1612 100%);
}
.e4-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(233, 213, 179, .22);
}
.e4-logo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  letter-spacing: .16em;
  color: #f0dec0;
  font-weight: 700;
}
.e4-nav { display: flex; gap: 10px; font-size: .68rem; color: rgba(240, 222, 192, .72); }
.e4-hero-box {
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  align-items: center;
}
.e4-eyebrow { font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; color: #d8be90; }
.e4-title {
  margin: 6px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.38rem;
  line-height: 1.2;
  color: #fbf5eb;
}
.e4-text { font-size: .76rem; color: rgba(245, 236, 222, .78); line-height: 1.5; margin: 0 0 12px; }
.e4-btn {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(95deg, #c9a870, #e6cfa4);
  color: #10241d;
  font-size: .72rem;
  font-weight: 800;
}
.e4-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.e4-tile {
  height: 76px;
  border-radius: 10px;
  border: 1px solid rgba(233, 213, 179, .28);
  background: linear-gradient(145deg, rgba(233, 213, 179, .18), rgba(11, 29, 23, .72));
  display: flex;
  align-items: flex-end;
  padding: 8px;
  font-size: .65rem;
  font-weight: 600;
  color: #f0dec0;
}
.e4-tile.tall { grid-row: span 2; height: 160px; }

/* Tema dashboard 4Ever Management */
.theme-app {
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 214, 160, .20), transparent 55%),
    linear-gradient(155deg, #061220, #0d2138);
}
.app-mock-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .74rem;
  color: var(--silver);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(120, 170, 235, .16);
}
.app-mock-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 214, 160, .14);
  color: var(--teal);
  font-size: .68rem;
  font-weight: 700;
}
.app-mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.app-mock-kpi {
  padding: 12px;
  border-radius: 12px;
  background: rgba(8, 123, 255, .11);
  border: 1px solid rgba(0, 217, 245, .20);
}
.app-mock-kpi strong { display: block; font-size: 1.05rem; color: var(--white); }
.app-mock-kpi span { font-size: .68rem; color: var(--cyan); }
.app-mock-rows { display: grid; gap: 8px; }
.app-mock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(3, 7, 18, .60);
  border: 1px solid rgba(120, 170, 235, .14);
  font-size: .75rem;
}
.app-mock-row b { color: var(--white); }
.app-mock-row span { color: var(--teal); font-weight: 600; font-size: .7rem; }

/* Cards de arquitetura do Estudo de Caso */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.case-card {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(10, 28, 52, .68), rgba(3, 7, 18, .78));
}
.case-card-num {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: .1em;
}
.case-card h3 { margin: 10px 0 8px; font-family: var(--font-display); font-size: 1.06rem; }
.case-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }

.case-banner-cta {
  padding: 24px 28px;
  border-radius: 22px;
  border: 1px solid rgba(0, 217, 245, .28);
  background: linear-gradient(110deg, rgba(8, 123, 255, .14), rgba(0, 214, 160, .09));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.case-banner-cta h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.15rem; }
.case-banner-cta p { margin: 0; color: var(--muted); font-size: .9rem; }

.is-hidden { display: none !important; }

/* ---------- Responsividade ---------- */
@media (max-width: 960px) {
  .case-hero { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .bar-center { order: 3; width: 100%; justify-content: center; overflow-x: auto; }
}
@media (max-width: 680px) {
  .studio-bar { padding: 10px 12px; gap: 10px; }
  .studio-badge, .vp-group { display: none; }
  .project-subbar { padding: 10px 12px; }
  .studio-stage { padding: 12px; }
  .device-frame { height: calc(100dvh - 190px); min-height: 460px; border-radius: 16px; }
  .e4-hero-box { grid-template-columns: 1fr; }
}
