/* custom-software.css: the Custom software page's own placing and sizing. Components and tokens come from design\.
   Scenes keep their words at full size; glass stays off faces. Both tablets carry the app on their own screens
   (corners recorded by a media agent, laid by core.js), driven by the scene beside them. */

/* ---------- 1. the header: the inspector at the creek (mirrored: the water at the left, his face right of center),
   the words and the form at the left, his day's sites in glass at the right ---------- */
.swhead { position: relative; display: grid; }
.swhead__media { position: relative; height: 560px; overflow: hidden; background: var(--c-night-3); }
/* under 1000 px the creek itself (the photo as shot, at its water side): the day's card stands over the water */
.swhead__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 100% 40%; }
/* his tablet's own screen: the card's day, without words (site-pins.js sets --sp-on, --sp-p1 to 5, --sp-mx, --sp-my) */
.swhead__fig { position: absolute; inset: 0; margin: 0; }
.swhead__fig > img { width: calc(100% + 2px); height: calc(100% + 2px); }
/* his left thumb, over the lower part of the glass's left edge (in the photo as shot), stays in front of the app */
.sp-screen { background: #E8EEE6; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 95%, 4% 93%, 5.2% 86%, 5.2% 72%, 4% 66%, 0 64%); }
.sp-app { position: absolute; inset: 0; display: grid; grid-template-rows: 48px minmax(0, 1fr); background: #E8EEE6; }
.sp-app__bar { display: flex; align-items: center; gap: 16px; padding: 0 18px; background: var(--c-night-3); }
.sp-app__sig { display: flex; align-items: flex-end; gap: 3px; flex: none; height: 20px; }
.sp-app__sig b { width: 5px; border-radius: 2px; background: color-mix(in srgb, #3CC46F calc(var(--sp-on, 1) * 100%), rgba(255, 255, 255, 0.3)); }
.sp-app__sig b:nth-child(1) { height: 8px; }
.sp-app__sig b:nth-child(2) { height: 14px; }
.sp-app__sig b:nth-child(3) { height: 20px; }
.sp-app__prog { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.sp-app__prog b { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--c-brand) calc(var(--p) * 100%), rgba(255, 255, 255, 0.22) 0); }
.sp-app__map { position: relative; overflow: hidden; }
.sp-app__map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sp-app__pin { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--c-night-3); }
.sp-app__pin .x { position: absolute; left: -1px; top: -1px; width: 32px; height: 32px; border-radius: 8px; opacity: min(1, calc(var(--p) * 2)); transform: scale(calc(0.5 + 0.5 * var(--p))); }
.sp-app__me { position: absolute; left: var(--sp-mx, 84%); top: var(--sp-my, 24%); width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(47, 125, 246, 0.2); box-shadow: inset 0 0 0 3px rgba(47, 125, 246, 0.9); }
.swhead__wash { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(13, 13, 15, 0) 70%, var(--c-night) 100%); }
.swhead__scene { position: absolute; inset: 0; z-index: 2; }
.swhead__media .stop { top: 14px; right: 14px; bottom: auto; }
.swhead__in { display: grid; gap: 22px; padding-block: 8px 40px; }
.swhead__copy { display: grid; gap: 14px; }
.swhead .phead__line { margin-top: 0; }
@media (min-width: 1000px) {
  .swhead { min-height: calc(100svh - var(--header-h)); }
  .swhead__media { position: absolute; inset: 0; height: auto; z-index: 0; }
  /* mirrored: his face between the words and the card. The photo and its screen turn together; the app turns back,
     so it reads the right way */
  .swhead__fig { transform: scaleX(-1); }
  .swhead__photo { object-position: 20% 40%; }
  .sp-app { transform: scaleX(-1); }
  .swhead__wash { background: linear-gradient(90deg, rgba(13, 13, 15, 0.92) 0%, rgba(13, 13, 15, 0.8) 30%, rgba(13, 13, 15, 0.12) 50%, rgba(13, 13, 15, 0) 100%); }
  .swhead__media .stop { top: auto; bottom: 18px; right: 40px; }
  .swhead__in { position: relative; z-index: 3; grid-template-columns: minmax(0, 470px); justify-content: start; align-content: center; width: 100%; padding-block: 28px; }
  .swhead .phead__title { font-size: min(clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem), 6.6vh); }
}

