"""Home — landing page once setup is complete. The plain index of sections.

`app.py` is the controller and shows the first-run nudge for fresh installs;
this page is just the "you've arrived, here's where things are" landing.
"""

from __future__ import annotations

import streamlit as st

from openrun.web._helpers import show_sidebar


show_sidebar()

st.title("openrun")
st.markdown(
    "Local-first endurance analytics. All data stays on your machine — Garmin "
    "sync, Banister CTL/ATL/TSB, decoupling, race-plan projection, off-watch "
    "activity logging."
)

cols = st.columns(2)
with cols[0]:
    st.markdown(
        """
        ### 📊 Dashboard
        Today's fitness, fatigue, and form at a glance — plus recent activity
        and weekly volume.

        ### 📋 Activities
        Browse, filter, and inspect individual runs.

        ### 📈 Race plan
        Periodised plan with projected PMC through race day.

        ### 📝 Manual log
        Off-watch sessions (strength, hikes, unrecorded runs).
        """
    )
with cols[1]:
    st.markdown(
        """
        ### 🛌 Recovery
        Sleep stages, HRV, RHR, and how prior-day load affects next-morning HRV.

        ### 🫀 Efficiency
        Metres per heartbeat — your aerobic fitness signal, year over year.

        ### 🔄 Sync
        Pull from Garmin Connect, or import a Garmin data export.
        """
    )

st.divider()
st.caption("Need to redo your profile or zones?")
if st.button("Open setup wizard"):
    st.session_state["show_welcome"] = True
    st.switch_page("pages/0_Welcome.py")
