/*
Theme Name: JG4IT Voetbalacademie
Theme URI: https://mediamaniacs.nl/talenttrack
Author: Casper Nieuwenhuizen
Author URI: https://mediamaniacs.nl
Description: Custom WordPress theme for the JG4IT Voetbalacademie TalentTrack installation. Dark navy + vivid blue palette, Barlow Condensed + Inter typography, Lucide iconography. Standalone — integrates with the TalentTrack plugin via page-dashboard.php.
Version: 0.2.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jg4it
Tags: one-column, custom-logo, custom-menu, full-width-template
*/

/* ---- Design tokens ---- */
:root {
    /* brand */
    --jg-navy: #0a1030;
    --jg-navy-deep: #050820;
    --jg-navy-soft: #141a42;
    --jg-blue: #1e88e5;
    --jg-blue-soft: #4fa3ea;
    --jg-blue-deep: #1565c0;
    /* surfaces */
    --jg-paper: #ffffff;
    --jg-paper-soft: #f6f8fb;
    --jg-paper-muted: rgba(255, 255, 255, 0.78);
    --jg-paper-dim: rgba(255, 255, 255, 0.55);
    /* text on light surfaces */
    --jg-ink: #0a1030;
    --jg-ink-soft: #475569;
    /* structure */
    --jg-line: rgba(255, 255, 255, 0.12);
    --jg-line-light: #e2e8f0;
    --jg-radius: 8px;
    --jg-radius-lg: 16px;
    --jg-shadow: 0 10px 30px rgba(5, 8, 32, 0.55);
    --jg-shadow-lg: 0 20px 60px rgba(5, 8, 32, 0.75);
    /* typography */
    --jg-font-display: "Barlow Condensed", "Oswald", "Helvetica Neue", Arial, sans-serif;
    --jg-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --jg-container: 1180px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--jg-font-body);
    color: var(--jg-paper);
    background: var(--jg-navy);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--jg-blue-soft); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--jg-paper); }

h1, h2, h3, h4 {
    font-family: var(--jg-font-display);
    font-weight: 800;
    font-style: italic;
    letter-spacing: 0.005em;
    color: var(--jg-paper);
    margin: 0 0 0.5em;
    line-height: 1.05;
    text-transform: uppercase;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.35rem; letter-spacing: 0.02em; }
p { margin: 0 0 1em; }

.jg-container { max-width: var(--jg-container); margin: 0 auto; padding: 0 24px; }

.jg-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
    left: 16px; top: 16px;
    background: var(--jg-blue);
    color: var(--jg-paper);
    padding: 10px 14px;
    border-radius: var(--jg-radius);
    z-index: 1000;
}

/* ---- Header ---- */
.jg-site-header {
    background: var(--jg-navy-deep);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--jg-line);
}
.jg-site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
}
.jg-site-brand {
    display: inline-flex;
    align-items: center;
    color: var(--jg-paper);
    font-family: var(--jg-font-display);
    font-size: 1.6rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.jg-site-brand:hover { color: var(--jg-blue-soft); }
.custom-logo-link { display: inline-flex; }
.custom-logo { max-height: 48px; width: auto; }
.jg-site-logo {
    max-height: 56px;
    width: auto;
    display: block;
}

.jg-site-tagline {
    margin: 0;
    font-family: var(--jg-font-display);
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    color: var(--jg-paper);
    font-size: clamp(0.85rem, 1.4vw, 1.15rem);
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-align: right;
    max-width: 44ch;
}
.jg-site-tagline .jg-accent {
    color: var(--jg-blue-soft);
}

.jg-nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: var(--jg-paper);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--jg-radius);
}
.jg-nav-toggle:focus-visible { outline: 2px solid var(--jg-blue); }

.jg-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; gap: 8px;
    flex-wrap: wrap;
}
.jg-nav a {
    color: var(--jg-paper);
    font-family: var(--jg-font-display);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: var(--jg-radius);
    transition: background-color .15s ease, color .15s ease;
}
.jg-nav a:hover,
.jg-nav .current-menu-item > a,
.jg-nav .current_page_item > a {
    background: var(--jg-blue);
    color: var(--jg-paper);
}

@media (max-width: 820px) {
    .jg-nav-toggle { display: inline-flex; align-items: center; }
    .jg-nav {
        display: none;
        position: absolute;
        top: calc(100% + 14px);
        left: 0;
        right: 0;
        background: var(--jg-navy-deep);
        border: 1px solid var(--jg-line);
        border-radius: var(--jg-radius);
        padding: 12px;
    }
    .jg-nav.is-open { display: block; }
    .jg-nav ul { flex-direction: column; gap: 4px; }
    .jg-nav a { display: block; }
    .jg-site-tagline { display: none; }
}

