/* /experience on the SANDR site: the live phone in a latest-generation iPhone body.
   Phone geometry is in the phone's own pixels (screen 390 x 844) and scaled with --xs, set by /assets/experience.js. */
.xh-copy { min-width: 0; }
.xh-copy h1 { margin-bottom: 1.1rem; }
.xh-simplified { margin: 1.4rem 0 0; max-width: 34rem; padding: .95rem 1.1rem; border: 1px solid var(--hairline); border-radius: 16px; background: var(--surface); color: var(--hero-lede); font-size: .95rem; line-height: 1.55; }
.xh-simplified strong { color: var(--ink); }
.xh-copy .button-row { margin-top: 1.5rem; }
.xh-grid { display: grid; gap: clamp(1rem, 2.4vw, 1.75rem); grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1.75rem; }
.xh-grid article { min-width: 0; padding-top: 1rem; border-top: 1px solid var(--hairline); }
.xh-grid h3 { margin: .5rem 0; font-size: 1.1rem; line-height: 1.25; }
.xh-grid p { margin: 0; color: var(--hero-lede); line-height: 1.55; }
@media (max-width: 960px) { .xh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 559px) { .xh-grid { grid-template-columns: minmax(0, 1fr); } }
/* ---- toolbar above the phone ---- */
.xh-slot { --xs: .72; display: flex; justify-content: center; min-width: 0; }
.xh-phone { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.xp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: calc(424px * var(--xs)); min-width: 300px; }
.xp-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); box-shadow: inset 0 0 0 1px var(--hairline); }
.xp-seg__btn { appearance: none; border: 0; background: none; font: inherit; font-size: .88rem; font-weight: 600; color: var(--muted); padding: .45rem .95rem; min-height: 36px; border-radius: 999px; cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.xp-seg__btn:hover { color: var(--ink); }
.xp-seg__btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .14), 0 0 0 1px var(--hairline); }
.xp-max { appearance: none; display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); font: inherit; font-size: .88rem; font-weight: 600; padding: 0 .95rem 0 .8rem; min-height: 40px; border-radius: 999px; cursor: pointer; transition: background-color .2s, transform .2s; }
.xp-max:hover { background: var(--button-surface-hover); }
.xp-max:active { transform: scale(.97); }
.xp-max svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.xp-max__out, .xp-max__lab[data-when="max"] { display: none; }
.is-max .xp-max__in, .is-max .xp-max__lab[data-when="min"] { display: none; }
.is-max .xp-max__out { display: block; }
.is-max .xp-max__lab[data-when="max"] { display: inline; }
.xp-seg__btn:focus-visible, .xp-max:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---- the phone ---- */
.xp-stage { position: relative; width: calc(424px * var(--xs)); height: calc(872px * var(--xs)); transition: width .5s cubic-bezier(.2, .8, .2, 1), height .5s cubic-bezier(.2, .8, .2, 1); }
.phone { position: absolute; left: calc(3px * var(--xs)); top: 0; width: 418px; height: 872px; transform: scale(var(--xs)); transform-origin: 0 0; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
/* titanium body: brushed rail, bright edge, soft contact shadows */
.phone__body { position: absolute; inset: 0; z-index: 1; border-radius: 69px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0) 84%, rgba(20, 22, 30, .18) 100%),
    linear-gradient(180deg, #eceef2 0%, #c6c8cf 20%, #eef0f4 48%, #b8bbc3 76%, #dde0e6 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .92), inset 0 0 0 2px rgba(58, 60, 68, .22),
    inset 0 3px 4px rgba(255, 255, 255, .95), inset 0 -3px 5px rgba(20, 22, 30, .32),
    0 0 0 1px rgba(20, 22, 28, .5),
    0 80px 90px -50px rgba(14, 14, 13, .5), 0 34px 50px -26px rgba(14, 14, 13, .4); }
