/* =============================================
   Homepage story (everything under the hero)
   Hook → four chapters with a pinned phone → comparison → "really social" → close.
   Brand: violet #6C3A7C leads, pink #F4197A acts, no gradients, no italics.
   Complete without JavaScript; `html.st-js` (set by homepage.js) switches on the
   animated states. Motion is off under prefers-reduced-motion.
   ============================================= */

/* style.css puts overflow-x: hidden on both html and body, which turns body
   into a scroll container and stops position: sticky from working (the pinned
   phone, the chapter pills, the site header). `clip` hides the same overflow
   without that side effect. */
body.is-home { overflow-x: clip; }

.st-hook, .st-story, .st-compare, .st-social, .st-close {
    --st-violet: #6C3A7C;
    --st-ground: #4A2756;
    --st-lilac: #F1EAF3;
    --st-tint: #F3EFF5;
    --st-edge: #DFD4E2;
    --st-pink: #F4197A;
    --st-ink: #1A1A1A;
    --st-grey: #6B6B6B;
    --st-line: #EAEAEA;
    --st-green: #43A047;
    --st-header: 64px;
    color: var(--st-ink);
}

.st-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.st-h2 {
    font-size: clamp(1.9rem, 2.6vw + 0.8rem, 2.9rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    text-wrap: balance;
}

/* ---------- small drawn icons ---------- */
.st-check, .st-x {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    border-radius: 999px;
    flex: none;
    position: relative;
    vertical-align: -0.25em;
    margin-right: 0.55em;
}
.st-check { background: var(--st-violet); }
.st-check-green { background: var(--st-green); }
.st-check::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 46%;
    width: 0.5em;
    height: 0.26em;
    border-left: 0.14em solid #fff;
    border-bottom: 0.14em solid #fff;
    transform: translate(-50%, -50%) rotate(-45deg);
}
.st-x { background: #E4E4E4; }
.st-x::before, .st-x::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.62em;
    height: 0.13em;
    background: #8A8A8A;
    border-radius: 2px;
}
.st-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.st-x::after { transform: translate(-50%, -50%) rotate(-45deg); }

