/* WordPith app page. Loaded after styles.css; every rule is scoped under .wp so nothing else changes.
   Same layout as the Leafy Word Search page, in WordPith's greens (src/theme/tokens.ts). */

.wp {
  --g: #3a8337;
  --g-dark: #265624;
  --g-soft: #e6efd6;
  --cream: #f1f4e4;
  --peach: #f6e7c6;
  --sun: #c9962e;
  --card: var(--surface);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wp { --g: #6fc25c; --g-dark: #a5db84; --g-soft: #22301f; --cream: #1e2b21; --peach: #33291a; --sun: #d9ad55; }
}
:root[data-theme="dark"] .wp { --g: #6fc25c; --g-dark: #a5db84; --g-soft: #22301f; --cream: #1e2b21; --peach: #33291a; --sun: #d9ad55; }

.wp img { max-width: 100%; height: auto; display: block; }
.wp h1, .wp h2 { letter-spacing: -0.01em; }
.wp .kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 800; color: var(--g-dark); margin: 0 0 12px; }
.wp .section-head { max-width: 680px; margin: 0 auto 36px; text-align: center; }
.wp .section-head h2 { margin: 0 0 0.35em; }
.wp .section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.wp section { padding: 72px 0; }
.wp .btn { background: var(--g); }
.wp .btn:hover { background: var(--g-dark); }
.wp .btn.secondary { background: transparent; }

/* Hero */
.wp .hero2 {
  position: relative; overflow: hidden; padding: 56px 0 80px;
  background: radial-gradient(1000px 500px at 85% 0%, color-mix(in srgb, var(--g) 22%, transparent), transparent 60%),
              linear-gradient(180deg, var(--g-soft), var(--bg));
}
.wp .hero2 .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.wp .hero2 h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); line-height: 1.08; }
.wp .hero2 h1 em { font-style: normal; color: var(--g-dark); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--sun) 55%, transparent) 62%); }
.wp .hero2 .lead { max-width: 560px; }
.wp .soon { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 10px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 0.95rem; }
.wp .soon .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sun) 30%, transparent); }
.wp .chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.wp .chips li { background: var(--card); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; color: var(--muted); }

.wp .stage { position: relative; min-height: 560px; }
.wp .stage::before { content: ""; position: absolute; inset: 6% 4% 2% 10%; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; background: color-mix(in srgb, var(--g) 18%, var(--cream)); }
.wp .phone { position: absolute; width: 46%; border-radius: 26px; overflow: hidden; background: #111; padding: 6px; box-shadow: 0 30px 60px -20px rgba(38, 86, 36, 0.42), 0 8px 18px rgba(0, 0, 0, 0.12); }
.wp .phone img { border-radius: 20px; }
.wp .phone.p1 { left: 6%; top: 4%; transform: rotate(-5deg); }
.wp .phone.p2 { right: 2%; top: 14%; transform: rotate(4deg); width: 48%; }
.wp .tree-float { position: absolute; left: -4%; bottom: -14px; width: 44%; z-index: 2; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.16)); pointer-events: none; }
.wp .bubble { position: absolute; left: 34%; bottom: 4%; z-index: 3; background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-weight: 700; font-size: 0.95rem; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1); }
@media (max-width: 900px) {
  .wp .hero2 .wrap { grid-template-columns: 1fr; }
  .wp .stage { min-height: 520px; max-width: 520px; margin: 0 auto; width: 100%; }
}

