/* RATCHeT website · "The app" (iteration 15.6). Layered ON TOP of the iteration-15 site, which stays the floor:
   the entrance, the music, the logo paint-in and the set are unchanged. This section explains what the app is,
   who it's for and how it connects, after the immersion. Same tokens (styles.css), no new design system. */

.xapp { --x-gut: clamp(20px, 5vw, 56px); --x-top: 84px; position: relative; padding: 110px var(--x-gut) 40px; }
.xapp__head { max-width: 1100px; margin: 0 auto; }
.xapp__lede { margin: 18px 0 0; max-width: 46ch; font-size: clamp(18px, 2.4vw, 22px); line-height: 1.45; color: var(--cream); }
.xapp__lede b { color: var(--spark); font-weight: 800; }

/* who it's for: the culture's own contradictions, set as pairs */
.xfor { max-width: 1100px; margin: 60px auto 0; display: grid; gap: 0; }
.xfor__label { margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--spark); }
.xfor__row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 18px 0; border-top: 1px solid var(--line); }
.xfor__row:last-child { border-bottom: 1px solid var(--line); }
.xfor__row b { font-weight: 900; font-style: italic; font-size: clamp(22px, 4.6vw, 38px); line-height: 1.05; }
.xfor__row span { font-weight: 900; font-style: italic; font-size: clamp(22px, 4.6vw, 38px); line-height: 1.05; color: var(--dating); }
@media (min-width: 900px) { .xfor__row { grid-template-columns: 1fr 1fr; gap: 30px; align-items: baseline; } }

/* the stage card: words, then the face */
.stagecard, .jcard { position: relative; margin: 0; border-radius: 26px; overflow: hidden; aspect-ratio: 3/4.1; background: #0a0403; box-shadow: 0 0 0 2px var(--ink), 0 30px 80px rgba(0,0,0,.7); isolation: isolate; }
.jcard__face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; transition: opacity 1s var(--ease-out), transform 1.6s var(--ease-out), filter 1s var(--ease-out); }
.stagecard__light { position: absolute; left: -15%; right: -15%; top: -30%; height: 80%; background: radial-gradient(ellipse at 50% 0%, rgba(255,233,4,.32), transparent 65%); pointer-events: none; z-index: 1; }
.jcard::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(1,0,0,.95) 0%, rgba(1,0,0,.35) 45%, transparent 70%); transition: background .9s var(--ease-out); pointer-events: none; }
.jcard__words { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; gap: 10px; padding: 22px; transition: transform .8s var(--ease-out), opacity .4s var(--ease-out); }
.stagecard__q { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--cream-dim); }
.stagecard__a { font-weight: 800; font-style: italic; font-size: 21px; line-height: 1.2; text-wrap: balance; transform-origin: left bottom; transition: transform .6s var(--ease-out); }
.stagecard__name { justify-self: start; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 22px; line-height: 1; padding: 7px 12px 5px; background: var(--dating); transform: skewX(-8deg); box-shadow: 4px 4px 0 var(--ink); transition: opacity .5s .4s, transform .6s .4s var(--ease-out); }
.aitag { position: absolute; z-index: 3; top: 14px; left: 14px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: rgba(1,0,0,.72); color: var(--spark); padding: 5px 8px; border-radius: 6px; }
.aitag--inline { position: static; display: inline-block; vertical-align: 2px; margin-left: 6px; }
.jstage[data-step="1"] .jcard__face { opacity: 0; transform: scale(1.14); filter: brightness(.35) blur(8px); }
.jstage[data-step="1"] .jcard::after { background: radial-gradient(ellipse at 50% 38%, rgba(40,18,10,.2), rgba(1,0,0,.95) 78%); }
.jstage[data-step="1"] .jcard__words { transform: translateY(-34%); }
.jstage[data-step="1"] .stagecard__a { transform: scale(1.18); }
.jstage[data-step="1"] .stagecard__name { opacity: 0; transform: skewX(-8deg) translateY(14px); }

