/* --- GLOBAL FONT DECLARATIONS --- */
/* Original heading font */
@font-face {
    font-family: 'Pragmatica Extended';
    src: url('webfonts/pragmatica_extended_bold-webfont.woff2') format('woff2'),
         url('webfonts/pragmatica_extended_bold-webfont.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* New body font for content pages */
/* THIN (100) */
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Thin-webfont.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Thin_Italic-webfont.woff2') format('woff2');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

/* LIGHT (300) */
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Light-webfont.woff2') format('woff2'),
                url('webfonts/Proxima_Nova_Light-webfont.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Light_It-webfont.woff2') format('woff2'),
                url('webfonts/Proxima_Nova_Light_Italic-webfont.woff') format('woff');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

/* REGULAR (400) */
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Regular-webfont.woff2') format('woff2'),
                url('webfonts/Proxima_Nova_Regular-webfont.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Regular_Italic-webfont.woff2') format('woff2'),
                url('webfonts/Proxima_Nova_Regular_Italic-webfont.woff') format('woff');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* SEMIBOLD (600) */
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Semibold-webfont.woff2') format('woff2'),
                url('webfonts/Proxima_Nova_Semibold-webfont.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Semibold_Italic-webfont.woff2') format('woff2'),
                url('webfonts/Proxima_Nova_Semibold_Italic-webfont.woff') format('woff');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

/* BOLD (700) */
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Bold-webfont.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Bold_Italic-webfont.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* EXTRA BOLD (800) */
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Extra_Bold-webfont.woff2') format('woff2'),
                url('webfonts/Proxima_Nova_Extra_Bold-webfont.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Extra_Bold_Italic-webfont.woff2') format('woff2'),
                url('webfonts/Proxima_Nova_Extra_Bold_Italic-webfont.woff') format('woff');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}

/* BLACK (900) */
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Black-webfont.woff2') format('woff2'),
                url('webfonts/Proxima_Nova_Black-webfont.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Proxima Nova';
    src: url('webfonts/Proxima_Nova_Black_Italic-webfont.woff2') format('woff2'),
                url('webfonts/Proxima_Nova_Black_Italic-webfont.woff') format('woff');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}


/* --- GENERAL BODY & DEFAULTS --- */
body, html {
    margin: 0;
    padding: 0;
    background-color: #3b649e;
    color: #f8f8f8;
}

html {
    height: 100%;
}

/* --- Font Utility Classses for inline styling --- */
.thin {
    font-weight: 100;
}
.light {
    font-weight: 300;
}
.bold {
    font-weight: 700;
}
.black {
    font-weight: 900;
}
.italic {
    font-style: italic;
}

/* Footnote tweaks */

/* Counter initialisation */
body {
    counter-reset: footnote;
}

/* Superscript markers */
sup a {
    text-decoration: none;
    color: inherit;
}

.footnote-ref::after {
    counter-increment: footnote;
    content: counter(footnote);
    font-size: 0.7em;
    vertical-align: super;
    margin-left: 0.15em;
    color: inherit;
    text-decoration: none;
}

/* Footnote section */
.footnotes {
    font-size: 0.8em;
    margin-top: 3em;
    padding-top: 1.5em;
    color: #f8f8f8;
    position: relative;
}

.footnotes::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 30%; /* control width here */
    height: 1px;
    background-color: #f8f8f8;
}

.footnotes ol {
    margin: 0;
    padding-left: 1.2em;
}

.footnotes li {
    margin-bottom: 0.6em;
    line-height: 1.4;
}

/* Return arrow */
.backlink {
    text-decoration: none;
    margin-left: 0.5em;
    font-size: 0.75em;
    color: #7898cf;
}

.backlink:hover {
    color: #f8f8f8;
}

/* Default font settings for content pages */
body {
    font-family: 'Proxima Nova', 'Helvetica Neue', Helvetica, sans-serif;
    line-height: 1.6;
    min-height: 100%;
}

a {
    color: #f8f8f8;
    text-decoration: underline;
    transition: color 0.3s ease;
}

a:hover {
    color: #cccccc;
}

