/* Leafy Word Search app page. Loaded after styles.css; every rule is scoped under .lws so nothing else changes. */

.lws {
  --g: #3e9b5f;
  --g-dark: #1f6b47;
  --g-soft: #e3efe7;
  --cream: #fff6e3;
  --peach: #fbe3d3;
  --sun: #f5c66b;
  --card: var(--surface);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lws { --g: #6fb58c; --g-dark: #8ac7a4; --g-soft: #26362d; --cream: #2a241d; --peach: #33271f; --sun: #d9ad55; }
}
:root[data-theme="dark"] .lws { --g: #6fb58c; --g-dark: #8ac7a4; --g-soft: #26362d; --cream: #2a241d; --peach: #33271f; --sun: #d9ad55; }

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

/* Hero */
.lws .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));
}
.lws .hero2 .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.lws .hero2 h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); line-height: 1.08; }
.lws .hero2 h1 em { font-style: normal; color: var(--g-dark); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--sun) 55%, transparent) 62%); }
.lws .hero2 .lead { max-width: 560px; }
.lws .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; }
.lws .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); }
.lws .chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.lws .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); }

.lws .stage { position: relative; min-height: 560px; }
.lws .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)); }
.lws .phone { position: absolute; width: 46%; border-radius: 26px; overflow: hidden; background: #111; padding: 6px; box-shadow: 0 30px 60px -20px rgba(31, 107, 71, 0.45), 0 8px 18px rgba(0, 0, 0, 0.12); }
.lws .phone img { border-radius: 20px; }
.lws .phone.p1 { left: 6%; top: 4%; transform: rotate(-5deg); }
.lws .phone.p2 { right: 2%; top: 14%; transform: rotate(4deg); width: 48%; }
.lws .leafy-float { position: absolute; left: -2%; bottom: -6px; width: 30%; z-index: 2; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.18)); }
.lws .bubble { position: absolute; left: 26%; bottom: 16%; 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) {
  .lws .hero2 .wrap { grid-template-columns: 1fr; }
  .lws .stage { min-height: 520px; max-width: 520px; margin: 0 auto; width: 100%; }
}

