/* ═══════════════════════════════════════════
   HOMEUniversity — Design System
   ═══════════════════════════════════════════ */

:root {
    --bg: #FDFCFA;
    --bg-side: #F8F6F3;
    --bg-card: #FFFFFF;
    --bg-tier: #FAF9F7;
    --t1: #1C1917;
    --t2: #57534E;
    --t3: #A8A29E;
    --tm: #D6D3D1;
    --ac: #B8860B;
    --ac-l: #D4A843;
    --ac-g: rgba(184,134,11,.08);
    --ac-b: rgba(184,134,11,.15);
    --bl: #ECEAE6;
    --bs: #F0EEEA;
    --red: #8B2500;
    --red-g: rgba(139,37,0,.06);
    --fd: 'Cormorant Garamond', Georgia, serif;
    --fb: 'DM Sans', -apple-system, sans-serif;
    --fm: 'JetBrains Mono', monospace;
    --sw: 300px;
    --cw: 780px;
    --ss: 0 1px 3px rgba(28,25,23,.04);
    --sg: 0 0 40px rgba(184,134,11,.06);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--fb);
    background: var(--bg);
    color: var(--t1);
    line-height: 1.7;
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ac-g); color: var(--ac); }

/* ═══ SIDEBAR ═══ */
.sidebar {
    width: var(--sw);
    background: var(--bg-side);
    border-right: 1px solid var(--bl);
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--tm); border-radius: 4px; }
.s-logo { padding: 2.5rem 2rem 2rem; border-bottom: 1px solid var(--bl); }
.s-logo a { text-decoration: none; display: block; }
.s-logo h1 {
    font-family: var(--fd);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: .25em;
    color: var(--t1);
    text-transform: uppercase;
}
.s-logo .sub {
    font-family: var(--fb);
    font-size: .65rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--t3);
    margin-top: .25rem;
}
.s-nav { flex: 1; padding: 1.5rem 0; }
.ng { margin-bottom: 1.5rem; }
.ng-t {
    padding: .4rem 2rem;
    font-size: .6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--t3);
}
.nl {
    display: block;
    padding: .65rem 2rem;
    font-size: .88rem;
    color: var(--t2);
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    position: relative;
    user-select: none;
}
.nl:hover { color: var(--t1); background: rgba(0,0,0,.02); }
.nl.active { color: var(--ac); background: var(--ac-g); }
.nl.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--ac);
}
.nl .arr { float: right; font-size: .7rem; transition: transform .25s; color: var(--t3); }
.nl.exp .arr { transform: rotate(90deg); }
.ndd { max-height: 0; overflow: hidden; transition: max-height .35s cubic-bezier(.4,0,.2,1); }
.ndd.open { max-height: 600px; }
.nsl {
    display: block;
    padding: .5rem 2rem .5rem 2.8rem;
    font-size: .82rem;
    color: var(--t3);
    text-decoration: none;
    transition: all .2s;
    position: relative;
    cursor: pointer;
}
.nsl::before {
    content: '';
    position: absolute;
    left: 2rem; top: 50%;
    width: 4px; height: 1px;
    background: var(--tm);
}
.nsl:hover { color: var(--t1); }
.nsl.active { color: var(--ac); }
.nsl.active::before { background: var(--ac); width: 6px; }
.nsl.dim { opacity: .45; cursor: default; }
.nsl.dim:hover { color: var(--t3); }
.s-foot {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--bl);
    font-size: .7rem;
    color: var(--tm);
    letter-spacing: .05em;
}