.st-icon {
    display: inline-block;
    width: 1.3em;
    height: 1.3em;
    background: currentColor;
    -webkit-mask: var(--st-icon) center / contain no-repeat;
    mask: var(--st-icon) center / contain no-repeat;
    flex: none;
}
.st-icon[data-icon="groups"] { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12.75c1.63 0 3.07.39 4.24.9 1.08.48 1.76 1.56 1.76 2.73V18H6v-1.61c0-1.18.68-2.26 1.76-2.73 1.17-.52 2.61-.91 4.24-.91zM4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zM12 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z'/%3E%3C/svg%3E"); }
.st-icon[data-icon="bolt"] { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 21h-1l1-7H7.5c-.88 0-.33-.75-.31-.78C8.48 10.94 10.42 7.54 13 3h1l-1 7h3.51c.4 0 .62.19.4.66C12.97 17.55 11 21 11 21z'/%3E%3C/svg%3E"); }
.st-icon[data-icon="event_note"] { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 10H7v2h10v-2zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zm-5-5H7v2h7v-2z'/%3E%3C/svg%3E"); }
.st-icon[data-icon="people"] { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E"); }

/* =============================================
   2. The hook
   ============================================= */
.st-hook {
    background: var(--st-ground);
    color: #fff;
    padding-block: clamp(64px, 9vw, 104px);
    overflow: hidden;
    overflow: clip; /* hides the tilted cards' overflow without stopping position: sticky inside */
}
.st-hook-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 56px;
    align-items: center;
}
.st-hook-title {
    font-size: clamp(2.1rem, 3.6vw + 0.6rem, 3.5rem);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin: 0;
    color: #fff;
    text-wrap: balance;
}
.st-hook-title span { color: #FF9CC8; }
.st-hook-text {
    font-size: 1.15rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.8);
    margin: 22px 0 0;
    max-width: 34ch;
}

/* the stage: a bright, messy chat and the tidy card that replaces it */
.st-hook-stage {
    position: relative;
    height: 470px;
    min-width: 0;
}
.st-mess {
    position: absolute;
    left: 0;
    top: 6px;
    width: min(320px, 78%);
    background: #fff;
    color: var(--st-ink);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(10, 0, 20, 0.45);
    transform: rotate(-3deg);
    transform-origin: 30% 40%;
    overflow: hidden;
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease;
}
.st-mess-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--st-line);
}
.st-mess-avatar { width: 34px; height: 34px; border-radius: 999px; background: #D9D9D9; flex: none; }
.st-mess-name { font-weight: 700; font-size: 15px; line-height: 1.2; flex: 1; }
.st-mess-name small { display: block; font-weight: 400; font-size: 12px; color: var(--st-grey); }
.st-mess-badge {
    background: var(--st-pink);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    border-radius: 999px;
    padding: 3px 9px;
}
.st-mess-body { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #F6F6F6; }
.st-bubble {
    margin: 0;
    align-self: flex-start;
    max-width: 88%;
    background: #fff;
    border-radius: 16px 16px 16px 5px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.35;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.st-bubble small { display: block; font-size: 11px; font-weight: 700; color: var(--st-violet); }
.st-bubble-me { align-self: flex-end; background: #E7E0EA; border-radius: 16px 16px 5px 16px; }

.st-tidy {
    position: absolute;
    right: 0;
    bottom: 34px;
    width: min(300px, 74%); /* nearly as big as the chat card it replaces */
    margin: 0;
    transform: rotate(3deg);
    transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.st-tidy img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 22px;
    box-shadow: 0 26px 60px rgba(10, 0, 20, 0.5);
}
.st-tidy-cap {
    position: absolute;
    right: 18px;
    bottom: 14px;
    margin: 0;
    white-space: nowrap;
    background: var(--st-pink);
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1.2;
    padding: 7px 15px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(10, 0, 20, 0.35);
    transition: opacity 0.4s ease 0.25s;
}

.st-hook-switch { display: none; }
.st-js .st-hook-switch {
    position: absolute;
    left: 0;
    bottom: -6px;
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}
.st-hook-btn {
    font: inherit;
    font-weight: 600;
    font-size: 13.5px;
    border: 0;
    border-radius: 999px;
    padding: 7px 14px;
    cursor: pointer;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.st-hook-btn:active, .st-cta:active { transform: scale(0.97); }
.st-hook-btn.is-on { background: #fff; color: var(--st-ground); }
.st-hook-btn:focus-visible, .st-cta:focus-visible, .st-nav-link:focus-visible, .st-swipe:focus-visible {
    outline: 3px solid var(--st-pink);
    outline-offset: 2px;
}

/* animated states (JS on) */
.st-js .st-hook-stage[data-show="mess"] .st-mess { opacity: 1; transform: rotate(-3deg) scale(1.04); }
.st-js .st-hook-stage[data-show="mess"] .st-tidy { opacity: 0; transform: rotate(8deg) translate(24px, 40px) scale(0.86); pointer-events: none; }
.st-js .st-hook-stage[data-show="tidy"] .st-mess { opacity: 0.42; transform: rotate(-6deg) translate(-10px, 8px) scale(0.9); filter: saturate(0.4); }
.st-js .st-hook-stage[data-show="tidy"] .st-tidy { opacity: 1; transform: rotate(3deg); }
.st-js .st-hook-stage[data-show="mess"] .st-tidy-cap { opacity: 0; transition-delay: 0s; }
.st-js .st-hook-stage .st-bubble { opacity: 0; transform: translateY(10px) scale(0.96); }
.st-js .st-hook-stage.is-played .st-bubble { opacity: 1; transform: none; }
.st-js .st-hook-stage.is-playing .st-bubble { animation: st-pop 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards; }
.st-js .st-hook-stage.is-playing .st-bubble:nth-child(1) { animation-delay: 0.1s; }
.st-js .st-hook-stage.is-playing .st-bubble:nth-child(2) { animation-delay: 0.5s; }
.st-js .st-hook-stage.is-playing .st-bubble:nth-child(3) { animation-delay: 0.9s; }
.st-js .st-hook-stage.is-playing .st-bubble:nth-child(4) { animation-delay: 1.3s; }
.st-js .st-hook-stage.is-playing .st-bubble:nth-child(5) { animation-delay: 1.7s; }
@keyframes st-pop { to { opacity: 1; transform: none; } }

/* Scroll-driven version (`st-scrub`, set by homepage.js): the stage pins in
   the middle of the screen and the scroll itself turns the group chat into the
   card. --b fills the chat with messages (0 → 1), --t is the change from the
   chat to the card (0 → 1); homepage.js sets both from the scroll position.
   --st-hook-n is how long it stays pinned, in % of the screen height. */
.st-scrub .st-hook-inner { align-items: start; }
.st-scrub .st-hook-track { --st-hook-n: 110; --st-hook-top: calc(var(--st-header) + max(18px, (100vh - var(--st-header) - 490px) / 2)); }
.st-scrub .st-hook-track::after { content: ""; display: block; height: calc(var(--st-hook-n) * 1vh); }
@supports (height: 1svh) {
    .st-scrub .st-hook-track { --st-hook-top: calc(var(--st-header) + max(18px, (100lvh - var(--st-header) - 490px) / 2)); }
    .st-scrub .st-hook-track::after { height: calc(var(--st-hook-n) * 1svh); }
}
.st-scrub .st-hook-stage { position: sticky; top: var(--st-hook-top); --b: 0; --t: 0; }
.st-scrub .st-hook-words {
    position: sticky;
    top: calc(var(--st-header) + max(18px, (100vh - var(--st-header) - 490px) / 2));
    padding-top: 30px;
}
.st-scrub .st-hook-stage .st-mess {
    transition: none;
    opacity: calc(1 - 0.6 * var(--t));
    transform: rotate(calc(-3deg - 3deg * var(--t))) translate(calc(-10px * var(--t)), calc(8px * var(--t))) scale(calc(1.04 - 0.14 * var(--t)));
    filter: saturate(calc(1 - 0.6 * var(--t)));
}
.st-scrub .st-hook-stage .st-tidy {
    transition: none;
    opacity: var(--t);
    transform: rotate(calc(8deg - 5deg * var(--t))) translate(calc(24px * (1 - var(--t))), calc(40px * (1 - var(--t)))) scale(calc(0.86 + 0.14 * var(--t)));
}
.st-scrub .st-hook-stage .st-tidy-cap { transition: none; opacity: clamp(0, calc(var(--t) * 3 - 2), 1); }
.st-scrub .st-hook-stage .st-bubble {
    --v: clamp(0, calc(var(--b) * 5 - var(--i, 0)), 1);
    animation: none;
    opacity: var(--v);
    transform: translateY(calc((1 - var(--v)) * 12px)) scale(calc(0.94 + 0.06 * var(--v)));
}
.st-bubble:nth-child(2) { --i: 1; }
.st-bubble:nth-child(3) { --i: 2; }
.st-bubble:nth-child(4) { --i: 3; }
.st-bubble:nth-child(5) { --i: 4; }

/* =============================================
   3. Chapters + pinned phone
   ============================================= */
.st-story { background: #FBFBFB; position: relative; }

.st-nav {
    position: sticky;
    top: calc(var(--st-header) + 10px);
    z-index: 20;
    display: flex;
    justify-content: center;
    padding: 18px 16px 0;
    pointer-events: none;
}
.st-nav-pill {
    pointer-events: auto;
    display: inline-flex;
    gap: 2px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--st-line);
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(74, 39, 86, 0.1);
}
.st-nav-link {
    font-weight: 600;
    font-size: 14px;
    color: var(--st-grey);
    text-decoration: none;
    padding: 7px 15px;
    border-radius: 999px;
    transition: background 0.25s ease, color 0.25s ease;
}
.st-nav-link:hover { color: var(--st-violet); }
.st-nav-link.is-active { background: var(--st-violet); color: #fff; }

.st-story-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 72px;
    align-items: start;
}
.st-phone-col {
    order: 2;
    position: sticky;
    top: calc(var(--st-header) + 84px);
    padding-block: 12px 40px;
    display: flex;
    justify-content: center;
}
.st-chapters { order: 1; min-width: 0; }
.st-chapter {
    min-height: 88vh;
    display: flex;
    align-items: center;
    scroll-margin-top: calc(var(--st-header) + 70px);
}
.st-chapter-words { max-width: 30rem; }
.st-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--st-violet);
    background: #EDE7EF;
    font-weight: 700;
    font-size: 14px;
    padding: 5px 13px 5px 10px;
    border-radius: 999px;
}
.st-chapter-title {
    font-size: clamp(1.9rem, 2.4vw + 0.8rem, 2.75rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 18px 0 0;
    text-wrap: balance;
}
.st-chapter-text { font-size: 1.15rem; line-height: 1.55; color: var(--st-grey); margin: 16px 0 0; }
.st-points { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.st-points li { position: relative; padding-left: 2em; font-weight: 600; line-height: 1.4; }
.st-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.08em;
    width: 1.25em;
    height: 1.25em;
    border-radius: 999px;
    background: var(--st-violet);
}
.st-points li::after {
    content: "";
    position: absolute;
    left: 0.36em;
    top: 0.46em;
    width: 0.5em;
    height: 0.26em;
    border-left: 0.14em solid #fff;
    border-bottom: 0.14em solid #fff;
    transform: rotate(-45deg);
}

/* the phone */
.st-phone {
    --st-phone-w: min(300px, calc((100vh - var(--st-header) - 190px) * 0.5618));
    width: var(--st-phone-w);
    position: relative;
}
.st-phone-screen {
    position: relative;
    aspect-ratio: 400 / 712;
    border-radius: 34px;
    border: 9px solid #1A1A1A;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(74, 39, 86, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.st-phone-screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.st-phone-col .st-phone-img {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.45s ease, transform 0.6s ease;
}
.st-phone-col .st-phone-img.is-active { opacity: 1; transform: none; }
.st-phone-dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px; min-height: 8px; }
.st-phone-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--st-edge); transition: background 0.3s ease, width 0.3s ease; }
.st-phone-dots i.is-on { background: var(--st-violet); width: 20px; }

/* "a friend is organizing something" (the phone's own banner is drawn; the words are the app's) */
.st-nudge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--st-ink);
    border-radius: 18px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.3;
    box-shadow: 0 10px 30px rgba(26, 0, 40, 0.28);
}
.st-nudge img { width: 34px !important; height: 34px !important; border-radius: 9px; flex: none; object-fit: cover; }
.st-nudge span { color: var(--st-grey); min-width: 0; }
.st-nudge b { display: block; color: var(--st-ink); font-size: 13.5px; }
.st-nudge i { font-style: normal; font-weight: 700; color: var(--st-green); }
.st-phone-col .st-nudge {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 8px;
    z-index: 3;
    opacity: 0;
    transform: translateY(-120%);
    transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1.1);
}
.st-phone-col .st-nudge.is-on { opacity: 1; transform: none; }