/* how it connects: one link, start to finish (the stage follows the story) */
.xhow { max-width: 1100px; margin: 110px auto 0; }
.xhow__title { margin: 0; font-weight: 900; font-style: italic; font-size: clamp(38px, 9vw, 76px); line-height: .98; letter-spacing: -.02em; }
.xhow__sub { margin: 10px 0 24px; color: var(--cream-dim); font-size: 17px; }
.journey { position: relative; }
.jstage { position: sticky; top: calc(var(--x-top) + 4px); z-index: 2; display: grid; justify-items: center; gap: 12px; padding: 8px 0 14px; background: linear-gradient(180deg, var(--canvas) 85%, transparent); }
.jcard { height: min(50svh, 470px); width: auto; }
.jcard > .jmove, .jcard > .jchat, .jcard > .jticket, .jcard > .jstamp { position: absolute; z-index: 4; opacity: 0; pointer-events: none; transition: opacity .45s var(--ease-out), transform .55s var(--ease-out); }
.jmove { inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 18px; background: rgba(6,3,2,.55); transform: scale(1.06); }
.jmove__stamp { margin: 0; font-weight: 900; font-style: italic; font-size: clamp(24px, 7vw, 34px); line-height: 1; text-transform: uppercase; color: var(--spark); -webkit-text-stroke: .03em var(--ink); border: 4px solid var(--spark); padding: 8px 14px 6px; border-radius: 10px; transform: rotate(-6deg); }
.jmove__slip { margin: 0; max-width: 26ch; padding: 12px 14px; background: #f3e9d6; color: var(--ink); font-weight: 800; font-style: italic; font-size: 15px; line-height: 1.3; transform: rotate(1.5deg); box-shadow: 4px 4px 0 var(--ink); }
.jmove__slip small, .jchat small, .jticket small { display: block; font-style: normal; font-weight: 800; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .65; margin-bottom: 3px; }
.jchat { left: 0; right: 0; bottom: 0; top: 18%; display: grid; align-content: end; gap: 8px; padding: 16px; background: linear-gradient(0deg, rgba(10,4,3,.97) 70%, rgba(10,4,3,0)); transform: translateY(24px); }
.jchat__q { margin: 0; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--spark); font-weight: 700; font-size: 14px; }
.jmsg { margin: 0; max-width: 84%; padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.35; }
.jmsg--me { justify-self: end; background: var(--dating); border-bottom-right-radius: 5px; }
.jmsg--them { justify-self: start; background: var(--raised); border-bottom-left-radius: 5px; }
.jticket { left: 14px; right: 14px; bottom: 16px; display: grid; gap: 4px; padding: 16px 18px; border-radius: 18px; background: var(--spark); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); transform: translateY(40px) rotate(-2deg); }
.jticket b { font-weight: 900; font-style: italic; font-size: 24px; line-height: 1.05; }
.jticket span { font-weight: 700; font-size: 13px; }
.jstamp { left: 50%; top: 40%; margin: 0; width: max-content; max-width: 88%; padding: 10px 14px 8px; font-weight: 900; font-style: italic; font-size: clamp(17px, 4.6vw, 22px); line-height: 1.1; text-transform: uppercase; text-align: center; color: var(--ink); background: var(--spark); border-radius: 8px; box-shadow: 4px 4px 0 var(--ink); transform: translate(-50%, -50%) rotate(-4deg) scale(1.4); }
.jstage[data-step="3"] .jmove { opacity: 1; transform: none; }
.jstage[data-step="4"] .jchat { opacity: 1; transform: none; }
.jstage[data-step="5"] .jchat { opacity: .35; }
.jstage[data-step="5"] .jticket, .jstage[data-step="6"] .jticket { opacity: 1; transform: rotate(-2deg); }
.jstage[data-step="6"] .jstamp { opacity: 1; transform: translate(-50%, -50%) rotate(-4deg) scale(1); }
.jstage[data-step="4"] .jcard__words, .jstage[data-step="5"] .jcard__words, .jstage[data-step="6"] .jcard__words { opacity: 0; }
.jtrack { display: flex; gap: 4px; width: min(100%, 420px); margin: 0; padding: 0; list-style: none; }
.jtrack li { flex: 1; min-width: 0; padding-top: 8px; position: relative; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-align: center; white-space: nowrap; color: rgba(246,235,221,.32); transition: color .4s; }
.jtrack li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px; background: var(--line); transition: background-color .4s; }
.jstage[data-step="4"] .jtrack li:nth-child(-n+2), .jstage[data-step="5"] .jtrack li:nth-child(-n+4), .jstage[data-step="6"] .jtrack li { color: var(--cream-dim); }
.jstage[data-step="4"] .jtrack li:nth-child(-n+2)::before, .jstage[data-step="5"] .jtrack li:nth-child(-n+4)::before, .jstage[data-step="6"] .jtrack li::before { background: var(--spark); }
.steps { position: relative; z-index: 1; margin: 0; padding: 0; list-style: none; }
.step { min-height: 62svh; display: grid; align-content: start; padding: 24px 0 0; max-width: 44ch; margin: 0 auto; opacity: .38; transition: opacity .4s var(--ease-out); }
.step.is-on { opacity: 1; }
.step__verb { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--spark); }
.step h3 { margin: 0 0 8px; font-weight: 900; font-style: italic; font-size: clamp(26px, 7vw, 38px); line-height: 1.02; }
.step p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--cream-dim); }
.step p i { font-style: normal; color: var(--cream); font-weight: 700; }
.step:last-child { min-height: 48svh; }

