@font-face {
  font-family: Lexend;
  src: url("../fonts/Lexend.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --orange: #e88928;
  --orange-d: #c56e14;
  --teal: #2f6f65;
  --teal-banner: #2c7a74;
  --teal-letter: #2a9a9a;
  --ink: #1f2a2e;
  --word: #1b3d32;
  --sky: #d8ebf6;
  --paper: #f8f3e8;
  --basement: #f8ddd6;
  --floor: #e0564c;
  --ceiling: #e8a8a0;
  --stage-line: #3a5a72;
  --sub: #5a6570;
  --page: #f3eee6;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Lexend, system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}
body.player { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 16px 24px; }
body.shot { padding: 16px; background: #efe8dc; }

/* Index */
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 20px 48px; }
.badge { display: inline-block; background: #2b241c; color: #f8e9c8; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
h1 { font-size: 32px; margin: 12px 0 8px; letter-spacing: -0.03em; }
.lead { font-size: 17px; line-height: 1.5; color: #3e4750; max-width: 70ch; margin: 0 0 28px; }
.ideas { display: flex; flex-direction: column; gap: 36px; }
.idea h2 { font-size: 22px; margin: 0 0 4px; }
.idea .why { margin: 0 0 14px; color: var(--sub); font-size: 15px; line-height: 1.45; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid #e4ddd2; border-radius: 18px; padding: 14px 14px 16px; box-shadow: 0 10px 28px rgba(40, 30, 20, .06); }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card p.one { margin: 0 0 10px; font-size: 14px; color: var(--sub); line-height: 1.4; min-height: 2.8em; }
.frame { position: relative; width: 100%; aspect-ratio: 844 / 520; background: #efe8dc; border-radius: 12px; overflow: hidden; }
.frame iframe { position: absolute; inset: 0; width: 200%; height: 200%; transform: scale(.5); transform-origin: top left; border: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.actions a, .btn {
  font: 650 13px/1 Lexend, system-ui, sans-serif;
  color: #fff; background: var(--teal); border: 0; border-radius: 999px;
  padding: 8px 14px; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center;
}
.actions a.alt, .btn.alt { background: #fff; color: var(--teal); border: 2px solid var(--teal); }
.note { font-size: 13px; color: #6b7280; margin-top: 28px; max-width: 80ch; line-height: 1.45; }

/* Player chrome */
.player-head { width: min(920px, 100%); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.player-head h1 { font-size: 20px; margin: 0; }
.player-head p { margin: 0; color: var(--sub); font-size: 14px; }
body.shot .player-head, body.shot .player-controls { display: none; }
.player-controls { width: min(920px, 100%); display: flex; gap: 8px; margin-top: 12px; }
.shot-root { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* Phone */
.phone {
  width: 844px; height: 390px;
  background: #111;
  border-radius: 28px;
  padding: 10px 12px;
  box-shadow: 0 18px 50px rgba(30, 20, 10, .28), inset 0 0 0 2px #2a2a2a;
  position: relative;
}
.phone:before {
  content: ""; position: absolute; left: 50%; top: 5px; transform: translateX(-50%);
  width: 64px; height: 5px; border-radius: 99px; background: #2c2c2c;
}
.screen {
  width: 820px; height: 370px;
  background: #fffaf2;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
}
.caption {
  font-size: 15px; font-weight: 650; color: #2b241c; text-align: center;
  min-height: 1.3em; letter-spacing: -0.01em;
}

/* App screen */
.bar {
  height: 36px; flex: 0 0 36px; display: flex; align-items: center; gap: 10px;
  padding: 0 12px 0 10px; color: #2b1700; font-weight: 700; font-size: 16px;
  background: var(--orange); position: relative; z-index: 4;
}
.bar.teal { background: var(--teal-banner); color: #fff; }
.bar .ico { display: inline-flex; align-items: center; margin-right: 4px; }
.bar .ico svg { width: 18px; height: 18px; fill: currentColor; }
.bar .dots { display: flex; gap: 5px; margin-left: 10px; }
.bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #7a4a1c; opacity: .85; }
.bar .dots i.on { background: #3a2410; }
.cue {
  position: absolute; left: 50%; top: 4px; transform: translateX(-50%);
  width: 40px; height: 40px; border-radius: 50%; background: #fff8ee;
  border: 3px solid #f0c58a; color: var(--orange-d);
  display: grid; place-items: center; z-index: 6; opacity: 0; pointer-events: none;
}
.cue svg { width: 70%; height: 70%; fill: currentColor; }
.cue.on { opacity: 1; animation: cuePulse 1s ease-in-out infinite alternate; }
@keyframes cuePulse { from { opacity: 1; } to { opacity: .45; } }

.stage {
  position: relative; flex: 1; min-height: 0;
  border: 2px solid var(--stage-line); border-bottom-width: 3px;
  margin: 0 6px; background: var(--paper); overflow: hidden;
}
.stage .sky { position: absolute; left: 0; right: 0; top: 0; height: 28%; background: var(--sky); }
.stage.phase4 .sky { height: 10%; }
.stage .ceiling { position: absolute; left: 0; right: 0; top: 28%; border-top: 2px dashed var(--ceiling); }
.stage.phase4 .ceiling { top: 10%; }
.stage .floor { position: absolute; left: 0; right: 0; bottom: 22%; border-top: 2px solid var(--floor); }
.stage .basement { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: var(--basement); }
.stage.phase4 .basement { height: 8%; }
.stage.phase4 .floor { bottom: 8%; }
.word {
  position: absolute; left: 0; right: 0; top: 8%; bottom: 4%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 640; color: var(--word);
  font-size: 210px; line-height: .85; letter-spacing: -0.03em;
  pointer-events: none; z-index: 1;
}
.word.letter { color: var(--teal-letter); font-weight: 700; font-size: 250px; top: 0; }
.word .ch { display: inline-block; opacity: 0; transform: translateY(8px); }
.word .ch.on { opacity: 1; transform: none; }
.caret {
  position: absolute; height: 4px; background: #2b5fa8; border-radius: 2px;
  bottom: 26%; z-index: 2; opacity: 0; transform-origin: left center;
}
.buddy-slot {
  position: absolute; left: 18px; top: 42%; transform: translateY(-50%);
  width: 158px; height: 158px; z-index: 3; pointer-events: none;
}
.stage.phase4 .buddy-slot { width: 92px; height: 92px; left: 14px; top: 50%; }
.buddy-slot canvas { width: 100% !important; height: 100% !important; display: block; }

.keyword {
  position: absolute; right: 10px; bottom: 14px; z-index: 3;
  width: 118px; background: #fff; border-radius: 14px;
  box-shadow: 0 8px 22px rgba(30, 40, 50, .16);
  padding: 8px 8px 6px; text-align: center;
}
.keyword img { width: 100%; height: 86px; object-fit: contain; display: block; }
.keyword span { display: block; font-weight: 700; font-size: 16px; margin-top: 2px; color: var(--ink); }

.wave-wrap {
  position: absolute; left: 130px; right: 140px; top: 8%; height: 28%;
  z-index: 4; pointer-events: none; opacity: 0;
}
.wave-wrap.on { opacity: 1; }
.wave-wrap canvas { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 10px rgba(47, 111, 101, .35)); }

.foot {
  flex: 0 0 54px; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 10px; background: #fffaf2;
}
.pill {
  font: 650 15px Lexend, system-ui, sans-serif;
  border-radius: 999px; padding: 7px 16px; display: inline-flex; align-items: center; gap: 6px;
  border: 2px solid #c9cdd3; background: #fff; color: #333;
}
.pill.stop { background: #3a3f46; color: #fff; border-color: #3a3f46; }
.pill svg { width: 14px; height: 14px; fill: currentColor; }
.next {
  margin-left: auto; width: 78px; height: 34px; border: 0; background: none; opacity: .45;
}
.next svg { width: 78px; height: 34px; display: block; }

.mic-waves {
  position: absolute; left: 18px; top: 42%; transform: translateY(-50%);
  width: 158px; height: 158px; z-index: 2; pointer-events: none; opacity: 0;
}
.mic-waves.on { opacity: 1; }
.mic-waves i {
  position: absolute; left: 50%; top: 50%; border: 2px solid var(--orange);
  border-radius: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px;
  opacity: 0; animation: ring 1.6s ease-out infinite;
}
.mic-waves i:nth-child(2) { animation-delay: .45s; border-color: #ffb870; }
.mic-waves i:nth-child(3) { animation-delay: .9s; }
@keyframes ring {
  0% { transform: scale(.7); opacity: .55; }
  100% { transform: scale(2.1); opacity: 0; }
}

@media (max-width: 900px) {
  .phone { transform-origin: top center; }
}
