/* MaximSense shared theme — design language shared by the subpages. */

:root {
    /* Background layer opacities — the moving starfield, the starlight
       pinpoints, and the nebula wash composite into one cohesive sky.
       The nebula's own gradient alphas carry its subtlety, so its layer
       opacity runs full. */
    --bg-starfield-opacity: 1;
    --bg-starlight-opacity: 0.85;
    --bg-nebula-opacity: 1;

    /* Refined Cosmos Color Palette */
    --color-void: #000000;
    --color-deep-space: #050508;
    --color-cosmic-dark: #0a0a0f;

    /* Accent Colors - Subtle & Sophisticated */
    --accent-celestial: rgba(120, 140, 200, 0.8);
    --accent-aurora: rgba(100, 200, 180, 0.6);
    --accent-stellar: rgba(255, 255, 255, 0.9);

    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.06);

    /* Accent System */
    --accent: #9db4ff;
    --accent-soft: rgba(157, 180, 255, 0.6);
    --accent-teal: #7fe0d4;
    --accent-gradient: linear-gradient(120deg, #c7d5ff 0%, #9db4ff 45%, #7fe0d4 100%);

    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Outfit', -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-void);
    overflow-x: hidden;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    letter-spacing: 0.01em;
    min-height: 100vh;
}

canvas#particleCanvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: var(--bg-starfield-opacity);
}

/* Nebula wash — the faintest layer, a subtle color undertone */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: var(--bg-nebula-opacity);
    background:
        radial-gradient(ellipse 55% 45% at 18% 8%, rgba(99, 102, 241, 0.45), transparent 65%),
        radial-gradient(ellipse 45% 40% at 85% 30%, rgba(139, 92, 246, 0.34), transparent 65%),
        radial-gradient(ellipse 60% 45% at 50% 95%, rgba(45, 212, 191, 0.28), transparent 65%);
}

/* ---------- Glassmorphism Navigation ---------- */

.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    height: 70px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.glass-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(157, 180, 255, 0.14), transparent 40%, rgba(127, 224, 212, 0.10));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.glass-nav:hover::before {
    opacity: 1;
}

.glass-nav:hover {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-logo,
.nav-menu,
.nav-login {
    position: relative;
    z-index: 1;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    text-decoration: none;
}

.nav-logo img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    padding: 5px;
    filter: drop-shadow(0 0 10px rgba(157, 180, 255, 0.5));
    transition: filter 0.4s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.nav-logo:hover img {
    filter: drop-shadow(0 0 16px rgba(157, 180, 255, 0.85));
    transform: rotate(180deg);
}

.nav-logo-text {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
    color: white;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    gap: 48px;
    list-style: none;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 0;
    display: block;
}

.nav-menu a:hover {
    color: white;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.nav-login {
    font-family: var(--font-body);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 24px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
}

.nav-login:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

/* ---------- Buttons ---------- */

.btn-primary {
    font-family: var(--font-body);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 14px 36px;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    border-color: rgba(157, 180, 255, 0.65);
    transform: translateY(-2px);
    box-shadow: 0 8px 36px rgba(99, 102, 241, 0.25);
}

/* ---------- Glass Card (centered page card) ---------- */

.page-card-container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 560px;
    margin: 140px auto 60px auto;
}

.page-card {
    background: rgba(8, 9, 18, 0.5);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: none;
    border-radius: 28px;
    box-shadow: 0 0 60px 32px rgba(8, 9, 18, 0.5);
    padding: clamp(40px, 5vw, 64px) clamp(28px, 4vw, 56px);
}

.card-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 500;
    color: white;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.card-subtitle {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    margin-bottom: 44px;
    line-height: 1.7;
}

/* ---------- Forms ---------- */

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: var(--font-body);
    font-weight: 300;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    color: white;
    transition: all 0.3s ease;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(157, 180, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form-input.error,
.form-textarea.error {
    border-color: rgba(255, 120, 120, 0.6);
}

.error-msg {
    color: rgba(255, 140, 140, 0.9);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.03em;
    margin-top: 6px;
    display: none;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-body);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: var(--accent);
    border: 1px solid transparent;
    border-radius: 2px;
    color: #0a0c1c;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
}

.btn-submit:hover {
    background: #c7d5ff;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.form-note {
    margin-top: 14px;
    font-size: 12.5px;
    font-weight: 300;
    letter-spacing: 0.03em;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

/* Keyboard focus ring, kept distinct from hover styling */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(157, 180, 255, 0.9);
    outline-offset: 3px;
}

/* ---------- Notifications ---------- */

.notification {
    padding: 14px 16px;
    border-radius: 2px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.03em;
    display: none;
}

.notification.success {
    background: rgba(100, 200, 180, 0.08);
    border: 1px solid rgba(100, 200, 180, 0.35);
    color: rgba(150, 225, 205, 0.95);
}

.notification.error {
    background: rgba(255, 120, 120, 0.08);
    border: 1px solid rgba(255, 120, 120, 0.35);
    color: rgba(255, 160, 160, 0.95);
}

/* ---------- Theme Toggle ---------- */

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: rgba(157, 180, 255, 0.6);
    color: var(--accent);
}

