/* One portrait proportion at every size. Motion lives on a separate wrapper. */
:root {
  --sunday-phone-width: 296px;
  --sunday-phone-size: min(var(--sunday-phone-width), calc(100vw - 24px));
}
@media (min-width: 901px) and (max-height: 799px) {
  :root { --sunday-phone-width: 260px; }
}
@media (min-width: 901px) and (max-height: 699px) {
  :root { --sunday-phone-width: 244px; }
}
@media (min-width: 901px) and (max-height: 639px) {
  :root { --sunday-phone-width: 216px; }
}
@media (max-width: 900px) {
  :root { --sunday-phone-width: 336px; }
}
.hero-stage {
  height: 610px;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  padding: 0;
  align-items: center;
}
.hero-stage::after {
  inset: 0 -35px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 51% 52%, #f3ddd4 0%, #ede2e754 42%, #fbfaf800 70%);
}
.hero-stage::before {
  content: '';
  position: absolute;
  width: 205px;
  height: 28px;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  inset-block-start: auto;
  background: #614b5c25;
  border-radius: 50%;
  filter: blur(18px);
  z-index: -1;
  pointer-events: none;
}
.hero-phone-float {
  position: relative;
  width: var(--sunday-phone-size);
  aspect-ratio: 71 / 149;
}
.hero-product {
  width: 100%;
  height: 100%;
  padding: calc(var(--sunday-phone-size) * 6 / 336);
  border: 1px solid #aba9aa;
  border-radius: calc(var(--sunday-phone-size) * 43 / 336);
  overflow: visible;
  background: linear-gradient(130deg, #fff, #cfccca 20%, #f6f3f0 48%, #b8b4b3 83%, #e2dfdc);
  box-shadow: inset 0 0 0 1px #fff9, 0 0 0 1px #eee8e3, 0 25px 42px -25px #64506469;
  transform: none;
  transform-origin: center;
  isolation: isolate;
}
.hero-product::before { content: none; }
.hero-product::after { content: none; }
/* Clip composited screen layers, not the hardware or its outside shadow. */
.hero-phone-screen,
.tour-stage .device-screen {
  --phone-screen-radius: 36px;
  --phone-screen-border: 3px;
  isolation: isolate;
  clip-path: inset(0 round var(--phone-screen-radius));
  -webkit-mask-image: linear-gradient(#fff, #fff);
  mask-image: linear-gradient(#fff, #fff);
}
.hero-phone-screen {
  --phone-screen-radius: calc(var(--sunday-phone-size) * 36 / 336);
  --phone-screen-border: calc(var(--sunday-phone-size) * 3 / 336);
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: var(--phone-screen-border) solid #252428;
  border-radius: var(--phone-screen-radius);
  background: var(--paper);
  container-type: inline-size;
}
.hero-phone-screen::after {
  content: '';
  position: absolute;
  bottom: 7px;
  left: 34%;
  width: 32%;
  height: 3px;
  border-radius: 3px;
  background: #302a32;
}
.phone-camera {
  position: absolute;
  z-index: 2;
  width: 27%;
  height: 6.6cqw;
  top: 3.2cqw;
  left: 36.5%;
  border-radius: 30px;
  background: #16151a;
  box-shadow: inset 0 0 0 1px #000;
}
.phone-camera::after {
  content: '';
  position: absolute;
  width: 3.2cqw;
  height: 3.2cqw;
  right: 3.4cqw;
  top: 1.7cqw;
  border: 1px solid #292938;
  border-radius: 50%;
  background: radial-gradient(circle at 65% 35%, #3b4465, #101119 65%);
}
.phone-button {
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #797678, #dfdcd9, #999597);
  box-shadow: -1px 0 0 #615d61;
}
.phone-button-action { left: -3px; top: 17%; height: 4%; }
.phone-button-volume { left: -3px; top: 25%; height: 13%; }
.phone-button-power { right: -3px; top: 29%; height: 10%; }

/* The miniature screen scales with the hardware rather than stretching. */
.hero-phone-top { flex: 0 0 auto; padding: 5.4cqw 7cqw 7.3cqw; }
.hero-phone-status { align-items: center; height: 4.5cqw; padding-inline: 1.5cqw; font-size: 3.5cqw; }
.phone-status-icons { display: block; width: 19cqw; height: 4.3cqw; }
.hero-phone-brand { margin: 8.5cqw 0 9cqw; }
.hero-phone-brand img { width: 32cqw; }
.hero-phone-brand > span { font-size: 3.8cqw; padding: 2.7cqw 4cqw; gap: 2.4cqw; }
.hero-phone-brand .icon { width: 3.8cqw; height: 3.8cqw; }
.hero-phone-top > p { font-size: 2.7cqw; letter-spacing: .4cqw; margin-bottom: 2cqw; }
.hero-phone-top h2 { font-size: 12.5cqw; letter-spacing: -.45cqw; }
.hero-week { margin-top: 7.3cqw; font-size: 2.7cqw; gap: 1.9cqw; }
.hero-week > span { width: 9.6cqw; padding: 2cqw 1.1cqw; }
.hero-week small { font-size: 3.8cqw; margin-top: 1.2cqw; }
.hero-phone-body { display: flex; flex-direction: column; min-height: 0; padding: 6cqw 6.8cqw 4cqw; }
.hero-phone-label { font-size: 2.7cqw; letter-spacing: .4cqw; }
.hero-appointment { position: relative; gap: 4.5cqw; margin: 4cqw 0 3.5cqw; min-height: 24cqw; }
.hero-appointment::after { content: ''; position: absolute; left: 13cqw; top: 22cqw; bottom: 0; width: 1px; background: #ded6de; }
.hero-appointment-time { flex: 0 0 26cqw; font-size: 13cqw; font-weight: 500; letter-spacing: -.6cqw; line-height: 1.05; text-align: center; font-variant-numeric: tabular-nums; }
.hero-appointment-time small { font-size: 3.1cqw; margin-top: 2.2cqw; letter-spacing: .1cqw; }
.hero-agenda-details { flex: 1; min-width: 0; }
.hero-agenda-details h3 { font-size: 5.2cqw; line-height: 1.25; letter-spacing: -.12cqw; font-weight: 600; }
.hero-agenda-details p { font-size: 3.3cqw; line-height: 1.4; margin-top: 2cqw; color: #827586; }
.hero-agenda-questions { display: flex; align-items: center; gap: 2cqw; margin-top: 2.5cqw; font-size: 3cqw; line-height: 1.4; color: #7d5a74; }
.hero-agenda-questions .icon { width: 3.8cqw; height: 3.8cqw; margin-left: auto; }
.hero-schedule-block { padding-top: 2cqw; }
.hero-schedule-row { display: flex; align-items: flex-start; gap: 4.5cqw; margin-top: 3cqw; }
.hero-schedule-time { flex: 0 0 26cqw; font: 500 9cqw/1.1 'Albert Sans',sans-serif; letter-spacing: -.3cqw; text-align: center; font-variant-numeric: tabular-nums; color: #4c4a5a; }
.hero-schedule-time small { display: block; margin-top: 1.5cqw; font: 3cqw/1.4 'Instrument Sans',sans-serif; letter-spacing: .1cqw; color: #837688; }
.hero-schedule-row h3 { font-size: 4.5cqw; font-weight: 500; color: #4c4a5a; }
.hero-schedule-row p { font-size: 3.1cqw; margin-top: 1.5cqw; }
.hero-schedule-tomorrow { margin-top: auto; padding-top: 3cqw; }
.hero-phone-nav { flex: 0 0 auto; padding: 5.4cqw 4.6cqw 8.1cqw; font-size: 2.3cqw; }
.hero-phone-nav > span { min-width: 13.5cqw; gap: 1.6cqw; }
.hero-phone-nav .icon { width: 5.4cqw; height: 5.4cqw; }

/* Alternating example updates: one fades away before the other arrives. */
.hero-update {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 218px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid #e9e1e4;
  border-radius: 16px;
  background: #fffefcf5;
  box-shadow: 0 14px 35px -19px #6450643d, 0 2px 7px #46394a05;
  pointer-events: none;
  opacity: 0;
  animation: care-update 12s cubic-bezier(.22, 1, .36, 1) infinite both;
}
.hero-update > img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.hero-update > span { display: grid; gap: 5px; min-width: 0; }
.hero-update strong { font-size: 12px; line-height: 1.35; font-weight: 500; letter-spacing: -.15px; }
.hero-update small { font-size: 9px; line-height: 1.5; color: #8b7788; }
.hero-update-left { left: -12px; top: 37%; --arrival-x: -10px; animation-delay: .7s; }
.hero-update-right { right: -12px; top: 69%; --arrival-x: 10px; animation-delay: 6.7s; }
@keyframes care-update {
  0% { opacity: 0; transform: translate(var(--arrival-x), 8px); }
  7%, 32% { opacity: 1; transform: translate(0, 0); }
  39%, 100% { opacity: 0; transform: translate(0, -5px); }
}

/* The live preview uses the same portrait ratio, including short desktops. */
.tour-stage .device-wrap {
  width: min(336px, calc(clamp(480px, 100svh - 214px, 705px) * 71 / 149));
  max-width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 71 / 149;
}
.tour-stage .device-edge {
  padding: 6px;
  border-radius: 43px;
  border-color: #b0acac;
  background: linear-gradient(130deg, #fff, #cfccca 20%, #f6f3f0 48%, #b8b4b3 83%, #e2dfdc);
  box-shadow: 0 0 0 1px #eee8e3, -2px 2px 0 #b0acad, 0 25px 42px -30px #64506469;
}
.tour-stage .device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: var(--phone-screen-border) solid #343035;
  border-radius: var(--phone-screen-radius);
  background: var(--paper);
  isolation: isolate;
}
.tour-stage .device-screen iframe {
  /* The iframe is laid out at 390px, so undo its scale for a matching inner arc. */
  --iframe-screen-radius: calc((var(--phone-screen-radius) - var(--phone-screen-border)) / var(--demo-scale, 1));
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  border-radius: var(--iframe-screen-radius);
  clip-path: inset(0 round var(--iframe-screen-radius));
  transform-origin: top left;
}
.tour-stage .device-screen.is-scaled iframe {
  width: var(--demo-layout-width);
  height: var(--demo-layout-height);
  transform: scale(var(--demo-scale));
}

@media (min-width: 1440px) {
  .hero-stage { height: 650px; }
}
@media (min-width: 901px) and (max-height: 790px) {
  .hero-stage { height: 520px; }
  .tour-stage .device-wrap { width: min(336px, calc(clamp(480px, 100svh - 195px, 705px) * 71 / 149)); }
}
@media (max-width: 1100px) and (min-height: 791px) {
  .hero-stage { height: 580px; }
}
@media (max-width: 900px) {
  .hero-stage { height: 540px; }
  .tour-stage .device-wrap { width: min(100%, 310px); }
}
@media (max-width: 1100px) {
  .hero-update { width: 185px; min-height: 69px; padding: 12px; gap: 9px; border-radius: 14px; }
  .hero-update > img { width: 29px; height: 29px; }
  .hero-update strong { font-size: 10.5px; }
  .hero-update small { font-size: 8px; }
  .hero-update-left { left: -5px; }
  .hero-update-right { right: -5px; }
}
@media (max-width: 650px) {
  .hero-stage { height: 550px; align-items: center; padding: 0; overflow: visible; }
  .hero-stage::after { inset: 0 -20px; }
  .hero-stage::before { width: 170px; height: 22px; bottom: 0; left: 50%; }
  .tour-stage .device-wrap { width: min(100%, 336px); }
}
.reduce-motion .hero-phone-float { transform: none !important; }
.reduce-motion .hero-update { animation: none; transform: none; }
.reduce-motion .hero-update-left { opacity: 1; }
.reduce-motion .hero-update-right { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-phone-float { transform: none !important; }
  .hero-update { animation: none; transform: none; }
  .hero-update-left { opacity: 1; }
  .hero-update-right { display: none; }
}