/* ═══ MOBILE ═══ */
.mh {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: var(--bg-side);
    border-bottom: 1px solid var(--bl);
    z-index: 101;
    align-items: center;
    padding: 0 1.5rem;
    justify-content: space-between;
}
.mh h1 {
    font-family: var(--fd);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.mt {
    width: 36px; height: 36px;
    background: none;
    border: 1px solid var(--bl);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.mt span { width: 18px; height: 1.5px; background: var(--t1); }
.ov {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 99;
    backdrop-filter: blur(2px);
}
.ov.active { display: block; }

/* ═══ MAIN ═══ */
.main { margin-left: var(--sw); flex: 1; min-height: 100vh; }

/* ═══ HERO ═══ */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -30%; left: 50%;
    transform: translateX(-50%);
    width: 800px; height: 800px;
    background: radial-gradient(ellipse, rgba(184,134,11,.04) 0%, transparent 70%);
    pointer-events: none;
}
.h-icon { width: 120px; height: 120px; margin-bottom: 3rem; opacity: 0; animation: ff 1.2s ease-out .3s forwards; }
.h-title {
    font-family: var(--fd);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 300;
    letter-spacing: .08em;
    color: var(--t1);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fu .8s ease-out .6s forwards;
}
.h-div { width: 60px; height: 1px; background: var(--ac); margin-bottom: 1.5rem; opacity: 0; animation: fu .8s ease-out .8s forwards; }
.h-sub {
    font-family: var(--fb);
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--t2);
    letter-spacing: .04em;
    line-height: 1.8;
    max-width: 520px;
    opacity: 0;
    animation: fu .8s ease-out 1s forwards;
}
.h-cta { margin-top: 3rem; opacity: 0; animation: fu .8s ease-out 1.2s forwards; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-block;
    padding: .85rem 2.5rem;
    font-family: var(--fb);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: all .3s;
    cursor: pointer;
    border: 1px solid var(--ac-b);
}
.btn-p { background: var(--ac); color: #fff; border-color: var(--ac); }
.btn-p:hover { background: #9A7209; box-shadow: var(--sg); }
.btn-g { background: none; color: var(--ac); }
.btn-g:hover { background: var(--ac); color: #fff; }

/* ═══ CONTENT ═══ */
.pc { max-width: var(--cw); margin: 0 auto; padding: 5rem 3rem 6rem; }
.ph { margin-bottom: 3.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--bl); }
.pl {
    font-family: var(--fb);
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--ac);
    margin-bottom: 1rem;
}
.pt {
    font-family: var(--fd);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: .04em;
    color: var(--t1);
    margin-bottom: 1.25rem;
    line-height: 1.2;
}
.sl {
    font-family: var(--fb);
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--ac);
    margin-bottom: .5rem;
    margin-top: 3.5rem;
}
.st {
    font-family: var(--fd);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--t1);
    margin-bottom: 1.5rem;
    letter-spacing: .02em;
}
.sst {
    font-family: var(--fd);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--t1);
    margin-bottom: 1rem;
    margin-top: 2.5rem;
    letter-spacing: .02em;
}

/* ═══ PROSE ═══ */
.prose { font-size: .98rem; color: var(--t2); line-height: 1.85; }
.prose p { margin-bottom: 1.4rem; }
.prose strong { color: var(--t1); font-weight: 600; }
.prose em { font-style: italic; color: var(--t1); }

blockquote {
    margin: 2rem 0;
    padding: 1.2rem 1.8rem;
    border-left: 2px solid var(--ac);
    background: var(--ac-g);
    font-family: var(--fd);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--t1);
    line-height: 1.7;
    border-radius: 0 4px 4px 0;
}
blockquote .ci {
    display: block;
    font-family: var(--fb);
    font-size: .75rem;
    font-style: normal;
    color: var(--t3);
    margin-top: .6rem;
    letter-spacing: .05em;
}

/* ═══ CALLOUTS ═══ */
.co { margin: 2rem 0; padding: 1.5rem 1.8rem; background: var(--bg-tier); border: 1px solid var(--bs); border-radius: 4px; }
.co-g { border-left: 2px solid var(--ac); background: var(--ac-g); }
.co-w { border-left: 2px solid var(--red); background: var(--red-g); }
.co-t { font-family: var(--fb); font-size: .65rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ac); margin-bottom: .7rem; }
.co-w .co-t { color: var(--red); }
.co p { font-size: .92rem; color: var(--t2); line-height: 1.7; margin-bottom: 0; }