/* ---------- Section Eyebrow ---------- */

.section-eyebrow {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent-soft);
    margin-bottom: 20px;
}

/* ---------- Contact Layout ---------- */

.contact-layout {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 40px;
    align-items: start;
    width: 92%;
    max-width: 1100px;
    margin: 140px auto 80px;
}

.contact-aside {
    background: rgba(8, 9, 18, 0.5);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 28px;
    box-shadow: 0 0 60px 32px rgba(8, 9, 18, 0.5);
    padding: clamp(40px, 5vw, 56px);
}

.contact-aside .card-title {
    text-align: left;
    margin-bottom: 16px;
}

.contact-lede {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
}

.contact-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-step {
    display: flex;
    gap: 18px;
    align-items: baseline;
    border-top: 1px solid rgba(157, 180, 255, 0.25);
    padding-top: 20px;
}

.contact-step span {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 22px;
    color: var(--accent-soft);
    line-height: 1;
    flex-shrink: 0;
}

.contact-step p {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
        margin-top: 120px;
    }
}

/* ---------- What Happens Next (contact) ---------- */

.next-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
    position: relative;
    z-index: 10;
    text-align: center;
}

.next-step span {
    display: block;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 24px;
    color: var(--accent-soft);
    margin-bottom: 10px;
    line-height: 1;
}

.next-step p {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 300;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 560px) {
    .next-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    /* Compact bar: logo + theme toggle. Section links live in the footer. */
    .glass-nav {
        top: 12px;
        width: calc(100% - 24px);
        height: 56px;
        padding: 0 16px;
    }

    .nav-menu,
    .nav-login {
        display: none;
    }

    .nav-logo img {
        width: 34px;
        height: 34px;
    }

    .nav-logo-text {
        font-size: 15px;
        letter-spacing: 0.16em;
    }

    .page-card-container {
        margin-top: 100px;
    }
}

/* ---------- Light Mode ---------- */

[data-theme="light"] {
    --accent: #4655c4;
    --accent-soft: rgba(70, 85, 196, 0.75);
    --accent-teal: #0f9d8f;
    --accent-gradient: linear-gradient(120deg, #6b7ce0 0%, #4655c4 45%, #0f9d8f 100%);
    --glass-bg: rgba(20, 24, 46, 0.04);
    --glass-border: rgba(20, 24, 46, 0.1);
    --glass-hover: rgba(20, 24, 46, 0.07);
}

[data-theme="light"] body {
    background: #eef0f8;
    color: rgba(23, 28, 56, 0.85);
}

[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse 55% 45% at 18% 8%, rgba(99, 102, 241, 0.14), transparent 65%),
        radial-gradient(ellipse 45% 40% at 85% 30%, rgba(139, 92, 246, 0.10), transparent 65%),
        radial-gradient(ellipse 60% 45% at 50% 95%, rgba(15, 157, 143, 0.10), transparent 65%);
}