/* ---- Hero ---- */
.jg-hero {
    position: relative;
    padding: clamp(64px, 10vw, 140px) 0 clamp(56px, 8vw, 112px);
    background:
        radial-gradient(ellipse at top right, rgba(30, 136, 229, 0.28), transparent 55%),
        radial-gradient(ellipse at bottom left, rgba(30, 136, 229, 0.12), transparent 60%),
        linear-gradient(180deg, var(--jg-navy) 0%, var(--jg-navy-deep) 100%);
    overflow: hidden;
}
.jg-hero__eyebrow {
    display: inline-block;
    font-family: var(--jg-font-display);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--jg-blue-soft);
    margin-bottom: 1.25rem;
}
.jg-hero h1 {
    max-width: 20ch;
    margin-bottom: 0.5em;
}
.jg-hero h1 .jg-accent { color: var(--jg-blue-soft); }
.jg-hero p.jg-lede {
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    color: var(--jg-paper-muted);
    max-width: 56ch;
    margin-bottom: 2.25rem;
    font-weight: 400;
}
.jg-cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- Buttons ---- */
.jg-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: var(--jg-radius);
    font-family: var(--jg-font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
    text-decoration: none;
    line-height: 1;
}
.jg-btn svg { flex-shrink: 0; }
.jg-btn--primary {
    background: var(--jg-blue);
    color: var(--jg-paper);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.35);
}
.jg-btn--primary:hover {
    background: var(--jg-blue-soft);
    color: var(--jg-paper);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(30, 136, 229, 0.45);
}
.jg-btn--ghost {
    background: transparent;
    color: var(--jg-paper);
    border-color: rgba(255, 255, 255, 0.32);
}
.jg-btn--ghost:hover {
    border-color: var(--jg-blue-soft);
    color: var(--jg-blue-soft);
}

/* ---- Page ---- */
.jg-page { padding: 56px 0 96px; }
.jg-page__inner { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.jg-page--full .jg-page__inner { max-width: var(--jg-container); }
.jg-page h1, .jg-page h2, .jg-page h3 { color: var(--jg-paper); }
.jg-entry a { color: var(--jg-blue-soft); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.jg-entry a:hover { color: var(--jg-paper); }
.jg-entry-meta { color: var(--jg-paper-dim); font-size: 0.9rem; margin-bottom: 18px; }

/* ---- Dashboard wrapper (light surface for plugin compatibility) ---- */
.jg-dashboard-wrap {
    min-height: 60vh;
    padding: 32px 0 64px;
    background: var(--jg-paper-soft);
    color: var(--jg-ink);
}
.jg-dashboard-wrap .jg-container { max-width: 1280px; }
.jg-dashboard-wrap a { color: var(--jg-blue-deep); }
.jg-dashboard-wrap a:hover { color: var(--jg-blue); }

/* ---- 404 ---- */
.jg-404 { text-align: center; padding: 120px 24px; }
.jg-404 h1 {
    font-size: clamp(4rem, 12vw, 8rem);
    color: var(--jg-blue-soft);
    margin-bottom: 8px;
    line-height: 1;
}
.jg-404 p { color: var(--jg-paper-muted); }

/* ---- Footer ---- */
.jg-site-footer {
    background: var(--jg-navy-deep);
    color: var(--jg-paper-muted);
    padding: 48px 0 32px;
    font-size: 0.95rem;
    border-top: 1px solid var(--jg-line);
}
.jg-site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.jg-social {
    display: flex;
    gap: 12px;
    list-style: none;
    margin: 0; padding: 0;
}
.jg-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--jg-paper);
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.jg-social a:hover {
    background: var(--jg-blue);
    color: var(--jg-paper);
    transform: translateY(-2px);
}
.jg-site-footer a { color: var(--jg-paper-muted); }
.jg-site-footer a:hover { color: var(--jg-blue-soft); }

/* ---- TalentTrack plugin dashboard re-skin ----
   The plugin scopes its design tokens to `.tt-dashboard` (frontend-admin.css)
   and the legacy public.css hardcodes some greens / serifs. We override the
   tokens at higher specificity and force the JG4IT typography on dashboard
   headings + body so the shortcode output inherits the brand. */
body .tt-dashboard {
    --tt-primary: var(--jg-blue);
    --tt-primary-ink: var(--jg-blue-deep);
    --tt-secondary: var(--jg-blue-soft);
    --tt-ink: var(--jg-ink);
    --tt-muted: var(--jg-ink-soft);
    --tt-line: var(--jg-line-light);
    --tt-bg-soft: var(--jg-paper-soft);
    --tt-info: var(--jg-blue);
    --tt-info-soft: rgba(30, 136, 229, 0.1);
    --tt-focus: 0 0 0 2px rgba(30, 136, 229, 0.35);

    font-family: var(--jg-font-body);
    color: var(--jg-ink);
}
body .tt-dashboard h1,
body .tt-dashboard h2,
body .tt-dashboard h3,
body .tt-dashboard h4 {
    font-family: var(--jg-font-display);
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    color: var(--jg-ink);
}
body .tt-dashboard a { color: var(--jg-blue-deep); }
body .tt-dashboard a:hover { color: var(--jg-blue); }
body .tt-dashboard .button-primary,
body .tt-dashboard button[type="submit"],
body .tt-dashboard .tt-btn-primary {
    background: var(--jg-blue);
    border-color: var(--jg-blue);
    color: var(--jg-paper);
}
body .tt-dashboard .button-primary:hover,
body .tt-dashboard button[type="submit"]:hover,
body .tt-dashboard .tt-btn-primary:hover {
    background: var(--jg-blue-soft);
    border-color: var(--jg-blue-soft);
}
