/* ═══════════════════════════════════════════════════════════════
   SafePremium Academy — Shared Foundation CSS
   Deduplicated from v1, where every page had its own copy.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --navy: #1C3D5A;
    --slate: #4F6B82;
    --off-white: #F7F9FA;
    --grey: #E4E8EB;
    --cyan: #00A6D6;
    --gold: #C9A959;
    --white: #FFFFFF;
    --cyan-dark: #008AB3;
    --navy-light: #24506F;
    --max-width: 1280px;
    --h-pad: 80px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Public Sans', sans-serif;
    font-weight: 400;
    font-size: 19px;
    line-height: 1.6;
    color: var(--slate);
    background-color: var(--off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--navy); }
h1 { font-size: clamp(36px, 5vw, 68px); line-height: 1.1; text-transform: uppercase; }
h2 { font-size: clamp(24px, 3vw, 38px); }
h3 { font-size: clamp(18px, 2vw, 24px); margin-bottom: 10px; }
p { margin-bottom: 12px; }
a { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--cyan-dark); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--h-pad); }
section { position: relative; overflow: hidden; }

.grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grey) 1px, transparent 1px),
        linear-gradient(90deg, var(--grey) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

.dark-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: 0;
    pointer-events: none;
}

.dark-section { background-color: var(--navy); color: var(--white); }
.dark-section p, .dark-section li { color: var(--grey); }

/* Navigation (shared) */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(28, 61, 90, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner {
    max-width: var(--max-width); margin: 0 auto; padding: 0 var(--h-pad);
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand svg { width: 32px; height: 32px; flex-shrink: 0; }
.nav-brand-name {
    font-family: 'Montserrat', sans-serif; font-weight: 700;
    font-size: 15px; color: var(--white); letter-spacing: 0.02em;
}
.nav-back {
    font-family: 'Public Sans', sans-serif; font-weight: 500; font-size: 13px;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.7); transition: color 0.2s;
}
.nav-back:hover { color: var(--white); }
.nav-back i { margin-right: 6px; font-size: 11px; }

/* Buttons */
.btn-primary {
    display: inline-block; padding: 14px 32px;
    font-family: 'Public Sans', sans-serif; font-weight: 600;
    font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em;
    background: var(--cyan); color: var(--white) !important;
    border: none; cursor: pointer; transition: background 0.2s;
    text-align: center; text-decoration: none;
}
.btn-primary:hover { background: var(--cyan-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-block { display: block; width: 100%; }

.btn-secondary {
    display: inline-block; padding: 8px 16px;
    font-family: 'Public Sans', sans-serif; font-weight: 600; font-size: 13px;
    background: transparent; color: var(--cyan);
    border: 1px solid var(--cyan); cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { background: var(--cyan); color: var(--white); }

/* Honeypot — visually hidden but in DOM */
.hp-field {
    position: absolute !important;
    left: -10000px;
    width: 1px; height: 1px;
    overflow: hidden;
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Section title */
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--navy);
    border-left: 8px solid var(--cyan);
    padding-left: 20px; margin-bottom: 40px;
}

/* ═══════════════════════════════════════════════════════════════
   Mobile responsive — phones and small tablets
   Affects every page since these classes are shared.
   ═══════════════════════════════════════════════════════════════ */

/* Tablet and below: reduce horizontal padding from 80px to something usable */
@media (max-width: 1024px) {
    :root { --h-pad: 32px; }
}

/* Phones: tighter padding, reflowed nav, smaller body type */
@media (max-width: 640px) {
    :root { --h-pad: 18px; }
    body { font-size: 17px; }
    h1 { font-size: clamp(28px, 8vw, 44px); }
    h2 { font-size: clamp(22px, 6vw, 28px); }

    /* Section title — less aggressive padding on mobile */
    .section-title {
        padding-left: 14px;
        border-left-width: 5px;
        margin-bottom: 24px;
    }

    /* Nav: prevent the brand and right-side controls from overlapping
       when the user-email is long. Allow the right-side controls to
       shrink and the email to truncate. */
    .nav-inner { gap: 12px; }
    .nav-brand-name { font-size: 13px; }
    .nav-brand svg { width: 28px; height: 28px; }
}

/* Very small phones (<360px): even tighter */
@media (max-width: 380px) {
    :root { --h-pad: 14px; }
    .nav-brand-name { display: none; }  /* keep just the logo */
}

/* ═══════════════════════════════════════════════════════════════
   Site footer (shared by site-footer, lesson-footer, dash-footer).
   Parent class provides the background tone; inner layout is shared
   so every page has the same brand / links / risk-disclosure pattern.
   ═══════════════════════════════════════════════════════════════ */
.site-footer,
.lesson-footer,
.dash-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.45);
    border-top: 1px solid rgba(255,255,255,0.12);
    position: relative;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px var(--h-pad);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    position: relative;
    z-index: 1;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.footer-brand svg { width: 36px; height: 36px; }
.footer-brand-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
}
.footer-links {
    display: flex;
    gap: 24px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.footer-links a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--h-pad) 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.footer-bottom span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
}