[data-theme="light"] .glass-nav {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(20, 24, 46, 0.08);
    box-shadow: 0 8px 32px 0 rgba(23, 28, 56, 0.12);
}

[data-theme="light"] .glass-nav:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(20, 24, 46, 0.12);
}

[data-theme="light"] .nav-logo-text { color: #171c38; }
[data-theme="light"] .nav-menu a { color: rgba(23, 28, 56, 0.7); }
[data-theme="light"] .nav-menu a:hover { color: #171c38; }
[data-theme="light"] .nav-menu a::after { background: rgba(23, 28, 56, 0.5); }
[data-theme="light"] .nav-login { color: rgba(23, 28, 56, 0.75); border-color: rgba(23, 28, 56, 0.25); }
[data-theme="light"] .nav-login:hover { background: rgba(23, 28, 56, 0.05); border-color: rgba(23, 28, 56, 0.45); color: #171c38; }
[data-theme="light"] .theme-toggle { border-color: rgba(23, 28, 56, 0.25); color: rgba(23, 28, 56, 0.7); }

[data-theme="light"] .page-card,
[data-theme="light"] .contact-aside {
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 60px 32px rgba(255, 255, 255, 0.55);
}

[data-theme="light"] .card-title { color: #171c38; }
[data-theme="light"] .card-subtitle,
[data-theme="light"] .contact-lede,
[data-theme="light"] .contact-step p,
[data-theme="light"] .next-step p { color: rgba(23, 28, 56, 0.65); }

[data-theme="light"] .form-label { color: rgba(23, 28, 56, 0.72); }

[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea {
    background: rgba(23, 28, 56, 0.05);
    border-color: rgba(23, 28, 56, 0.15);
    color: #171c38;
}

[data-theme="light"] .form-input::placeholder,
[data-theme="light"] .form-textarea::placeholder { color: rgba(23, 28, 56, 0.35); }

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-textarea:focus {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(70, 85, 196, 0.55);
    box-shadow: 0 0 0 3px rgba(70, 85, 196, 0.12);
}

[data-theme="light"] .btn-submit {
    background: #4655c4;
    color: #ffffff;
}

[data-theme="light"] .btn-submit:hover {
    background: #3a48ad;
    box-shadow: 0 8px 32px rgba(70, 85, 196, 0.3);
}

[data-theme="light"] .form-note { color: rgba(31, 38, 80, 0.7); }

[data-theme="light"] a:focus-visible,
[data-theme="light"] button:focus-visible,
[data-theme="light"] input:focus-visible,
[data-theme="light"] textarea:focus-visible {
    outline-color: rgba(70, 85, 196, 0.9);
}

[data-theme="light"] .btn-primary { color: #171c38; border-color: rgba(23, 28, 56, 0.35); }
[data-theme="light"] .btn-primary::before { background: rgba(70, 85, 196, 0.08); }
[data-theme="light"] .btn-primary:hover { border-color: rgba(70, 85, 196, 0.6); box-shadow: 0 8px 36px rgba(70, 85, 196, 0.2); }

[data-theme="light"] .notification.success {
    background: rgba(15, 157, 143, 0.08);
    border-color: rgba(15, 157, 143, 0.4);
    color: #0b7a6f;
}

[data-theme="light"] .notification.error {
    background: rgba(200, 60, 60, 0.07);
    border-color: rgba(200, 60, 60, 0.35);
    color: #a83232;
}

[data-theme="light"] .contact-step { border-top-color: rgba(70, 85, 196, 0.3); }

[data-theme="light"] .lost-code { color: rgba(23, 28, 56, 0.65); }
[data-theme="light"] .lost-title { color: #171c38; text-shadow: none; }
[data-theme="light"] .lost-text { color: rgba(23, 28, 56, 0.65); }
