/* Home page. Loaded after styles.css; every rule is scoped under .home so nothing else changes. */

.home {
  --leaf: #4c8c6b;
  --sun: #f5c66b;
  --card: var(--surface);
  --shadow: 0 30px 60px -28px rgba(30, 40, 30, 0.45);
  /* Each app's own colour, from its app page */
  --c-hh: #6b43d6; --c-nb: #0b6e63; --c-ls: #1f8466; --c-lws: #3e9b5f; --c-wp: #3a8337; --c-fff: #0f4c5c; --c-hn: #4f46e5;
  --c-cb: #2f7d6d; --c-tax: #b4622d; --c-pet: #c2577a; --c-fc: #8a4fbf;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home { --shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.8); }
}
:root[data-theme="dark"] .home { --shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.8); }

.home img { max-width: 100%; height: auto; display: block; }
.home h1, .home h2 { letter-spacing: -0.015em; }
.home section { padding: 84px 0; }
.home .kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 800; color: var(--accent-dark); margin: 0 0 12px; }
.home .section-head { max-width: 700px; margin: 0 auto 44px; text-align: center; }
.home .section-head h2 { margin: 0 0 0.35em; }
.home .section-head p { color: var(--muted); font-size: 1.12rem; margin: 0; }
.home .tint { background: var(--surface-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Hero ---------- */
.home .hero3 { position: relative; overflow: hidden; padding: 64px 0 96px; isolation: isolate; }
.home .hero3::before {
  content: ""; position: absolute; inset: -20% -10% 0; z-index: -1;
  background:
    radial-gradient(520px 380px at 78% 30%, color-mix(in srgb, var(--c-hh) 22%, transparent), transparent 70%),
    radial-gradient(520px 420px at 62% 78%, color-mix(in srgb, var(--c-nb) 24%, transparent), transparent 70%),
    radial-gradient(600px 420px at 10% 10%, color-mix(in srgb, var(--sun) 26%, transparent), transparent 70%),
    linear-gradient(180deg, var(--accent-soft), var(--bg) 85%);
}
.home .hero3 .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.home .hero3 h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); line-height: 1.04; margin-bottom: 0.35em; }
.home .hero3 h1 em { font-style: normal; background: linear-gradient(100deg, var(--c-nb), var(--c-hh) 55%, #d4567a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home .hero3 .lead { max-width: 540px; }
.home .badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.home .badges li { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 700; color: var(--ink); box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.25); }
.home .badges svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

.home .cluster { position: relative; aspect-ratio: 1 / 1.02; max-width: 560px; width: 100%; margin: 0 auto; }
.home .cluster .ring { position: absolute; inset: 9%; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--accent) 30%, transparent); }
.home .cluster .ring.r2 { inset: 0; border-style: solid; border-width: 1px; opacity: 0.6; }
.home .cluster .ph { position: absolute; width: 34%; border-radius: 24px; padding: 5px; background: #111; box-shadow: var(--shadow); }
.home .cluster .ph img { border-radius: 19px; }
.home .cluster .ph.a { left: 8%; top: 20%; transform: rotate(-9deg); }
.home .cluster .ph.b { left: 33%; top: 9%; z-index: 2; width: 36%; }
.home .cluster .ph.c { right: 8%; top: 20%; transform: rotate(9deg); }
.home .cluster .ic { position: absolute; width: 15%; border-radius: 24%; z-index: 3; box-shadow: 0 14px 26px -12px rgba(0, 0, 0, 0.5); }
.home .cluster .ic.i1 { left: 0; top: 6%; }
.home .cluster .ic.i2 { right: 1%; top: 2%; }
.home .cluster .ic.i3 { left: -2%; bottom: 20%; }
.home .cluster .ic.i4 { right: -2%; bottom: 24%; }
.home .cluster .ic.i5 { left: 24%; bottom: 0; }
.home .cluster .ic.i6 { right: 22%; bottom: -2%; }
@media (max-width: 920px) {
  .home .hero3 .wrap { grid-template-columns: 1fr; }
  .home .cluster { max-width: 460px; }
}

/* ---------- Icon strip ---------- */
.home .strip { padding: 0; margin-top: -40px; position: relative; z-index: 2; }
.home .strip .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 4px; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 18px 16px; box-shadow: var(--shadow); }
.home .strip a { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 92px; padding: 8px 4px; border-radius: 16px; color: var(--ink); font-size: 0.8rem; font-weight: 700; text-align: center; line-height: 1.25; transition: background 0.2s, transform 0.2s; }
.home .strip a:hover { background: var(--surface-alt); text-decoration: none; transform: translateY(-3px); }
.home .strip .app-ic { width: 56px; height: 56px; }

