/*
Theme Name: Laffun
Theme URI: https://example.com/
Author: Doug Springfield
Description: Storefront theme for the Laffun Controller, a modern drop-in controller for vintage Original Peter Figuren and Bibi Products Laffun Heads. WooCommerce ready. Activating it creates the Home, Features, Phone App, Install, Send It In and FAQ pages for you.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.3
License: Proprietary
Text Domain: laffun
WC requires at least: 7.0
*/

/* ===================== Tokens ===================== */
:root {
  --cream: #f7f0e3;
  --paper: #fffaf1;
  --ink: #221c2b;
  --ink-2: #463e52;
  --muted: #756c80;
  --line: #e7dcc9;
  --red: #e2432f;
  --red-dk: #b92e1d;
  --mustard: #f4b53f;
  --mustard-lt: #fde9bf;
  --teal: #16867e;
  --teal-lt: #d6efea;
  --night: #17121f;
  --night-2: #231c2e;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(34, 28, 43, .06), 0 8px 28px rgba(34, 28, 43, .08);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px;
}

/* ===================== Base ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--red-dk); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.18rem; color: var(--ink-2); max-width: 46em; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-block;
  font: 700 .78rem/1 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red-dk);
  margin-bottom: 14px;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font: 700 1rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 4px 0 var(--red-dk); }
.btn-primary:hover { color: #fff; box-shadow: 0 6px 0 var(--red-dk); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row { justify-content: center; }

/* ===================== Header ===================== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 240, 227, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 52px; height: 52px; }
.brand-name { font: 800 1.45rem/1 var(--display); }
.brand-name small { display: block; font: 600 .66rem/1.2 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav a {
  display: block; padding: 9px 13px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.main-nav a:hover, .main-nav .current a { background: var(--mustard-lt); color: var(--ink); }
.header-cta { padding: 11px 20px; font-size: .92rem; }
.cart-link { position: relative; display: inline-flex; padding: 8px; color: var(--ink); }
.cart-link svg { width: 26px; height: 26px; }
.cart-count {
  position: absolute; top: 0; right: -2px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff;
  font: 700 .7rem/18px var(--body); text-align: center;
}
.nav-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 72px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 10px 20px 18px; display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav a { padding: 12px 14px; }
  .header-cta { display: none; }
}

/* ===================== Sections ===================== */
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }
.section-head { margin-bottom: 48px; }
.section-head.center { max-width: 760px; margin-left: auto; margin-right: auto; }
.bg-paper { background: var(--paper); }
.bg-night { background: var(--night); color: #efe8f6; }
.bg-night h2, .bg-night h3 { color: #fff; }
.bg-night .lead, .bg-night .muted { color: #b9aec8; }
.bg-night .eyebrow { color: var(--mustard); }
.bg-mustard { background: var(--mustard); }
.bg-teal { background: var(--teal); color: #fff; }

/* Wavy divider for a bit of fun */
.wave { display: block; width: 100%; height: 40px; }

/* ===================== Hero ===================== */
.hero { padding: 70px 0 40px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--red); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .16em;
  background: var(--mustard); z-index: -1; border-radius: 4px;
}
.hero-art { position: relative; }
.hero-art .burst {
  position: absolute; inset: 4% 2% 2% 6%;
  background: radial-gradient(circle at 50% 50%, var(--mustard) 0 52%, transparent 53%);
  border-radius: 50%;
}
.hero-art img, .hero-art svg { position: relative; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.price-tag {
  position: absolute; left: -2%; bottom: 0;
  background: var(--red); color: #fff;
  width: 112px; height: 112px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  font: 800 1.9rem/1 var(--display);
  transform: rotate(10deg);
  box-shadow: 0 6px 0 var(--red-dk);
}
.price-tag small { display: block; font: 700 .68rem/1.2 var(--body); letter-spacing: .1em; text-transform: uppercase; }

/* Water-splash badge: sits where the GIF's spit lands (left of the mouth) */
.splat-badge {
  position: absolute; z-index: 3;
  left: -92px; top: calc(90% - 104px);
  width: 208px; aspect-ratio: 1; display: grid; place-items: center;
  transform: rotate(-9deg);
  filter: drop-shadow(0 4px 0 rgba(16, 25, 43, .18));
}
.splat-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.splat-badge span {
  position: relative; color: #fff; text-align: center;
  font: 800 1.35rem/1 var(--display);
  text-shadow: 0 2px 0 #10192b, 2px 0 0 #10192b, -2px 0 0 #10192b, 0 -2px 0 #10192b;
}
.splat-badge small { display: block; font: 800 .74rem/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.splat-badge b { display: block; font-size: 2.1rem; }
.hero-art.has-gif .price-tag { left: auto; right: -2%; }
/* The GIF has a white background; multiply lets the cream page show through. The file itself is untouched. */
.hero-head { display: block; width: 100%; height: auto; position: relative; mix-blend-mode: multiply; }
@media (max-width: 860px) {
  .splat-badge { left: calc(4% - 72px); width: 150px; top: calc(86% - 75px); }
  .splat-badge b { font-size: 1.4rem; }
  .splat-badge span { font-size: .95rem; }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { width: 100%; max-width: 420px; margin: 0 auto; }
}

.mascot { width: 100%; }

/* Mascot animation */
.mascot .spit-drop { opacity: 0; }
.mascot.spitting .spit-drop { animation: drop 1.1s ease-out forwards; }
.mascot.spitting .spit-drop:nth-of-type(2) { animation-delay: .08s; }
.mascot.spitting .spit-drop:nth-of-type(3) { animation-delay: .16s; }
.mascot.spitting .spit-drop:nth-of-type(4) { animation-delay: .24s; }
.mascot.spitting .spit-drop:nth-of-type(5) { animation-delay: .32s; }
@keyframes drop { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, -120px), var(--dy, 40px)); } }
.mascot .jaw, .mascot .tongue { transform-box: fill-box; transform-origin: 50% 0; }
.mascot.laughing .jaw { animation: jaw .28s ease-in-out infinite alternate; }
.mascot.laughing .tongue { animation: tongue .56s ease-in-out infinite alternate; }
@keyframes jaw { to { transform: scaleY(.8); } }
@keyframes tongue { to { transform: translateY(9px) scaleY(1.2); } }
.mascot.blinking .lid { animation: lid .5s steps(1) infinite; }
@keyframes lid { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .mascot * { animation: none !important; }
}

/* ===================== Spit meter ===================== */
.spit-section { background: linear-gradient(180deg, #eaf7fd 0%, var(--cream) 100%); }
.spit-meter { max-width: 900px; margin: 0 auto 40px; display: grid; gap: 18px; }
.spit-row { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: center; }
.spit-label strong { display: block; font: 700 1.05rem/1.2 var(--display); }
.spit-label span { color: var(--muted); font-size: .9rem; }
.spit-track { position: relative; height: 34px; border-radius: 99px; background: #fff; border: 1px solid #cfe6f2; overflow: hidden; display: flex; align-items: center; }
.spit-bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #8fe0ff, #2fa9e6); width: 0; transition: width 1.6s cubic-bezier(.2, .8, .2, 1); }
.spit-track em { position: relative; margin-left: 12px; font-style: normal; font-weight: 700; font-size: .9rem; color: var(--ink-2); white-space: nowrap; }
.spit-row.old .spit-bar { background: linear-gradient(90deg, #c9c2b4, #a89f8e); }
.spit-row.new .spit-track { height: 44px; border-color: #2fa9e6; }
.spit-row.new .spit-track em { position: absolute; right: 14px; color: #fff; font-size: 1.05rem; text-shadow: 0 1px 0 rgba(10, 60, 110, .4); }
.spit-meter.in .spit-row:nth-child(1) .spit-bar { width: 3%; }
.spit-meter.in .spit-row:nth-child(2) .spit-bar { width: 14%; }
.spit-meter.in .spit-row:nth-child(3) .spit-bar { width: 100%; }
.spit-ruler { display: flex; justify-content: space-between; margin-left: 250px; color: var(--muted); font-size: .78rem; font-weight: 600; border-top: 2px dashed #b9d9ea; padding-top: 6px; }
.spit-facts .card h3 { color: #1569b8; }
@media (max-width: 700px) {
  .spit-row { grid-template-columns: 1fr; gap: 6px; }
  .spit-ruler { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .spit-bar { transition: none; } }

/* ===================== Cards & grids ===================== */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.bg-paper .card { background: #fff; }
.bg-night .card { background: var(--night-2); border-color: #362c45; box-shadow: none; }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--mustard-lt); color: var(--red-dk);
  margin-bottom: 18px;
}
.icon svg { width: 28px; height: 28px; }
.icon.teal { background: var(--teal-lt); color: var(--teal); }
.icon.red { background: #fbe0db; color: var(--red-dk); }

/* ===================== Then vs Now ===================== */
.compare { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.compare-row { display: grid; grid-template-columns: 200px 1fr 1fr; border-top: 1px solid var(--line); }
.compare-row:first-child { border-top: 0; }
.compare-row > div { padding: 18px 22px; }
.compare-row .label { font-weight: 700; background: var(--cream); }
.compare-row .then { color: var(--muted); }
.compare-row .now { font-weight: 600; background: #f3fbf9; }
.compare-row .now::before { content: "\2713"; color: var(--teal); font-weight: 800; margin-right: 8px; }
.compare-head > div { font: 800 1.05rem/1.2 var(--display); padding-top: 22px; padding-bottom: 22px; }
.compare-head .then { background: #efe7da; color: var(--ink-2); }
.compare-head .now { background: var(--teal); color: #fff; }
.compare-head .now::before { content: none; }
@media (max-width: 720px) {
  .compare-row { grid-template-columns: 1fr 1fr; }
  .compare-row .label { grid-column: 1 / -1; padding-bottom: 6px; padding-top: 14px; }
  .compare-head .label { display: none; }
}

/* ===================== Laugh player ===================== */
.laughs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .laughs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .laughs { grid-template-columns: 1fr; } }
.laugh {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--night-2);
  border: 1px solid #3a2f4a;
  color: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color .15s, transform .15s;
}
.laugh:hover { border-color: var(--mustard); transform: translateY(-2px); }
.laugh .play {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: var(--mustard); color: var(--ink);
  display: grid; place-items: center;
}
.laugh .play svg { width: 22px; height: 22px; }
.laugh .play .i-pause { display: none; }
.laugh.playing .play { background: var(--red); color: #fff; }
.laugh.playing .play .i-play { display: none; }
.laugh.playing .play .i-pause { display: block; }
.laugh b { display: block; font: 800 1.2rem/1.2 var(--display); }
.laugh small { display: block; color: #b9aec8; font-size: .86rem; line-height: 1.4; margin-top: 2px; }
.tag {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font: 700 .66rem/1.4 var(--body); letter-spacing: .08em; text-transform: uppercase;
  margin-top: 6px;
}
.tag-orig { background: rgba(244, 181, 63, .18); color: var(--mustard); }
.tag-bonus { background: rgba(22, 134, 126, .25); color: #6fe0d4; }
.laugh .bars { margin-left: auto; display: flex; gap: 3px; align-items: flex-end; height: 22px; opacity: 0; }
.laugh .bars i { width: 4px; background: var(--mustard); border-radius: 2px; height: 30%; }
.laugh.playing .bars { opacity: 1; }
.laugh.playing .bars i { animation: eq .5s ease-in-out infinite alternate; }
.laugh.playing .bars i:nth-child(2) { animation-delay: .15s; }
.laugh.playing .bars i:nth-child(3) { animation-delay: .3s; }
.laugh.playing .bars i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { to { height: 100%; } }

/* ===================== Offer / pricing cards ===================== */
.offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
@media (max-width: 980px) { .offers { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }
.offer {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff; border: 2px solid var(--line); border-radius: 22px;
  padding: 32px 28px 28px;
  box-shadow: var(--shadow);
}
.offer.featured { border-color: var(--red); }
.offer .ribbon {
  position: absolute; top: -14px; left: 28px;
  background: var(--red); color: #fff;
  font: 700 .72rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 999px;
}
.offer h3 { font-size: 1.5rem; }
.offer .price { font: 800 2.8rem/1 var(--display); margin: 8px 0 4px; }
.offer .price small { font: 600 .95rem var(--body); color: var(--muted); }
.offer .price .woocommerce-Price-amount { font: inherit; }
.offer ul { list-style: none; padding: 0; margin: 18px 0 26px; flex: 1; }
.offer li { padding: 7px 0 7px 28px; position: relative; border-top: 1px dashed var(--line); }
.offer li:first-child { border-top: 0; }
.offer li::before { content: "\2713"; position: absolute; left: 2px; color: var(--teal); font-weight: 800; }
.offer li.no { color: var(--muted); }
.offer li.no::before { content: "\2013"; color: var(--muted); }
.offer .btn { width: 100%; }

/* ===================== Phone demo ===================== */
.demo { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: center; }
@media (max-width: 920px) { .demo { grid-template-columns: 1fr; } .demo-head { order: 2; } }
.demo-head { display: grid; place-items: center; }
.demo-head .mascot { width: min(420px, 100%); }
.demo-head .demo-face { display: block; width: min(440px, 100%); height: auto; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35)); }
.demo-caption { text-align: center; color: #b9aec8; font-size: .92rem; margin-top: 10px; min-height: 1.6em; }

.phone {
  width: 360px; max-width: 100%; margin: 0 auto;
  border-radius: 46px; padding: 12px;
  background: #0d0b11;
  box-shadow: 0 0 0 2px #3a3346, 0 30px 70px rgba(0, 0, 0, .5);
}
.phone-screen {
  position: relative;
  height: 680px; border-radius: 36px; overflow: hidden;
  background: #05070b;
}
.phone-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 26px 6px; color: #dcf8ea; font: 600 12px/1 var(--body); }
.phone-bar .notch { width: 96px; height: 24px; background: #000; border-radius: 999px; }
.phone-url {
  margin: 2px 14px 0; padding: 7px 12px; border-radius: 10px;
  background: #121821; color: #86a39a; font: 500 12px/1 var(--body); text-align: center;
}
.phone-url b { color: #dcf8ea; font-weight: 600; }
@media (max-width: 920px) { .phone-screen { height: 560px; } }
.app-scroll { position: absolute; inset: 78px 0 0 0; overflow-y: auto; scrollbar-width: none; }
.app-scroll::-webkit-scrollbar { display: none; }

/* The controller's own UI, recreated from firmware build 187 */
.app {
  --bg: #05070b; --panel: #0a1118; --panel2: #0e1821; --line: #1a2b36;
  --text: #dcf8ea; --muted: #86a39a; --green: #39ff88; --cyan: #22e5ff;
  --magenta: #ff3df2; --amber: #ffb020; --red: #ff4d5e;
  color: var(--text);
  background: radial-gradient(600px 260px at 50% -120px, #0c3326 0%, transparent 70%), var(--bg);
  font: 13px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 10px 12px 30px;
  min-height: 100%;
}
.app .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.app h1 { margin: 0; font: 700 1.45em/1.15 system-ui, sans-serif; color: var(--green); text-shadow: 0 0 14px rgba(57, 255, 136, .45); letter-spacing: 0; }
.app .sub { color: var(--muted); font-size: .85em; }
.app .btn-link { flex: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); font-weight: 600; font-size: .9em; cursor: pointer; }
.app .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.app .chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: .82em; color: var(--muted); }
.app .chip b { color: var(--text); }
.app .chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.app .chip.good { border-color: rgba(57, 255, 136, .45); }
.app .chip.good .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.app .card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: none; }
.app .card h2 { margin: 0 0 4px; font: 700 .92em/1.3 system-ui, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--cyan); display: flex; justify-content: space-between; }
.app .card h2 .val { color: var(--text); text-transform: none; letter-spacing: 0; }
.app .hint { color: var(--muted); font-size: .86em; margin: 0 0 9px; }
.app .tip { border-left: 3px solid var(--green); background: rgba(57, 255, 136, .06); padding: 6px 9px; border-radius: 0 8px 8px 0; font-size: .84em; margin: 8px 0 0; }
.app .agrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.app .agrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app button { font: inherit; cursor: pointer; }
.app .track { position: relative; padding: 11px 4px; border-radius: 10px; border: 2px solid rgba(57, 255, 136, .35); background: #071a10; color: var(--green); font-size: 1em; font-weight: 700; }
.app .track.selected { border-color: var(--green); box-shadow: 0 0 12px rgba(57, 255, 136, .45); background: #0c2a19; }
.app .track.selected::before { content: "\25CF"; position: absolute; left: 6px; top: 3px; font-size: .65em; }
.app .track .star { position: absolute; right: 6px; top: 2px; font-size: .7em; color: var(--amber); }
.app .track.playing { border-color: var(--amber); color: var(--amber); background: #2a1c03; animation: apulse 1s infinite; }
@keyframes apulse { 50% { box-shadow: 0 0 18px rgba(255, 176, 32, .7); } }
.app .switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.app .switch-row .hint { margin: 0; }
.app .switch { flex: none; width: 44px; height: 24px; border-radius: 999px; border: 1px solid var(--line); background: #2a0d12; position: relative; padding: 0; }
.app .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); transition: left .15s, background .15s; }
.app .switch.on { background: #0b2617; border-color: var(--green); }
.app .switch.on::after { left: 22px; background: var(--green); }
.app .fx { padding: 12px 4px; border-radius: 10px; font-weight: 700; font-size: .98em; }
.app .fx small { display: block; font-weight: 500; font-size: .74em; opacity: .75; }
.app .fx.magenta { border: 2px solid var(--magenta); color: var(--magenta); background: #1d0620; }
.app .fx.cyan { border: 2px solid var(--cyan); color: var(--cyan); background: #04191f; }
.app .fx.magenta.active { background: #4a0f50; box-shadow: 0 0 18px var(--magenta); }
.app .fx.cyan.active { background: #08414d; box-shadow: 0 0 18px var(--cyan); }
.app input[type=range] { width: 100%; accent-color: var(--green); margin: 4px 0; }
.app .seg { display: flex; flex-wrap: wrap; gap: 6px; }
.app .seg button { flex: 1 1 0; min-width: 70px; padding: 8px 4px; border-radius: 9px; border: 1px solid var(--line); background: #0b141b; color: var(--muted); font-weight: 600; font-size: .92em; }
.app .seg button.on { border-color: var(--green); color: var(--green); background: #0b2617; box-shadow: 0 0 8px rgba(57, 255, 136, .3); }
.app .seg.magenta button.on { border-color: var(--magenta); color: var(--magenta); background: #2a0a2d; }
.app .seg.cyan button.on { border-color: var(--cyan); color: var(--cyan); background: #062a33; }
.app .seg-note { color: var(--muted); font-size: .84em; margin-top: 6px; min-height: 2.6em; }
.app label.field { display: block; margin: 0 0 9px; }
.app label.field span { display: block; font-size: .84em; color: var(--muted); margin-bottom: 3px; }
.app select, .app input[type=text] { width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: #071017; color: var(--text); font: inherit; }
.app .primary { width: 100%; padding: 10px; border-radius: 10px; border: 2px solid var(--green); background: #0b2617; color: var(--green); font-weight: 700; }
.app .kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: .88em; margin: 0; }
.app .kv dt { color: var(--muted); }
.app .kv dd { margin: 0; }
.app footer { color: var(--muted); font-size: .8em; text-align: center; margin-top: 14px; }
.app .screen[hidden] { display: none; }

.demo-steps { list-style: none; padding: 0; margin: 24px 0 0; counter-reset: s; }
.demo-steps li { counter-increment: s; position: relative; padding: 0 0 14px 44px; color: #d8cfe4; }
.demo-steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--mustard); color: var(--ink);
  display: grid; place-items: center; font-weight: 800; font-size: .9rem;
}
.demo-steps b { color: #fff; }
.demo-steps.light li { color: var(--ink-2); }
.demo-steps.light b { color: var(--ink); }
code { font: 600 .9em ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--mustard-lt); padding: 1px 6px; border-radius: 6px; }

/* ===================== Steps (install) ===================== */
.steps { counter-reset: step; display: grid; gap: 26px; }
.step {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px;
  box-shadow: var(--shadow);
}
.step:nth-child(even) .step-media { order: -1; }
.step-num { counter-increment: step; display: inline-flex; align-items: center; gap: 10px; font: 700 .78rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--red-dk); margin-bottom: 10px; }
.step-num::before { content: counter(step); width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font: 800 1rem/1 var(--display); letter-spacing: 0; }
@media (max-width: 820px) { .step { grid-template-columns: 1fr; } .step:nth-child(even) .step-media { order: 0; } }

/* Photo slots: show a real photo if one has been added, a labelled placeholder if not */
.photo { margin: 0; border-radius: 16px; overflow: hidden; background: var(--cream); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.contain img { object-fit: contain; }
.fw-latest { border: 2px solid var(--teal); }
.fw-latest h2 small { font: 600 1rem var(--body); }
.feature-shot { max-width: 1000px; margin: 0 auto 40px; box-shadow: var(--shadow); border-radius: 16px; }
.photo-slot {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center; text-align: center;
  border: 2px dashed #d8c9ae; border-radius: 16px;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(244, 181, 63, .10) 14px 28px),
    var(--cream);
  color: var(--muted); padding: 20px; font-size: .9rem;
}
.photo-slot svg { width: 42px; height: 42px; margin: 0 auto 8px; color: #c9b693; }
.photo-slot b { display: block; color: var(--ink-2); font-size: .95rem; }

/* ===================== Callouts, notes, lists ===================== */
.note {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--mustard-lt); border: 1px solid #efd398; border-radius: 16px;
  padding: 18px 20px; color: var(--ink-2);
}
.note.teal { background: var(--teal-lt); border-color: #b4ded6; }
.note strong { color: var(--ink); }
.note p:last-child { margin-bottom: 0; }
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding: 6px 0 6px 30px; }
.checklist li::before { content: "\2713"; position: absolute; left: 4px; top: 6px; color: var(--teal); font-weight: 800; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.gestures { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.gestures th, .gestures td { text-align: left; padding: 14px 18px; border-top: 1px solid var(--line); vertical-align: top; }
.gestures th { background: var(--ink); color: #fff; font-weight: 700; border-top: 0; }
.gestures td:first-child { font-weight: 700; white-space: nowrap; }
.bg-night .gestures { background: var(--night-2); }
.bg-night .gestures td { border-color: #362c45; }

.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 640px) { .specs { grid-template-columns: 1fr; } }

.chips-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips-list li { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.bg-night .chips-list li { background: var(--night-2); border-color: #3a2f4a; color: #efe8f6; }

/* ===================== FAQ ===================== */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 34px 20px 0; position: relative; font-weight: 700; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font: 700 1.6rem/1 var(--body); color: var(--red); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 20px; color: var(--ink-2); }

/* ===================== CTA band ===================== */
.cta-band { background: var(--red); color: #fff; border-radius: 28px; padding: 56px 48px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: #ffe1dc; margin: 0; font-size: 1.1rem; }
.cta-band .btn-light { box-shadow: 0 4px 0 var(--red-dk); }
.cta-band::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; padding: 40px 28px; } }

/* ===================== Page header ===================== */
.page-hero { padding: 72px 0 56px; background: var(--paper); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.1rem, 4.8vw, 3.5rem); max-width: 18ch; }
.page-hero .lead { margin-bottom: 0; }

/* ===================== Footer ===================== */
.site-footer { background: var(--night); color: #b9aec8; padding: 64px 0 28px; margin-top: 0; }
.site-footer a { color: #efe8f6; text-decoration: none; }
.site-footer a:hover { color: var(--mustard); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { color: #fff; font-family: var(--body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 4px 0; }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; color: #fff; font: 800 1.4rem/1 var(--display); }
.footer-brand img { width: 48px; }
.footer-legal { border-top: 1px solid #2f263b; margin-top: 44px; padding-top: 22px; font-size: .82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===================== Generic page content & WooCommerce ===================== */
.entry { padding: 64px 0 96px; }
.entry-content > * { max-width: 780px; }
.entry-content > .alignwide, .entry-content > .woocommerce { max-width: none; }
.woocommerce-page .entry-content > * { max-width: none; }

.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce button.button.alt, .woocommerce a.button.alt {
  background: var(--red); color: #fff; border-radius: 999px; padding: 14px 24px; font-weight: 700; border: 0;
}
.woocommerce .button:hover, .woocommerce button.button.alt:hover, .woocommerce a.button.alt:hover { background: var(--red-dk); color: #fff; }
.woocommerce div.product .product_title { font-family: var(--display); font-size: clamp(2rem, 4vw, 2.8rem); }
.woocommerce div.product p.price, .woocommerce div.product span.price, .woocommerce ul.products li.product .price { color: var(--red-dk); font-family: var(--display); font-weight: 800; font-size: 1.6rem; }
.woocommerce ul.products li.product { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--display); font-size: 1.25rem; }
.woocommerce span.onsale { background: var(--mustard); color: var(--ink); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--teal); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--teal); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom-color: #fff; }

/* Laugh list in a half-width panel (Features page): one row per laugh */
.laughs-panel { padding: 14px; }
.laughs-panel .laughs { grid-template-columns: 1fr; gap: 10px; }
.laughs-panel .laugh { padding: 12px 16px; gap: 14px; }
.laughs-panel .laugh:hover { transform: none; }
.laughs-panel .laugh .play { width: 44px; height: 44px; }
.laughs-panel .laugh .play svg { width: 18px; height: 18px; }
.laughs-panel .laugh > span:nth-child(2) { flex: 1; min-width: 0; }
.laughs-panel .laugh b { display: inline; font-size: 1.08rem; margin-right: 8px; }
.laughs-panel .laugh .tag { margin-top: 0; vertical-align: 2px; }
.laughs-panel .laugh small { margin-top: 3px; }
.laughs-panel .laugh > span:nth-child(2) { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.laughs-panel .laugh > span:nth-child(2) b { margin-right: 0; }
.laughs-panel .laugh > span:nth-child(2) small { order: 3; flex-basis: 100%; }
