/* ═══════════════════════════════════════════════════════════════════════════
   x.css — the 2026 redesign's shared system. Pages that use it add "x" to
   their css list. Everything here is plain CSS; x.js adds the motion.

   Rules the design keeps:
   · Light and warm. White and paper, one ink, one blue for actions.
   · Each app owns a colour: Phrase Lab = indigo (--lab), Willowbrook = meadow
     (--wb). Never mix one app's colour, photos or reviews into the other.
   · Every heading a beginner must understand is short and literal. James's
     handwriting (.hand) is decoration: nothing depends on reading it.
   · Motion starts only when the visitor scrolls, points or presses. Sound and
     video with sound never start by themselves.
   ═══════════════════════════════════════════════════════════════════════ */

body.x { background: #fff; }
.x main { overflow-x: clip; }

/* sections */
.xs { padding: clamp(80px, 11vw, 160px) 0; position: relative; }
.xs-tight { padding: clamp(56px, 7vw, 100px) 0; }
.xs-paper { background: var(--paper); }
.xs-ink { background: var(--ink); color: #E8EAF0; }
.xs-lab { background: var(--lab-soft); }
.xs-wb { background: var(--wb-soft); }
.xw { width: min(1280px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.xw-narrow { width: min(900px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }

/* type */
.xk { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); font-variation-settings: 'opsz' 12, 'wdth' 90, 'wght' 700; }
.xk::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.xk-lab { color: var(--lab); } .xk-wb { color: var(--wb); } .xk-live { color: var(--live); } .xk-blue { color: var(--sound); }
.xh1 { font-family: var(--f-display); font-size: clamp(3.2rem, 1.6rem + 7vw, 8.4rem); line-height: .9; letter-spacing: -.032em; font-variation-settings: 'opsz' 96, 'wdth' 84, 'wght' 800; text-wrap: balance; }
.xh2 { font-family: var(--f-display); font-size: clamp(2.4rem, 1.4rem + 4.2vw, 5.6rem); line-height: .95; letter-spacing: -.03em; font-variation-settings: 'opsz' 96, 'wdth' 86, 'wght' 780; text-wrap: balance; }
.xh3 { font-family: var(--f-display); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.3rem); line-height: 1.05; letter-spacing: -.025em; font-variation-settings: 'opsz' 48, 'wdth' 92, 'wght' 740; }
.xh2 em, .xh1 em { font-style: normal; color: var(--sound); }
.xh-lab em { color: var(--lab); } .xh-wb em { color: var(--wb); }
.xlede { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.5; color: var(--ink-2); max-width: 40ch; text-wrap: pretty; }
.xlede b { color: var(--ink); font-weight: 650; }
.xs-ink .xlede { color: #A9AFBE; } .xs-ink .xlede b { color: #fff; }
.xsmall { font-size: .9rem; color: var(--ink-3); }
.xhead { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 80px); }
.xhead-center { justify-items: center; text-align: center; }
.xhead-center .xlede { margin-inline: auto; }
.xhead-split { grid-template-columns: 1.2fr 1fr; align-items: end; gap: 40px; }
@media (max-width: 860px) { .xhead-split { grid-template-columns: 1fr; } }

/* James's handwriting, for notes in the margin */
.hand { font-family: var(--f-hand); font-weight: 600; line-height: 1.05; }
.note { position: absolute; font-family: var(--f-hand); font-weight: 600; font-size: clamp(1.25rem, 1rem + .8vw, 1.7rem); line-height: 1.05; color: var(--sound); transform: rotate(-4deg); pointer-events: none; z-index: 3; }
.note svg { position: absolute; width: 60px; height: 44px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* buttons */
.xbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 999px; font-family: var(--f-display); font-size: 1.05rem; line-height: 1; text-decoration: none; white-space: nowrap; font-variation-settings: 'opsz' 24, 'wdth' 96, 'wght' 680; background: var(--ink); color: #fff; border: 0; cursor: pointer; transition: background .25s, box-shadow .25s, color .25s; will-change: transform; }
.xbtn:hover { color: #fff; background: #000; box-shadow: 0 14px 30px -12px rgba(14,17,24,.5); }
.xbtn .arr { display: inline-block; transition: transform .35s var(--ease-out); }
.xbtn:hover .arr { transform: translateX(4px); }
.xbtn-blue { background: var(--sound); box-shadow: 0 10px 24px -10px rgba(36,87,245,.7); } .xbtn-blue:hover { background: var(--sound-2); }
.xbtn-lab { background: var(--lab); box-shadow: 0 10px 24px -10px rgba(67,56,230,.7); } .xbtn-lab:hover { background: var(--lab-2); }
.xbtn-wb { background: var(--wb); box-shadow: 0 10px 24px -10px rgba(46,139,87,.7); } .xbtn-wb:hover { background: var(--wb-2); }
.xbtn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); } .xbtn-line:hover { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.xbtn-white { background: #fff; color: var(--ink); } .xbtn-white:hover { background: #fff; color: var(--ink); }
.xbtn-glass { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); } .xbtn-glass:hover { background: rgba(255,255,255,.26); }
.xbtn-lg { min-height: 64px; padding: 0 34px; font-size: 1.15rem; }
.xbtn-sm { min-height: 44px; padding: 0 18px; font-size: .95rem; }
.xbtns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.xbtn-note { font-size: .88rem; color: var(--ink-3); margin-top: 12px; }
.xlink { font-weight: 700; color: var(--ink); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat; padding-bottom: 3px; transition: background-size .35s var(--ease-out); }
.xlink:hover { background-size: 0 2px; background-position: 100% 100%; color: var(--ink); }

/* play buttons for James's voice */
.say { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 8px; border-radius: 999px; background: #fff; color: var(--ink); border: 0; box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 650; font-size: .95rem; cursor: pointer; transition: box-shadow .2s, background .2s; }
.say:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.say-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sound); color: #fff; flex: none; }
.say-ic svg { width: 14px; height: 14px; fill: currentColor; }
.say .bars { display: none; gap: 2px; align-items: center; height: 14px; }
.say .bars i { width: 3px; border-radius: 2px; background: currentColor; animation: bar 0.9s ease-in-out infinite; }
.say .bars i:nth-child(2) { animation-delay: -.3s; } .say .bars i:nth-child(3) { animation-delay: -.6s; }
@keyframes bar { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.say.is-playing .say-ic { background: var(--live); }
.say.is-playing .say-ic svg { display: none; }
.say.is-playing .bars { display: flex; }
.say-lab .say-ic { background: var(--lab); } .say-wb .say-ic { background: var(--wb); }

/* chips and stats */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.chip b { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 2px; border-radius: var(--radius-lg); overflow: hidden; }
.stat { padding: 28px 26px; background: #fff; display: grid; gap: 6px; }
.stat b { font-family: var(--f-display); font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); line-height: 1; letter-spacing: -.04em; font-variation-settings: 'opsz' 96, 'wdth' 86, 'wght' 780; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: .95rem; line-height: 1.35; }

/* cards */
.card { background: #fff; border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); overflow: hidden; }
.tilt { transform-style: preserve-3d; transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out); will-change: transform; }

/* device frames: honest boxes around real screenshots and recordings */
.laptop { position: relative; border-radius: 18px; padding: 10px; background: linear-gradient(#20242E, #0E1118); box-shadow: var(--shadow-3); }
.laptop::before { content: ''; position: absolute; top: 4px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #333946; }
.laptop-screen { border-radius: 10px; overflow: hidden; background: #fff; aspect-ratio: 16/10; position: relative; }
.laptop-screen > img, .laptop-screen > video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.laptop-base { height: 14px; margin: 0 -7%; border-radius: 0 0 14px 14px; background: linear-gradient(#D5D9E2, #A7ADBB); box-shadow: 0 20px 30px -18px rgba(0,0,0,.5); }
.phone { position: relative; width: 100%; max-width: 330px; aspect-ratio: 390/844; border-radius: 48px; padding: 11px; background: #0E1118; box-shadow: var(--shadow-3), inset 0 0 0 2px #2A2F3A; }
.phone-screen { width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: #fff; position: relative; }
.phone-screen > img, .phone-screen > video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.phone::after { content: ''; position: absolute; top: 20px; left: 50%; width: 30%; height: 24px; margin-left: -15%; border-radius: 14px; background: #0E1118; }
.frame-cap { font-size: .85rem; color: var(--ink-3); margin-top: 14px; display: flex; gap: 8px; align-items: center; }
.frame-cap::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--live); flex: none; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.faq details[open] { box-shadow: inset 0 0 0 1.5px var(--ink); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 64px; padding: 16px 22px; font-family: var(--f-display); font-size: 1.1rem; font-variation-settings: 'opsz' 24, 'wdth' 96, 'wght' 680; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-size: 1.3rem; transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 22px 20px; color: var(--ink-2); max-width: 70ch; }
.faq details > div p + p { margin-top: .8em; }

/* ticks */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.ticks li::before { content: ''; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: var(--sound) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.ticks-lab li::before { background-color: var(--lab); } .ticks-wb li::before { background-color: var(--wb); }

/* marquee */
.marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; flex: none; gap: 14px; padding-right: 14px; animation: marquee var(--speed, 40s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* reveal states (x.js adds .in when the element enters the screen) */
.js [data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms); }
.js [data-reveal="left"] { transform: translateX(-50px); }
.js [data-reveal="right"] { transform: translateX(50px); }
.js [data-reveal="zoom"] { transform: scale(.92); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--i) * 45ms + var(--d, 0) * 1ms); }
.js [data-split].in .w > span { transform: none; }
.js [data-draw] path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease-out) .3s; }
.js [data-draw].in path { stroke-dashoffset: 0; }

/* scroll progress line under the bar */
.xprog { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 101; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--sound), var(--lab), var(--live)); pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-split] .w > span { opacity: 1 !important; transform: none !important; transition: none !important; }
  .marquee-track { animation: none; }
}

/* sticky buy bar for phones on the app pages: appears once the hero is gone,
   hides again while the real offer (or the footer) is on screen */
.stick { display: none; }
@media (max-width: 760px) {
  .stick { display: flex; gap: 8px; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 80; padding: 8px; border-radius: 22px; background: rgba(255,255,255,.9); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); box-shadow: 0 0 0 1px var(--line), 0 16px 40px -12px rgba(14,17,24,.35); transform: translateY(140%); transition: transform .5s var(--ease-out); }
  .stick.on { transform: none; }
  .stick .xbtn { flex: 1; min-height: 50px; padding: 0 14px; font-size: .98rem; }
}