/* App icons: real ones are images; the planners get a drawn glyph on their colour */
.home .app-ic { border-radius: 24%; flex: none; display: grid; place-items: center; overflow: hidden; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.45); }
.home .app-ic img { width: 100%; height: 100%; }
.home .app-ic.glyph { background: linear-gradient(145deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c)); color: #fff; }
.home .app-ic.glyph svg { width: 56%; height: 56%; }

/* ---------- Numbers ---------- */
.home .numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 56px; }
.home .numbers div { text-align: center; }
.home .numbers b { display: block; font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; color: var(--accent-dark); }
.home .numbers span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 720px) { .home .numbers { grid-template-columns: repeat(2, 1fr); row-gap: 26px; } }

/* ---------- Values ---------- */
.home .values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.home .value { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px 26px; }
.home .value .vi { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); margin-bottom: 16px; }
.home .value .vi svg { width: 26px; height: 26px; }
.home .value h3 { margin: 0 0 8px; }
.home .value p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .home .values { grid-template-columns: 1fr; } }

/* ---------- Category jump links ---------- */
.home .jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: -20px 0 48px; padding: 0; list-style: none; }
.home .jump a { display: inline-block; padding: 8px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 0.93rem; }
.home .jump a:hover { border-color: var(--accent); text-decoration: none; }
.home .cat { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 20px; scroll-margin-top: 90px; }
.home .cat h3 { font-size: 1.5rem; margin: 0; }
.home .cat p { margin: 0; color: var(--muted); }
.home .cat-block + .cat-block { margin-top: 64px; }

