/* ==========================================================================
   brjoub.com/offshelf
   Mobile first: on a 360×640 phone the store badges sit above the fold,
   with the paper stage and its screens peeking in underneath.
   ========================================================================== */

.offshelf-page section[id], .offshelf-page header[id] { scroll-margin-top: 72px; }

/* --- Nav: at the top the hero already shows the icon and name ------------------ */
.offshelf-page .brand img { border-radius: 9px; }
.offshelf-page #navbar:not(.scrolled) .brand { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.offshelf-page .brand { transition: opacity 0.3s ease, transform 0.3s ease; }

/* --- Hero ------------------------------------------------------------------------ */
.os-hero { position: relative; padding: 76px 0 0; overflow: hidden; }
.os-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(70, 52, 24, 0.12) 1.1px, transparent 1.3px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%);
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
    pointer-events: none;
}
.os-hero-grid { position: relative; display: grid; gap: 6px; }
.os-hero-copy { min-width: 0; text-align: center; }
.os-app { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 12px; text-align: left; }
.os-app-icon-wrap { position: relative; flex-shrink: 0; }
.os-app-icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08), 0 10px 18px -8px rgba(22, 56, 41, 0.55); transform: rotate(-4deg); animation: iconIn 0.9s var(--ease-paper) 0.1s both; }
@keyframes iconIn { from { opacity: 0; transform: scale(0.6) rotate(-20deg); } to { opacity: 1; transform: rotate(-4deg); } }
.os-app-name { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.os-app-sub { display: block; margin-top: 4px; font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.os-title { font-size: clamp(2.3rem, 10vw, 4.4rem); line-height: 1.0; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 12px; }
.os-lede { max-width: 36ch; margin: 0 auto 14px; font-size: 1.02rem; line-height: 1.5; color: var(--ink-2); }

/* A ribbon of paper tags, sliding by. */
.ribbon {
    position: relative;
    margin: 0 -20px 16px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.ribbon-track { display: flex; gap: 8px; width: max-content; padding: 4px 0 6px; animation: marquee 42s linear infinite; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
.ribbon-track li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    background: var(--card);
    border-radius: 4px;
    box-shadow: var(--sh-1);
}
.ribbon-track li:nth-child(odd) { transform: rotate(-1.5deg); }
.ribbon-track li:nth-child(even) { transform: rotate(1.2deg); }
.ribbon-track li::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--dot, var(--forest)); transform: rotate(45deg); }
.ribbon-track li:nth-child(5n + 2) { --dot: var(--honey); }
.ribbon-track li:nth-child(5n + 3) { --dot: var(--rust); }
.ribbon-track li:nth-child(5n + 4) { --dot: var(--navy); }
.ribbon-track li:nth-child(5n + 5) { --dot: var(--plum); }
@keyframes marquee { to { transform: translateX(-50%); } }

.os-hero .stores { justify-content: center; flex-wrap: nowrap; }
.os-proof { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; font-size: 0.8rem; font-weight: 600; color: var(--ink-3); }
.os-proof li { display: inline-flex; align-items: center; gap: 5px; }
.os-proof .star { color: var(--honey); }
.os-proof svg { color: var(--forest); }

/* The stage: a paper arch, three phones, felt props. */
.os-stage {
    position: relative;
    height: 360px;
    margin-top: 16px;
    clip-path: inset(-120px -60px 0 -60px);
}
.arch { position: absolute; left: 50%; bottom: 0; width: min(400px, 100%); height: 100%; transform: translateX(-50%); }
.arch span {
    position: absolute;
    bottom: 0;
    border-radius: 999px 999px 0 0;
    box-shadow: 0 -2px 5px rgba(40, 25, 5, 0.22);
    transform-origin: 50% 100%;
    animation: archUp 1s var(--ease-paper) both;
}
.arch span:nth-child(1) { inset: 0 0 0 0; background: var(--sky) url("assets/images/paper/grain.webp") 0 0 / 240px; animation-delay: 0.1s; }
.arch span:nth-child(2) { inset: 7% 6% 0; background: var(--blush) url("assets/images/paper/grain.webp") 0 0 / 240px; animation-delay: 0.2s; }
.arch span:nth-child(3) { inset: 14% 12% 0; background: var(--honey-2) url("assets/images/paper/grain.webp") 0 0 / 240px; animation-delay: 0.3s; }
.arch span:nth-child(4) { inset: 21% 18% 0; background: var(--paper-2) url("assets/images/paper/grain.webp") 0 0 / 240px; animation-delay: 0.4s; }
@keyframes archUp { from { transform: scaleY(0.15); opacity: 0; } to { transform: none; opacity: 1; } }
.stage-sun { position: absolute; right: 5%; top: -6%; width: 74px; animation: sunUp 1.4s var(--ease-out) 0.4s both; }
@keyframes sunUp { from { opacity: 0; transform: translateY(50%) rotate(-40deg); } to { opacity: 1; transform: none; } }
.stage-cloud { position: absolute; width: 110px; opacity: 0.95; }
.stage-cloud.a { left: 1%; top: 6%; animation: cloudA 1.2s var(--ease-out) 0.5s both, drift 16s ease-in-out 2s infinite alternate; }
.stage-cloud.b { right: 0; top: 34%; width: 80px; animation: cloudA 1.2s var(--ease-out) 0.7s both, drift 12s ease-in-out 2s infinite alternate-reverse; }
@keyframes cloudA { from { opacity: 0; transform: translateX(-30%); } to { opacity: 0.95; transform: none; } }
@keyframes drift { from { transform: translateX(-8%); } to { transform: translateX(10%); } }
.stage-phone { position: absolute; left: 50%; animation: phoneUp 1.2s var(--ease-paper) both; }
.stage-phone.main { width: 160px; bottom: -90px; z-index: 3; margin-left: -80px; animation-delay: 0.55s; }
.stage-phone.left { width: 128px; bottom: -60px; z-index: 2; margin-left: -142px; --rot: -9deg; animation-delay: 0.4s; }
.stage-phone.right { width: 128px; bottom: -60px; z-index: 2; margin-left: 14px; --rot: 9deg; animation-delay: 0.48s; }
.stage-phone .paper-phone { transform: rotate(var(--rot, 0deg)); }
@keyframes phoneUp { from { opacity: 0; transform: translateY(45%); } to { opacity: 1; transform: none; } }
.stage-prop { display: none; }
.stage-card { position: absolute; left: 3%; top: 38%; width: 92px; z-index: 4; filter: drop-shadow(0 8px 8px rgba(40, 25, 5, 0.25)); animation: cardFloat 1s var(--ease-paper) 1s both, bob 5s ease-in-out 2s infinite alternate; }
@keyframes cardFloat { from { opacity: 0; transform: translateY(30px) rotate(-20deg); } to { opacity: 1; transform: rotate(-8deg); } }
@keyframes bob { from { transform: rotate(-8deg) translateY(0); } to { transform: rotate(-4deg) translateY(-10px); } }
.os-stage .plane-track { position: absolute; inset: -40px 0 30%; z-index: 4; animation: planeX 15s linear 2.2s infinite both; }
.os-stage .plane-bob { position: absolute; left: 0; top: 10%; animation: planeY 3s ease-in-out infinite alternate; }
.os-stage .plane { width: 38px; filter: drop-shadow(0 5px 4px rgba(40, 25, 5, 0.25)); }
@keyframes planeX { from { transform: translateX(-14%); } to { transform: translateX(114%); } }
@keyframes planeY { from { transform: translateY(0) rotate(4deg); } to { transform: translateY(80%) rotate(-6deg); } }

/* Short phones: tighten so the badges still show without scrolling. */
@media (max-height: 700px) and (max-width: 899px) {
    .os-hero { padding-top: 68px; }
    .os-app { margin-bottom: 8px; }
    .os-app-icon { width: 48px; height: 48px; border-radius: 12px; }
    .os-app-name { font-size: 1.32rem; }
    .os-title { font-size: clamp(2.1rem, 9.4vw, 3rem); margin-bottom: 10px; }
    .os-lede { font-size: 0.95rem; margin-bottom: 12px; }
    .ribbon { margin-bottom: 12px; }
}
@media (max-width: 359px) {
    .store { padding: 0 8px; gap: 7px; height: 52px; }
    .store-text strong { font-size: 1rem; }
    .store-text small { font-size: 0.58rem; }
}

/* --- Reviews: real reviews as taped study notes ---------------------------------------
   The people are Open Peeps (Pablo Stanley, CC0). */
.os-reviews { min-width: 0; margin-top: 26px; text-align: center; }
.os-reviews-head { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 4px; text-align: left; }
.faces { display: flex; flex-shrink: 0; }
.faces img { width: 40px; height: 40px; margin-left: -12px; border-radius: 50%; border: 2.5px solid var(--paper); box-shadow: 0 3px 8px rgba(40, 25, 5, 0.16); }
.faces img:first-child { margin-left: 0; background: #F6E3B4; }
.faces img:nth-child(2) { background: #CFE3CA; }
.faces img:nth-child(3) { background: #DED0EE; }
.stars-row { display: flex; gap: 1px; color: var(--honey); }
.os-reviews-title { margin: 2px 0 0; font-family: var(--f-sans); font-size: 0.84rem; font-weight: 600; letter-spacing: 0; line-height: 1.25; color: var(--ink-2); }
.os-reviews-title strong { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.notes-rail {
    display: flex;
    gap: 14px;
    margin: 0 -20px -20px;
    padding: 22px 22px 42px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 22px;
    scrollbar-width: none;
}
.notes-rail::-webkit-scrollbar { display: none; }
.review {
    --note: #FFF3CC;
    --tilt: -1.8deg;
    position: relative;
    flex: 0 0 min(74vw, 272px);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 24px 18px 14px;
    border-radius: 2px 2px 18px 2px;
    background: var(--note);
    box-shadow: var(--sh-2);
    transform: rotate(var(--tilt));
    transition: transform 0.4s var(--ease-paper), box-shadow 0.4s ease;
    text-align: left;
}
.review:nth-child(2) { --note: #E3EED9; --tilt: 1.4deg; }
.review:nth-child(3) { --note: #EEE5F6; --tilt: -1deg; }
.review .tape { top: -12px; left: 50%; width: 76px; margin-left: -38px; transform: rotate(calc(var(--tilt) * -2.2)); }
.review:nth-child(2) .tape { background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.28) 0 5px, transparent 5px 10px), rgba(47, 107, 79, 0.45); }
.review:nth-child(3) .tape { background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.28) 0 5px, transparent 5px 10px), rgba(180, 100, 60, 0.45); }
@media (hover: hover) {
    .review:hover { transform: rotate(0deg) translateY(-5px); box-shadow: var(--sh-3); }
}
.review blockquote { font-family: var(--f-display); font-size: 1.14rem; font-weight: 560; line-height: 1.32; color: var(--ink); }
.review mark { padding: 0 2px; margin: 0 -2px; color: inherit; background: linear-gradient(100deg, transparent 0 2%, rgba(217, 164, 58, 0.5) 3% 97%, transparent 98%) 0 85% / 100% 42% no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.review figcaption { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1.5px dashed var(--line-2); font-size: 0.8rem; font-weight: 600; color: var(--ink-3); }
.review figcaption strong { display: block; font-family: var(--f-display); font-size: 1rem; line-height: 1.1; color: var(--ink); }
.review-face { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: #F6E3B4; border: 2.5px solid #fff; box-shadow: 0 4px 10px rgba(40, 25, 5, 0.16); }
.review:nth-child(2) .review-face { background: #CFE3CA; }
.review:nth-child(3) .review-face { background: #DED0EE; }
.review-src { display: inline-flex; align-items: center; gap: 4px; }

/* Desktop: copy left, the stage right. */
@media (min-width: 900px) {
    .os-hero { padding-top: 64px; }
    .os-hero-grid { grid-template-columns: 1.05fr 0.95fr; min-height: min(calc(100vh - 64px), 780px); gap: 0 40px; }
    .os-hero-copy { grid-column: 1; grid-row: 1; align-self: end; text-align: left; padding-top: 40px; }
    .os-app { margin-bottom: 20px; }
    .os-app-icon { width: 72px; height: 72px; border-radius: 18px; }
    .os-app-name { font-size: 1.8rem; }
    .os-title { margin-bottom: 18px; }
    .os-lede { margin: 0 0 22px; font-size: 1.15rem; max-width: 32ch; }
    .ribbon { margin: 0 0 22px; max-width: 520px; }
    .os-hero .stores { justify-content: flex-start; }
    .os-proof { justify-content: flex-start; }
    .os-reviews { grid-column: 1; grid-row: 2; align-self: start; margin-top: 30px; padding-bottom: 48px; text-align: left; }
    .notes-rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 20px 2px 4px; overflow: visible; }
    .review { padding: 22px 14px 12px; }
    .review blockquote { font-size: 1.02rem; }
    .review-face { width: 38px; height: 38px; }
    .os-stage { grid-column: 2; grid-row: 1 / span 2; height: 640px; margin-top: 0; align-self: end; clip-path: none; }
    .arch { width: 560px; height: 100%; }
    .stage-sun { width: 104px; right: 2%; top: 4%; }
    .stage-cloud { width: 150px; }
    .stage-cloud.b { width: 110px; }
    .stage-phone.main { width: 236px; margin-left: -118px; bottom: 14px; }
    .stage-phone.left { width: 190px; margin-left: -214px; bottom: 30px; }
    .stage-phone.right { width: 190px; margin-left: 24px; bottom: 30px; }
    .stage-prop { display: block; position: absolute; z-index: 5; bottom: -6px; filter: drop-shadow(0 12px 12px rgba(40, 25, 5, 0.3)); animation: propIn 1s var(--ease-paper) both; }
    .stage-prop.books { left: -2%; width: 170px; animation-delay: 0.9s; }
    .stage-prop.cup { right: 2%; width: 96px; animation-delay: 1s; }
    .stage-card { left: -4%; top: 30%; width: 130px; }
    .os-stage .plane { width: 48px; }
}
@keyframes propIn { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }

/* --- Sections ---------------------------------------------------------------------------- */
.os-section { position: relative; padding: 88px 0; }
.os-alt { background: var(--paper-2) url("assets/images/paper/grain.webp") 0 0 / 320px; padding-top: 0; }
.os-alt > .torn + .container { padding-top: 84px; }
.os-after-alt { padding-top: 0; }
.os-after-alt > .torn + .container { padding-top: 88px; }

/* The store screenshots, as prints on a rail. */
.rail-wrap { position: relative; }
.rail {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    padding: 14px 20px 34px;
    scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail figure {
    flex: 0 0 auto;
    width: min(62vw, 250px);
    scroll-snap-align: start;
    padding: 6px;
    background: var(--card);
    border-radius: 6px;
    box-shadow: var(--sh-2);
    transform: rotate(var(--r, -1deg));
    transition: transform 0.4s var(--ease-paper), box-shadow 0.4s ease;
}
.rail figure:nth-child(even) { --r: 1.2deg; }
@media (hover: hover) { .rail figure:hover { transform: rotate(0) translateY(-6px); box-shadow: var(--sh-3); } }
.rail img { width: 100%; aspect-ratio: 640 / 1391; border-radius: 3px; background: var(--paper-2); }
.rail-btn {
    display: none;
    position: absolute;
    top: 44%;
    z-index: 2;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--ink);
    background: var(--card);
    box-shadow: var(--sh-2);
    transition: transform 0.25s var(--ease-out);
}
.rail-btn:hover { transform: scale(1.08); }
.rail-btn.prev { left: 16px; }
.rail-btn.next { right: 16px; }
@media (min-width: 900px) {
    .rail { gap: 22px; padding-left: max(20px, calc((100vw - 1180px) / 2)); padding-right: max(20px, calc((100vw - 1180px) / 2)); scroll-padding: 0 max(20px, calc((100vw - 1180px) / 2)); }
    .rail figure { width: 236px; }
    .rail-btn { display: inline-flex; }
}

/* --- Inside the app: a notebook with divider tabs ----------------------------------------------- */
.book { max-width: 1080px; margin: 0 auto; }
.book-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 12px 0;
    margin: 0 -20px;
    overflow-x: auto;
    scrollbar-width: none;
    position: relative;
    z-index: 1;
}
.book-tabs::-webkit-scrollbar { display: none; }
.book-tab {
    position: relative;
    flex: 0 0 auto;
    padding: 11px 16px 15px;
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    background: var(--tc) url("assets/images/paper/grain-light.webp") 0 0 / 200px;
    border-radius: 9px 9px 0 0;
    transform: translateY(7px);
    box-shadow: inset 0 -8px 8px -8px rgba(0, 0, 0, 0.35);
    transition: transform 0.35s var(--ease-paper), background-color 0.3s ease, color 0.3s ease;
}
.book-tab:hover { transform: translateY(2px); }
.book-tab.is-on { transform: translateY(0); color: var(--ink); background: var(--card); box-shadow: 0 -5px 10px -6px rgba(40, 25, 5, 0.3); }
.book-tab .run { position: absolute; left: 14px; right: 14px; bottom: 7px; height: 3px; border-radius: 2px; background: var(--tc); transform-origin: 0 50%; transform: scaleX(0); opacity: 0; }
.book-tab.is-on .run { opacity: var(--run, 0); animation: run 5.2s linear forwards; }
.book:not(.is-visible) .book-tab.is-on .run { animation-play-state: paused; }
@keyframes run { to { transform: scaleX(1); } }
.book-page {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 26px 18px 30px 50px;
    border-radius: 0 10px 10px 10px;
    background:
        linear-gradient(90deg, transparent 0 34px, rgba(217, 110, 90, 0.4) 34px 36px, transparent 36px),
        repeating-linear-gradient(transparent 0 31px, rgba(105, 150, 185, 0.16) 31px 32px),
        var(--card);
    box-shadow: var(--sh-3);
}
.book-screens { position: relative; height: 448px; margin-left: -16px; perspective: 1400px; }
.book-screens figure {
    position: absolute;
    left: 50%;
    top: 0;
    width: 198px;
    margin-left: -99px;
    opacity: 0;
    transform: rotateY(-38deg) translateX(-30%) rotate(-4deg);
    transform-origin: 0 50%;
    transition: opacity 0.45s ease, transform 0.8s var(--ease-out);
    pointer-events: none;
}
.book-screens figure.is-on { opacity: 1; transform: rotate(-2deg); transition-delay: 0.08s; }
.book-panels { position: relative; min-width: 0; }
.book-panels [role="tabpanel"] { padding: 4px 2px 0; }
.book-panels [role="tabpanel"]:not([hidden]) > * { animation: panelIn 0.6s var(--ease-out) both; }
.book-panels [role="tabpanel"]:not([hidden]) > :nth-child(2) { animation-delay: 0.06s; }
.book-panels [role="tabpanel"]:not([hidden]) > :nth-child(3) { animation-delay: 0.12s; }
.book-panels [role="tabpanel"]:not([hidden]) > :nth-child(4) { animation-delay: 0.18s; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.panel-kicker { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tc, var(--forest)); }
.book-panels h3 { font-size: clamp(1.8rem, 5vw, 2.5rem); margin: 6px 0 10px; }
.book-panels p.lead { font-size: 1.05rem; line-height: 1.6; color: var(--ink-2); max-width: 46ch; }
.ticks { display: grid; gap: 10px; margin-top: 18px; }
.ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 0.97rem; line-height: 1.5; color: var(--ink-2); }
.ticks li::before {
    content: '';
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 5px;
    background: var(--honey-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23163829' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
    box-shadow: 0 2px 0 rgba(140, 100, 20, 0.35);
    transform: rotate(-4deg);
}
.ticks .pro { display: inline-block; margin-left: 4px; padding: 1px 7px; font-family: var(--f-mono); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #7A5A14; background: var(--honey-pale); border-radius: 3px; vertical-align: 1px; }
@media (min-width: 900px) {
    .book-tabs { margin: 0; padding: 0 0 0 10px; }
    .book-page { grid-template-columns: 300px 1fr; gap: 40px; align-items: center; padding: 44px 56px 44px 64px; }
    .book-screens { height: 540px; margin-left: 0; }
    .book-screens figure { width: 238px; margin-left: -119px; top: 6px; }
}

/* --- iPad and tablets: two paper tablets, and a pencil writing on the front one -------------------------- */
.tablets { overflow-x: clip; }
.tablets-grid { display: grid; gap: 36px; align-items: center; }
.tablets-copy { max-width: 560px; }
.tablets-copy .h2 { margin: 14px 0 12px; }
.tab-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tab-chips li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px 8px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
    background: var(--card);
    border-radius: 6px;
    box-shadow: var(--sh-1);
}
.tab-chips svg { color: var(--forest); flex-shrink: 0; }
.tab-stage { position: relative; width: min(100%, 560px); aspect-ratio: 1 / 1.02; margin: 0 auto; }
.paper-tablet { position: absolute; z-index: 1; margin: 0; padding: 2.6%; transition: transform 1.1s var(--ease-paper), opacity 0.6s ease; }
.paper-tablet::before, .paper-tablet::after { content: ''; position: absolute; z-index: -1; border-radius: 7% / 5.2%; }
.paper-tablet::before {
    /* The felt back, cut a little larger. */
    inset: -2% -2.4% 1.6% 2.2%;
    background: var(--navy) url("assets/images/paper/grain-light.webp") 0 0 / 200px;
    box-shadow: 0 10px 16px -10px rgba(20, 10, 0, 0.45);
}
.paper-tablet::after {
    inset: 0;
    background: var(--card);
    box-shadow: 0 1px 0 rgba(80, 60, 30, 0.1), 0 28px 44px -24px rgba(40, 25, 5, 0.55);
}
.tab-screen { position: relative; }
.tab-screen img { display: block; width: 100%; height: auto; border-radius: 3.6% / 2.7%; }
.tab-write { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.paper-tablet.back { width: 64%; right: 0; top: 0; transform: rotate(5deg); }
.paper-tablet.back::before { background-color: var(--rust); }
.paper-tablet.front { width: 72%; left: 0; bottom: 0; z-index: 2; transform: rotate(-2.5deg); }
.paper-tablet.front::before { background-color: var(--forest-2); }
.js .tab-stage:not(.in) .back { transform: translate(16%, -6%) rotate(14deg); opacity: 0; }
.js .tab-stage:not(.in) .front { transform: translateY(14%) rotate(-9deg); opacity: 0; }
.tab-stage.in .front { transition-delay: 0.15s; }
@media (min-width: 900px) {
    .tablets-grid { grid-template-columns: 0.85fr 1.15fr; gap: 56px; }
    .tab-stage { width: min(100%, 620px); }
}

/* --- Journeys: a night sheet of felt ------------------------------------------------------------- */
.journeys { position: relative; overflow-x: clip; padding: 0 0 100px; color: rgba(251, 246, 236, 0.82); background: var(--navy-deep) url("assets/images/paper/grain-light.webp") 0 0 / 320px; }
.journeys > .container { padding-top: 90px; }
.journeys .eyebrow { color: var(--navy-deep); }
.journeys h2 { color: var(--paper); }
.journeys .mark::before { background: rgba(240, 205, 126, 0.45); }
.journeys .sub { color: rgba(251, 246, 236, 0.75); }
.journeys-grid { display: grid; gap: 40px; align-items: center; }
.journey-phone { position: relative; width: 230px; margin: 0 auto; }
.journey-phone .paper-phone { transform: rotate(-3deg); }
.journey-phone .paper-phone::before { background-color: var(--honey); }
.journey-phone::after {
    /* Stars cut from paper. */
    content: '✦  ✧     ✦';
    position: absolute;
    left: -40px;
    top: -26px;
    font-size: 1.3rem;
    letter-spacing: 6px;
    color: var(--honey-2);
    animation: twinkle 3s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.4; } to { opacity: 1; } }
.tickets { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tickets li {
    position: relative;
    padding: 8px 16px;
    font-family: var(--f-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--paper);
    -webkit-mask: radial-gradient(circle at 0 50%, transparent 5px, #000 5.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 5px, #000 5.5px) right / 51% 100% no-repeat;
    mask: radial-gradient(circle at 0 50%, transparent 5px, #000 5.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 5px, #000 5.5px) right / 51% 100% no-repeat;
}
/* The tickets are dealt out one by one once the column slides in. */
.tickets li { transition: transform 0.7s var(--ease-paper), opacity 0.5s ease; transition-delay: calc(0.35s + var(--n, 0) * 0.05s); }
.js .slide-r:not(.in) .tickets li { opacity: 0; transform: translateY(14px) rotate(-6deg); }
.tickets li:nth-child(2) { --n: 1; } .tickets li:nth-child(3) { --n: 2; } .tickets li:nth-child(4) { --n: 3; }
.tickets li:nth-child(5) { --n: 4; } .tickets li:nth-child(6) { --n: 5; } .tickets li:nth-child(7) { --n: 6; }
.tickets li:nth-child(8) { --n: 7; } .tickets li:nth-child(9) { --n: 8; } .tickets li:nth-child(10) { --n: 9; }
.tickets li:nth-child(11) { --n: 10; }
@media (hover: hover) {
    .tickets li:hover { transform: translateY(-3px) rotate(-2deg); transition-delay: 0s; }
}
.tickets li.free { background: var(--honey-2); }
.tickets li.free::after { content: ' · free'; color: var(--forest-2); }
.journeys .fine { margin-top: 16px; font-size: 0.86rem; color: rgba(251, 246, 236, 0.6); }
@media (min-width: 900px) {
    .journeys-grid { grid-template-columns: 0.9fr 1.1fr; gap: 64px; }
    .journey-phone { width: 290px; }
    .journeys .section-head { text-align: left; margin: 0; }
}

/* --- Premium ------------------------------------------------------------------------------------------ */
.premium { display: grid; overflow: hidden; max-width: 1080px; margin: 0 auto; border-radius: 8px; background: var(--card); box-shadow: var(--sh-3); }
.premium-intro { position: relative; padding: 34px 24px 150px; color: rgba(251, 246, 236, 0.82); background: var(--forest-2) url("assets/images/paper/grain-light.webp") 0 0 / 320px; overflow: hidden; }
.premium-intro .eyebrow { color: var(--forest-deep); background: var(--honey-2); }
.premium-intro .eyebrow::before { background: #E1B860; }
.premium-intro h2 { font-size: clamp(1.9rem, 5.4vw, 2.7rem); color: var(--paper); margin: 14px 0 12px; }
.premium-intro .mark::before { background: rgba(240, 205, 126, 0.45); }
.premium-intro p { font-size: 1rem; line-height: 1.6; }
.premium-intro .note { margin-top: 14px; font-size: 0.84rem; color: rgba(251, 246, 236, 0.6); }
.trophy { position: absolute; right: 18px; bottom: -8px; width: 120px; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.35)); animation: trophyBob 5s ease-in-out infinite alternate; }
@keyframes trophyBob { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(3deg) translateY(-8px); } }
.premium-list { display: grid; gap: 14px; padding: 30px 24px 34px; }
.premium-list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: 0.98rem; line-height: 1.5; color: var(--ink-2); }
.premium-list li::before {
    content: '★';
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    color: var(--forest-deep);
    border-radius: 50%;
    background: var(--honey-2);
    box-shadow: 0 2px 0 rgba(140, 100, 20, 0.35);
}
.premium-list strong { color: var(--ink); }
@media (min-width: 900px) {
    .premium { grid-template-columns: 0.95fr 1.05fr; }
    .premium-intro { padding: 54px 48px 170px; }
    .trophy { width: 150px; right: 36px; }
    .premium-list { align-content: center; padding: 50px 52px; gap: 16px; }
}

/* --- Questions, and the languages hung on two strings ---------------------------------------------------- */
.faq-grid { display: grid; gap: 36px; max-width: 1080px; margin: 0 auto; }
.faq-head .h2 { margin: 14px 0 12px; }
.faq-head .sub a, .faq-a a { color: var(--forest-2); font-weight: 600; border-bottom: 2px solid var(--honey-2); overflow-wrap: anywhere; }
.faq-head .sub a:hover, .faq-a a:hover { border-color: var(--honey); }
.faq-list { display: grid; gap: 12px; align-content: start; }
.faq-item { background: var(--card); border-radius: 6px; box-shadow: var(--sh-1); transition: box-shadow 0.3s ease; }
.faq-item[open] { box-shadow: var(--sh-2); }
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 16px 16px 18px;
    list-style: none;
    cursor: pointer;
    font-family: var(--f-display);
    font-size: 1.1rem;
    font-weight: 650;
    line-height: 1.3;
    color: var(--ink);
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i {
    /* A paper button: plus when shut, minus when open. */
    position: relative;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--paper-2);
    box-shadow: inset 0 0 0 1px var(--line);
    transition: transform 0.5s var(--ease-paper), background 0.3s ease;
}
.faq-item summary i::before, .faq-item summary i::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 2px;
    margin: -1px 0 0 -6px;
    border-radius: 1px;
    background: var(--forest-2);
    transition: transform 0.5s var(--ease-paper);
}
.faq-item summary i::after { transform: rotate(90deg); }
.faq-item[open] summary i { background: var(--honey-2); transform: rotate(180deg); }
.faq-item[open] summary i::after { transform: rotate(0deg); }
@media (hover: hover) { .faq-item summary:hover i { background: var(--honey-pale); } }
.faq-a { padding: 0 18px 18px; }
.faq-a p { font-size: 0.98rem; line-height: 1.65; color: var(--ink-2); max-width: 60ch; }
.faq-item[open] .faq-a { animation: faqOpen 0.5s var(--ease-out); }
@keyframes faqOpen { from { opacity: 0; transform: translateY(-6px); } }

.langs { margin-top: 30px; max-width: 420px; }
.langs-label { font-size: 1.5rem; line-height: 1; color: var(--ink-3); transform: rotate(-2deg); }
.lang-line { position: relative; height: 96px; }
.lang-string { position: absolute; left: 0; top: 4px; width: 100%; height: 40px; overflow: visible; }
.lang-tags li {
    /* A tag hangs from the string where it sags: y = 8 + 72·t(1 − t) at t = 1/6, 1/2, 5/6. */
    --y: 18px;
    position: absolute;
    top: calc(4px + var(--y) + 14px);
    left: 16.67%;
    padding: 13px 12px 7px;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--ink);
    background: var(--card);
    border-radius: 3px 3px 5px 5px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 6px 10px -5px rgba(40, 25, 5, 0.38);
    transform-origin: 50% -14px;
    translate: -50% 0;
    animation: tagSway 3.4s ease-in-out calc(var(--i) * -0.7s) infinite alternate;
}
.lang-tags li:nth-child(2) { --y: 26px; left: 50%; animation-duration: 4.1s; }
.lang-tags li:nth-child(3) { left: 83.33%; animation-duration: 3.7s; }
.lang-tags li::before {
    /* The punched hole. */
    content: '';
    position: absolute;
    left: 50%;
    top: 4px;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--paper-2);
    box-shadow: inset 0 1px 1px rgba(60, 40, 10, 0.4);
}
.lang-tags li::after {
    /* The thread from the hole up to the string. */
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% - 7px);
    height: 21px;
    border-left: 1.5px solid #B8935F;
}
.lang-tags li[lang="ar"] { font-size: 1rem; }
.lang-line + .lang-line { margin-top: -10px; }
.lang-line + .lang-line .lang-string { transform: scaleX(-1); }
@keyframes tagSway { from { rotate: -3deg; } to { rotate: 3deg; } }
.js .langs:not(.in) .lang-tags li { opacity: 0; transform: translateY(-16px) rotate(-14deg); }
.langs .lang-tags li { transition: opacity 0.5s ease calc(var(--i) * 0.09s), transform 0.9s var(--ease-paper) calc(var(--i) * 0.09s); }
@media (min-width: 900px) {
    .faq-grid { grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
    .faq-head { position: sticky; top: 96px; }
}

/* --- Final call ------------------------------------------------------------------------------------------ */
.os-final { position: relative; padding: 0 0 90px; }
.os-final > .torn + .container { padding-top: 70px; }
.final-card {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    padding: 44px 22px 130px;
    text-align: center;
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--sh-3);
    overflow: hidden;
}
.final-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(70, 52, 24, 0.1) 1.1px, transparent 1.3px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%);
    mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
