/* ══════════════════════════════════════════════
   home.css — Homepage-only styles (index.html)
   ══════════════════════════════════════════════ */

/* ---------- placement card ---------- */
.place-card {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 18px;
  padding: 40px 36px;
  text-align: left;
  background: linear-gradient(135deg, var(--forest) 0%, var(--primary) 100%);
  color: #fff;
  border: none;
  box-shadow: var(--shadow)
}

.place-art {
  flex: 0 0 200px;
  min-width: 0
}

.place-art svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible
}

.place-copy {
  flex: 1;
  min-width: 0
}

.place-copy .btn-row {
  justify-content: flex-start
}

.think-bubble {
  animation: thinkBob 4.5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center
}

@keyframes thinkBob {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-7px)
  }
}

@media(max-width:640px) {
  .place-card {
    flex-direction: column;
    text-align: center;
    padding: 36px 24px;
    gap: 20px
  }

  .place-art {
    flex-basis: auto;
    width: 158px
  }

  .place-copy .btn-row {
    justify-content: center
  }
}

@media(prefers-reduced-motion:reduce) {
  .think-bubble {
    animation: none
  }
}

/* ---------- hero phone demo ---------- */
.hero-home .wrap.hero-split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
  max-width: 1120px;
}

.hero-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.phone {
  width: 272px;
  height: 582px;
  background: #0e1318;
  border-radius: 48px;
  padding: 12px;
  position: relative;
  box-shadow: 0 34px 70px rgba(0, 0, 0, .38), inset 0 0 0 2px #2b333c;
  animation: pfloat 7s ease-in-out infinite;
}

@keyframes pfloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #f7f5ee;
  border-radius: 37px;
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 23px;
  left: 50%;
  transform: translateX(-50%);
  width: 98px;
  height: 27px;
  background: #0e1318;
  border-radius: 15px;
  z-index: 6;
}

.p-time {
  position: absolute;
  top: 28px;
  left: 28px;
  font-size: 12px;
  font-weight: 700;
  color: #20242a;
  z-index: 6;
}

.pscreen {
  position: absolute;
  inset: 0;
  padding: 60px 14px 16px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}

.pscreen.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.p-head {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
}

.p-prompt {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  margin: 10px 0 14px;
  box-shadow: 0 2px 10px rgba(30, 40, 60, .07);
}

.p-micwrap {
  position: relative;
  width: 98px;
  height: 98px;
  margin: 8px auto 2px;
}

.p-mic {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--forest));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px rgba(18, 90, 60, .35);
  z-index: 2;
}

.p-mic svg {
  width: 38px;
  height: 38px;
}

.p-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--primary);
  opacity: 0;
  z-index: 1;
}

.pscreen.active .p-ring {
  animation: pring 2.1s ease-out infinite;
}

.pscreen.active .p-ring.r2 {
  animation-delay: 1.05s;
}

@keyframes pring {
  0% {
    transform: scale(.7);
    opacity: .75;
  }

  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.p-timer {
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}

.p-wave {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  height: 46px;
  margin: 12px 0 4px;
}

.p-wave span {
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--forest));
}

.pscreen.active .p-wave span {
  animation: pwave 1.15s ease-in-out infinite;
}

@keyframes pwave {

  0%,
  100% {
    transform: scaleY(.35);
  }

  50% {
    transform: scaleY(1);
  }
}

.p-cap {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.p-board {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px 8px;
  margin-top: 12px;
  box-shadow: 0 2px 10px rgba(30, 40, 60, .07);
}

.p-palette {
  display: flex;
  gap: 7px;
  margin-bottom: 4px;
}

.p-pal {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  opacity: .3;
}

.p-pal.on {
  opacity: 1;
  transform: scale(1.18);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .28);
}

.p-canvas {
  display: block;
  width: 100%;
  height: auto;
}

.p-draw {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.pscreen.active .p-draw {
  animation: pdraw 1s ease forwards;
}

@keyframes pdraw {
  to {
    stroke-dashoffset: 0;
  }
}

.p-quiz-opt {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.p-quiz-opt .p-check {
  width: 20px;
  height: 20px;
  opacity: 0;
  transform: scale(.4);
}

.pscreen.active .p-quiz-opt.correct {
  animation: pcorrect .45s ease 1.5s forwards;
}

.pscreen.active .p-quiz-opt.correct .p-check {
  animation: ppop .4s ease 1.85s forwards;
}

@keyframes pcorrect {
  to {
    border-color: var(--primary);
    background: #e8f5ee;
  }
}

@keyframes ppop {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.p-xp {
  align-self: center;
  margin-top: 14px;
  background: linear-gradient(135deg, var(--primary), var(--forest));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 7px 16px;
  opacity: 0;
  transform: translateY(6px);
}

.pscreen.active .p-xp {
  animation: ppop .45s ease 2.2s forwards;
}

.p-chat {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}

.p-bubble {
  max-width: 84%;
  padding: 9px 12px;
  border-radius: 15px;
  font-size: 12.5px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(10px);
}

.p-bubble.t {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  box-shadow: 0 2px 8px rgba(30, 40, 60, .06);
}

.p-bubble.s {
  background: linear-gradient(135deg, var(--primary), var(--forest));
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

.pscreen.active .p-bubble {
  animation: pmsg .45s ease forwards;
}

.pscreen.active .p-bubble.b1 {
  animation-delay: .35s;
}

.pscreen.active .p-bubble.b2 {
  animation-delay: 1s;
}

.pscreen.active .p-bubble.b3 {
  animation-delay: 1.75s;
}

.pscreen.active .p-bubble.b4 {
  animation-delay: 2.5s;
}

@keyframes pmsg {
  to {
    opacity: 1;
    transform: none;
  }
}

.p-dashnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.p-dash {
  border: 0;
  padding: 0;
  width: 20px;
  height: 22px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.p-dash::before {
  content: "";
  display: block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .45);
  transition: background .25s, width .25s;
}

.p-dash.active::before {
  width: 20px;
  background: #fff;
}


@media (max-width:920px) {
  .hero-home .wrap.hero-split {
    grid-template-columns: 1fr;
    gap: 42px;
    text-align: center;
  }

  .hero-home .hero-copy .btn-row {
    justify-content: center;
  }

  .hero-home .hero-copy p.lead {
    margin-left: auto;
    margin-right: auto;
  }

  .phone {
    width: 252px;
    height: 542px;
  }
}

@media (prefers-reduced-motion:reduce) {

  .phone,
  .p-ring,
  .pscreen.active .p-wave span {
    animation: none !important;
  }

  .pscreen {
    transition: none;
  }

  .pscreen.active .p-bubble,
  .pscreen.active .p-quiz-opt.correct .p-check,
  .pscreen.active .p-xp {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .pscreen.active .p-quiz-opt.correct {
    border-color: var(--primary);
    background: #e8f5ee;
  }

  .pscreen.active .p-draw {
    animation: none;
    stroke-dashoffset: 0;
  }
}