/* A row of screens inside each chapter.
   With JavaScript (`st-auto`, set by homepage.js), on every screen size: the
   row pins in the middle of the screen while you scroll down and the screens
   slide left with the scroll; on a computer it sits beside the chapter's words.
   Without it (or with reduced motion): phones get a row you swipe, computers
   the single pinned phone above. Marco's rules: no sideways swiping, pinned in
   the middle, screens grow as the row arrives, continuous motion (never a
   sudden switch), one scroll never runs through several screens, and the last
   screen stays a while before the row lets go. */
.st-track { display: none; }
.st-strip { display: flex; gap: 16px; width: max-content; }
.st-swipe-item { flex: none; }
.st-phone-small { --st-phone-w: var(--st-shot-w); }
.st-phone-small .st-phone-screen { border-width: 7px; border-radius: 28px; box-shadow: 0 16px 34px rgba(74, 39, 86, 0.2); }
/* "Ana is organizing something" sits on the first Friends screen. With
   JavaScript it drops in a moment after the row has pinned, once you have
   scrolled a little further, so you see it arrive (homepage.js). */
.st-phone-small .st-nudge {
    position: absolute;
    left: 6px;
    right: 6px;
    top: 6px;
    z-index: 3;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 14px;
    font-size: 10px;
    box-shadow: 0 8px 22px rgba(26, 0, 40, 0.3);
}
.st-phone-small .st-nudge b { font-size: 11px; }
.st-phone-small .st-nudge img { width: 26px !important; height: 26px !important; border-radius: 7px; }
.st-js .st-phone-small .st-nudge {
    opacity: 0;
    transform: translateY(-120%);
    transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1.1);
}
.st-js .st-phone-small .st-nudge.is-on { opacity: 1; transform: none; }
.st-track-dots { display: none; }
.st-track-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--st-edge); transition: background 0.3s ease, width 0.3s ease; }
.st-track-dots i.is-on { background: var(--st-violet); width: 20px; }