/* ═══ COURSE MAP ═══ */
.cm { display: grid; gap: 1rem; margin: 2rem 0; }
.cc {
    padding: 1.5rem 1.8rem;
    background: var(--bg-card);
    border: 1px solid var(--bl);
    border-radius: 6px;
    cursor: pointer;
    transition: all .3s;
    text-decoration: none;
    display: block;
}
.cc:hover { border-color: var(--ac-b); box-shadow: var(--sg); transform: translateY(-1px); }
.cc.lk { opacity: .4; cursor: default; pointer-events: none; }
.cc-n { font-family: var(--fd); font-size: 1.6rem; font-weight: 300; color: var(--ac-l); margin-bottom: .25rem; }
.cc-ti { font-family: var(--fb); font-size: .95rem; font-weight: 600; color: var(--t1); margin-bottom: .4rem; }
.cc-d { font-size: .82rem; color: var(--t3); line-height: 1.5; }
.cc-b {
    display: inline-block;
    margin-top: .6rem;
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--tm);
    padding: .2rem .6rem;
    border: 1px solid var(--bl);
    border-radius: 2px;
}

/* ═══ TIER TABS ═══ */
.tn { display: flex; gap: 0; margin-top: 3.5rem; border-bottom: 1px solid var(--bl); flex-wrap: wrap; }
.tt {
    padding: .9rem 1.3rem;
    font-family: var(--fb);
    font-size: .66rem;
    font-weight: 500;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--t3);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all .25s;
    position: relative;
    bottom: -1px;
}
.tt:hover { color: var(--t2); }
.tt.active { color: var(--ac); border-bottom-color: var(--ac); }
.tc { display: none; padding-top: 2.5rem; animation: fi .4s ease; }
.tc.active { display: block; }

/* ═══ PROTOCOLS ═══ */
.proto {
    margin: 1.5rem 0;
    padding: 1.8rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--bl);
    border-radius: 6px;
    box-shadow: var(--ss);
}
.proto-n { font-family: var(--fd); font-size: 2rem; font-weight: 300; color: var(--ac-l); line-height: 1; margin-bottom: .5rem; }
.proto-ti { font-family: var(--fb); font-size: .95rem; font-weight: 600; color: var(--t1); margin-bottom: .8rem; }
.proto p, .proto li { font-size: .9rem; color: var(--t2); line-height: 1.7; }
.proto ul { list-style: none; padding: 0; margin: .5rem 0; }
.proto ul li { padding: .3rem 0 .3rem 1.2rem; position: relative; }
.proto ul li::before { content: '—'; position: absolute; left: 0; color: var(--tm); }

/* ═══ AI PROMPT ═══ */
.aip {
    margin: 1.5rem 0;
    padding: 1.8rem 2rem;
    background: var(--t1);
    color: #E7E5E4;
    border-radius: 6px;
    font-family: var(--fm);
    font-size: .8rem;
    line-height: 1.8;
    white-space: pre-wrap;
    position: relative;
    overflow: hidden;
}
.aip::before {
    content: 'AI PROMPT';
    position: absolute;
    top: 0; right: 0;
    padding: .4rem 1rem;
    font-family: var(--fb);
    font-size: .55rem;
    font-weight: 600;
    letter-spacing: .2em;
    color: var(--ac);
    background: rgba(184,134,11,.1);
    border-radius: 0 6px 0 4px;
}

/* ═══ MODULE STACK ═══ */
.ms {
    font-family: var(--fm);
    font-size: .72rem;
    color: var(--t3);
    line-height: 1.8;
    padding: 1.2rem 1.5rem;
    background: var(--bg-tier);
    border-radius: 4px;
    border-left: 2px solid var(--ac-b);
    margin-bottom: 1.5rem;
    white-space: pre-line;
}
.mi { font-size: 1.02rem; color: var(--t2); line-height: 1.9; }

