/* The phone demo page: the real app inside a phone frame, for showing the phone version on a computer.
   The screen is 402 x 874 CSS pixels, the size of a current large iPhone. */

.demo {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 48px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 56px;
  align-items: start;
}

.demo-info { position: sticky; top: 110px; }
.demo-info h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); letter-spacing: -0.02em; }
.demo-info > p { margin-top: 14px; font-size: 1.12rem; max-width: 500px; }
.demo-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0; }
.demo-mobile-only { display: none; }
.demo-steps h2 { margin-bottom: 12px; }
.demo-steps ol { margin: 0 0 14px; padding-left: 20px; }
.demo-steps li + li { margin-top: 9px; }
.demo-steps strong { overflow-wrap: anywhere; }

.demo-stage { display: flex; justify-content: center; }
.phone-scaler { position: relative; width: 430px; height: 902px; }

.phone {
  position: absolute;
  top: 0;
  left: 0;
  width: 430px;
  height: 902px;
  padding: 14px;
  border-radius: 70px;
  background: linear-gradient(145deg, #1d1b24, #08080b 60%, #17151d);
  /* Black bezel inside a lavender aluminium band, like one of the iPhone 17 colours */
  box-shadow:
    0 0 0 3px #cdbff2,
    0 0 0 5px #a594d9,
    inset 0 0 0 2px #000,
    0 40px 90px rgba(76, 29, 149, 0.35),
    0 0 120px rgba(255, 63, 164, 0.18);
  transform-origin: top left;
}

.phone-button { position: absolute; width: 6px; background: linear-gradient(90deg, #b7a6e8, #cdbff2 60%, #a594d9); border-radius: 3px; }
.phone-button.action { left: -8px; top: 152px; height: 34px; }
.phone-button.vol-up { left: -8px; top: 208px; height: 64px; }
.phone-button.vol-down { left: -8px; top: 284px; height: 64px; }
.phone-button.power { right: -8px; top: 246px; height: 100px; }
.phone-button.camera { right: -8px; top: 520px; height: 62px; } /* Camera Control */

.phone-screen {
  position: relative;
  width: 402px;
  height: 874px;
  border-radius: 56px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.phone-status {
  position: relative;
  flex: none;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 30px 0 50px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.phone-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  height: 36px;
  border-radius: 20px;
  background: #000;
}

.phone-icons { display: flex; align-items: center; gap: 6px; }

.phone-screen iframe { flex: 1; width: 100%; border: 0; display: block; background: var(--bg); }

.phone-home { flex: none; height: 22px; display: flex; align-items: center; justify-content: center; background: var(--surface); }
.phone-home span { width: 136px; height: 5px; border-radius: 3px; background: var(--text); opacity: 0.85; }

/* The phone-only window (desktop "Onepost (Phone)" icon): just the phone, centred. */
body.phone-only { min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.phone-only-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px; }
.phone-caption { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--muted); font-size: 0.85rem; font-weight: 600; }

@media (max-width: 960px) {
  .demo { grid-template-columns: 1fr; gap: 32px; }
  .demo-info { position: static; }
}

/* On an actual phone, skip the fake phone and point straight at the app. */
@media (max-width: 520px) {
  .demo-stage, .demo-desktop-only { display: none; }
  .demo-mobile-only { display: inline-flex; }
}