/* Scroll-driven version. The numbers live on the chapter so the words beside
   the row (computer) can use them too:
     --st-step-n  % of the screen height you scroll per screen (raise = slower)
     --st-tail-n  % of the screen height the last screen stays before the row lets go
   Sizes use svh (the screen with the browser bars showing) so a whole phone
   always fits; the middle is taken from lvh (bars hidden), which is how the
   screen looks while you scroll down. Computers override some of it below. */
.st-auto .st-chapter {
    --st-step-n: 100;
    --st-tail-n: 55;
    --st-below: calc(var(--st-header) + 74px); /* the site header and the pills */
    --st-shot-w: min(300px, 78vw, calc((100vh - var(--st-below) - 62px) * 0.5618));
    --st-pin-h: calc(var(--st-shot-w) * 1.78 + 50px);
    --st-pin-top: calc(var(--st-below) + max(4px, (100vh - var(--st-below) - var(--st-pin-h)) / 2));
}
.st-auto .st-track { display: block; }
.st-auto .st-track::after { content: ""; display: block; height: calc((var(--st-steps, 1) * var(--st-step-n) + var(--st-tail-n)) * 1vh); }
@supports (height: 1svh) {
    .st-auto .st-chapter {
        --st-shot-w: min(300px, 78vw, calc((100svh - var(--st-below) - 62px) * 0.5618));
        --st-pin-top: calc(var(--st-below) + max(4px, (100lvh - var(--st-below) - var(--st-pin-h)) / 2));
    }
    .st-auto .st-track::after { height: calc((var(--st-steps, 1) * var(--st-step-n) + var(--st-tail-n)) * 1svh); }
}
.st-auto .st-pin { position: sticky; top: var(--st-pin-top); }
/* homepage.js grows the screens as the row arrives and moves the strip sideways. */
.st-auto .st-swipe { overflow: hidden; overflow: clip; scroll-snap-type: none; }
.st-auto .st-swipe:focus-visible { outline: none; }
/* Start with the first screen in the middle; homepage.js moves the strip. */
.st-auto .st-strip {
    padding: 6px calc((100% - var(--st-shot-w)) / 2) 22px;
    will-change: transform;
}
.st-auto .st-swipe-item { scroll-snap-align: none; transform-origin: 50% 50%; will-change: transform, opacity; }
.st-auto .st-track-dots { display: flex; justify-content: center; gap: 7px; min-height: 8px; padding-bottom: 14px; }