/* Trust strip */
.lws .strip { padding: 0; margin-top: -28px; position: relative; z-index: 2; }
.lws .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; }
.lws .strip .stat { padding: 22px 18px; text-align: center; border-right: 1px solid var(--line); }
.lws .strip .stat:last-child { border-right: 0; }
.lws .strip .num { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--g-dark); line-height: 1.1; }
.lws .strip .lbl { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 720px) { .lws .strip .row { grid-template-columns: repeat(2, 1fr); } .lws .strip .stat:nth-child(2) { border-right: 0; } .lws .strip .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* Feature rows */
.lws .feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.lws .feature + .feature { margin-top: 88px; }
.lws .feature.flip .media { order: 2; }
.lws .feature h2 { margin: 0 0 0.4em; }
.lws .feature p { color: var(--muted); font-size: 1.08rem; }
.lws .ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.lws .ticks li { position: relative; padding-left: 30px; }
.lws .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; }
.lws .media { position: relative; display: flex; justify-content: center; }
.lws .media .blob { position: absolute; inset: 8% 10%; border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%; background: var(--g-soft); }
.lws .media .shot { position: relative; width: min(300px, 70%); border-radius: 30px; padding: 7px; background: #111; box-shadow: 0 30px 60px -24px rgba(31, 107, 71, 0.5); }
.lws .media .shot img { border-radius: 24px; }
.lws .media.duo .shot { width: min(240px, 46%); }
.lws .media.duo .shot + .shot { margin-left: -6%; margin-top: 10%; }
@media (max-width: 860px) { .lws .feature { grid-template-columns: 1fr; gap: 28px; } .lws .feature.flip .media { order: 0; } .lws .feature + .feature { margin-top: 64px; } }

/* Collections */
.lws .tint { background: var(--surface-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lws .cols10 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.lws .col { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.lws .col:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.3); }
.lws .col img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.lws .col div { padding: 12px 14px 16px; }
.lws .col b { display: block; font-family: var(--serif); font-size: 1.02rem; }
.lws .col span { color: var(--muted); font-size: 0.85rem; line-height: 1.4; display: block; margin-top: 4px; }
@media (max-width: 960px) { .lws .cols10 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .lws .cols10 { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

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

/* Steps */
.lws .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.lws .step { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 24px; position: relative; }
.lws .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; }
.lws .step h3 { margin: 6px 0 6px; }
.lws .step p { margin: 0; color: var(--muted); }
@media (max-width: 800px) { .lws .steps { grid-template-columns: 1fr; gap: 28px; } }

/* Leafy and badges */
.lws .meet { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center; }
.lws .meet .leafy-card { background: linear-gradient(160deg, var(--g-soft), var(--cream)); border: 1px solid var(--line); border-radius: 28px; padding: 28px; text-align: center; }
.lws .meet .leafy-card .hero-leafy { width: min(260px, 70%); margin: 0 auto; filter: drop-shadow(0 14px 16px rgba(31, 107, 71, 0.22)); }
.lws .stages { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 22px; align-items: end; }
.lws .stages figure { margin: 0; text-align: center; }
.lws .stages img { width: 100%; max-width: 64px; margin: 0 auto; }
.lws .stages figcaption { font-size: 0.68rem; font-weight: 700; color: var(--muted); margin-top: 4px; line-height: 1.2; }
.lws .badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.lws .badge { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px 12px; text-align: center; }
.lws .badge img { width: 72px; margin: 0 auto 6px; }
.lws .badge b { display: block; font-size: 0.88rem; line-height: 1.25; }
.lws .badge small { font-size: 0.74rem; line-height: 1.3; display: block; margin-top: 2px; }
@media (max-width: 860px) { .lws .meet { grid-template-columns: 1fr; } .lws .badges { grid-template-columns: repeat(2, 1fr); } }

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

/* Plus */
.lws .plus { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.lws .plan { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.lws .plan.featured { border: 2px solid var(--g); background: linear-gradient(180deg, var(--g-soft), var(--card) 60%); }
.lws .plan h3 { margin: 0 0 4px; }
.lws .plan .tagline { color: var(--muted); margin: 0 0 14px; }
.lws .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) { .lws .plus { grid-template-columns: 1fr; } }

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

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

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

/* Leafy has a dark outline, so in dark mode give it a lighter backdrop to sit on. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lws .meet .leafy-card { background: linear-gradient(160deg, #d8ebdf, #f3ead6); border-color: transparent; }
  :root:not([data-theme="light"]) .lws .meet .leafy-card .stages figcaption { color: #4a5a50; }
  :root:not([data-theme="light"]) .lws .stage::before { background: #3f6b52; }
}
:root[data-theme="dark"] .lws .meet .leafy-card { background: linear-gradient(160deg, #d8ebdf, #f3ead6); border-color: transparent; }
:root[data-theme="dark"] .lws .meet .leafy-card .stages figcaption { color: #4a5a50; }
:root[data-theme="dark"] .lws .stage::before { background: #3f6b52; }

/* Trailer: poster in the page, the player opens in a lightbox */
.lws .video { position: relative; left: 50%; width: min(1400px, calc(100vw - 32px)); transform: translateX(-50%); aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; background: #1d4a30; box-shadow: 0 30px 60px -28px rgba(31, 107, 71, 0.55); }
.lws .video-play { all: unset; display: block; position: relative; width: 100%; height: 100%; cursor: pointer; }
.lws .video-play img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.3s ease; }
.lws .video-play:hover img, .lws .video-play:focus-visible img { transform: scale(1.03); filter: brightness(1.08); }
.lws .video-btn { position: absolute; inset: 0; display: grid; place-items: center; transition: transform 0.2s ease; }
.lws .video-btn svg { width: clamp(64px, 10vw, 96px); height: auto; filter: drop-shadow(0 8px 18px rgba(10, 28, 16, 0.5)); }
.lws .video-play:hover .video-btn, .lws .video-play:focus-visible .video-btn { transform: scale(1.1); }
.lws .video-play:focus-visible { outline: 3px solid var(--g); outline-offset: -3px; }
.lws .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; }
.lws .video-note { text-align: center; color: var(--muted); font-size: 0.95rem; margin: 14px auto 0; max-width: 720px; }

.lws .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); }
.lws .video-modal::backdrop { background: rgba(8, 20, 10, 0.9); backdrop-filter: blur(6px); }
.lws .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); }
.lws .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lws .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; }
.lws .video-close:hover, .lws .video-close:focus-visible { background: rgba(255, 255, 255, 0.28); }
.lws .video-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 640px) { .lws .video-modal { width: 100vw; } .lws .video-frame { border-radius: 0; } .lws .video-close { top: -54px; right: 10px; } }

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