/* ============================================
   Kobu brand layer, loaded after styles.css on every page.

   The app's rules (DESIGN.md §1.1), on the web:
   - a black canvas, with depth from lightness and never from outlines;
   - the primary action is the white button;
   - Kobu orange (#FF6A1A) is a spark for live state, never a link or a
     button colour;
   - a heavy, tight heading and a wide-tracked uppercase micro-label.
   ============================================ */

:root {
    --bg: #000000;
    --bg-card: #171717;
    --bg-card-hover: #1F1F20;
    --bg-elevated: #262628;
    --border: #1C1C1E;
    --border-light: #2A2A2C;
    --text: #F5F5F7;
    --text-secondary: #A1A1A6;
    --text-muted: #6E6E73;
    --accent: #FF6A1A;
    --accent-hover: #FF7D38;
    --gradient-start: #FFFFFF;
    --gradient-end: #A1A1A6;
    --spark: #FF6A1A;
}

body {
    background: var(--bg);
}

/* The logo: the gorilla tile beside the white wordmark. */
.nav-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav-logo::before,
.footer-logo::before {
    content: "";
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: url("favicon-192.png?v=kobu") center / cover no-repeat;
    flex: none;
}

.footer-logo::before {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.wordmark,
.wordmark-footer {
    color: #FFFFFF;
}

.wordmark-nav {
    font-size: 24px;
}

.nav {
    background: rgba(0, 0, 0, 0.72);
}

/* An open phone menu is solid, so the page doesn't show through it. */
.nav:has(.nav-mobile.open) {
    background: #000000;
}

.nav-links a,
.nav-mobile a {
    color: var(--text-secondary);
}

.nav-links a:hover,
.nav-mobile a:hover,
.nav-links a.active,
.nav-mobile a.active {
    color: #FFFFFF;
}

/* The menu links sit on the same line as the Coach login pill. */
.nav-links {
    align-items: center;
}

/* Coach login is a plain link, the way Trainerize and TrainHeroic show
   their log in. The white pill after it is the page's one call to action:
   get the app. */
.nav-links a.nav-login,
.nav-mobile a.nav-login {
    color: #FFFFFF;
}

@media (max-width: 1080px) {
    .nav-links {
        gap: 20px;
    }
}

.nav-links a.nav-cta {
    background: #FFFFFF;
    color: #000000;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
}

.nav-links a.nav-cta:hover {
    background: #E8E8EA;
    color: #000000;
}

.nav-mobile a.nav-cta {
    color: #FFFFFF;
    font-weight: 600;
}

/* Buttons: white is the primary action, a dark card is the second. */
.btn-primary {
    background: #FFFFFF;
    color: #000000;
    box-shadow: none;
}

.btn-primary:hover {
    background: #E8E8EA;
    color: #000000;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: #FFFFFF;
    border: none;
}

.btn-secondary:hover {
    background: #303032;
    border: none;
}

/* The micro-label above a heading. */
.section-tag {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Links inside a policy page: white and underlined, not orange. */
.policy-meta a,
.policy-article a,
.policy-section a {
    color: #FFFFFF;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-underline-offset: 3px;
}

.policy-meta a:hover,
.policy-article a:hover,
.policy-section a:hover {
    text-decoration-color: #FFFFFF;
}

.policy-section li::before {
    background: var(--text-muted);
}

.gradient-text {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: #FFFFFF;
}

.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.footer-column a {
    color: var(--text-secondary);
}

.footer-column a:hover {
    color: #FFFFFF;
}

/* Two audiences, two menus: athletes and coaches, the way TrainHeroic
   splits its nav. A menu opens on hover or keyboard focus with no script;
   home.js adds click-to-open for touch screens and Escape to close. */
.nav-group {
    position: relative;
}

.nav-group-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    background: none;
    border: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.nav-group-btn:hover,
.nav-group-btn.active,
.nav-group:focus-within .nav-group-btn,
.nav-group.open .nav-group-btn {
    color: #FFFFFF;
}

.nav-caret {
    width: 12px;
    height: 12px;
    transition: transform 0.2s;
}

.nav-group:hover .nav-caret,
.nav-group.open .nav-caret {
    transform: rotate(180deg);
}

.nav-menu {
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 280px;
    padding: 8px;
    margin-top: 6px;
    border-radius: 18px;
    background: #171717;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

/* Bridges the gap between the button and the menu, so the pointer can
   travel down without the menu closing. */
.nav-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
}

.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu,
.nav-group.open .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.nav-group.closed .nav-menu {
    opacity: 0;
    visibility: hidden;
}

.nav-links .nav-menu a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #FFFFFF;
}

.nav-links .nav-menu a:hover,
.nav-links .nav-menu a:focus-visible,
.nav-links .nav-menu a[aria-current="page"] {
    background: #262628;
}

.nav-menu strong {
    font-size: 15px;
    font-weight: 600;
}

.nav-menu span {
    font-size: 13px;
    color: var(--text-secondary);
}

.nav-mobile-label {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.nav-mobile-label:first-child {
    margin-top: 0;
}

.nav-mobile a[aria-current="page"] {
    color: #FFFFFF;
}