/* ---------- 2. paper or app ---------- */
.papp .head { margin-bottom: 32px; }
.papp__pair { position: relative; display: grid; gap: 20px; }
@media (min-width: 900px) { .papp__pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; } }
.papp__side { position: relative; overflow: hidden; height: 500px; margin: 0; border-radius: var(--radius-xl); background: var(--c-night-3); box-shadow: var(--shadow-l); }
@media (min-width: 900px) { .papp__side { height: 560px; } }
.papp__photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.papp__side--paper .papp__photo { object-position: 67% 50%; filter: grayscale(0.75) brightness(0.94) contrast(0.96); }
/* the App side: its tablet's whole screen inside the frame at every width */
.papp__side--app .papp__photo { object-position: 60% 50%; }
@media (min-width: 900px) { .papp__side--paper .papp__photo { object-position: 60% 50%; } }
.papp__scene { position: absolute; inset: 0; }
.papp__tag { position: absolute; z-index: 2; left: 16px; top: 16px; padding: 7px 14px; border-radius: 99px; background: rgba(13, 13, 15, 0.72); color: #fff; font: 700 var(--fs-small)/1 var(--font-ui); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.papp__tag--on { background: var(--grad-brand); color: var(--c-on-brand); box-shadow: none; }
@media (min-width: 900px) { .papp__side--app .papp__scene .pa-col { left: auto; right: 18px; } }
/* the App side's tablet: the form itself (paper-app.js sets --pa-saved, --pa-s1 to 4, --pa-sent); the four photos are
   crops of the creek's own photo */
/* the glove's thumb, over the glass's lower middle, stays in front of the form */
.pa-screen { background: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%, 56.5% 100%, 57% 86%, 55.5% 77%, 52% 73.5%, 48% 73%, 44% 75%, 38% 81%, 28% 91%, 15% 100%, 0 100%); }
.pa-app { position: absolute; inset: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 16px; padding: 20px 22px; background: #fff; color: var(--c-ink); font-family: var(--font-ui); }
.pa-app__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
.pa-app__top b { font: 800 30px/1.1 var(--font-display); letter-spacing: -0.01em; }
.pa-app__chip { display: grid; opacity: var(--pa-saved, 1); transform: scale(calc(0.8 + 0.2 * var(--pa-saved, 1))); transform-origin: 100% 50%; }
.pa-app__chip > span { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 16px; border-radius: 99px; font: 700 22px/1.1 var(--font-ui); }
.pa-app__saved { background: #E6F4EA; color: #17603A; opacity: calc(1 - var(--pa-sent, 1)); }
.pa-app__saved i { width: 10px; height: 10px; border-radius: 50%; background: #2BA35A; }
.pa-app__sent { background: #2BA35A; color: #fff; opacity: var(--pa-sent, 1); }
.pa-app__sent i { width: 7px; height: 13px; margin: -3px 2px 0 0; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.pa-app__shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pa-app__shot { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 12px; background: var(--c-paper); box-shadow: inset 0 0 0 2px var(--c-line); }
.pa-app__shot::before { content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 22px; margin: -9px 0 0 -15px; border-radius: 5px; box-shadow: inset 0 0 0 3px rgba(26, 26, 30, 0.28); }
.pa-app__shot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -3px 0 0 -5px; border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(26, 26, 30, 0.28); }
.pa-app__shot i { position: absolute; z-index: 1; inset: 0; background: url('https://xappdesign-media.pages.dev/assets/img/sw-creek-640.webp') 100% 62% / 420% auto no-repeat; opacity: min(1, calc(var(--s) * 2)); transform: scale(calc(1.3 - 0.3 * var(--s))); }
.pa-app__shot:nth-child(2) i { background-position: 86% 96%; }
.pa-app__shot:nth-child(3) i { background-position: 100% 8%; }
.pa-app__shot:nth-child(4) i { background-position: 72% 82%; }
.pa-app__send { display: grid; align-self: end; height: 58px; margin: 0; border-radius: 14px; overflow: hidden; }
.pa-app__send span { grid-area: 1 / 1; display: grid; place-items: center; }
.pa-app__go { background: var(--grad-brand); }
.pa-app__go i { width: 30px; height: 26px; background: var(--c-on-brand); clip-path: polygon(0 42%, 100% 0, 64% 100%, 46% 62%); }
.pa-app__done { background: #2BA35A; opacity: var(--pa-sent, 1); }
.pa-app__done i { width: 11px; height: 21px; margin-top: -5px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg); }
.papp__pair .stop { top: 14px; right: 14px; bottom: auto; }

/* ---------- 3. the build, the signature: the steps and one stage ---------- */
.swbuild { --ground-x: 90%; --ground-y: 0%; }
.swbuild__in { display: grid; gap: 32px; align-items: center; }
@media (min-width: 1000px) { .swbuild__in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; } }
.swbuild__side { display: grid; gap: 28px; }
.swbuild__head { margin: 0; }
.ab-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ab-step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-l); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); transition: background var(--dur-fast), box-shadow var(--dur-fast); }
.ab-step > span:last-child { display: grid; gap: 4px; }
.ab-step b { font: 700 1.0625rem/1.25 var(--font-ui); }
.ab-step small { font-size: var(--fs-small); line-height: 1.45; color: var(--c-on-night-soft); }
.ab-num { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; background: rgba(255, 255, 255, 0.08); font: 800 0.9375rem/1 var(--font-ui); }
.ab-step.on { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 2px var(--c-accent); }
.ab-step.on .ab-num, .ab-step.done .ab-num { background: var(--grad-x); color: var(--c-on-brand); }
.swbuild__stage { position: relative; padding-top: 48px; }
.swbuild__scene { position: relative; }
.swbuild__stage .stop { top: 0; right: 0; bottom: auto; }

