/* The illustrated Premium page (/{locale}/pricing), after the iOS paywall:
   a painted section per feature on its own wash of colour, then the plans. */
.pp { --pp-he: "Rubik", sans-serif; position: relative; color: var(--text); }
/* The sections run edge to edge, past the site's page column. */
.pub-main:has(> .pp) { max-width: none; padding: 0; }
.pp-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pp-section { --wash: #f9f2e1; --accent: #297e8a; position: relative; background: var(--wash); padding-bottom: 56px; }
.pp-section + .pp-section { border-top: 10px solid #fff; }
.pp-section--stories { --wash: #faf2e0; --accent: #29858f; }
.pp-section--flashcards { --wash: #ebf2e3; --accent: #336b52; }
.pp-section--offline { --wash: #e6f0fa; --accent: #427abd; }
.pp-section--dictionary { --wash: #fcebde; --accent: #b8663d; }
.pp-section--audio { --wash: #f2ebf5; --accent: #6b3366; }
.pp-section--numbers { --wash: #f5f5e3; --accent: #99802e; }
.pp-pricing { --wash: #fcf2f0; }

/* Paintings keep their own proportions, so layers and mock-ups placed in
   percentages land on the painted subject at any width. */
.pp-figure { position: relative; overflow: hidden; }
.pp-canvas { --ar: 3 / 4; position: relative; container-type: inline-size; aspect-ratio: var(--ar); width: 100%; margin-inline: auto; }
.pp-canvas--branch { --ar: 4 / 3; }
.pp-canvas--jaffa { --ar: 3 / 2.85; }
.pp-paint { position: absolute; inset: 0; mix-blend-mode: multiply; -webkit-mask-image: linear-gradient(#000 calc(100% - 90px), transparent); mask-image: linear-gradient(#000 calc(100% - 90px), transparent); }
.pp-canvas--jaffa .pp-paint, .pp-canvas--jaffa .pp-layer { inset: 0 0 auto; height: auto; aspect-ratio: 3 / 4; }
.pp-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pp-canvas:not(.pp-canvas--jaffa) .pp-paint > picture:first-child .pp-layer { animation: pp-drift 16s ease-in-out infinite alternate; transform-origin: 50% 45%; }

.pp-boats { animation: pp-bob 3.8s ease-in-out infinite alternate; }
.pp-clouds { animation: pp-clouds 7.6s ease-in-out infinite alternate; }
.pp-sprig { transform-origin: 0 50%; animation: pp-sway 3.8s ease-in-out infinite alternate; }
.pp-dusk-branch { transform-origin: 0 19%; animation: pp-sway 3.8s ease-in-out infinite alternate; }
/* The plane and its trail are one cut-out, its nose 82% along. It crosses at one
   steady speed once it is first on screen, fades out at the right, and returns. */
.pp .pp-plane { position: absolute; width: 190%; max-width: none; height: auto; top: 28%; left: -164%; rotate: -5.5deg; transform-origin: 82% 50%; animation: pp-fly 20s linear infinite paused; }
.pp-plane.is-flying { animation-play-state: running; }
@keyframes pp-drift { to { transform: scale(1.045); } }
@keyframes pp-bob { from { transform: translateY(-1.5px) rotate(-.5deg); } to { transform: translateY(2.5px) rotate(.5deg); } }
@keyframes pp-clouds { from { transform: translateX(-3.5%); } to { transform: translateX(3.5%); } }
@keyframes pp-sway { from { rotate: -1.2deg; } to { rotate: 1.2deg; } }
@keyframes pp-fly { 0% { left: -164%; opacity: 1; } 88% { opacity: 1; } 94%, 100% { left: -26%; opacity: 0; } }
@keyframes pp-fly-wide { 0% { left: -80.4%; opacity: 1; } 88% { opacity: 1; } 94%, 100% { left: 24.6%; opacity: 0; } }

.pp-copy { position: relative; max-width: 560px; margin: 0 auto; padding: 8px 28px 0; text-align: center; }
.pp-eyebrow { margin: 0 0 8px; font-weight: 700; font-size: 19px; color: var(--accent); }
.pp-copy h2 { margin: 0 0 10px; font-family: var(--font-sans); font-size: clamp(28px, 4vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.pp-detail { margin: 0; font-size: 17px; line-height: 1.5; color: #61655c; }
.pp-he { font-family: var(--pp-he); }

/* Mock-ups sit over the painting, low enough that its subject shows above. */
.pp-mock { position: absolute; left: 50%; top: 56%; translate: -50% -50%; }
.pp-flashcard { width: 220px; height: 168px; top: 52%; }
.pp-flashcard__back, .pp-flashcard__front { position: absolute; inset: 0; border-radius: 22px; }
.pp-flashcard__back { background: rgba(255, 255, 255, .75); rotate: -7deg; translate: -14px 10px; }
.pp-flashcard__front { display: grid; justify-items: center; align-content: center; gap: 4px; background: #fff; rotate: 3deg; box-shadow: 0 8px 36px rgba(0, 0, 0, .12); }
.pp-flashcard__front .pp-he { font-size: 46px; line-height: 1.1; }
.pp-flashcard__sound { font-size: 15px; color: #61655c; }
.pp-flashcard hr { width: 168px; margin: 8px 0; border: 0; border-top: 1px solid #e8e8e6; }
.pp-flashcard__meaning { font-size: 19px; font-weight: 600; }

/* The verb on the jar's own label, its forms set around the jar. */
.pp-jar { position: absolute; inset: 0; }
.pp-jar__label { position: absolute; left: 50%; top: 48.5%; translate: -50% -50%; font-size: 6.2cqw; color: #5c4d38; }
.pp-jar__form { position: absolute; left: clamp(54px, var(--x), calc(100% - 54px)); top: var(--y); translate: -50% -50%; rotate: var(--tilt); padding: 4px 12px; border-radius: 999px; background: #fff; box-shadow: 0 3px 16px rgba(0, 0, 0, .1); font-size: min(22px, 4.5cqw); white-space: nowrap; }

.pp-audio { display: grid; gap: 14px; justify-items: center; padding: 18px 20px; border-radius: 22px; background: #fff; box-shadow: 0 8px 36px rgba(0, 0, 0, .12); top: 64%; }
.pp-audio p { margin: 0; font-size: 28px; white-space: nowrap; }
.pp-audio mark { padding: 0 4px; border-radius: 6px; background: rgba(255, 200, 0, .35); color: inherit; }
.pp-audio__row { display: flex; align-items: center; gap: 14px; }
.pp-audio__speaker { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #6b3366; color: #fff; }
.pp-audio__speaker svg { width: 22px; height: 22px; }
.pp-audio__wave { display: flex; align-items: center; gap: 3px; height: 40px; }
.pp-audio__wave i { width: 4px; height: calc(34px * var(--h)); min-height: 6px; border-radius: 2px; background: rgba(107, 51, 102, .25); animation: pp-wave var(--t) ease-in-out var(--d) infinite alternate; }
.pp-audio__wave i.pp-audio__played { background: #6b3366; }
@keyframes pp-wave { from { scale: 1 .55; } to { scale: 1 1.3; } }

/* Covers drift slowly sideways, the row repeated so it never ends. */
.pp-covers { margin: 24px -28px 0; overflow: hidden; }
.pp-covers__track { display: flex; gap: 12px; width: max-content; animation: pp-covers 48s linear infinite; }
.pp-covers img { width: 96px; height: 136px; object-fit: cover; border-radius: 12px; box-shadow: 0 3px 12px rgba(0, 0, 0, .1); }
@keyframes pp-covers { to { translate: calc(-50% - 6px) 0; } }
[dir='rtl'] .pp-covers__track { animation-name: pp-covers-rtl; }
@keyframes pp-covers-rtl { to { translate: calc(50% + 6px) 0; } }

/* The plans. */
.pp-pricing { padding-bottom: 72px; }
.pp-pricing__intro { max-width: 560px; margin: 0 auto; padding: 0 22px; }
.pp-figure--door { max-height: 420px; aspect-ratio: 3 / 2.6; }
.pp-figure--door .pp-layer { object-position: 50% 40%; }
.pp-pricing h2 { margin: 4px 0 20px; font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.pp-quote { margin: 0 0 22px; padding: 18px; border-radius: 18px; background: rgba(255, 255, 255, .75); }
.pp-quote__stars { margin: 0 0 8px; color: #eda838; letter-spacing: 2px; }
.pp-quote blockquote { margin: 0 0 12px; font-size: 17px; font-weight: 600; line-height: 1.45; }
.pp-quote figcaption { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #61655c; }
.pp-quote__avatar { display: grid; place-items: end center; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #e2e2dc; color: #fff; }
.pp-quote__avatar svg { width: 28px; height: 28px; }
.pp-pricing__plans { max-width: 560px; margin: 0 auto; padding: 0 22px; }

/* One green button to the plans, on a frosted wash that fades upward, until the
   plans are in view and have their own. */
.pp-float { position: fixed; inset: auto 0 0; z-index: 20; display: flex; justify-content: center; padding: 34px 22px max(14px, env(safe-area-inset-bottom)); pointer-events: none; transition: opacity .25s ease, visibility .25s; }
.pp-float::before { content: ''; position: absolute; inset: 0; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); background: rgba(255, 255, 255, .25); -webkit-mask-image: linear-gradient(transparent, #000 55%); mask-image: linear-gradient(transparent, #000 55%); }
.pp-float__button { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 440px; min-height: 56px; border-radius: 16px; background: #7aa34c; color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; pointer-events: auto; }
.public-site .pp-float__button, .public-site .pp-float__button:hover { color: #fff; }
.pp-float__button:hover { background: #6d9442; }
.pp-float__button svg { width: 18px; height: 18px; }
.pp-float.is-hidden { opacity: 0; visibility: hidden; }

/* Wide screens: each painting has a wide version (resources/art, the `web…`
   jobs) that carries the same scene out to both edges at 2:1. Mock-ups move to
   the same subjects in its coordinates. */
@media (min-width: 900px) and (max-width: 1099px) {
    .pp-canvas, .pp-canvas--branch, .pp-canvas--jaffa { --ar: 2 / 1; }
    .pp-canvas--jaffa .pp-paint, .pp-canvas--jaffa .pp-layer { inset: 0; height: 100%; aspect-ratio: auto; }
    .pp-jar__label { top: 46%; font-size: 3.1cqw; }
    .pp-jar__form { left: var(--wx); top: var(--wy); font-size: min(26px, 1.9cqw); padding: 5px 14px; }
    .pp-flashcard { top: 50%; }
    .pp-audio { top: 60%; }
    .pp .pp-plane { width: 95%; top: 23%; left: -80%; animation-name: pp-fly-wide; animation-duration: 28s; }
}
@media (min-width: 900px) {
    .pp-copy { max-width: 680px; padding: 4px 32px 0; }
    .pp-copy h2 { font-size: 46px; }
    .pp-detail { font-size: 19px; }
    .pp-eyebrow { font-size: 20px; }
    .pp-covers { margin: 32px calc(50% - 50vw) 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
    .pp-pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; column-gap: 56px; padding: 48px max(32px, calc((100% - 1120px) / 2)) 96px; }
    .pp-pricing__intro, .pp-pricing__plans { max-width: none; padding: 0; }
    .pp-pricing__plans { padding-top: 48px; }
    .pp-float::before { display: none; }
}

/* Wider desktops: each feature is a 50/50 row, the painting (its portrait version, which
   the mock-ups are placed for) on one half and the benefit on the other, alternating sides,
   with the section's own wash running behind both. */
@media (min-width: 1100px) {
    .pp-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
        column-gap: clamp(40px, 5vw, 88px); padding: 56px max(40px, calc((100% - 1200px) / 2)); }
    .pp-section .pp-figure { width: 100%; max-width: 520px; justify-self: end; border-radius: 28px; }
    .pp-section .pp-copy { max-width: 520px; margin: 0; padding: 0; text-align: start; justify-self: start; }
    .pp-section:nth-of-type(even) .pp-figure { order: 2; justify-self: start; }
    .pp-section:nth-of-type(even) .pp-copy { order: 1; justify-self: end; }
    .pp-section .pp-paint { -webkit-mask-image: none; mask-image: none; }
    .pp-section .pp-copy h2 { font-size: clamp(38px, 3.4vw, 50px); }
    .pp-section .pp-covers { margin: 32px 0 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
    .pp-section--stories .pp-canvas--jaffa .pp-paint, .pp-section--stories .pp-canvas--jaffa .pp-layer { inset: 0; height: 100%; aspect-ratio: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .pp *, .pp-plane { animation: none !important; }
    .pp-plane { left: -100%; }
}
