/* Brand Compliance Fest — mismos tokens que Michi / Pasapalabra */

@font-face {
  font-family: "Chaney";
  src: url("../fonts/chaney-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Silka";
  src: url("../fonts/silka-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Silka";
  src: url("../fonts/silka-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Silka";
  src: url("../fonts/silka-black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-blue: #002d62;
  --cyan: #00afec;
  --red: #ff0000;

  --bg: #000000;
  --bg-elev: #111111;
  --ink: #ffffff;
  --ink-dim: rgba(255, 255, 255, 0.78);
  --accent: var(--red);
  --on-accent: #ffffff;
  --ok: var(--cyan);
  --bad: var(--red);
  --hairline: rgba(255, 255, 255, 0.18);
  --line: #333333;

  /* Chat estilo WhatsApp (dentro del iPhone) */
  --wa-header: #075e54;
  --wa-header-ink: #ffffff;
  --wa-chat-bg: #ece5dd;
  --wa-bubble-them: #ffffff;
  --wa-bubble-me: #dcf8c6;
  --wa-ink: #111b21;
  --wa-ink-dim: #667781;
  --wa-composer: #f0f2f5;
  --wa-accent: #25d366;

  --font-display: "Chaney", "Silka", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Silka", "Helvetica Neue", Arial, sans-serif;

  --touch-min: 120px;
  --pad: 32px;
  --phone-radius: 48px;
  --phone-bezel: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
  touch-action: manipulation;
}

body {
  overscroll-behavior: none;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(255, 0, 0, 0.06) 0%, transparent 45%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.015) 2px,
      rgba(255, 255, 255, 0.015) 3px
    );
}

#app {
  height: 100%;
  width: 100%;
}

.stage {
  position: relative;
  height: 100%;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

/* Landscape 16:9: iPhone centrado como en el mockup del tótem */
@media (orientation: landscape) {
  .stage {
    max-width: none;
    display: grid;
    place-items: center;
    background:
      radial-gradient(ellipse at 30% 40%, rgba(255, 0, 0, 0.08) 0%, transparent 50%),
      radial-gradient(ellipse at 70% 70%, rgba(255, 255, 255, 0.04) 0%, transparent 45%),
      #000;
  }

  .screen--phone,
  .screen--attract .phone--attract {
    width: min(42vh, 28vw, 520px);
    height: min(94vh, 94dvh);
    max-height: 94vh;
  }

  .screen--phone {
    height: min(94vh, 94dvh);
  }

  .screen--phone .phone {
    margin: 0;
    height: 100%;
    width: 100%;
  }

  .screen--brand,
  .screen--learning,
  .screen--closing,
  .screen--attract {
    width: min(960px, 92vw);
    height: min(94vh, 94dvh);
    max-width: 960px;
  }
}

.screen {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.fest-logo {
  display: block;
  width: min(100%, 560px);
  height: auto;
  margin: 0 0 24px;
  align-self: flex-start;
}

.fest-logo--sm {
  width: min(100%, 320px);
  margin-bottom: 16px;
}

.touch-target {
  min-height: var(--touch-min);
  font-size: 28px;
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 24px 32px;
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 700;
  background: var(--bg-elev);
  color: var(--ink);
  width: 100%;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.phone__footer .btn--primary {
  background: var(--wa-header);
  border-radius: 14px;
  font-size: 26px;
}

.btn--ghost {
  background: transparent;
  border: 2px solid var(--line);
  color: var(--ink);
}

.brand-mark {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 12px;
}

/* —— R0 Attract —— */
.attract {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px var(--pad) 40px;
  justify-content: flex-end;
  gap: 16px;
  min-height: 100%;
}

.attract__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 64px;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}

.attract__title span {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.42em;
  letter-spacing: 0.1em;
  margin-top: 10px;
  text-transform: none;
}

.attract__sub {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-dim);
  margin: 0 0 8px;
}

.phone--attract {
  flex: 1;
  max-height: 46%;
  margin: 8px 0 12px;
  pointer-events: none;
  align-self: center;
  width: min(100%, 420px);
  background: linear-gradient(180deg, #1a3a36 0%, #0d1f1c 40%, #111 100%);
  border-color: #111;
}

.phone__island {
  width: 126px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  margin: 10px auto 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.phone__island::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1a1a2e;
  box-shadow: inset 0 0 0 2px #0d0d14;
}

.phone__home {
  width: 134px;
  height: 5px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  margin: 8px auto 10px;
  flex-shrink: 0;
}

.phone--attract .phone__home {
  background: rgba(255, 255, 255, 0.35);
}

.phone__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 22px 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--wa-ink);
  flex-shrink: 0;
}

.phone--attract .phone__status {
  color: #fff;
}

.notif {
  display: flex;
  gap: 14px;
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  padding: 16px 18px;
  margin: 0 16px 12px;
  animation: notif-in 0.6s ease both;
  color: var(--wa-ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.notif--dim {
  opacity: 0.72;
  animation-delay: 0.35s;
}

.notif__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--wa-header);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  flex-shrink: 0;
  font-size: 16px;
}

.notif__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 18px;
  min-width: 0;
}