/* ---------- 4. databases: the office monitor ---------- */
.swdb__in { display: grid; gap: 36px; align-items: center; }
@media (min-width: 1000px) { .swdb__in { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; } }
.swdb__copy { display: grid; gap: 20px; }
.swdb__copy .head__line { margin: 0; }
.swdb__frame { position: relative; overflow: hidden; border-radius: var(--radius-xl); background: var(--c-night-3); box-shadow: var(--shadow-l); }
.swdb__box { position: relative; width: 100%; aspect-ratio: 3 / 2; }
.swdb__photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.swdb__scene { position: absolute; inset: 0; }
.swdb__frame .stop { top: 14px; right: 14px; bottom: auto; }
/* on a phone the box is wider than the screen, held on the monitor and the desk */
@media (max-width: 759px) {
  .swdb__frame { margin-inline: calc(var(--gutter) * -1); border-radius: 0; }
  .swdb__box { width: 640px; left: 50%; margin-left: calc(-50vw - 32px); }
  .swdb__frame .stop { right: 14px; }
}

/* ---------- 5. the record: type set as the picture ---------- */
.swrec { --ground-x: 50%; --ground-y: 0%; }
.swrec__stage { position: relative; max-width: 1080px; margin: 0 auto; padding-top: 48px; }
.swrec__stage .stop { top: 0; right: 0; bottom: auto; }
.rc { display: grid; gap: 28px 48px; align-items: center; overflow: visible; }
@media (min-width: 900px) { .rc { grid-template-columns: minmax(0, 1fr) auto; } }
.rc-title { margin: 0; display: grid; gap: 10px; color: #fff; }
.rc-n { display: block; padding: 0.06em 0 0.04em; font: 800 clamp(6rem, 3rem + 10vw, 12rem)/0.9 var(--font-display); font-stretch: 105%; letter-spacing: -0.04em; background: var(--grad-x); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rc-l { display: block; max-width: 30rem; font: 800 clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem)/1.15 var(--font-display); }
.rc-side { display: grid; gap: 16px; justify-items: center; }
.rc-badge { width: 200px; height: 200px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5)); }
.rc-codes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rc-code { padding: 8px 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); font: 700 var(--fs-small)/1 var(--font-ui); letter-spacing: 0.02em; }
.rc-names { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0; padding-top: 24px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.rc-name { font: 800 clamp(1.375rem, 1rem + 1.2vw, 2rem)/1.1 var(--font-display); color: var(--c-on-night-soft); }
.swrec__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; max-width: 1080px; margin: 28px auto 0; }
.swrec__foot .head__line { margin: 0; }

/* ---------- 6. the close: the bridge site as a band, the words and the form under it ---------- */
.swclose { padding-top: 0; }
.swclose::before { display: none; }
.swclose .close__media { position: relative; inset: auto; z-index: 0; height: clamp(340px, 38vw, 560px); margin-bottom: 36px; }
.swclose .close__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 13, 15, 0) 70%, var(--c-night) 100%); }
.swclose__photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 75%; }
.swclose__card { position: absolute; z-index: 1; right: max(var(--gutter), 6%); bottom: 48px; }
.swclose__in { display: grid; gap: 30px; align-items: center; }
@media (min-width: 1000px) { .swclose__in { grid-template-columns: minmax(0, 520px) minmax(0, 440px); justify-content: space-between; gap: 56px; } }
.swclose__words { display: grid; gap: 16px; }
@media (max-width: 759px) { .swclose__photo { object-position: 40% 75%; } .swclose__card { right: 16px; bottom: 30px; } }