/* --- LANDING PAGE ("Coming Soon") SPECIFIC STYLES --- */
body.landing-page {
    display: flex;
    /* UPDATED: Change flex direction to stack content and footer vertically */
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Pragmatica Extended', Arial, sans-serif;
    overflow: hidden;
}

.landing-page .container {
    /* UPDATED: Allow this container to grow and push the footer down */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    padding: 20px;
}

.landing-page h1 {
    font-family: 'Pragmatica Extended', sans-serif;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: bold;
    margin: 0 0 0.5em;
    text-shadow: 2px 2px 4px #3b81f6;
    line-height: 1.2;
}

.landing-page .coming-soon {
    font-family: 'Pragmatica Extended', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.25rem);
    font-weight: bold;
    color: #e8e8e8;
    letter-spacing: 0.05em;
    margin-bottom: 2em;
}


/* --- CONTENT PAGE (Terms, Privacy, etc.) STYLES --- */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(248, 248, 248, 0.2);
    padding-bottom: 1.5rem;
}

.page-header a {
    text-decoration: none;
}

.page-header h1 {
    font-family: 'Pragmatica Extended', sans-serif;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: bold;
    text-shadow: 1px 1px 2px #3b81f6;
    margin: 0;
}

.content-wrapper h2 {
    font-family: 'Pragmatica Extended', sans-serif;
    font-weight: bold;
    color: #f8f8f8;
    margin-top: 2.5rem;
    font-size: 1.4rem;
    border-bottom: 1px solid rgba(248, 248, 248, 0.2);
    padding-bottom: 0.5rem;
}

.content-wrapper p, .content-wrapper ul {
    font-size: 1.1rem;
    color: #e8e8e8;
}

.content-wrapper ul {
    list-style-type: disc;
    padding-left: 20px;
}

.content-wrapper li {
    margin-bottom: 0.5rem;
}

footer {
    text-align: center;
    margin-top: auto; /* Pushes footer to bottom in flex container */
    padding: 2rem 0;
    width: 100%;
    border-top: 1px solid rgba(248, 248, 248, 0.2);
    font-size: 0.9rem;
    color: #cccccc;
    /* UPDATED: Add this for the landing page */
    flex-shrink: 0;
    font-family: 'Pragmatica Extended', Arial, sans-serif;
}

/* On content pages, remove the border added for the landing page */
.page-container footer {
    border-top: none;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(248, 248, 248, 0.2);
}

footer .footer-links a {
    margin: 0 10px;
    color: #cccccc;
}

footer .footer-links a:hover {
    color: #f8f8f8;
}


/* --- JUST IN CASE, SOME CODE FORMATTING --- */
code {
    font-family: monospace;
    background: #f6f6f6;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: #333;
}
pre code {
    display: block;
    padding: 1em;
    white-space: pre-wrap;
}

/* --- SHARED STYLES (Buttons, Modals) --- */
.cta-button {
    font-family: 'Pragmatica Extended', sans-serif;
    background-color: transparent;
    border: 2px solid #f8f8f8;
    color: #f8f8f8;
    padding: 0.75em 2em;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 8px transparent;
    text-decoration: none;
}

.cta-button:hover {
    background-color: #f8f8f8;
    color: #3b649e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 1000;
}

.form-modal.visible {
    opacity: 1;
    visibility: visible;
}

.form-container {
    background-color: #3b649e;
    padding: 2.5em;
    border-radius: 8px;
    width: 90%;
    max-width: 650px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    position: relative;
    text-align: left;
}

.form-container h2 {
    margin-top: 0;
    text-align: center;
    font-family: 'Pragmatica Extended', sans-serif;
}

.form-group {
    margin-bottom: 1.5em;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    font-size: 0.9rem;
    color: #e8e8e8;
    font-family: 'Proxima Nova', sans-serif;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8em;
    background-color: #3b649e;
    border: 2px solid #f0f0f0;
    border-radius: 4px;
    color: #f8f8f8;
    font-family: 'Proxima Nova', sans-serif; /* Changed to new font */
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3b81f6;
    box-shadow: 0 0 8px #3b81f6;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #f8f8f8;
    cursor: pointer;
    line-height: 1;
}