.notif__body strong {
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif__body span {
  color: var(--wa-ink-dim);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif__app {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wa-accent);
  flex-shrink: 0;
}

@keyframes notif-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Pick case —— */
.pick {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px var(--pad);
  justify-content: flex-end;
  gap: 14px;
}

.pick__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.case-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.case-card {
  text-align: left;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 24px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: var(--touch-min);
  font-family: var(--font-body);
  font-size: 26px;
}

.case-card strong {
  font-size: 30px;
  font-weight: 900;
}

.case-card span {
  color: var(--ink-dim);
}

/* —— iPhone chrome + chat estilo WhatsApp —— */
.phone {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 16px 14px 18px;
  background: #1c1c1e;
  border: var(--phone-bezel) solid #0a0a0a;
  border-radius: var(--phone-radius);
  overflow: hidden;
  min-height: 0;
  box-shadow:
    0 0 0 2px #2a2a2c,
    0 24px 64px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
}

.phone__header {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 14px 14px;
  flex-shrink: 0;
  background: var(--wa-header);
  color: var(--wa-header-ink);
}

.phone__back {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 28px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.phone__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  flex-shrink: 0;
}

.phone__meta {
  min-width: 0;
  flex: 1;
}

.phone__name {
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone__sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone__actions {
  display: flex;
  gap: 18px;
  align-items: center;
  opacity: 0.95;
  flex-shrink: 0;
  pointer-events: none;
}

.phone__icon {
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
}

.phone__icon--video {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 10.5V7a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3.5l4 4v-11l-4 4z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 10.5V7a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3.5l4 4v-11l-4 4z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.phone__icon--call {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.2 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.2 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.role-panel {
  flex: 1;
  padding: 28px 24px;
  overflow: auto;
  background: var(--wa-chat-bg);
  color: var(--wa-ink);
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 18px 18px;
}

.role-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--wa-header);
  font-size: 16px;
}

.role-text {
  font-size: 30px;
  line-height: 1.35;
  margin: 12px 0 0;
  font-weight: 400;
}

.phone__footer {
  padding: 14px 16px 6px;
  background: var(--wa-composer);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.chat-log {
  flex: 1;
  overflow: auto;
  padding: 16px 12px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  min-height: 0;
  background-color: var(--wa-chat-bg);
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.045) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  color: var(--wa-ink);
}

.bubble {
  max-width: 88%;
  padding: 12px 14px 10px;
  border-radius: 10px;
  font-size: 24px;
  line-height: 1.35;
  word-break: break-word;
  position: relative;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.bubble--them {
  align-self: flex-start;
  background: var(--wa-bubble-them);
  color: var(--wa-ink);
  border-top-left-radius: 2px;
}

.bubble--me {
  align-self: flex-end;
  background: var(--wa-bubble-me);
  color: var(--wa-ink);
  border-top-right-radius: 2px;
}

.typing {
  align-self: flex-start;
  background: var(--wa-bubble-them);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  gap: 6px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.typing span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--wa-ink-dim);
  animation: blink 1.2s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.3;
  }
  40% {
    opacity: 1;
  }
}

.options-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 6px;
  background: var(--wa-composer);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  max-height: 46%;
  overflow: auto;
}

.option-bubble {
  width: 100%;
  text-align: left;
  background: #fff;
  color: var(--wa-ink);
  border: 1.5px solid rgba(7, 94, 84, 0.28);
  border-radius: 14px;
  padding: 18px 16px;
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.3;
  min-height: var(--touch-min);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.option-bubble:disabled {
  opacity: 0.45;
}

.option-bubble:not(:disabled):active {
  background: var(--wa-bubble-me);
  border-color: var(--wa-accent);
  color: var(--wa-ink);
}

.wa-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 4px;
  background: var(--wa-composer);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.wa-composer__plus,
.wa-composer__send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 26px;
  font-weight: 700;
  color: var(--wa-ink-dim);
  pointer-events: none;
}

.wa-composer__send {
  background: var(--wa-header);
  color: #fff;
  font-size: 18px;
}

.wa-composer__field {
  flex: 1;
  min-height: 44px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--wa-ink-dim);
  font-size: 18px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* —— Learning / closing —— */
.learning {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 36px var(--pad) 28px;
  gap: 14px;
  overflow: auto;
}

.learning__result {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
}

.learning__result.is-ok {
  color: var(--cyan);
}
.learning__result.is-bad {
  color: var(--accent);
}

.learning__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.learning__block h2 {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 6px;
}

.learning__block p {
  margin: 0;
  font-size: 24px;
  line-height: 1.4;
  color: var(--ink);
}

.learning__q {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-dim);
  margin: 8px 0 0;
}

.learning__footer {
  margin-top: auto;
  padding-top: 16px;
}

.closing {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px var(--pad) 80px;
  gap: 16px;
}

.closing h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0;
}

.closing__sub {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

/* —— Idle / operator —— */
.idle-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px var(--pad);
  gap: 16px;
  z-index: 20;
}

.idle-overlay[hidden] {
  display: none !important;
}

.idle-overlay__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 48px;
  text-transform: uppercase;
  margin: 0;
}

.idle-overlay__count {
  font-size: 72px;
  font-weight: 900;
  margin: 0;
  color: var(--accent);
}

.op-hotspot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 80px;
  height: 80px;
  z-index: 30;
}

.operator {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: #000;
  padding: 40px var(--pad);
}

.operator[hidden] {
  display: none !important;
}

.op-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: flex-end;
  height: 100%;
}

.op-panel h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  text-transform: uppercase;
  margin: 0;
}

.op-hint {
  font-size: 18px;
  color: var(--ink-dim);
}

@media (max-height: 900px) {
  .attract__title {
    font-size: 42px;
  }
  .bubble {
    font-size: 22px;
  }
  .touch-target {
    min-height: 72px;
  }
  .fest-logo {
    width: min(100%, 360px);
  }
}
