/* BAXILANCER – modern visual layer.
   Loaded after each page's inline styles, so it only refines what is there. */

:root {
  --m-green: #3d642d;
  --m-green-dark: #24401a;
  --m-green-bright: #5a9442;
  --m-yellow: #f6b600;
  --m-ink: #0f1a12;
  --m-surface: #ffffff;
  --m-border: rgba(61, 100, 45, 0.14);
  --m-shadow: 0 1px 2px rgba(15, 26, 18, 0.04), 0 12px 32px -12px rgba(15, 26, 18, 0.14);
  --m-shadow-hover: 0 2px 4px rgba(15, 26, 18, 0.05), 0 28px 48px -16px rgba(61, 100, 45, 0.32);
  --m-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  background: #f6f8f4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* Soft drifting colour fields behind the whole page */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  will-change: transform;
}

body::before {
  top: -25vmax;
  left: -20vmax;
  background: radial-gradient(circle, rgba(90, 148, 66, 0.55), transparent 65%);
  animation: m-drift-a 26s ease-in-out infinite alternate;
}

body::after {
  bottom: -30vmax;
  right: -22vmax;
  background: radial-gradient(circle, rgba(246, 182, 0, 0.45), transparent 65%);
  animation: m-drift-b 32s ease-in-out infinite alternate;
}

@keyframes m-drift-a { to { transform: translate3d(14vmax, 10vmax, 0) scale(1.15); } }
@keyframes m-drift-b { to { transform: translate3d(-12vmax, -8vmax, 0) scale(1.1); } }

/* Scroll progress bar (element is injected by modern.js) */
.m-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 1000;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--m-green), var(--m-green-bright), var(--m-yellow));
  pointer-events: none;
}

/* ---------- Header / hero ---------- */
header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--m-border);
  background:
    radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(246, 182, 0, 0.16), transparent 60%),
    radial-gradient(900px circle at 85% -10%, rgba(90, 148, 66, 0.2), transparent 60%),
    radial-gradient(700px circle at 5% 110%, rgba(246, 182, 0, 0.14), transparent 60%),
    linear-gradient(180deg, #ffffff, #f3f8ef);
}

/* fine dot grid that fades towards the bottom */
header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(61, 100, 45, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  mask-image: linear-gradient(180deg, #000, transparent 85%);
  pointer-events: none;
}

.logo-icon {
  background: transparent;
  box-shadow: 0 6px 18px -6px rgba(61, 100, 45, 0.45);
  transition: transform 0.5s var(--m-ease);
}

.brand:hover .logo-icon { transform: rotate(-6deg) scale(1.06); }

.lang-link,
.site-lang-switcher .lang-link {
  border-radius: 999px;
  border-color: var(--m-border);
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 0.25s var(--m-ease), background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lang-link:hover { transform: translateY(-2px); }

.lang-link.active,
.site-lang-switcher .lang-link.active {
  background: var(--m-green);
  color: #fff;
}

.pill {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--m-border);
  padding: 6px 14px;
  box-shadow: 0 4px 14px -6px rgba(61, 100, 45, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.pill::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--m-yellow);
  box-shadow: 0 0 0 0 rgba(246, 182, 0, 0.6);
  animation: m-pulse 2.2s ease-out infinite;
  vertical-align: 1px;
}

@keyframes m-pulse {
  70% { box-shadow: 0 0 0 9px rgba(246, 182, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(246, 182, 0, 0); }
}

.hero-copy h1 {
  font-size: clamp(30px, 5.4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 14px auto 16px;
  max-width: 16em;
  text-wrap: balance;
  color: var(--m-green-dark);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-copy h1 {
    background: linear-gradient(100deg, var(--m-green-dark) 10%, var(--m-green-bright) 55%, #b98a00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.hero-copy .subtitle {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  text-wrap: pretty;
}

.hero-copy .subtitle a { color: var(--m-green) !important; }

/* "Free" badge under the store buttons */
.free-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--m-green-dark);
  background: linear-gradient(120deg, rgba(246, 182, 0, 0.28), rgba(90, 148, 66, 0.2));
  border: 1px solid var(--m-border);
}

.free-note::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  color: #fff;
  background: var(--m-green);
}

/* Store badges */
header a[href*="apps.apple.com"],
header a[href*="play.google.com"],
main a[href*="apps.apple.com"],
main a[href*="play.google.com/store"] {
  transition: transform 0.35s var(--m-ease), filter 0.35s ease;
}

a[href*="apps.apple.com"]:hover,
a[href*="play.google.com/store"]:hover {
  transform: translateY(-4px) scale(1.04);
  filter: drop-shadow(0 12px 16px rgba(15, 26, 18, 0.25));
}

/* ---------- Typography ---------- */
main h2 {
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

.section > h2 {
  font-size: clamp(24px, 3.2vw, 32px);
  color: var(--m-green-dark);
}

.section > h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-top: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--m-green), var(--m-yellow));
}

.section[style*="text-align:center"] > h2::after { margin-inline: auto; }

.section > p { line-height: 1.7; }

.section { margin-bottom: 56px; }

/* ---------- Cards ---------- */
.grid { gap: 18px; }

.grid .card {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 24px;
  border-radius: 20px;
  border: 1px solid var(--m-border);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--m-shadow);
  transition: transform 0.45s var(--m-ease), box-shadow 0.45s var(--m-ease), border-color 0.3s ease;
}

