/**
 * Teach My CEO — Academy Theme
 *
 * Scholarly, authoritative, warm academic prestige.
 * Deep navy + burgundy + ivory palette with Merriweather serif headings.
 *
 * @link    https://teachmyceo.ai
 * @version 1.0
 */

/* ===================================================================
   RESET & FOUNDATION
   =================================================================== */

* {
    box-sizing: border-box;
    border: 0 none;
    margin: 0;
    padding: 0;
}

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0 none;
}

/* ===================================================================
   DESIGN TOKENS
   =================================================================== */

:root {
    --navy:       #1E3A5F;
    --navy-deep:  #152C49;
    --navy-light: #2A4D73;
    --burgundy:   #991B1B;
    --burgundy-hover: #7F1616;
    --ivory:      #FFFEF5;
    --ivory-warm: #FBF9F0;
    --cream:      #F5F0E8;
    --gold:       #C5985E;
    --gold-light: #D4AD74;
    --text:       #2C2C2C;
    --text-light: #5A5A5A;
    --text-muted: #8A8A8A;
    --rule:       #D6CFC2;
    --rule-light: #E8E2D8;
    --card-bg:    #FFFFFF;
    --card-border:#E2DCD2;
    --font-heading: 'Merriweather', Georgia, 'Times New Roman', serif;
    --font-body:    'Source Sans 3', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
    --max-width:  42rem;
    --wide-width: 68rem;
}

/* ===================================================================
   LAYOUT
   =================================================================== */

html, body { height: 100%; }

body {
    display: flex;
    flex-direction: column;
    background-color: var(--ivory);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text);
    font-variant-ligatures: common-ligatures;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.content-wrap {
    flex: 1 0 auto;
    padding: 3.5rem 1.5rem 4rem;
}

.content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.landscape-page .content {
    max-width: var(--wide-width);
}

/* ===================================================================
   NAVIGATION
   =================================================================== */