.final-card > * { position: relative; }
.final-books { width: 120px; margin: 0 auto 10px; filter: drop-shadow(0 10px 10px rgba(40, 25, 5, 0.22)); }
.final-card h2 { font-size: clamp(2.2rem, 6.6vw, 3.4rem); margin-bottom: 10px; }
.final-card p { color: var(--ink-2); margin-bottom: 22px; }
.final-card .stores { justify-content: center; }
.final-card .os-reviews-head { margin-top: 22px; }
.crowd { position: absolute !important; left: 0; right: 0; bottom: -34px; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.crowd img { width: 84px; margin: 0 -12px; transition: transform 0.9s var(--ease-paper); }
.crowd img:nth-child(2), .crowd img:nth-child(4) { width: 78px; margin-bottom: -5px; }
.crowd img:nth-child(3) { width: 92px; }
.js .final-card:not(.in) .crowd img { transform: translateY(70%); }
.final-card.in .crowd img:nth-child(1) { transition-delay: 0.3s; }
.final-card.in .crowd img:nth-child(2) { transition-delay: 0.42s; }
.final-card.in .crowd img:nth-child(3) { transition-delay: 0.36s; }
.final-card.in .crowd img:nth-child(4) { transition-delay: 0.48s; }
.final-card.in .crowd img:nth-child(5) { transition-delay: 0.54s; }
@media (min-width: 900px) {
    .final-card { padding: 60px 40px 190px; }
    .crowd img { width: 140px; margin: 0 -10px; }
    .crowd img:nth-child(2), .crowd img:nth-child(4) { width: 128px; }
    .crowd img:nth-child(3) { width: 150px; }
}

/* --- Sticky download bar (phones) ------------------------------------------------------------------------- */
.sticky-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 10px;
    border-radius: 14px;
    background: rgba(255, 252, 245, 0.97);
    box-shadow: 0 0 0 1px var(--line), 0 16px 34px -10px rgba(40, 25, 5, 0.35);
    transform: translateY(150%);
    transition: transform 0.45s var(--ease-paper);
}
.sticky-bar.show { transform: none; }
.sticky-bar img { width: 40px; height: 40px; border-radius: 10px; }
.sticky-text { flex: 1; min-width: 0; line-height: 1.15; }
.sticky-text strong { display: block; font-family: var(--f-display); font-size: 1.05rem; color: var(--ink); }
.sticky-text span { font-size: 0.76rem; font-weight: 600; color: var(--ink-3); }
.sticky-bar .btn { min-height: 42px; padding: 10px 16px; font-size: 0.9rem; }
@media (min-width: 900px) { .sticky-bar { display: none; } }

@media (prefers-reduced-motion: reduce) {
    .ribbon-track, .stage-cloud, .stage-card, .os-stage .plane-track, .os-stage .plane-bob, .trophy, .journey-phone::after { animation: none !important; }
    .os-stage .plane-track { display: none; }
    .ribbon-track { flex-wrap: wrap; width: auto; justify-content: center; }
    .ribbon-track li[aria-hidden] { display: none; }
    .ribbon { -webkit-mask-image: none; mask-image: none; }
    .lang-tags li, .faq-item[open] .faq-a { animation: none !important; }
    .paper-tablet, .tickets li, .lang-tags li, .faq-item summary i, .faq-item summary i::after { transition: none !important; }
}
