/* ============================================================
   Safeguard Senior · App phone mockups (recreated from app spec)
   Drop-in slots for real screenshots when available.
   ============================================================ */

.phone {
  --pw: 300px;
  width: var(--pw);
  aspect-ratio: 300 / 620;
  background: linear-gradient(170deg, #18293e 0%, #0d1828 45%, #091420 100%);
  border-radius: 42px;
  padding: 12px;
  position: relative;
  flex-shrink: 0;
  box-shadow:
    /* Frame highlight ring — catches the light */
    inset 0 0 0 1.5px rgba(255,255,255,0.14),
    inset 1px 1px 0 rgba(255,255,255,0.09),
    inset -1px -1px 0 rgba(0,0,0,0.4),
    /* Outer dark edge seam */
    0 0 0 1px rgba(0,0,0,0.75),
    /* Physical thickness — staggered offset shadows */
    3px 5px 0 rgba(0,0,0,0.38),
    5px 9px 0 rgba(0,0,0,0.22),
    7px 13px 0 rgba(0,0,0,0.12),
    /* Float / ambient shadow */
    0 40px 80px -16px rgba(0,0,0,0.9),
    0 16px 40px -8px rgba(0,0,0,0.55);
}

/* Volume buttons — left rail */
.phone::before {
  content: "";
  position: absolute;
  left: -8px; top: 98px;
  width: 8px; height: 44px;
  background: linear-gradient(to left, #0d1828 0%, #1c3050 45%, #0d1828 100%);
  border-radius: 6px 0 0 6px;
  box-shadow:
    -2px 2px 5px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.14),
    /* Second volume button offset downward */
    0 62px 0 #0d1828,
    -2px 64px 5px rgba(0,0,0,0.55);
}

/* Power button — right rail */
.phone::after {
  content: "";
  position: absolute;
  right: -8px; top: 128px;
  width: 8px; height: 66px;
  background: linear-gradient(to right, #0d1828 0%, #1c3050 45%, #0d1828 100%);
  border-radius: 0 6px 6px 0;
  box-shadow:
    2px 2px 5px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.14);
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--white);
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone__notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 26px;
  background: #0d1828;
  border-radius: 0 0 16px 16px;
  z-index: 30;
}

/* status bar */
.app-status {
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 18px 4px;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 12px;
  color: inherit;
}
.app-status .dots { display: flex; gap: 3px; align-items: center; }
.app-status .dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; display: block; opacity: .85; font-style: normal; }

/* generic app screen */
.app-screen { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; font-family: var(--ui); }