/* ═══ PROGRESS ═══ */
.pbc { width: 100%; height: 3px; background: var(--bl); border-radius: 3px; margin: 1rem 0 .5rem; overflow: hidden; }
.pb { height: 100%; background: var(--ac); border-radius: 3px; transition: width .6s; }
.pbl { font-size: .72rem; color: var(--t3); letter-spacing: .05em; }

.nm {
    margin-top: 2rem;
    padding: 2rem 2.5rem;
    background: var(--bg-tier);
    border: 1px solid var(--bs);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: all .3s;
    cursor: pointer;
}
.nm:hover { border-color: var(--ac-b); box-shadow: var(--sg); }
.nm-l { font-size: .6rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--t3); margin-bottom: .3rem; }
.nm-ti { font-family: var(--fd); font-size: 1.3rem; font-weight: 400; color: var(--t1); }
.nm-a { font-size: 1.5rem; color: var(--ac); transition: transform .3s; }
.nm:hover .nm-a { transform: translateX(4px); }

/* ═══ PRINCIPLES ═══ */
.prins { display: grid; gap: 1rem; margin: 2rem 0; }
.prin { padding: 1.2rem 1.5rem; border-left: 2px solid var(--ac-b); background: var(--bg-tier); border-radius: 0 4px 4px 0; }
.prin strong { display: block; font-size: .88rem; color: var(--t1); margin-bottom: .25rem; }
.prin span { font-size: .85rem; color: var(--t3); line-height: 1.5; }

/* ═══ PFS SPECIFIC ═══ */
.phase-card {
    margin: 1.5rem 0;
    padding: 2rem 2.2rem;
    background: var(--bg-card);
    border: 1px solid var(--bl);
    border-radius: 6px;
    box-shadow: var(--ss);
    position: relative;
    overflow: hidden;
}
.phase-card::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px; background: var(--ac); }
.phase-tag { font-family: var(--fm); font-size: .6rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ac); margin-bottom: .6rem; }
.phase-title { font-family: var(--fd); font-size: 1.4rem; font-weight: 400; color: var(--t1); margin-bottom: .8rem; }
.phase-card p { font-size: .9rem; color: var(--t2); line-height: 1.75; margin-bottom: .6rem; }
.phase-card p:last-child { margin-bottom: 0; }

.supp-group { margin: 2rem 0; }
.supp-group-title {
    font-family: var(--fb);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--ac);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--bl);
}
.supp-item { display: flex; justify-content: space-between; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--bs); gap: 1rem; }
.supp-item:last-child { border-bottom: none; }
.supp-name { font-size: .9rem; font-weight: 600; color: var(--t1); flex: 1; }
.supp-dose { font-family: var(--fm); font-size: .78rem; color: var(--t3); text-align: right; white-space: nowrap; }
.supp-note { font-size: .8rem; color: var(--t3); margin-top: .2rem; line-height: 1.5; }

.timeline { margin: 2rem 0; position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--bl); }
.timeline-item { position: relative; margin-bottom: 2rem; padding-left: 1.5rem; }
.timeline-item::before { content: ''; position: absolute; left: -2rem; top: 8px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--ac-b); background: var(--bg); }
.timeline-item.active::before { background: var(--ac); border-color: var(--ac); }
.timeline-label { font-family: var(--fm); font-size: .65rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ac); margin-bottom: .3rem; }
.timeline-title { font-family: var(--fd); font-size: 1.15rem; font-weight: 400; color: var(--t1); margin-bottom: .4rem; }
.timeline-desc { font-size: .85rem; color: var(--t3); line-height: 1.6; }

/* ═══ ANIMATIONS ═══ */
@keyframes fu { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ff { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fi { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .mh { display: flex !important; }
    .main { margin-left: 0; padding-top: 60px; }
    .hero { min-height: calc(100vh - 60px); }
    .pc { padding: 3rem 1.5rem 4rem; }
}
@media (max-width: 600px) {
    .pc { padding: 2.5rem 1.2rem 3rem; }
    .tt { padding: .7rem .9rem; font-size: .58rem; }
    .nm { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .supp-item { flex-direction: column; gap: .2rem; }
    .supp-dose { text-align: left; }
}