/* spotlight that follows the pointer (coordinates set by modern.js) */
.grid .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--cx, 50%) var(--cy, 0%), rgba(246, 182, 0, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.grid .card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--m-green), var(--m-yellow));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.5s var(--m-ease);
}

.grid .card:hover {
  transform: translateY(-6px);
  box-shadow: var(--m-shadow-hover);
  border-color: rgba(61, 100, 45, 0.35);
}

.grid .card:hover::before { opacity: 1; }
.grid .card:hover::after { transform: scaleX(1); }

.grid .card > * { position: relative; }

.grid .card h3 {
  margin: 0 0 10px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--m-ink);
}

.grid .card p { line-height: 1.6; }

.text-link { transition: color 0.2s ease; }

.grid .card .text-link {
  display: inline-block;
  transition: transform 0.3s var(--m-ease);
}

.grid .card:hover .text-link { transform: translateX(4px); }

/* ---------- Buttons ---------- */
.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--m-green-bright), var(--m-green) 55%, var(--m-green-dark));
  box-shadow: 0 10px 24px -8px rgba(61, 100, 45, 0.6);
  transition: transform 0.3s var(--m-ease), box-shadow 0.3s var(--m-ease);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--m-ease);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--m-green-bright), var(--m-green) 55%, var(--m-green-dark));
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -8px rgba(61, 100, 45, 0.7);
}

.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:active { transform: translateY(0) scale(0.98); }

/* ---------- "Free" box ---------- */
.pricing-box {
  position: relative;
  padding: 24px 26px;
  border-radius: 20px;
  border: 1px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(120deg, var(--m-green), var(--m-yellow)) border-box;
  box-shadow: var(--m-shadow);
}

.pricing-box p { margin: 6px 0; line-height: 1.5; }

.pricing-box strong {
  font-size: 18px;
  color: var(--m-green-dark);
}

/* ---------- FAQ (accordion behaviour added by modern.js) ---------- */
.faq-list {
  padding: 6px 22px;
  border-radius: 20px;
  border-color: var(--m-border);
  box-shadow: var(--m-shadow);
}

.faq-item + .faq-item {
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid var(--m-border);
}

.faq-item h3 {
  margin: 0;
  padding: 16px 0;
  font-size: 16px;
  line-height: 1.4;
}

.faq-item p { padding-bottom: 16px; line-height: 1.6; }

.m-js .faq-item h3 {
  position: relative;
  padding-right: 36px;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.m-js .faq-item h3:hover { color: var(--m-green-bright); }

.m-js .faq-item h3:focus-visible {
  outline: 2px solid var(--m-green);
  outline-offset: 4px;
  border-radius: 6px;
}

.m-js .faq-item h3::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  color: var(--m-green);
  background: rgba(61, 100, 45, 0.1);
  transition: transform 0.4s var(--m-ease), background 0.2s ease, color 0.2s ease;
}

.m-js .faq-item.is-open h3::after {
  transform: rotate(135deg);
  background: var(--m-green);
  color: #fff;
}

.m-js .faq-item .m-faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--m-ease);
}

.m-js .faq-item.is-open .m-faq-body { grid-template-rows: 1fr; }
.m-js .faq-item .m-faq-body > * { overflow: hidden; min-height: 0; }
.m-js .faq-item .m-faq-body p { padding-bottom: 0; }
.m-js .faq-item .m-faq-body p::after { content: ""; display: block; height: 16px; }

/* ---------- Other page furniture (blog lists, legal boxes, callouts) ---------- */
.item, .box, .callout, .toc, .key-takeaway {
  border-radius: 18px;
}

.item, .box {
  border-color: var(--m-border);
  box-shadow: var(--m-shadow);
  transition: transform 0.4s var(--m-ease), box-shadow 0.4s var(--m-ease);
}

.item:hover {
  transform: translateY(-4px);
  box-shadow: var(--m-shadow-hover);
}

main img {
  border-radius: 14px;
}

a[href*="apps.apple.com"] img,
a[href*="play.google.com"] img { border-radius: 6px; }

footer {
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top-color: var(--m-border);
}

::selection { background: rgba(246, 182, 0, 0.45); }

:focus-visible { outline-color: var(--m-green); }

/* ---------- Scroll reveal (classes applied by modern.js) ---------- */
.m-js .m-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--m-ease), transform 0.7s var(--m-ease);
  transition-delay: var(--m-delay, 0ms);
}

.m-js .m-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* once revealed, cards get their normal (faster) hover transition back */
.m-js .grid .card.m-reveal.is-done {
  transition: transform 0.45s var(--m-ease), box-shadow 0.45s var(--m-ease), border-color 0.3s ease;
  transition-delay: 0ms;
}

/* Hero entrance */
.m-js .hero-copy > * {
  animation: m-rise 0.9s var(--m-ease) both;
}

.m-js .hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
.m-js .hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
.m-js .hero-copy > *:nth-child(4) { animation-delay: 0.24s; }
.m-js .hero-copy > *:nth-child(5) { animation-delay: 0.32s; }

@keyframes m-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .section { margin-bottom: 44px; }
  body::before, body::after { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before, body::after, .pill::before { animation: none; }
  .m-js .hero-copy > * { animation: none; }
  .m-js .m-reveal { opacity: 1; transform: none; transition: none; }
  .grid .card, .btn-primary, .item, .lang-link { transition: none; }
  .grid .card:hover, .btn-primary:hover, .item:hover { transform: none; }
  .m-js .faq-item .m-faq-body { transition: none; }
}
