/* ============================================
   Montessori Oak Orangevale — Custom Styles
   Premium Dark Luxury Theme
   ============================================ */

/* --- Custom Properties --- */
:root {
    --oak-50:  #faf6f1;
    --oak-100: #f3ebe0;
    --oak-200: #e8d5be;
    --oak-300: #dbba94;
    --oak-400: #cc9d6e;
    --oak-500: #c8956c;
    --oak-600: #b87a4f;
    --oak-700: #965d3a;
    --oak-800: #784a32;
    --oak-900: #623d2b;
    --oak-950: #341f14;

    --dark-900: #0d0d0d;
    --dark-850: #111111;
    --dark-800: #161616;
    --dark-750: #1a1a1a;
    --dark-700: #1e1e1e;
    --dark-650: #222222;
    --dark-600: #2a2a2a;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Selection --- */
::selection {
    background: rgba(200, 149, 108, 0.3);
    color: var(--oak-100);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--dark-900);
}
::-webkit-scrollbar-thumb {
    background: var(--oak-700);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--oak-600);
}

/* --- Focus --- */
:focus-visible {
    outline: 2px solid var(--oak-400);
    outline-offset: 2px;
}

/* --- Navigation --- */
#site-header {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#site-header.scrolled {
    background: rgba(13, 13, 13, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(200, 149, 108, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--oak-400);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--oak-400) !important;
}

/* --- Mobile Menu --- */
#mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-link {
    position: relative;
    display: block;
    text-align: center;
    padding: 0.5rem 1rem;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--oak-400);
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
    width: 100%;
}

/* --- Menu Button Animation --- */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Default state: visible (for no-JS / reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Program Cards --- */
.program-card {
    overflow: hidden;
}

.program-card img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Buttons --- */
button, [role="button"], a[type="submit"] {
    cursor: pointer;
}

/* --- Input Autofill --- */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #1a1a1a inset !important;
    -webkit-text-fill-color: #e8d5be !important;
    caret-color: #e8d5be;
}

/* --- Form Validation --- */
input:invalid:not(:placeholder-shown):not(:focus),
textarea:invalid:not(:placeholder-shown):not(:focus) {
    border-color: rgba(200, 100, 80, 0.5) !important;
}

input:valid:not(:placeholder-shown):not(:focus) {
    border-color: rgba(200, 149, 108, 0.3) !important;
}

/* --- Divider Lines --- */
h1, h2, h3, h4 {
    text-wrap: pretty;
}

p, li, dd {
    text-wrap: pretty;
}

/* --- Smooth Image Loading --- */
img {
    background: var(--dark-700);
}

/* --- Print --- */
@media print {
    #site-header,
    #mobile-menu,
    .reveal {
        display: block !important;
        opacity: 1 !important;
    }

    body {
        background: white !important;
        color: #1a1a1a !important;
    }

    a {
        color: #1a1a1a !important;
    }
}