.academy-nav {
    background: var(--navy);
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.75rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.brand-seal {
    font-size: 1.4rem;
    color: var(--gold);
    line-height: 1;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.nav-links li { padding: 0; }

.nav-links a {
    display: block;
    padding: 0.6rem 1rem;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.2s ease, background 0.2s ease;
    border-radius: 4px;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.nav-links .active a {
    color: var(--gold-light);
    background: rgba(197,152,94,0.12);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform 0.2s ease;
}

/* ===================================================================
   HERO SECTIONS
   =================================================================== */

.academy-hero {
    background: var(--navy);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-ornament {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 320px;
    opacity: 0.04;
    background: radial-gradient(circle at 70% 30%, var(--gold) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3.5rem 1.5rem 3rem;
    position: relative;
}

.home-hero .hero-inner {
    max-width: var(--wide-width);
    padding: 4.5rem 1.5rem 4rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.25rem 0.85rem;
    background: rgba(197,152,94,0.18);
    color: var(--gold-light);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(197,152,94,0.25);
    border-radius: 3px;
    margin-bottom: 1.25rem;
    font-family: var(--font-body);
}

.academy-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.hero-accent {
    color: var(--gold-light);
}

.hero-deck {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.78);
    max-width: 40rem;
}

.home-hero .hero-deck {
    max-width: 48rem;
}

.hero-breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.55);
}

.hero-breadcrumb a {
    color: var(--gold-light);
    text-decoration: none;
}

.hero-breadcrumb a:hover { color: #fff; }

.bc-sep {
    margin: 0 0.4rem;
    color: rgba(255,255,255,0.3);
}

/* Hero metrics */

.hero-metrics {
    display: flex;
    gap: 2.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.metric-block {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--gold-light);
    line-height: 1;
}

.metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.5);
    margin-top: 0.35rem;
    font-weight: 600;
}

/* ===================================================================
   TYPOGRAPHY
   =================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-weight: 700;
    line-height: 1.3;
}

.content h1 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--rule);
}

.content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--rule-light);
    color: var(--navy);
}

.content h3 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--navy-light);
}

.content h4 {
    font-size: 1.05rem;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
    font-weight: 700;
    color: var(--text);
}

.content h5 { font-size: 1rem; margin-bottom: 0.4rem; }
.content h6 { font-size: 1rem; font-weight: 400; font-style: italic; margin-bottom: 0.4rem; }

p, td, th, li, dd {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

p { text-align: justify; }

p, hr, table, .table-responsive, ol, ul, dl, dd, pre, blockquote, fieldset {
    margin-bottom: 1.15em;
}

a {
    color: var(--burgundy);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--burgundy-hover); text-decoration: underline; }

img { max-width: 100%; }

hr {
    border: none;
    height: 1px;
    background: var(--rule);
    margin: 2rem 0;
}

strong { font-weight: 700; color: var(--navy); }

blockquote {
    margin: 1.5rem 0 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--burgundy);
    background: var(--cream);
    font-style: italic;
    color: var(--text-light);
    border-radius: 0 4px 4px 0;
}

blockquote p:last-child { margin-bottom: 0; }

/* ===================================================================
   LISTS
   =================================================================== */

ol, ul {
    list-style-position: outside;
    padding-left: 1.5em;
}
ol { padding-left: 2.5em; }
li { padding-left: 0.35em; margin-bottom: 0.3em; }

dt { font-weight: 700; color: var(--navy); }
dd { margin-left: 1.5em; }

/* ===================================================================
   TABLES — Comparison & Landscape
   =================================================================== */

table {
    border-spacing: 0;
    width: 100%;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

th {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--navy);
    color: #fff;
    padding: 0.75rem 0.85rem;
    white-space: nowrap;
}

th:first-child { text-align: left; }

td {
    padding: 0.65rem 0.85rem;
    vertical-align: top;
    border-top: 1px solid var(--rule-light);
    font-size: 0.95rem;
}

td:first-child {
    font-weight: 600;
    color: var(--navy);
}

tr:hover td {
    background: rgba(30,58,95,0.02);
}

tbody tr:first-child td { border-top: none; }

.table-responsive { overflow-x: auto; margin-bottom: 1.15em; }
.table-responsive > table { margin-bottom: 0; }

/* ===================================================================
   HARVEY BALLS
   =================================================================== */

td:has(.hb) {
    text-align: center;
    vertical-align: middle;
}

.hb {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--navy);
    position: relative;
    background: var(--card-bg);
    vertical-align: middle;
}

.hb-1 { background: var(--card-bg); }

.hb-2 {
    background: conic-gradient(var(--navy) 0deg 90deg, var(--card-bg) 90deg 360deg);
}

.hb-3 {
    background: conic-gradient(var(--navy) 0deg 180deg, var(--card-bg) 180deg 360deg);
}

.hb-4 {
    background: conic-gradient(var(--navy) 0deg 270deg, var(--card-bg) 270deg 360deg);
}

.hb-5 {
    background: var(--navy);
}

/* ===================================================================
   CODE
   =================================================================== */

code {
    margin: 0 0.1em;
    padding: 0.15em 0.35em;
    border: 1px solid var(--rule-light);
    border-radius: 3px;
    background: var(--cream);
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
    font-size: 0.85rem;
}

pre {
    padding: 1em 1.25em;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    background: var(--cream);
    overflow-x: auto;
}

pre code {
    display: block;
    margin: 0;
    padding: 0;
    border: 0 none;
    background: transparent;
    line-height: 1.5;
}

/* ===================================================================
   GLOSSARY INDEX
   =================================================================== */

.glossary-index h2 {
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--burgundy);
    border-bottom: 2px solid var(--burgundy);
    padding-bottom: 0.3rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.glossary-index ul {
    list-style: none;
    padding-left: 0;
}

.glossary-index ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--rule-light);
}

.glossary-index ul li:last-child { border-bottom: none; }

.glossary-index ul li a {
    font-weight: 600;
    font-size: 1.05rem;
}

/* ===================================================================
   GLOSSARY ENTRY
   =================================================================== */

