/* 08 · Exemplos: exposición de cinco proyectos en MacBook, iPad e iPhone (prefijo ex-).
   Las pantallas muestran las demos reales (iframes locales) a su ancho real: cada dispositivo
   enseña la versión de escritorio, tablet o móvil de la propia web. */

.ex { position: relative; overflow: hidden; background: linear-gradient(180deg, #06080b, #0a0f15 45%, #06080b); }
.ex__luz { position: absolute; inset: 0; pointer-events: none; transition: opacity .6s; opacity: 1;
  background: radial-gradient(ellipse 55% 50% at 38% 58%, var(--ex-cor1, rgba(61,220,255,.18)), transparent 70%), radial-gradient(ellipse 35% 45% at 85% 40%, var(--ex-cor2, rgba(42,123,255,.12)), transparent 70%); }
.ex[data-ex-nicho="clinica"]      { --ex-cor1: rgba(150, 230, 255, .22); --ex-cor2: rgba(198, 244, 50, .08); }
.ex[data-ex-nicho="restaurante"]  { --ex-cor1: rgba(230, 80, 45, .22);   --ex-cor2: rgba(245, 190, 60, .14); }
.ex[data-ex-nicho="contabilistas"]{ --ex-cor1: rgba(190, 170, 140, .16); --ex-cor2: rgba(35, 54, 44, .35); }
.ex[data-ex-nicho="advogado"]     { --ex-cor1: rgba(61, 90, 254, .26);   --ex-cor2: rgba(200, 210, 230, .08); }
.ex[data-ex-nicho="alojamento"]   { --ex-cor1: rgba(220, 140, 90, .2);   --ex-cor2: rgba(111, 127, 96, .2); }
.ex.ex-troca .ex__luz { opacity: .35; }
.ex .env { position: relative; }
.ex__cab { max-width: 860px; margin-bottom: 34px; }
.ex__cab .mono { display: block; margin-bottom: 18px; }
.ex__cab .lead { margin-top: 18px; }

/* Selector de proyectos (no es un carrusel automático) */
.ex-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.ex-tab { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 18px 10px 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--branco); cursor: pointer; text-align: left; transition: background .25s, border-color .25s, color .25s, transform .2s; }
.ex-tab__n { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(61,220,255,.1); color: var(--cyan); font: 700 .74rem var(--f-mono); }
.ex-tab__nome { font: 800 .95rem/1.1 var(--f-tit); text-transform: uppercase; }
.ex-tab__estilo { font: 400 .95rem/1 var(--f-serif); font-style: italic; color: var(--muted); }
.ex-tab:hover { border-color: rgba(61,220,255,.5); transform: translateY(-1px); }
.ex-tab.ativo { background: #fff; border-color: #fff; color: var(--tinta); box-shadow: 0 0 30px rgba(61,220,255,.25); }
.ex-tab.ativo .ex-tab__n { background: var(--tinta); }
.ex-tab.ativo .ex-tab__estilo { color: #4b5866; }
.ex-tab:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* Escena: palco con los dispositivos + ficha del proyecto */
.ex-cena { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, .8fr); grid-template-areas: "palco info" "palco ver"; gap: 18px 44px; align-items: center; }
.ex-palco { grid-area: palco; position: relative; aspect-ratio: 100 / 64; }
.ex-info { grid-area: info; align-self: end; }
.ex-ver { grid-area: ver; align-self: start; justify-self: start; }

/* Pantalla genérica: el iframe tiene el ancho real del dispositivo y se escala al hueco */
.ex-ecra { position: relative; overflow: hidden; background: #fff; }
.ex-ecra iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; pointer-events: none; opacity: 1; transition: opacity .35s; }
.ex-ecra.carregando iframe { opacity: 0; }
.ex-ecra::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(118deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 32%); }

/* MacBook */
.ex-mac { position: absolute; left: 2%; top: 3%; width: 74%; z-index: 2; filter: drop-shadow(0 30px 40px rgba(0,0,0,.55)); }
.ex-mac__tampa { position: relative; padding: 2.4% 2.4% 3.2%; border-radius: 16px 16px 4px 4px; background: linear-gradient(180deg, #16181c, #0b0c0e); box-shadow: 0 0 0 1.5px #5a616a, inset 0 0 0 1px rgba(255,255,255,.04); }
.ex-mac__camara { position: absolute; top: 1%; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #1f2a33; box-shadow: inset 0 0 0 1.5px #0a0d10, 0 0 3px rgba(61,220,255,.25); }
.ex-mac .ex-ecra { aspect-ratio: 1440 / 900; border-radius: 3px; }
.ex-mac__base { position: relative; height: 0; padding-top: 3.4%; margin: 0 -7%; border-radius: 0 0 22px 22px / 0 0 60% 60%; background: linear-gradient(180deg, #e6e9ec 0%, #b8bec5 45%, #7c838b 100%); box-shadow: 0 2px 0 #4c535a, 0 18px 30px rgba(0,0,0,.45); }
.ex-mac__base::before { content: ""; position: absolute; top: 0; left: 50%; width: 15%; height: 38%; transform: translateX(-50%); border-radius: 0 0 10px 10px; background: linear-gradient(180deg, #8f969d, #b9bfc5); }

/* iPad (vertical) */
.ex-ipad { position: absolute; right: 0; top: 10%; width: 25%; z-index: 1; padding: 1.1%; border-radius: 22px; background: linear-gradient(160deg, #1d2025, #0c0d10); box-shadow: 0 0 0 1.5px #646b74, 0 26px 40px rgba(0,0,0,.55); }
.ex-ipad .ex-ecra { aspect-ratio: 820 / 1180; border-radius: 12px; }

/* iPhone (primer plano) */
.ex-iphone { position: absolute; left: 0; bottom: 0; width: 15%; z-index: 3; padding: .9%; border-radius: 30px; background: linear-gradient(160deg, #26282d, #0b0b0d); box-shadow: 0 0 0 1.5px #6c727a, 0 24px 34px rgba(0,0,0,.6); }
.ex-iphone .ex-ecra { aspect-ratio: 390 / 844; border-radius: 22px; }
.ex-iphone__ilha { position: absolute; top: 2.6%; left: 50%; width: 30%; height: 2.4%; transform: translateX(-50%); border-radius: 99px; background: #050506; z-index: 2; }

.ex-chao { position: absolute; left: 4%; right: 6%; bottom: -3%; height: 10%; background: radial-gradient(ellipse, rgba(0,0,0,.6), transparent 70%); filter: blur(8px); z-index: 0; }

/* Entrada suave al cambiar de proyecto, escalonada */
.ex-troca .ex-mac, .ex-troca .ex-ipad, .ex-troca .ex-iphone { animation: ex-entra .7s cubic-bezier(.2,.7,.2,1) both; }
.ex-troca .ex-ipad { animation-delay: .08s; }
.ex-troca .ex-iphone { animation-delay: .16s; }
@keyframes ex-entra { from { opacity: 0; transform: translateY(16px); } }

/* Ficha del proyecto */
.ex-info { animation: ex-entra .6s cubic-bezier(.2,.7,.2,1) both; }
.ex-info__n { font: 700 .72rem var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }
.ex-info h3 { margin: 10px 0 6px; font: 800 clamp(2rem, 3.6vw, 3rem)/1 var(--f-tit); text-transform: uppercase; }
.ex-info__lema { font: 400 1.35rem/1.2 var(--f-serif); font-style: italic; color: #cfe9f2; margin-bottom: 12px; }
.ex-info p:not(.ex-info__lema) { color: #b9c5cf; }
.ex-info ul { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ex-info li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; color: #dbe5ec; }
.ex__nota { margin-top: 28px; font-size: .85rem; color: var(--muted); }

/* Tablet: escena encima y ficha debajo */
@media (max-width: 1080px) {
  .ex-cena { grid-template-columns: 1fr; grid-template-areas: "palco" "info" "ver"; }
  .ex-palco { max-width: 860px; width: 100%; justify-self: center; }
}
/* Móvil: composición reorganizada a propósito (portátil arriba; tablet y teléfono debajo) */
@media (max-width: 640px) {
  .ex-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .ex-tab { flex: none; }
  .ex-palco { aspect-ratio: auto; display: grid; grid-template-columns: 1.45fr 1fr; gap: 22px 18px; align-items: end; padding-bottom: 6px; }
  .ex-mac, .ex-ipad, .ex-iphone { position: relative; inset: auto; width: auto; }
  .ex-mac { grid-column: 1 / -1; margin: 0 6%; }
  .ex-ipad { border-radius: 16px; padding: 2.2%; }
  .ex-iphone { width: 78%; justify-self: center; border-radius: 26px; padding: 2.6%; }
  .ex-chao { display: none; }
  .ex-ver { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .ex-troca .ex-mac, .ex-troca .ex-ipad, .ex-troca .ex-iphone, .ex-info { animation: none; }
  .ex__luz, .ex-ecra iframe, .ex-tab { transition: none; }
}

/* Invitación a probar (2026-10-10): que se note que las pestañas y la pantalla se pueden tocar */
.ex-dica { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 10px 18px 10px 12px; border-radius: 999px; border: 1px solid rgba(43, 245, 154, .5); background: rgba(43, 245, 154, .08); color: #e9fff4; font-size: 1rem; box-shadow: 0 0 22px rgba(43, 245, 154, .18); }
.ex-dica b { color: var(--verde); }
.ex-dica__mao { flex: none; width: 30px; height: 30px; color: var(--verde); animation: ex-toque 1.6s ease-in-out infinite; }
@keyframes ex-toque { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(4px) scale(.92); } }
.ex:not(.ex-explorado) .ex-tab:not(.ativo) { animation: ex-chama 2.4s ease-in-out infinite; }
.ex:not(.ex-explorado) .ex-tab:nth-child(3) { animation-delay: .3s; }
.ex:not(.ex-explorado) .ex-tab:nth-child(4) { animation-delay: .6s; }
.ex:not(.ex-explorado) .ex-tab:nth-child(5) { animation-delay: .9s; }
@keyframes ex-chama { 0%, 100% { border-color: var(--line); box-shadow: none; } 50% { border-color: rgba(61, 220, 255, .75); box-shadow: 0 0 18px rgba(61, 220, 255, .35); } }
.ex-abrir { grid-area: palco; align-self: end; justify-self: center; z-index: 6; margin-bottom: 4%; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: rgba(5, 7, 10, .88); border: 1px solid var(--cyan); color: #fff; font: 700 .82rem var(--f-tit); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; box-shadow: 0 0 24px rgba(61, 220, 255, .35); transition: transform .2s, box-shadow .2s; }
.ex-abrir:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(61, 220, 255, .55); }
.ex-abrir:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ex-abrir__ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 0 rgba(43, 245, 154, .7); animation: ex-ponto 1.8s infinite; }
@keyframes ex-ponto { 70% { box-shadow: 0 0 0 10px rgba(43, 245, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(43, 245, 154, 0); } }
@media (max-width: 640px) { .ex-dica { font-size: .9rem; border-radius: 16px; } .ex-abrir { display: none; } }
@media (prefers-reduced-motion: reduce) { .ex-dica__mao, .ex-abrir__ponto, .ex:not(.ex-explorado) .ex-tab:not(.ativo) { animation: none; } }
