/* 参考：refs/cartesia、refs/upload-zone-x，加上现站 santacam.org（evergreen + red CTA + Bree/Nunito）。
   Draft C "Doorbell notification": a portrait 9:16 phone screen. A doorbell alert lands on the
   lock screen, then the screen opens into the clip full-frame, like tapping a doorbell push.
   Sized from the viewport height so H1 + clip + primary button share one 390×844 screen. */

.hero {
  padding-top: 12px;
}
.phone {
  margin: 16px auto 0;
  width: min(66vw, 260px, calc((100vh - 392px) * 9 / 16));
  width: min(66vw, 260px, calc((100svh - 392px) * 9 / 16));
  min-width: 180px;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-panel);
  border: 1px solid var(--line);
}
.phone::after {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 34%);
}

/* Lock screen layer (fades away when the alert opens) */
.lockscreen {
  position: absolute;
  z-index: 2;
  inset: 0;
  padding-top: 24px;
  text-align: center;
  background: rgba(5, 42, 33, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.35s ease;
}
.lockscreen p {
  margin: 0;
}
.lockscreen .date {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
}
.lockscreen .clock {
  font: 300 56px/1.1 var(--body);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.phone.open .lockscreen {
  opacity: 0;
  pointer-events: none;
}

/* The push banner */
.push {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  z-index: 5;
  left: 8px;
  right: 8px;
  top: 124px;
  padding: 8px 12px;
  border-radius: var(--r-btn);
  background: rgba(240, 246, 242, 0.16);
  border: 1px solid rgba(240, 246, 242, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  grid-template-areas:
    'icon app when'
    'title title title'
    'body body body';
  column-gap: 8px;
  row-gap: 4px;
  align-items: center;
  color: var(--text);
  transition:
    top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.3s;
  animation: land 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes land {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
}
.push:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.push .icon {
  grid-area: icon;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
}
.push .icon svg {
  width: 18px;
  height: 18px;
}
.push .app {
  grid-area: app;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-2);
}
.push .when {
  grid-area: when;
  font-size: 16px;
  color: var(--text-2);
}
.push .title {
  grid-area: title;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}
.push .body {
  grid-area: body;
  font-size: 16px;
  line-height: 1.4;
}
/* Opened: banner shrinks to a header strip on top of the live clip */
.phone.open .push {
  top: 8px;
  background: rgba(3, 20, 15, 0.62);
  grid-template-areas: 'icon title title';
}
.phone.open .push .at {
  display: block;
  font-weight: 600;
  color: var(--text-2);
}
.phone.open .push .sep,
.phone.open .push .app,
.phone.open .push .when,
.phone.open .push .body {
  display: none;
}

.phone .osd.ai {
  top: 84px;
  right: 12px;
  bottom: auto;
  opacity: 0;
  transition: opacity 0.3s;
}
.phone.open .osd.ai {
  opacity: 1;
}
.phone .caption {
  left: 8px;
  right: 8px;
  bottom: 64px;
  padding: 4px 8px;
  font-size: 17px;
}
.phone:not(.open) .caption {
  visibility: hidden;
}
.phone .sound {
  top: auto;
  bottom: 12px;
  right: 50%;
  transform: translateX(50%);
  white-space: nowrap;
}
.phone.blocked .sound {
  bottom: auto;
  top: 60%;
  transform: translate(50%, -50%);
  min-height: 48px;
  padding: 8px 20px;
  background: var(--accent);
  border-color: transparent;
}
.actions .ctas {
  margin-top: 16px;
}

@media (min-width: 900px) {
  .hero .phone {
    margin: 0 auto;
    width: min(360px, calc((100vh - 160px) * 9 / 16));
  }
  .push {
    top: 160px;
  }
}