.glossary-entry h2 {
    font-size: 1.35rem;
    color: var(--navy);
    border-bottom-color: var(--burgundy);
    border-bottom-width: 2px;
}

.glossary-entry h2:first-of-type {
    margin-top: 0;
}

/* ===================================================================
   COMPARISON PAGES
   =================================================================== */

.compare-index h2 {
    font-size: 1.2rem;
    color: var(--navy);
    margin-top: 2rem;
}

.compare-index p strong a {
    color: var(--burgundy);
    font-family: var(--font-heading);
}

.comparison-detail h2 {
    color: var(--navy);
}

.comparison-detail h3 {
    color: var(--burgundy);
    font-size: 1.1rem;
    margin-top: 1.75rem;
}

/* ===================================================================
   ABOUT PAGE
   =================================================================== */

.about-content h2 {
    font-size: 1.3rem;
}

/* ===================================================================
   FOOTER
   =================================================================== */

.academy-footer {
    flex: 0 0 auto;
    background: var(--navy-deep);
    color: rgba(255,255,255,0.5);
    border-top: 3px solid var(--gold);
}

.footer-inner {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.75rem;
}

.footer-brand .brand-seal {
    color: var(--gold);
}

.footer-disclosure {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.footer-edition {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}

/* ===================================================================
   FORMS
   =================================================================== */

label, fieldset legend { font-weight: 700; }

input:not([type="checkbox"]):not([type="radio"]), button, select, textarea, fieldset, fieldset legend {
    border: 1px solid var(--card-border);
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:not([type="checkbox"]):not([type="radio"]), button, select, textarea {
    padding: 0.5em 1em;
    outline: 0 none;
    font-size: 1rem;
    font-family: var(--font-body);
}

input:focus:not([type="checkbox"]):not([type="radio"]), button:focus, select:focus, textarea:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30,58,95,0.12);
}

button, .button {
    background-color: var(--burgundy);
    border-color: var(--burgundy);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

button:hover, .button:hover {
    background-color: var(--burgundy-hover);
    border-color: var(--burgundy-hover);
}

/* ===================================================================
   UTILITIES
   =================================================================== */

.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.align-justify { text-align: justify; }

.image { display: block; margin: 0 auto; }
.image.xsmall { width: 20%; }
.image.small { width: 40%; }
.image.large { width: 60%; }
.image.xlarge { width: 80%; }
.image.float-left { float: left; margin: 1em 2em 1em 0; }
.image.float-right { float: right; margin: 1em 0 1em 2em; }
.image img { display: block; width: 100%; }

/* ===================================================================
   RESPONSIVE — TABLET
   =================================================================== */

@media (max-width: 900px) {
    .hero-metrics {
        gap: 1.5rem;
    }

    .academy-hero h1 {
        font-size: 2rem;
    }

    .landscape-page .content {
        max-width: 100%;
    }
}

/* ===================================================================
   RESPONSIVE — MOBILE
   =================================================================== */

@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--navy-deep);
        padding: 0.5rem 0;
        border-top: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 0.75rem 1.5rem;
        border-radius: 0;
    }

    .content-wrap {
        padding: 2rem 1rem 3rem;
    }

    .hero-inner {
        padding: 2.5rem 1rem 2rem;
    }

    .home-hero .hero-inner {
        padding: 3rem 1rem 2.5rem;
    }

    .academy-hero h1 {
        font-size: 1.6rem;
    }

    .hero-deck {
        font-size: 1rem;
    }

    .hero-metrics {
        flex-direction: column;
        gap: 1rem;
    }

    .metric-block {
        flex-direction: row;
        align-items: baseline;
        gap: 0.5rem;
    }

    .metric-value {
        font-size: 1.5rem;
    }

    .content h1 { font-size: 1.6rem; }
    .content h2 { font-size: 1.25rem; }
    .content h3 { font-size: 1.1rem; }

    .image.xsmall { width: 60%; }
    .image.small { width: 80%; }
    .image.large, .image.xlarge { width: 100%; }
    .image.float-left, .image.float-right { float: none; margin: 0 auto; }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.5rem 0.6rem;
    }
}