#form-status {
    font-family: 'Proxima Nova', sans-serif;
}

/* --- NAVIGATION MENU STYLES --- */
/* Add this section to your existing styles.css file */

/* Remove any positioning from page-header to avoid conflicts */
.page-header {
    /* Keep existing styles, just ensure positioning doesn't interfere */
}

/* Position navigation to scroll with page */
.main-navigation {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
}

/* Align hamburger with page content on larger screens */
@media (min-width: 769px) {
    .main-navigation {
        right: calc((100vw - 800px) / 2 + 2rem); /* Align with page-container max-width */
    }
}

/* Mobile Menu Toggle - Now shown on all screen sizes */
.main-navigation .menu-toggle {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.main-navigation .menu-toggle span {
    width: 22px;
    height: 2px;
    background: #f8f8f8;
    margin: 3px 0;
    transition: 0.3s ease;
    border-radius: 1px;
}

.main-navigation .menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.main-navigation .menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.main-navigation .menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -5px);
}

/* Navigation Menu - Hidden by default, slides in when active */
.main-navigation .nav-menu {
    position: fixed !important; /* Back to fixed to ensure viewport positioning */
    top: 0 !important;
    right: -350px !important; /* Move further off-screen */
    width: 300px;
    height: auto; /* Auto height instead of 100vh */
    max-height: 100vh; /* Don't exceed viewport height */
    background: #3b649e;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    transition: right 0.3s ease;
    padding: 2rem 1.5rem; /* Remove specific bottom padding */
    padding-bottom: 25px; /* Add 25px bottom padding */
    list-style: none;
    margin: 0 !important;
    border-left: 1px solid rgba(248, 248, 248, 0.2);
    border-bottom: 1px solid rgba(248, 248, 248, 0.2); /* Add bottom border */
    border-radius: 0 0 0 5px; /* Round bottom-left corner */
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.1); /* Extend shadow to bottom */
    z-index: 1000;
    /* Force it to break out of any container constraints */
    transform: translateX(0);
    left: auto !important;
}

.main-navigation .nav-menu.active {
    right: 0 !important; /* Slides in when active class is added */
}

.main-navigation .nav-menu li {
    width: 100%;
    margin: 0.5rem 0;
}

.main-navigation .nav-menu a {
    text-decoration: none;
    color: #f8f8f8;
    font-family: 'Proxima Nova', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: 0.8rem 0;
    width: 100%;
    display: block;
    border-bottom: 1px solid rgba(248, 248, 248, 0.1);
    position: relative;
    white-space: nowrap;
}

.main-navigation .nav-menu a:hover {
    color: #cccccc;
}

.main-navigation .nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: #f8f8f8;
    transition: width 0.3s ease;
}

.main-navigation .nav-menu a:hover::after {
    width: 100%;
}

.main-navigation .nav-menu a.active {
    color: #cccccc;
}

.main-navigation .nav-menu a.active::after {
    width: 100%;
}

/* Special styling for Client Portal */
.main-navigation .nav-menu a.client-portal {
    background: rgba(248, 248, 248, 0.1) !important;
    color: #f8f8f8 !important;
    padding: 0.8rem 1rem !important; /* Restore horizontal padding */
    margin: 0.8rem 0 0 0 !important; /* Only top margin */
    border-radius: 3px;
    border: 1px solid rgba(248, 248, 248, 0.3); /* Restore all borders */
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center !important; /* Center the text */
    width: 100%; /* Match width of other menu items */
    box-sizing: border-box;
}

.main-navigation .nav-menu a.client-portal:hover {
    background: rgba(248, 248, 248, 0.2) !important;
    border-color: rgba(248, 248, 248, 0.5);
    color: #f8f8f8 !important;
}

.main-navigation .nav-menu a.client-portal::after {
    display: none;
}

/* Overlay when menu is open - separate element for better click handling */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .main-navigation .nav-menu {
        width: 250px;
        right: -300px !important; /* Extra margin for small screens */
    }
    
    .main-navigation .nav-menu.active {
        right: 0 !important;
    }
    
    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}