/* =============================================
   4. Comparison
   ============================================= */
.st-compare { background: #fff; padding-block: clamp(64px, 8vw, 96px); }
.st-sub { color: var(--st-grey); font-size: 1.1rem; margin: 12px 0 0; }
.st-table { margin-top: 36px; }
.st-row {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: stretch;
}
.st-row > span { padding: 16px 18px; border-bottom: 1px solid var(--st-line); display: flex; align-items: center; min-width: 0; }
.st-what { font-weight: 600; }
.st-row .st-them { color: var(--st-grey); }
.st-row .st-us {
    background: var(--st-tint);
    font-weight: 600;
    border-left: 2px solid var(--st-violet);
    border-right: 2px solid var(--st-violet);
}
.st-row-head > span { border-bottom: 0; font-size: 13px; font-weight: 700; color: var(--st-grey); padding-bottom: 12px; }
.st-row-head .st-us { background: var(--st-violet); color: #fff; font-size: 15px; border-radius: 18px 18px 0 0; }
.st-row:last-child .st-us { border-bottom: 2px solid var(--st-violet); border-radius: 0 0 18px 18px; }

.st-js .st-compare .st-row:not(.st-row-head) .st-us > *,
.st-js .st-compare .st-row:not(.st-row-head) .st-us { transition: opacity 0.5s ease, transform 0.5s ease; transition-delay: calc(var(--st-i, 0) * 110ms + 150ms); }
.st-js .st-compare:not(.is-in) .st-row:not(.st-row-head) .st-us { opacity: 0.25; }

/* =============================================
   5. Really social
   ============================================= */
.st-social { background: var(--st-lilac); padding-block: clamp(64px, 8vw, 92px); text-align: center; }
.st-social-eyebrow { font-weight: 600; font-size: 1.05rem; color: var(--st-violet); margin: 0 0 14px; }
.st-social-eyebrow b { font-weight: 800; }
.st-social-lead { font-size: 1.2rem; line-height: 1.5; color: #4A4A4A; max-width: 44ch; margin: 18px auto 0; }
.st-chips { list-style: none; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 30px 0 0; padding: 0; }
.st-chips li {
    background: #fff;
    border-radius: 999px;
    padding: 10px 20px 10px 14px;
    font-weight: 600;
    font-size: 15.5px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 14px rgba(74, 39, 86, 0.08);
}

/* =============================================
   6. Close
   ============================================= */
.st-close { background: var(--st-ground); color: #fff; text-align: center; padding-block: clamp(72px, 9vw, 108px); }
.st-close-title {
    font-size: clamp(2.3rem, 4vw + 0.6rem, 3.8rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin: 0;
    color: #fff;
    text-wrap: balance;
}
.st-close-text { font-size: 1.25rem; color: rgba(255, 255, 255, 0.82); margin: 16px 0 0; }
.st-cta {
    display: inline-block;
    margin-top: 34px;
    background: var(--st-pink);
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    padding: 17px 38px;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(10, 0, 20, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.st-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(10, 0, 20, 0.42); }
.st-close .st-close-stores { margin-top: 26px; opacity: 1; animation: none; justify-content: center; }
/* Desktop: no big "Get BuddyBuddy" button; the store badges are the way in. */
@media (min-width: 960px) {
    .st-close .st-cta { display: none; }
    .st-close .st-close-stores { margin-top: 34px; }
}
.st-free { margin: 18px 0 0; color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 959px) {
    .st-hook-inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .st-hook-stage { height: 440px; max-width: 420px; margin-bottom: 60px; }
    .st-js .st-hook-switch { bottom: -62px; }
    /* Phones: only the stage pins (the words scroll away above it), sized to
       fit under the header also on short screens. */
    .st-scrub .st-hook-words { position: static; padding-top: 0; }
    .st-scrub .st-hook-stage { height: min(440px, calc(100vh - var(--st-header) - 96px)); }
    .st-scrub .st-hook-track { --st-hook-top: calc(var(--st-header) + max(14px, (100vh - var(--st-header) - 512px) / 2)); }
    @supports (height: 1svh) {
        .st-scrub .st-hook-stage { height: min(440px, calc(100svh - var(--st-header) - 96px)); }
        .st-scrub .st-hook-track { --st-hook-top: calc(var(--st-header) + max(14px, (100lvh - var(--st-header) - 512px) / 2)); }
    }

    .st-story-inner { display: block; padding-left: 0; padding-right: 0; }
    .st-phone-col { display: none; }
    .st-chapter { min-height: 0; display: block; padding-block: 44px 8px; }
    .st-chapter-words { max-width: 36rem; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
    .st-story { padding-bottom: 40px; }

    /* Plain version (no JavaScript, or reduced motion): a row you swipe sideways. */
    .st-chapter { --st-shot-w: min(236px, 62vw); }
    .st-track { display: block; margin-top: 28px; }
    .st-swipe {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .st-swipe::-webkit-scrollbar { display: none; }
    .st-strip { padding: 6px max(20px, env(safe-area-inset-left, 0px)) 26px; }
    .st-swipe-item { scroll-snap-align: start; }
}

/* Computers with JavaScript: the same scroll-driven rows as on phones, beside
   the chapter's words. The words stay next to the row while it slides, and
   the single pinned phone is not used. */
@media (min-width: 960px) {
    .st-auto .st-phone-col { display: none; }
    .st-auto .st-story-inner { display: block; }
    .st-auto .st-story { padding-bottom: 10vh; }
    .st-auto .st-chapter {
        --st-step-n: 80;
        --st-tail-n: 45;
        --st-gap-top: 12vh;
        --st-shot-w: min(330px, calc((100vh - var(--st-below) - 62px) * 0.5618));
        display: grid;
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
        column-gap: 56px;
        align-items: start;
        min-height: 0;
        padding-top: var(--st-gap-top);
        /* the pills jump straight to the pinned row */
        scroll-margin-top: calc(var(--st-pin-top) - var(--st-gap-top));
    }
    .st-auto .st-chapter-words {
        position: sticky;
        top: var(--st-pin-top);
        min-height: var(--st-pin-h);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }
    .st-auto .st-strip { gap: 24px; }
    /* No hard edge in the middle of the page: screens that have gone by fade
       out, the next one waits faded on the right (homepage.js). */
    .st-auto .st-swipe { overflow: visible; }
}

@media (max-width: 759px) {
    /* Comparison on phones: both answers next to each other under each
       question, the group chat in grey, BuddyBuddy in violet. */
    .st-table { margin-top: 26px; }
    .st-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 8px; padding-top: 14px; }
    .st-row > span { border: 0; }
    .st-what { grid-column: 1 / -1; justify-content: center; text-align: center; padding: 0 2px 7px; font-size: 14px; }
    .st-row .st-them, .st-row .st-us {
        padding: 11px 10px 11px 11px;
        border-radius: 14px;
        font-size: 14.5px;
        line-height: 1.3;
        align-items: flex-start;
    }
    .st-row .st-them { background: #F3F3F3; }
    .st-row .st-us, .st-row:last-child .st-us { border: 1.5px solid var(--st-violet); border-radius: 14px; }
    .st-row .st-check, .st-row .st-x { margin-right: 0.5em; margin-top: 0.02em; }

    .st-row-head { padding-top: 0; position: sticky; top: var(--st-header); z-index: 5; background: #fff; padding-block: 8px; }
    .st-row-head > span:first-child { display: none; }
    .st-row-head .st-them, .st-row-head .st-us, .st-row-head:last-child .st-us {
        justify-content: center;
        padding: 7px 10px;
        border: 0;
        border-radius: 999px;
        font-size: 13.5px;
    }
    .st-row-head .st-them { background: #EDEDED; color: #4A4A4A; }
    .st-js .st-compare:not(.is-in) .st-row:not(.st-row-head) .st-us { opacity: 0.2; transform: scale(0.96); }
}

@media (max-width: 420px) {
    .st-nav-link { padding: 7px 11px; font-size: 13px; }
    .st-hook-stage { height: 420px; }
}

@media (prefers-reduced-motion: reduce) {
    .st-mess, .st-tidy, .st-tidy-cap, .st-bubble, .st-phone-col .st-phone-img, .st-nudge, .st-cta,
    .st-js .st-compare .st-row .st-us { transition: none !important; animation: none !important; }
    .st-js .st-hook-stage .st-bubble { opacity: 1; transform: none; }
}