[data-theme="dark"] .phone__body { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), inset 0 0 0 2px rgba(58, 60, 68, .22), inset 0 3px 4px rgba(255, 255, 255, .95), inset 0 -3px 5px rgba(20, 22, 30, .32), 0 0 0 1px rgba(0, 0, 0, .7), 0 0 90px -20px rgba(255, 255, 255, .07), 0 70px 90px -40px rgba(0, 0, 0, .8); }
/* antenna splits across the rail */
.phone__ant { position: absolute; height: 1.3px; width: 5px; background: rgba(46, 48, 56, .55); }
.phone__ant--l1 { left: 0; top: 118px; } .phone__ant--l2 { left: 0; top: 752px; }
.phone__ant--r1 { right: 0; top: 118px; } .phone__ant--r2 { right: 0; top: 752px; }
/* black glass border */
.phone__glass { position: absolute; z-index: 2; inset: 5px; border-radius: 64px; background: #030304; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 0 16px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .6); }
.phone__screen { --sr: 55px; position: absolute; z-index: 3; left: 14px; top: 14px; width: 390px; height: 844px; border-radius: var(--sr); clip-path: inset(0 round var(--sr)); overflow: hidden; background: #000; }
.phone__app { display: block; width: 390px; height: 844px; border: 0; border-radius: var(--sr, 55px); clip-path: inset(0 round var(--sr, 55px)); background: #000; }
/* Dynamic Island, with the front camera lens */
.phone__island { position: absolute; z-index: 5; top: 25px; left: 50%; width: 124px; height: 37px; margin-left: -62px; border-radius: 20px; background: #000; pointer-events: none; }
.phone__island::after { content: ""; position: absolute; right: 14px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; border-radius: 50%; background: radial-gradient(circle at 34% 32%, #3a4c78 0 14%, #0f1626 42%, #04050a 72%); box-shadow: 0 0 0 1.5px #0a0a0d, inset 0 0 2px rgba(130, 160, 255, .55); }
.phone__island::before { content: ""; position: absolute; left: 20px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #1b1e28, #050608 70%); }
/* glass reflection, kept subtle so the screen stays true */
.phone__shine { position: absolute; z-index: 6; left: 14px; top: 14px; width: 390px; height: 844px; border-radius: 55px; pointer-events: none; mix-blend-mode: screen; background: linear-gradient(118deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .015) 18%, rgba(255, 255, 255, 0) 32%), radial-gradient(90% 50% at 100% 0%, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 55%); }
/* side buttons, sitting just behind the rail */
.phone__btn { position: absolute; z-index: 0; width: 5px; border-radius: 2.5px; background: linear-gradient(90deg, #8d9098 0%, #e9ebef 48%, #b3b6be 100%); box-shadow: inset 0 0 0 .6px rgba(20, 22, 30, .4), 0 1px 2px rgba(20, 22, 30, .25); }
.phone__btn--action, .phone__btn--up, .phone__btn--down { left: -3px; }
.phone__btn--power, .phone__btn--camera { right: -3px; transform: scaleX(-1); }
.phone__btn--action { top: 150px; height: 36px; } .phone__btn--up { top: 222px; height: 68px; } .phone__btn--down { top: 302px; height: 68px; }
.phone__btn--power { top: 250px; height: 104px; } .phone__btn--camera { top: 590px; height: 58px; width: 4px; }

/* ---- maximised: the phone fits the window's height, the page dims and blurs behind it ---- */
.xh-slot.is-max { position: fixed; inset: 0; z-index: 3000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; background: color-mix(in srgb, var(--bg) 42%, transparent); -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1); animation: xp-in .35s ease both; }
.xh-slot.is-max::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(8, 8, 10, .46); }
.xh-slot.is-max .xp-toolbar { width: calc(424px * var(--xs)); }
@keyframes xp-in { from { opacity: 0; } to { opacity: 1; } }
html.xp-locked { overflow: hidden; }

/* ---- small screens or short windows: no bezel, the screen fills the width ("fluid") ---- */
.xh-slot.is-fluid .xp-stage { width: 100%; height: auto; max-width: 430px; }
.xh-slot.is-fluid .xp-toolbar { width: 100%; max-width: 430px; min-width: 0; }
.xh-slot.is-fluid .phone { position: relative; left: 0; width: 100%; height: var(--xfh, 640px); transform: none; }
.xh-slot.is-fluid .phone__body, .xh-slot.is-fluid .phone__glass, .xh-slot.is-fluid .phone__island, .xh-slot.is-fluid .phone__shine, .xh-slot.is-fluid .phone__btn { display: none; }
.xh-slot.is-fluid .phone__screen { left: 0; top: 0; width: 100%; height: 100%; --sr: 26px; box-shadow: 0 0 0 1px var(--hairline), 0 1px 2px rgba(var(--shadow-rgb), .05), 0 22px 48px -28px rgba(var(--shadow-rgb), .32); }
.xh-slot.is-fluid .phone__app { width: 100%; height: 100%; }
.xh-slot.is-fluid.is-max { padding: 0; justify-content: flex-start; gap: 0; background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.xh-slot.is-fluid.is-max::before { display: none; }
.xh-slot.is-fluid.is-max .xh-phone { flex: 1 1 auto; width: 100%; min-height: 0; gap: 0; }
.xh-slot.is-fluid.is-max .xp-toolbar { max-width: none; padding: 10px 12px; }
.xh-slot.is-fluid.is-max .xp-stage { max-width: none; flex: 1; min-height: 0; }
.xh-slot.is-fluid.is-max .phone { height: 100%; }
.xh-slot.is-fluid.is-max .phone__screen { --sr: 0px; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  .xp-stage, .phone { transition: none; }
  .xh-slot.is-max { animation: none; }
}

/* fluid screen sits on fractional pixels: a black backing would show as a hairline at its edge */
.xh-slot.is-fluid .phone__screen, .xh-slot.is-fluid .phone__app { background: transparent; }