/* masthead (navy) */
.app-masthead { background: var(--navy); color: #fff; padding: 4px 16px 14px; }
.app-masthead .app-status { color: #fff; }
.app-masthead .mh-row { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.app-masthead .mh-brand { font-family: var(--display); font-weight: 800; font-size: 21px; }
.app-masthead .mh-brand .w { color: var(--amber); }
.app-masthead .mh-date { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-top: 2px; }
.app-search {
  margin-top: 12px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
}
.app-search .mag { width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.app-search .mag::after { content: ""; position: absolute; right: -4px; bottom: -3px; width: 5px; height: 1.5px; background: currentColor; transform: rotate(45deg); }

/* category pills */
.app-cats { display: flex; gap: 7px; padding: 12px 16px 4px; overflow: hidden; }
.app-cats .c {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em;
  padding: 6px 12px; border-radius: 7px;
  border: 1px solid var(--divider); color: var(--ink-2);
  white-space: nowrap;
}
.app-cats .c.on { background: var(--amber); border-color: var(--amber); color: #fff; }

/* story rows */
.app-feed { padding: 4px 16px 16px; overflow: hidden; }
.story {
  display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}
.story:last-child { border-bottom: 0; }
.story__thumb { width: 64px; height: 64px; border-radius: 4px; flex-shrink: 0; position: relative; overflow: hidden; }
.story__thumb span {
  position: absolute; inset: auto 0 0 0; padding: 3px 5px;
  font-size: 7px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,0.35);
}
.t-phone { background: var(--navy); }
.t-email { background: #1E3A8A; }
.t-ai { background: #7C2D12; }
.t-prev { background: #14532D; }
.t-online { background: #4A1D96; }
.story__body { flex: 1; min-width: 0; }
.story__kick { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.story__kick.k-ai { color: var(--red); }
.story__kick.k-prev { color: var(--green); }
.story__kick.k-news { color: var(--amber); }
.story__title { font-family: var(--serif); font-weight: 600; font-size: 13px; line-height: 1.3; color: var(--ink); }
.story__meta { font-size: 9px; color: var(--muted); margin-top: 6px; }
.story--lead .story__thumb { width: 100%; height: 110px; margin-bottom: 10px; }
.story--lead { flex-direction: column; gap: 0; }
.story--lead .story__title { font-size: 16px; }
.story--lead .story__kick { font-size: 10px; }

/* bottom nav */
.app-tabbar {
  height: 56px; flex-shrink: 0;
  border-top: 1px solid var(--divider);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 6px 4px;
}
.app-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; color: var(--nav-inactive, #C0B8B0); }
.app-tab .ic { width: 20px; height: 20px; }
.app-tab .lb { font-size: 9px; font-weight: 600; }
.app-tab.on { color: var(--navy); }
.app-tab.on .amberdot { position: absolute; top: -3px; right: 50%; transform: translateX(8px); width: 4px; height: 4px; border-radius: 50%; background: var(--amber); }

/* simple icon shapes */
.ic-svg { width: 20px; height: 20px; display: block; }

/* article screen */
.app-article { background: #fff; overflow: hidden; flex: 1; display: flex; flex-direction: column; }
.app-article .art-hero { height: 150px; position: relative; background: var(--navy); }
.app-article .art-back { position: absolute; top: 12px; left: 12px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.16); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; }
.app-article .art-body { padding: 16px; overflow: hidden; }
.app-article .art-kick { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); }
.app-article .art-title { font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1.15; margin: 8px 0 10px; color: var(--ink); }
.app-article .art-byline { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-block: 1px solid var(--divider); margin-bottom: 12px; }
.app-article .art-byline .av { width: 26px; height: 26px; border-radius: 50%; background: var(--amber-tint); border: 1px solid var(--divider); }
.app-article .art-byline .who { font-size: 10px; }
.app-article .art-byline .who b { display: block; color: var(--ink); font-size: 11px; }
.app-article .art-byline .who span { color: var(--muted); }
.app-article .art-p { font-family: var(--serif); font-size: 12px; line-height: 1.7; color: var(--ink); margin-bottom: 10px; }
.app-article .art-callout { background: var(--offwhite); border-left: 3px solid var(--amber); padding: 11px 13px; border-radius: 0 6px 6px 0; font-family: var(--serif); font-size: 11.5px; line-height: 1.55; color: var(--ink); }
.app-article .art-callout b { display:block; font-family: var(--ui); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); margin-bottom: 4px; }

/* simulate screen */
.app-sim { flex: 1; background: var(--offwhite); display: flex; flex-direction: column; overflow: hidden; }
.app-sim .sim-head { background: var(--navy); color: #fff; padding: 14px 16px; }
.app-sim .sim-head .sk { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); font-weight: 700; }
.app-sim .sim-head .st { font-family: var(--display); font-weight: 800; font-size: 18px; margin-top: 4px; }
.sim-chat { padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; flex: 1; }
.sim-bubble { max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: 12px; line-height: 1.45; }
.sim-bubble.them { background: #fff; border: 1px solid var(--divider); border-bottom-left-radius: 4px; color: var(--ink); align-self: flex-start; box-shadow: var(--shadow-card); }
.sim-bubble.label { align-self: flex-start; background: transparent; padding: 0; font-family: var(--ui); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sim-flag { align-self: center; background: var(--amber-tint); border: 1px solid var(--amber-soft); color: #b35a22; border-radius: 8px; padding: 9px 12px; font-size: 10.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.sim-actions { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.sim-choice { background: #fff; border: 1.5px solid var(--divider); border-radius: 10px; padding: 12px 14px; font-size: 12px; font-weight: 600; color: var(--ink); text-align: left; }
.sim-choice.danger { border-color: var(--amber); }

/* alerts screen */
.app-alerts { flex: 1; background: var(--offwhite); overflow: hidden; display: flex; flex-direction: column; }
.app-alerts .al-head { background: var(--navy); color: #fff; padding: 14px 16px; }
.app-alerts .al-head .at { font-family: var(--display); font-weight: 800; font-size: 20px; }
.app-alerts .al-list { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.alert-card { background: #fff; border-radius: 8px; box-shadow: var(--shadow-card); padding: 14px; border-left: 3px solid var(--red); }
.alert-card.breaking { border-left-color: var(--red); }
.alert-card .ak { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); display: flex; align-items: center; gap: 6px; }
.alert-card .ak .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.alert-card.green { border-left-color: var(--green); }
.alert-card.green .ak { color: var(--green); }
.alert-card.green .ak .pulse { background: var(--green); }
.alert-card .atitle { font-family: var(--serif); font-weight: 600; font-size: 13px; line-height: 1.3; margin: 7px 0 5px; color: var(--ink); }
.alert-card .ameta { font-size: 9.5px; color: var(--muted); }

/* slot for real screenshot */
.phone--slot .phone__screen { background: var(--offwhite); }

/* ---------- 360° flip phone (homepage app showcase) ---------- */
.phone-flip { perspective: 1600px; }
.phone-flip[data-phone-flip] { cursor: pointer; }
.phone-flip__inner { position: relative; transform-style: preserve-3d; }
.phone-flip__inner .phone {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(9px);
}
.phone-flip__back {
  position: absolute; inset: 0;
  transform: rotateY(180deg) translateZ(9px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background:
    radial-gradient(circle at 70% 15%, rgba(232,121,58,0.12), transparent 45%),
    linear-gradient(160deg, #1c3050 0%, #0d1828 60%, #091420 100%);
  border-radius: 42px;
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.12),
    inset 1px 1px 0 rgba(255,255,255,0.07),
    inset -1px -1px 0 rgba(0,0,0,0.35),
    0 0 0 1px rgba(0,0,0,0.7),
    0 40px 80px -16px rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
}

/* 3D side edge geometry — visible when phone is edge-on during spin */
.phone-flip__side {
  position: absolute;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
}
.phone-flip__side--right {
  left: 100%;
  top: 0;
  width: 18px;
  height: 100%;
  background: linear-gradient(to right,
    #1c3050 0%,
    #152540 30%,
    #0d1f36 60%,
    #091420 100%);
  border-radius: 0 14px 14px 0;
  transform-origin: left center;
  transform: rotateY(-90deg);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.06);
}
.phone-flip__side--right::after {
  content: "";
  position: absolute;
  right: 1px; top: 33%;
  width: 4px; height: 11%;
  background: linear-gradient(to right, #091420, #1c3050 50%, #091420);
  border-radius: 0 3px 3px 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.phone-flip__side--left {
  right: 100%;
  top: 0;
  width: 18px;
  height: 100%;
  background: linear-gradient(to left,
    #1c3050 0%,
    #152540 30%,
    #0d1f36 60%,
    #091420 100%);
  border-radius: 14px 0 0 14px;
  transform-origin: right center;
  transform: rotateY(90deg);
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.06);
}
.phone-flip__side--left::before {
  content: "";
  position: absolute;
  left: 1px; top: 24%;
  width: 4px; height: 8%;
  background: linear-gradient(to left, #091420, #1c3050 50%, #091420);
  border-radius: 3px 0 0 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.phone-flip__side--left::after {
  content: "";
  position: absolute;
  left: 1px; top: 35%;
  width: 4px; height: 8%;
  background: linear-gradient(to left, #091420, #1c3050 50%, #091420);
  border-radius: 3px 0 0 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.phone-flip__side--top {
  top: 0;
  left: 0; right: 0;
  width: 100%;
  height: 18px;
  background: linear-gradient(to top,
    #1c3050 0%,
    #152540 40%,
    #0d1f36 70%,
    #091420 100%);
  border-radius: 14px 14px 0 0;
  transform-origin: center top;
  transform: rotateX(90deg);
}
.phone-flip__side--bottom {
  bottom: 0;
  left: 0; right: 0;
  width: 100%;
  height: 18px;
  background: linear-gradient(to bottom,
    #1c3050 0%,
    #152540 40%,
    #0d1f36 70%,
    #091420 100%);
  border-radius: 0 0 14px 14px;
  transform-origin: center bottom;
  transform: rotateX(-90deg);
}
.phone-flip__back::before { /* camera island */
  content: "";
  position: absolute; top: 18px; left: 18px;
  width: 78px; height: 78px; border-radius: 22px;
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.09);
}
.phone-flip__back::after { /* lenses */
  content: "";
  position: absolute; top: 31px; left: 31px;
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a4f6e, #0a1320 72%);
  box-shadow:
    0 0 0 2.5px rgba(255,255,255,0.12),
    30px 30px 0 0 #0a1320,
    30px 30px 0 2.5px rgba(255,255,255,0.12);
}
.phone-flip__back .wm-mark { width: 66px; height: 66px; opacity: 0.95; }
.phone-flip [data-flip-screen][hidden] { display: none !important; }

@keyframes phone-spin360 {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}
.phone-flip__inner.is-spinning {
  animation: phone-spin360 1.7s cubic-bezier(0.55, 0.06, 0.18, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .phone-flip__inner.is-spinning { animation: none; }
}
