/* Reset & Base Styles */
:root {
    --primary-color: #1F36D3;
    --text-color: #000000;
    --bg-color: #ffffff;
    --gray-light: #f5f5f5;
    --gray-border: #e0e0e0;
    --font-main: 'Inter', sans-serif;
    --container-width: 1100px;
    --spacing-unit: 1rem;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* Focus Indicators */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    color: #333;
}

/* Utilities */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }

.section {
    padding: 80px 0;
}

.section-gray {
    background-color: var(--gray-light);
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    padding: 18px 36px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1.125rem;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 14px rgba(31, 54, 211, 0.3);
}

.btn:hover {
    background-color: #1629a8;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(31, 54, 211, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* Header/Navigation */
header {
    background: white;
    border-bottom: 1px solid var(--gray-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.nav-cta {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Mobile Menu */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 202;
}

.hamburger-btn span {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

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

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    height: 100dvh;
    background: white;
    z-index: 201;
    padding: 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-link {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background-color: var(--gray-light);
    color: var(--primary-color);
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    min-width: 44px;
    min-height: 44px;
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--gray-border);
    font-size: 0.9rem;
    color: #777;
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1rem;
    }
    .nav-link {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .section {
        padding: 50px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
}

/* Inline Alert Messages (client-side form validation) */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fcd34d;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 340px;
    width: calc(100% - 3rem);
    pointer-events: none;
}

.toast {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem 1.125rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    pointer-events: auto;
    animation: toastIn 0.25s ease-out;
}

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

/* Progress bar — drains right to left over 5s */
.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: 0.35;
    animation: toastBar 5s linear forwards;
    transform-origin: left center;
}

@keyframes toastBar {
    from { width: 100%; }
    to   { width: 0%; }
}

.toast-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.toast-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.toast-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fcd34d;
}

.toast-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.toast-text {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.45;
    padding: 0;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
}

/* Form input error state */
.form-input.error,
.form-textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Disabled button */
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

/* Button active/pressed state */
.btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(31, 54, 211, 0.2);
}

/* Embedded calendar/contact section shared styles */
.cal-embed-section {
    max-width: 1200px;
    margin: 60px auto 0;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-border);
}

.cal-embed-section h2 {
    text-align: center;
    margin-bottom: 20px;
}

.cal-embed-iframe {
    width: 100%;
    height: 750px;
    border: none;
    display: block;
}

@media (max-width: 768px) {
    .cal-embed-iframe {
        height: 600px;
    }
}

@media (max-width: 480px) {
    .cal-embed-iframe {
        height: 500px;
    }
}

/* Mobile menu logo */
.mobile-logo {
    height: 35px;
    width: auto;
}

/* Mobile menu logout button — matches .mobile-nav-link visually */
.mobile-nav-form {
    display: block;
}

.mobile-nav-logout {
    color: #e74c3c;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    width: 100%;
    text-align: left;
    padding: 1rem;
}

.mobile-nav-logout:hover {
    background-color: var(--gray-light);
}

/* Mobile sign-up link — primary colour highlight */
.mobile-nav-signup {
    color: var(--primary-color);
    font-weight: 700;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
