/* OFA Demo · iPhone 15 Pro + WhatsApp iOS · limpio */
:root {
  --accent: #075E54;
  --wa-green: #075E54;
  --wa-green-light: #25D366;
  --wa-bubble-in: #ffffff;
  --wa-bubble-out: #DCF8C6;
  --wa-bg: #E5DDD5;
  --wa-tick: #53BDEB;
  --brand-blue: #1e3a5f;
  --brand-orange: #e87040;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── PÁGINA ── */
body {
  min-height: 100dvh;
  background: #f5f6f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 80px;
}

/* ── HEADER OFA ── */
.ofa-header {
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
}
.ofa-header__brand { display: flex; align-items: center; gap: 10px; }
.ofa-header__logo {
  width: 38px; height: 38px;
  background: var(--brand-blue);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.ofa-header__name { font-size: 14px; font-weight: 700; color: var(--brand-blue); }
.ofa-header__tag { font-size: 11px; color: #6b7280; }
.ofa-header__cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-orange);
  text-decoration: none;
  border: 1.5px solid var(--brand-orange);
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── ESCENA ── */
.scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.scene__foot { font-size: 11px; color: #9ca3af; }
.scene__foot strong { color: #6b7280; }

/* ── CARCASA IPHONE ── */
.iphone {
  position: relative;
  width: 320px;
  height: 660px;
  background: linear-gradient(145deg, #2a2a2a 0%, #111 100%);
  border-radius: 50px;
  box-shadow:
    0 0 0 1.5px #4a4540,
    0 0 0 3px #2a2520,
    0 30px 80px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.08);
}

/* Botones */
.iphone__btn { position: absolute; background: #2a2520; border-radius: 2px; }
.iphone__btn--silent  { left:-3px; top:100px; width:3px; height:26px; }
.iphone__btn--vol-up  { left:-3px; top:148px; width:3px; height:52px; }
.iphone__btn--vol-down{ left:-3px; top:212px; width:3px; height:52px; }
.iphone__btn--power   { right:-3px; top:148px; width:3px; height:72px; }

/* ── PANTALLA ── */
.iphone__screen {
  position: absolute;
  top: 8px; bottom: 8px;
  left: 8px; right: 8px;
  border-radius: 42px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--wa-bg);
}

/* ── STATUS BAR ── */
.status-bar {
  height: 48px;
  background: var(--accent);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 20px 7px;
  flex-shrink: 0;
  position: relative;
}
.status-bar__time { color: #fff; font-size: 14px; font-weight: 700; }
.status-bar__island {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 24px;
  background: #000;
  border-radius: 20px;
}
.status-bar__icons { display: flex; align-items: center; gap: 5px; }
.status-bar__battery { display: flex; align-items: center; gap: 1px; }
.status-bar__battery-fill {
  width: 20px; height: 10px;
  background: #fff;
  border-radius: 2px;
  border: 1.5px solid rgba(255,255,255,.3);
  position: relative;
}
.status-bar__battery-fill::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: #fff;
  border-radius: 1px;
  width: 70%;
}
.status-bar__battery-tip { width: 2px; height: 5px; background: rgba(255,255,255,.5); border-radius: 1px; }

/* ── WA HEADER ── */
.wa-header {
  background: var(--accent);
  padding: 6px 12px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.wa-header__back {
  background: none; border: none; color: #fff;
  display: flex; align-items: center; gap: 2px;
  font-size: 15px; cursor: pointer; padding: 2px 0;
}
.wa-header__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
  text-transform: uppercase;
}
.wa-header__info { flex: 1; min-width: 0; }
.wa-header__name { color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-header__status { color: rgba(255,255,255,.75); font-size: 11px; }
.wa-header__actions { display: flex; gap: 14px; color: #fff; }

/* ── CHAT ── */
.wa-chat {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background-color: var(--wa-bg);
  scrollbar-width: none;
}
.wa-chat::-webkit-scrollbar { display: none; }
.wa-chat__date { text-align: center; margin: 6px 0 8px; }
.wa-chat__date span {
  background: rgba(225,245,254,.9); color: #777;
  font-size: 11px; padding: 3px 10px; border-radius: 8px;
}

/* ── MENSAJES ── */
.msg {
  max-width: 80%;
  padding: 6px 9px 4px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.42;
  word-wrap: break-word;
  position: relative;
  animation: msgPop .15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.msg__meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 2px; }
.msg__time { font-size: 10px; color: rgba(0,0,0,.38); }
.msg__tick { font-size: 12px; color: var(--wa-tick); }

.msg--bot {
  align-self: flex-start;
  background: var(--wa-bubble-in);
  border-top-left-radius: 2px;
  margin-left: 2px;
}
.msg--bot::before {
  content: '';
  position: absolute;
  top: 0; left: -7px;
  border-right: 8px solid var(--wa-bubble-in);
  border-bottom: 8px solid transparent;
}
.msg--me {
  align-self: flex-end;
  background: var(--wa-bubble-out);
  border-top-right-radius: 2px;
  margin-right: 2px;
}
.msg--me::after {
  content: '';
  position: absolute;
  top: 0; right: -7px;
  border-left: 8px solid var(--wa-bubble-out);
  border-bottom: 8px solid transparent;
}
.msg--typing {
  align-self: flex-start;
  background: var(--wa-bubble-in);
  border-top-left-radius: 2px;
  padding: 10px 14px;
  display: flex; gap: 4px; align-items: center;
  margin-left: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.msg--typing::before {
  content: '';
  position: absolute;
  top: 0; left: -7px;
  border-right: 8px solid var(--wa-bubble-in);
  border-bottom: 8px solid transparent;
}
.msg--typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #8696a0;
  animation: typingBounce 1.4s infinite ease-in-out;
}
.msg--typing span:nth-child(2) { animation-delay: .2s; }
.msg--typing span:nth-child(3) { animation-delay: .4s; }

/* ── COMPOSER ── */
.wa-composer {
  background: #f0f2f5;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  border-top: 1px solid rgba(0,0,0,.06);
}
.wa-composer__wrap {
  flex: 1;
  min-width: 0;
  background: #fff;
  border-radius: 24px;
  display: flex;
  align-items: center;
  padding: 0 6px 0 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  min-height: 38px;
  overflow: hidden;
}
.wa-composer__icon {
  background: none; border: none;
  color: #8696a0; cursor: pointer;
  padding: 6px; display: grid; place-items: center;
  flex-shrink: 0;
}
.wa-composer__input {
  flex: 1; min-width: 0;
  border: none; outline: none;
  font-size: 14px; color: #111b21;
  background: transparent;
  padding: 7px 4px;
}
.wa-composer__input::placeholder { color: #8696a0; }
.wa-composer__send {
  width: 38px; height: 38px;
  border-radius: 50%; border: none;
  background: var(--wa-green-light);
  color: #fff; display: grid; place-items: center;
  cursor: pointer; flex-shrink: 0;
  transition: transform .12s;
}
.wa-composer__send:hover { transform: scale(1.06); }
.wa-composer__send:active { transform: scale(.94); }
.wa-composer__send:disabled { opacity: .5; }

/* ── HOME INDICATOR ── */
.home-indicator {
  height: 20px; background: #f0f2f5;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.home-indicator::after {
  content: ''; width: 100px; height: 4px;
  background: rgba(0,0,0,.18); border-radius: 10px;
}

/* ── OFERTA ── */
.offer-bar {
  width: 100%; max-width: 320px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 12.5px;
  padding: 10px 16px;
  border-radius: 12px;
  text-align: center;
  margin-top: 4px;
}

/* ── CTA FINAL ── */
.demo-cta {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  z-index: 100;
  animation: fadeIn .3s ease;
}
.demo-cta__card {
  background: #fff;
  border-radius: 20px;
  padding: 20px 18px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.demo-cta__title { font-size: 17px; font-weight: 700; color: #111b21; text-align: center; }
.demo-cta__sub { font-size: 13px; color: #667781; text-align: center; line-height: 1.45; }
.demo-cta__offer {
  background: #f0fdf4; border: 1px solid #bbf7d0;
  color: #166534; font-size: 12px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; text-align: center;
}
.demo-cta__btn {
  display: block; text-align: center;
  padding: 12px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  transition: transform .12s;
}
.demo-cta__btn:active { transform: scale(.97); }
.demo-cta__btn--primary { background: #25D366; color: #fff; }
.demo-cta__btn--secondary { background: #f0f2f5; color: #075E54; }
.demo-cta__legal { font-size: 10.5px; color: #aaa; text-align: center; line-height: 1.4; }
.demo-cta__legal a { color: #aaa; text-decoration: underline; }

/* ── COOKIES ── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--brand-blue);
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 999;
  font-size: 12.5px;
}
.cookie-banner p { flex: 1; opacity: .85; line-height: 1.4; }
.cookie-banner a { color: var(--brand-orange); text-decoration: underline; }
.cookie-banner button {
  background: var(--brand-orange); color: #fff;
  border: none; padding: 8px 16px;
  border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}

/* ── MOBILE ── */
@media (max-width: 380px) {
  body { padding: 0; }
  .ofa-header { max-width: 100%; }
  .iphone { width: 100vw; height: calc(100dvh - 120px); border-radius: 0; box-shadow: none; }
  .iphone__btn { display: none; }
  .iphone__screen { top: 0; bottom: 0; left: 0; right: 0; border-radius: 0; }
  .offer-bar { max-width: 100%; border-radius: 0; border-left: 0; border-right: 0; }
  .cookie-banner { flex-direction: column; text-align: center; }
}

/* ── ANIMACIONES ── */
@keyframes msgPop { from { opacity: 0; transform: scale(.96) translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes typingBounce { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Scale para pantallas pequeñas */
@media (max-height: 800px) and (min-width: 381px) {
  .iphone { transform: scale(.9); transform-origin: top center; }
}
@media (max-height: 700px) and (min-width: 381px) {
  .iphone { transform: scale(.8); transform-origin: top center; }
}