/* ---------- Game showcase cards ---------- */
.home .showcase { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.home .show { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; min-height: 340px; border-radius: 28px; overflow: hidden; color: #fff; isolation: isolate;
  background: radial-gradient(420px 300px at 100% 0%, color-mix(in srgb, #fff 22%, transparent), transparent 70%), linear-gradient(150deg, color-mix(in srgb, var(--c) 82%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000));
  box-shadow: 0 28px 50px -30px color-mix(in srgb, var(--c) 80%, #000); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.home .show:hover { text-decoration: none; transform: translateY(-5px); box-shadow: 0 36px 60px -30px color-mix(in srgb, var(--c) 90%, #000); }
.home .show .txt { padding: 28px 8px 28px 28px; display: flex; flex-direction: column; }
.home .show .top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.home .show .app-ic { width: 54px; height: 54px; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.5); }
.home .show .kind { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }
.home .show h4 { font-family: var(--serif); font-size: 1.45rem; margin: 2px 0 0; color: #fff; line-height: 1.15; }
.home .show p { margin: 0 0 14px; opacity: 0.92; font-size: 0.98rem; line-height: 1.55; }
.home .show .facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.home .show .facts li { background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.22); padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.home .show .go { margin-top: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 800; font-size: 0.95rem; }
.home .show .shot { position: relative; align-self: end; margin: 28px 22px -70px 0; border-radius: 26px 26px 0 0; padding: 6px 6px 0; background: #111; box-shadow: -10px 20px 40px -10px rgba(0, 0, 0, 0.45); transform: rotate(4deg); transition: transform 0.4s ease; }
.home .show .shot img { border-radius: 20px 20px 0 0; }
.home .show:hover .shot { transform: rotate(2deg) translateY(-8px); }
@media (max-width: 960px) { .home .showcase { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .home .show { grid-template-columns: 1fr 0.7fr; } .home .show .txt { padding: 22px 4px 22px 20px; } .home .show .shot { margin-right: 12px; } }

/* Status pills */
.home .status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; background: rgba(255, 255, 255, 0.95); color: #1d2a22; }
.home .status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }
.home .status.live::before { background: #2fbf71; box-shadow: 0 0 0 3px rgba(47, 191, 113, 0.25); }
.home .tile .status { background: var(--surface-alt); color: var(--ink); }

/* ---------- Wide feature card (Focus Flow Finish) ---------- */
.home .wide { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
.home .wide .show { min-height: 380px; }
.home .hn { border-radius: 28px; padding: 28px; color: #fff; display: flex; flex-direction: column; position: relative; overflow: hidden;
  background: radial-gradient(300px 220px at 100% 100%, rgba(255, 255, 255, 0.18), transparent 70%), linear-gradient(150deg, #6c63ff, var(--c-hn) 60%, #2e2a9e);
  box-shadow: 0 28px 50px -30px #2e2a9e; transition: transform 0.3s ease; }
.home .hn:hover { text-decoration: none; transform: translateY(-5px); }
.home .hn .app-ic { width: 64px; height: 64px; margin-bottom: 18px; }
.home .hn h4 { font-family: var(--serif); font-size: 1.45rem; margin: 0 0 8px; color: #fff; }
.home .hn p { opacity: 0.92; }
.home .hn .ring-art { position: absolute; right: -40px; bottom: -40px; width: 200px; height: 200px; border-radius: 50%; border: 22px solid rgba(255, 255, 255, 0.12); }
.home .hn .go { margin-top: auto; display: flex; gap: 12px; align-items: center; font-weight: 800; }
@media (max-width: 860px) { .home .wide { grid-template-columns: 1fr; } }

/* ---------- Planner tiles ---------- */
.home .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.home .tile { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; color: var(--ink); display: flex; flex-direction: column; position: relative; overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.home .tile::after { content: ""; position: absolute; right: -50px; top: -50px; width: 130px; height: 130px; border-radius: 50%; background: color-mix(in srgb, var(--c) 12%, transparent); }
.home .tile:hover { text-decoration: none; transform: translateY(-4px); box-shadow: 0 20px 36px -22px rgba(0, 0, 0, 0.35); }
.home .tile .app-ic { width: 52px; height: 52px; margin-bottom: 14px; position: relative; z-index: 1; }
.home .tile .kind { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.home .tile h4 { font-family: var(--serif); font-size: 1.15rem; margin: 2px 0 8px; }
.home .tile p { color: var(--muted); font-size: 0.95rem; margin: 0 0 16px; }
.home .tile .go { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 800; font-size: 0.9rem; color: var(--accent-dark); }
@media (max-width: 960px) { .home .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .home .tiles { grid-template-columns: 1fr; } }

/* ---------- YouTube band ---------- */
.home .yt { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; align-items: center; }
.home .yt h2 { margin: 0 0 0.4em; }
.home .yt p { color: var(--muted); font-size: 1.08rem; }
.home .poster { position: relative; display: block; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.home .poster img { transition: transform 0.5s ease; }
.home .poster:hover img { transform: scale(1.03); }
.home .poster .play { position: absolute; inset: 0; display: grid; place-items: center; }
.home .poster .play svg { width: clamp(60px, 9vw, 84px); height: auto; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45)); transition: transform 0.2s; }
.home .poster:hover .play svg { transform: scale(1.1); }
@media (max-width: 860px) { .home .yt { grid-template-columns: 1fr; } }

/* ---------- Closing call ---------- */
.home .cta { position: relative; overflow: hidden; border-radius: 32px; color: #fff; padding: 60px 32px; text-align: center;
  background: radial-gradient(500px 300px at 15% 0%, rgba(245, 198, 107, 0.35), transparent 70%), linear-gradient(135deg, #3d7d5c, #1f4a36); }
.home .cta h2 { color: #fff; margin: 0 0 0.3em; }
.home .cta p { color: #dcefe4; max-width: 560px; margin: 0 auto 22px; font-size: 1.1rem; }
.home .cta .btn { background: #fff; color: #1f4a36; }
.home .cta .btn:hover { background: #f3ece0; }
.home .cta .btn.secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.home .cta .leafart { position: absolute; width: 180px; opacity: 0.16; color: #fff; }
.home .cta .leafart.l1 { left: -30px; bottom: -40px; transform: rotate(-20deg); }
.home .cta .leafart.l2 { right: -20px; top: -40px; transform: rotate(160deg); }

/* Gentle motion, only when it is welcome */
@media (prefers-reduced-motion: no-preference) {
  .home .rise { animation: home-rise 0.7s ease both; }
  .home .rise.d2 { animation-delay: 0.1s; }
  .home .rise.d3 { animation-delay: 0.2s; }
  .home .rise.d4 { animation-delay: 0.3s; }
  .home .cluster .ic { animation: home-float 7s ease-in-out infinite; }
  .home .cluster .ic.i2 { animation-delay: -1.5s; }
  .home .cluster .ic.i3 { animation-delay: -3s; }
  .home .cluster .ic.i4 { animation-delay: -4.5s; }
  .home .cluster .ic.i5 { animation-delay: -2.2s; }
  .home .cluster .ic.i6 { animation-delay: -5.4s; }
  .home .cluster .ph.b { animation: home-bob 8s ease-in-out infinite; }
  .home .cluster .ring { animation: home-spin 90s linear infinite; }
  @keyframes home-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes home-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
  @keyframes home-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
  @keyframes home-spin { to { rotate: 360deg; } }
}
@media (max-width: 520px) { .home .strip a { width: 78px; font-size: 0.74rem; } .home .strip .app-ic { width: 48px; height: 48px; } }

/* ---------- Leafy Scale: BMI check teaser ---------- */
.home .ls-try { position: relative; overflow: hidden; border-radius: 28px; padding: 28px; display: flex; flex-direction: column; color: var(--ink); background: var(--card); border: 1px solid var(--line); box-shadow: 0 28px 50px -34px rgba(0, 0, 0, 0.35); transition: transform 0.3s ease; isolation: isolate; }
.home .ls-try:hover { text-decoration: none; transform: translateY(-5px); }
.home .ls-try .ls-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 55%; object-fit: cover; object-position: center bottom; z-index: -1; opacity: 0.85; -webkit-mask: linear-gradient(transparent, #000 45%); mask: linear-gradient(transparent, #000 45%); }
.home .ls-try .kind { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-ls); }
.home .ls-try h4 { font-family: var(--serif); font-size: 1.45rem; margin: 6px 0 8px; }
.home .ls-try p { color: var(--muted); margin: 0 0 18px; }
.home .ls-try .go { margin-top: auto; font-weight: 800; color: var(--c-ls); background: color-mix(in srgb, var(--card) 80%, transparent); align-self: flex-start; padding: 6px 14px; border-radius: 999px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .home .ls-try .ls-art { opacity: 0.25; } :root:not([data-theme="light"]) .home .ls-try .kind, :root:not([data-theme="light"]) .home .ls-try .go { color: #8fe0bf; } }
:root[data-theme="dark"] .home .ls-try .ls-art { opacity: 0.25; }
:root[data-theme="dark"] .home .ls-try .kind, :root[data-theme="dark"] .home .ls-try .go { color: #8fe0bf; }