/* endings + privacy */
.xclose { max-width: 1100px; margin: 60px auto 0; display: grid; gap: 30px; }
.xclose__title { margin: 0; font-weight: 900; font-style: italic; font-size: clamp(34px, 8vw, 64px); line-height: .98; letter-spacing: -.02em; }
.xclose__sub { margin: 14px 0 0; max-width: 40ch; font-size: 17px; line-height: 1.5; color: var(--cream-dim); }
.xclose__promises { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.xclose__promises li { padding-left: 14px; border-left: 3px solid var(--spark); color: var(--cream-dim); font-size: 15px; }
.xclose__promises b { color: var(--cream); }
.closecard { justify-self: center; width: min(100%, 420px); display: grid; gap: 10px; padding: 20px; border-radius: 26px 26px 18px 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(0,0,0,.55); }
.closecard__to { margin: 0 0 4px; display: flex; align-items: center; gap: 10px; font-weight: 800; }
.closecard__to img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.closecard fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.closeline { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 13px 14px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); font-style: italic; font-weight: 700; font-size: 15px; cursor: pointer; }
.closeline input { width: 20px; height: 20px; accent-color: var(--spark); flex: none; margin-top: 1px; }
.closeline:has(input:checked) { border-color: var(--spark); }
.closecard .btn { width: 100%; margin-top: 4px; }
.closecard__done { margin: 0; text-align: center; font-weight: 900; font-style: italic; font-size: 18px; color: var(--ink); background: var(--spark); padding: 10px; border-radius: 8px; transform: rotate(-1.5deg); box-shadow: 3px 3px 0 var(--ink); }
.closecard.is-sent fieldset, .closecard.is-sent .btn { opacity: .35; pointer-events: none; }
.closecard__done[hidden] { display: none; }

/* get the app */
.xget { max-width: 1100px; margin: 110px auto 0; padding: 44px 26px; border-radius: 28px; text-align: center; display: grid; justify-items: center; gap: 14px; background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(249,6,46,.22), transparent 70%), var(--surface); border: 1px solid var(--line); }
.xget__title { margin: 0; font-weight: 900; font-style: italic; font-size: clamp(32px, 7vw, 56px); line-height: 1; }
.xget__sub { margin: 0; max-width: 44ch; color: var(--cream-dim); }
.avail { font-size: 13px; color: var(--cream-dim); }
.avail p { margin: 0; }
.avail .stores { display: flex; gap: 10px; margin-top: 8px; justify-content: center; }
.hero .avail { margin-top: 12px; }

/* walking in: the door closes behind you, then the app's door opens */
.webdoor { position: fixed; inset: 0; z-index: 95; pointer-events: none; display: grid; place-items: center; }
.webdoor__panel { position: absolute; top: 0; bottom: 0; width: 50.5%; background: radial-gradient(rgba(0,0,0,.38) 2px, transparent 3px) 0 0 / 26px 26px, linear-gradient(90deg, #1a0605, #33100a 55%, #160505); box-shadow: inset 0 0 80px rgba(0,0,0,.75); transition: transform .6s cubic-bezier(.7,0,.2,1); }
.webdoor__panel--l { left: 0; transform: translateX(-101%); border-right: 2px solid #6b1f10; }
.webdoor__panel--r { right: 0; transform: translateX(101%); border-left: 2px solid #6b1f10; }
.webdoor__line { position: relative; margin: 0; font-weight: 900; font-style: italic; font-size: 26px; opacity: 0; transition: opacity .3s .4s; }
.webdoor.is-closing .webdoor__panel { transform: none; }
.webdoor.is-closing .webdoor__line { opacity: 1; }

@media (min-width: 900px) {
  .journey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; }
  .jstage { top: calc(var(--x-top) + 4svh); align-self: start; height: calc(100svh - var(--x-top) - 8svh); align-content: center; background: none; }
  .jcard { height: min(64svh, 580px); }
  .step { min-height: 78svh; align-content: center; padding: 0; margin: 0; }
  .step:last-child { min-height: 70svh; }
  .xclose { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .jcard__face, .jcard__words, .stagecard__name, .stagecard__a, .jcard > *, .step, .webdoor__panel, .jtrack li, .jtrack li::before { transition: none !important; }
}