/* Trust strip */
.wp .strip { padding: 0; margin-top: -28px; position: relative; z-index: 2; }
.wp .strip .row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.25); overflow: hidden; }
.wp .strip .stat { padding: 22px 18px; text-align: center; border-right: 1px solid var(--line); }
.wp .strip .stat:last-child { border-right: 0; }
.wp .strip .num { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--g-dark); line-height: 1.1; }
.wp .strip .lbl { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 720px) { .wp .strip .row { grid-template-columns: repeat(2, 1fr); } .wp .strip .stat:nth-child(2) { border-right: 0; } .wp .strip .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* Feature rows */
.wp .feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.wp .feature + .feature { margin-top: 88px; }
.wp .feature.flip .media { order: 2; }
.wp .feature h2 { margin: 0 0 0.4em; }
.wp .feature p { color: var(--muted); font-size: 1.08rem; }
.wp .ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.wp .ticks li { position: relative; padding-left: 30px; }
.wp .ticks li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 50%; background: var(--g); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M8 14.4 3.6 10l1.4-1.4 3 3 7-7L16.4 6z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M8 14.4 3.6 10l1.4-1.4 3 3 7-7L16.4 6z'/%3E%3C/svg%3E") center/contain no-repeat; }
.wp .media { position: relative; display: flex; justify-content: center; }
.wp .media .blob { position: absolute; inset: 8% 10%; border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%; background: var(--g-soft); }
.wp .media .shot { position: relative; width: min(300px, 70%); border-radius: 30px; padding: 7px; background: #111; box-shadow: 0 30px 60px -24px rgba(47, 99, 34, 0.45); }
.wp .media .shot img { border-radius: 24px; }
.wp .media.duo { align-items: flex-start; }
.wp .media.duo .shot { width: min(240px, 46%); }
.wp .media.duo .shot + .shot { margin-left: -6%; margin-top: 10%; }
@media (max-width: 860px) { .wp .feature { grid-template-columns: 1fr; gap: 28px; } .wp .feature.flip .media { order: 0; } .wp .feature + .feature { margin-top: 64px; } }

/* Packs */
.wp .tint { background: var(--surface-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wp .pack-group + .pack-group { margin-top: 40px; }
.wp .pack-group h3 { margin: 0 0 14px; font-size: 1.15rem; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.wp .pack-group h3 small { font-family: var(--sans, inherit); font-weight: 400; font-size: 0.92rem; }
.wp .packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.wp .pack { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.wp .pack:hover { transform: translateY(-3px); box-shadow: 0 16px 28px -18px rgba(0, 0, 0, 0.3); }
.wp .pack .eg { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 12px; }
.wp .pack .t { background: var(--g); color: #fff; font-weight: 800; font-size: 0.74rem; letter-spacing: 0.04em; padding: 4px 9px; border-radius: 8px; }
.wp .pack.exam .t { background: var(--sun); color: #231a05; }
.wp .pack .eg i { font-style: normal; color: var(--muted); font-size: 0.85rem; }
.wp .pack .eg i:last-child { flex-basis: 100%; margin-top: 2px; }
.wp .pack b { display: block; font-family: var(--serif); font-size: 1.02rem; line-height: 1.25; }
.wp .pack span { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.4; margin-top: 4px; }
@media (max-width: 1000px) { .wp .packs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .wp .packs { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 420px) { .wp .packs { grid-template-columns: 1fr; } }

/* Screenshot gallery */
.wp .gallery { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 24px 28px; margin: 0 -24px; scrollbar-width: thin; }
.wp .gallery figure { flex: 0 0 auto; width: 240px; margin: 0; scroll-snap-align: center; }
.wp .gallery .frame { border-radius: 28px; padding: 6px; background: #111; box-shadow: 0 24px 44px -24px rgba(0, 0, 0, 0.5); }
.wp .gallery img { border-radius: 22px; }
.wp .gallery figcaption { text-align: center; margin-top: 12px; font-weight: 700; font-size: 0.95rem; }
.wp .gallery figcaption small { display: block; font-weight: 400; }
.wp .tablet { margin: 28px auto 0; max-width: 880px; padding: 10px; background: #111; border-radius: 22px; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.5); }
.wp .tablet img { border-radius: 14px; }
.wp .tablet-cap { text-align: center; color: var(--muted); margin-top: 14px; }

/* Steps */
.wp .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.wp .step { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 24px; position: relative; }
.wp .step::before { counter-increment: s; content: counter(s); position: absolute; top: -16px; left: 22px; width: 34px; height: 34px; border-radius: 50%; background: var(--g); color: #fff; font-weight: 800; display: grid; place-items: center; }
.wp .step h3 { margin: 6px 0 6px; }
.wp .step p { margin: 0; color: var(--muted); }
@media (max-width: 800px) { .wp .steps { grid-template-columns: 1fr; gap: 28px; } }

/* The tree and its stages */
.wp .meet { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.wp .meet .tree-card { background: linear-gradient(160deg, var(--g-soft), var(--cream)); border: 1px solid var(--line); border-radius: 28px; padding: 26px 22px 20px; }
.wp .stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-items: end; }
.wp .stages figure { margin: 0; text-align: center; }
.wp .stages img { width: 100%; max-width: 200px; margin: 0 auto; }
.wp .stages figcaption { margin-top: 4px; font-weight: 800; font-size: 0.95rem; line-height: 1.25; }
.wp .stages figcaption small { display: block; font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.wp .meet .cycle { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.wp .meet .cycle li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 0.9rem; }
.wp .meet .cycle li small { font-weight: 500; }
@media (max-width: 860px) { .wp .meet { grid-template-columns: 1fr; } }

/* Compare / principles */
.wp .principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.wp .pr { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.wp .pr h3 { margin: 0 0 6px; font-size: 1.1rem; }
.wp .pr p { margin: 0; color: var(--muted); font-size: 0.98rem; }
@media (max-width: 860px) { .wp .principles { grid-template-columns: 1fr; } }

/* Plus */
.wp .plus { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.wp .plan { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.wp .plan.featured { border: 2px solid var(--g); background: linear-gradient(180deg, var(--g-soft), var(--card) 60%); }
.wp .plan h3 { margin: 0 0 4px; }
.wp .plan .tagline { color: var(--muted); margin: 0 0 14px; }
.wp .plan .tag { display: inline-block; background: var(--g); color: #fff; font-size: 0.74rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; letter-spacing: 0.04em; }
@media (max-width: 800px) { .wp .plus { grid-template-columns: 1fr; } }

.wp .plus-note { text-align: center; color: var(--muted); max-width: 680px; margin: 26px auto 0; }

/* FAQ */
.wp .faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.wp .faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.wp .faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.wp .faq summary::-webkit-details-marker { display: none; }
.wp .faq summary::after { content: "+"; font-size: 1.4rem; color: var(--g); line-height: 1; transition: transform 0.2s; }
.wp .faq details[open] summary::after { transform: rotate(45deg); }
.wp .faq details p { margin: 0 0 18px; color: var(--muted); }

/* Final call to action */
.wp .cta { position: relative; overflow: hidden; border-radius: 30px; color: #fff; padding: 56px 32px; text-align: center; background: linear-gradient(135deg, #4f8a3c, #2f6322); }
.wp .cta::before { content: ""; position: absolute; inset: 0; background: url("../assets/wordpith/hero-tree.webp") right -20px bottom -40px/auto 125% no-repeat; opacity: 0.22; }
.wp .cta > * { position: relative; }
.wp .cta h2 { color: #fff; margin: 0 0 0.3em; }
.wp .cta p { color: #eef5e6; max-width: 560px; margin: 0 auto 22px; font-size: 1.1rem; }
.wp .cta .btn { background: #fff; color: var(--g-dark); }
.wp .cta .btn:hover { background: var(--cream); }
.wp .cta .btn.secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.wp .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.wp .fact { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.wp .fact h3 { margin: 0 0 4px; font-size: 1rem; }
.wp .fact p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 800px) { .wp .facts { grid-template-columns: 1fr; } }

/* Gentle entrance, only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .wp .rise { animation: wp-rise 0.7s ease both; }
  .wp .rise.d2 { animation-delay: 0.12s; }
  .wp .rise.d3 { animation-delay: 0.24s; }
  .wp .phone.p1 { animation: wp-bob 7s ease-in-out infinite; }
  .wp .phone.p2 { animation: wp-bob 8s ease-in-out 1s infinite; }
  @keyframes wp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes wp-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
}

/* The tree's leaves are dark green, so in dark mode give the stages a light backdrop to sit on. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wp .meet .tree-card { background: linear-gradient(160deg, #dfe9d1, #f0f2e2); border-color: transparent; }
  :root:not([data-theme="light"]) .wp .meet .tree-card .stages figcaption { color: #1e3326; }
  :root:not([data-theme="light"]) .wp .meet .tree-card .stages figcaption small { color: #5f6f60; }
  :root:not([data-theme="light"]) .wp .stage::before { background: #36532f; }
}
:root[data-theme="dark"] .wp .meet .tree-card { background: linear-gradient(160deg, #dfe9d1, #f0f2e2); border-color: transparent; }
:root[data-theme="dark"] .wp .meet .tree-card .stages figcaption { color: #1e3326; }
:root[data-theme="dark"] .wp .meet .tree-card .stages figcaption small { color: #5f6f60; }
:root[data-theme="dark"] .wp .stage::before { background: #36532f; }

/* Trailer: poster in the page, the player opens in a lightbox */
.wp .video { position: relative; left: 50%; width: min(1400px, calc(100vw - 32px)); transform: translateX(-50%); aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; background: #173a1c; box-shadow: 0 30px 60px -28px rgba(38, 86, 36, 0.55); }
.wp .video-play { all: unset; display: block; position: relative; width: 100%; height: 100%; cursor: pointer; }
.wp .video-play img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.3s ease; }
.wp .video-play:hover img, .wp .video-play:focus-visible img { transform: scale(1.03); filter: brightness(1.08); }
.wp .video-btn { position: absolute; inset: 0; display: grid; place-items: center; transition: transform 0.2s ease; }
.wp .video-btn svg { width: clamp(64px, 10vw, 96px); height: auto; filter: drop-shadow(0 8px 18px rgba(10, 28, 16, 0.5)); }
.wp .video-play:hover .video-btn, .wp .video-play:focus-visible .video-btn { transform: scale(1.1); }
.wp .video-play:focus-visible { outline: 3px solid var(--g); outline-offset: -3px; }
.wp .video-len { position: absolute; right: 14px; bottom: 12px; z-index: 1; padding: 3px 9px; border-radius: 8px; background: rgba(10, 28, 16, 0.78); color: #fff; font-weight: 700; font-size: 0.9rem; }
.wp .video-note { text-align: center; color: var(--muted); font-size: 0.95rem; margin: 14px auto 0; max-width: 720px; }

.wp .video-modal { border: 0; padding: 0; margin: auto; background: transparent; max-width: none; max-height: none; overflow: visible;
  width: min(96vw, calc((100vh - 120px) * 16 / 9), 2400px); width: min(96vw, calc((100dvh - 120px) * 16 / 9), 2400px); }
.wp .video-modal::backdrop { background: rgba(8, 20, 10, 0.9); backdrop-filter: blur(6px); }
.wp .video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.7); }
.wp .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wp .video-close { all: unset; position: absolute; top: -52px; right: 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.wp .video-close:hover, .wp .video-close:focus-visible { background: rgba(255, 255, 255, 0.28); }
.wp .video-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 640px) { .wp .video-modal { width: 100vw; } .wp .video-frame { border-radius: 0; } .wp .video-close { top: -54px; right: 10px; } }

/* Shorts: vertical posters, shown as each one publishes */
.wp .shorts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.wp .short { width: calc((100% - 5 * 22px) / 6); }
@media (max-width: 900px) { .wp .short { width: calc((100% - 2 * 22px) / 3); } }
@media (max-width: 560px) { .wp .shorts { gap: 16px; } .wp .short { width: calc((100% - 16px) / 2); } }
.wp .short[hidden] { display: none; }
.wp .short-play { all: unset; display: block; position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; background: #173a1c; cursor: pointer; box-shadow: 0 22px 44px -24px rgba(38, 86, 36, 0.6); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.wp .short-play img { width: 100%; height: 100%; object-fit: cover; }
.wp .short-play:hover, .wp .short-play:focus-visible { transform: translateY(-4px); box-shadow: 0 28px 52px -22px rgba(38, 86, 36, 0.7); }
.wp .short-play:focus-visible { outline: 3px solid var(--g); outline-offset: 2px; }
.wp .short-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); transition: transform 0.2s ease; }
.wp .short-play:hover .short-btn, .wp .short-play:focus-visible .short-btn { transform: translate(-50%, -50%) scale(1.1); }
.wp .short-btn svg { filter: drop-shadow(0 6px 12px rgba(10, 28, 16, 0.5)); }
.wp .short-title { margin: 10px 4px 0; font-size: 0.92rem; line-height: 1.35; color: var(--muted); text-align: center; }
