/* ===== RITREK – Main Stylesheet ===== */

/* --- Base & Reset --- */
:root {
    --ritrek-blue: #2050c8;
    --ritrek-accent: #3eb1ff;
    --nav-bg: rgba(19, 25, 48, 0.93);
    --nav-blur: 22px;
}

html {
    box-sizing: border-box;
    width: 100%;
    font-family: 'Inter', Arial, sans-serif;
    overflow-x: hidden !important;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #10182d;
    color: #e6eefb;
    font-family: 'Inter', Arial, sans-serif;
    overflow: unset !important;
}

body.no-scroll {
    overflow: hidden !important;
    height: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .16s;
}

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

h1, h2, h3, h4, h5, h6, p {
    margin: 0;
    font-weight: normal;
}

button {
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

/* --- Section Defaults --- */
section,
.content-section {
    width: 100%;
    display: block;
    font-size: 2rem;
    color: #e6eefb;
    scroll-margin-top: 48px;
    padding: 0;
}

section[data-bg="light"],
.content-section[data-bg="light"] {
    background: #f7faff;
    color: #17253e;
}

section[data-bg="dark"],
.content-section[data-bg="dark"] {
    background: #10182d;
    color: #e6eefb;
}

/* --- Navbar --- */
.ritrek-navbar {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 44px;
    background: var(--nav-bg);
    box-shadow: 0 3px 32px #12348833;
    backdrop-filter: blur(var(--nav-blur)) saturate(180%) contrast(120%);
    -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(180%) contrast(120%);
    border-bottom: 1.3px solid #2e427733;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 42px 0 24px;
    z-index: 100000;
    font-family: 'Inter', Arial, sans-serif;
    transition: transform .4s cubic-bezier(.6, .02, .36, 1.07), opacity .3s ease-out;
    overflow: hidden;
    will-change: transform, opacity;
}

.ritrek-navbar--hidden {
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
}

.ritrek-navbar::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, .07) 0%, rgba(120, 200, 255, .09) 80%, rgba(255, 255, 255, .03) 100%);
    opacity: .13;
    filter: blur(1.1px);
    z-index: 1;
}

.ritrek-navbar::after {
    content: "";
    position: absolute;
    left: -12%;
    top: 0;
    height: 100%;
    width: 22%;
    pointer-events: none;
    background: linear-gradient(105deg, rgba(66, 203, 255, .04) 0%, rgba(66, 203, 255, .14) 40%, rgba(66, 203, 255, .08) 100%);
    filter: blur(13px);
    opacity: .8;
    z-index: 3;
    animation: navbarSheen 4.5s cubic-bezier(.5, 0, .4, 1) infinite;
}

@keyframes navbarSheen {
    0% { left: -12%; opacity: .10; }
    15% { opacity: .4; }
    32%, 100% { left: 88%; opacity: 0; }
}

body.admin-bar .ritrek-navbar {
    top: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    z-index: 2;
    margin-right: auto;
    height: 100%;
}

.main-logo {
    height: 28px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.1vw;
    z-index: 2;
    margin: 0 auto;
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
}

.nav-menu a {
    color: #d8eaff;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 0 3px;
    position: relative;
    opacity: .73;
    transition: color .16s, opacity .17s, text-shadow .16s, letter-spacing .14s;
    white-space: nowrap;
}

.nav-menu a.active,
.nav-menu a:focus,
.nav-menu a:hover {
    color: var(--ritrek-accent);
    opacity: 1;
    text-shadow: 0 2px 8px #215b9822;
    letter-spacing: .1em;
}

.nav-menu a:active {
    animation: navTapPulse .22s cubic-bezier(.62, 0, .42, 1.5);
}

@keyframes navTapPulse {
    0% { transform: scale(1) }
    55% { transform: scale(.91) }
    100% { transform: scale(1) }
}

.nav-menu a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 0;
    height: 1.3px;
    border-radius: 1.6px;
    background: linear-gradient(90deg, var(--ritrek-blue), var(--ritrek-accent) 80%, #47e6fa 100%);
    box-shadow: 0 0 4px #2ebeff2f;
    opacity: .93;
    transform: translateX(-50%) scaleX(.32);
    transition: width .19s, left .15s, box-shadow .15s, opacity .13s, transform .13s;
    pointer-events: none;
}

.nav-menu a.active::after,
.nav-menu a:focus::after,
.nav-menu a:hover::after {
    width: 80%;
    box-shadow: 0 0 7px #39bcff4c, 0 0 13px #2050c819;
    transform: translateX(-50%) scaleX(1.03);
    animation: navSlideGlow .43s cubic-bezier(.53, .05, .53, 1.21);
}

@keyframes navSlideGlow {
    0% { width: 0; opacity: 0 }
    38% { opacity: 1 }
    100% { width: 80%; opacity: 1 }
}

.nav-contact {
    margin-left: 20px;
    z-index: 2;
    display: flex;
    align-items: center;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', 'Inter', Arial, sans-serif;
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .19em;
    color: var(--ritrek-accent);
    background: transparent;
    border: 1.3px solid var(--ritrek-accent);
    border-radius: 11px;
    padding: 3.5px 19px;
    transition: all .2s ease-in-out;
}

.contact-btn:hover,
.contact-btn:focus {
    background: linear-gradient(90deg, #183f8f 12%, #2050c8 38%, #3eb1ff 90%);
    color: #fff;
    border-color: #3eb1ff;
    box-shadow: 0 2px 12px #2759b922, 0 0 1.5px #26376a77, 0 0 14px #62cfff44;
    transform: translateY(-1.5px) scale(1.033);
}

.contact-btn:active {
    background: #2050c8;
    color: #fff;
    border-color: #2050c8;
    transform: scale(.98);
}

@media (max-width:1100px) {
    .ritrek-navbar {
        padding: 0 12px 0 7px;
    }
    .nav-menu {
        gap: .8vw;
    }
    .main-logo {
        height: 24px;
    }
    .nav-contact {
        margin-left: 8px;
    }
    .contact-btn {
        padding: 2px 8px;
        font-size: .7rem;
    }
}

@media (max-width:700px) {
    .ritrek-navbar {
        padding: 0 1vw;
    }
    .nav-menu {
        display: none;
    }
    .nav-contact {
        margin-left: auto;
    }
    .main-logo {
        height: 20px;
    }
}

/* --- Floating Waitlist Bubble (magnetic-ready) --- */
.floating-waitlist-bubble {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 5000; /* below modal (100001), above page */
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    overflow: hidden;

    /* Visuals */
    background: radial-gradient(120% 140% at 30% -10%, #5bb8ff 0%, #2a7df0 38%, #1f54c9 100%);
    box-shadow:
        0 10px 26px rgba(33,114,243,.28),
        inset 0 -1px 0 rgba(255,255,255,.18);
    -webkit-tap-highlight-color: transparent;

    /* Magnetic composition via CSS variables */
    --mx: 0px;      /* cursor-follow x (set by JS) */
    --my: 0px;      /* cursor-follow y (set by JS) */
    --rot: 0deg;    /* tilt (set by JS) */
    --floatY: 0px;  /* idle bob */
    --gx: 50%;      /* hotspot x% (set by JS) */
    --gy: 50%;      /* hotspot y% (set by JS) */

    transform: translate3d(var(--mx), calc(var(--my) + var(--floatY)), 0) rotate(var(--rot));
    will-change: transform, box-shadow, filter;

    animation:
        waitlistFloat 4.8s ease-in-out infinite,
        waitlistGlow  5.6s ease-in-out infinite;
    transition: box-shadow .25s ease, filter .25s ease, background .25s ease;
}

.floating-waitlist-bubble::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(220px 220px at var(--gx) var(--gy),
            rgba(255,255,255,.16), rgba(255,255,255,0) 60%);
    transition: opacity .25s ease;
    opacity: .85;
}

.floating-waitlist-bubble::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    pointer-events: none;
    box-shadow: 0 0 0 0 rgba(72,149,255,.28);
    transition: box-shadow .35s ease;
}

.floating-waitlist-bubble:hover,
.floating-waitlist-bubble:focus-visible {
    box-shadow:
        0 18px 46px rgba(33,114,243,.38),
        inset 0 -1px 0 rgba(255,255,255,.22);
    filter: brightness(1.04) saturate(1.06);
    outline: none;
}
.floating-waitlist-bubble:hover::after,
.floating-waitlist-bubble:focus-visible::after {
    box-shadow: 0 0 0 8px rgba(72,149,255,.18);
}

.floating-waitlist-bubble:active {
    transform: translate3d(var(--mx), calc(var(--my) + var(--floatY)), 0) rotate(var(--rot)) scale(.985);
}

.bubble-label {
    font-family: 'Space Grotesk', 'Inter', Arial, sans-serif;
    font-size: .54rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: #fff;
    opacity: .97;
    text-align: center;
    pointer-events: none;
    line-height: 1.12;
    padding: 0 2px;
    display: block;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: none !important;
}

/* Idle bob uses CSS var so JS can compose transforms */
@keyframes waitlistFloat {
    0%,100% { --floatY: 0px; }
    50%     { --floatY: -6px; }
}

/* Breathing halo */
@keyframes waitlistGlow {
    0%,100% {
        box-shadow:
            0 10px 26px rgba(33,114,243,.28),
            inset 0 -1px 0 rgba(255,255,255,.18);
    }
    50% {
        box-shadow:
            0 16px 40px rgba(33,114,243,.38),
            inset 0 -1px 0 rgba(255,255,255,.20);
    }
}

@media (max-width:800px) {
    .floating-waitlist-bubble {
        width: 38px;
        height: 38px;
        right: 9px;
        bottom: 9px;
    }
    .bubble-label {
        font-size: .36rem;
        letter-spacing: .14em;
    }
}

/* Disable hotspot on coarse pointers for perf */
@media (pointer: coarse) {
    .floating-waitlist-bubble::before { opacity: .6; }
}

/* --- Footer --- */
.site-footer {
    background-color: #0A142F;
    border-top: 1px solid rgba(30, 58, 138, .3);
    padding: 4rem 1rem;
    font-family: 'Inter', sans-serif;
}

.footer-container {
    max-width: 80rem;
    margin: 0 auto;
}

.footer-glass-card {
    position: relative;
    background: rgba(10, 20, 47, .6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, .125);
    border-radius: 1rem;
    padding: 2rem;
}

.footer-glow {
    position: absolute;
    top: 0;
    left: 25%;
    width: 50%;
    height: 100%;
    background-color: rgba(59, 130, 246, .06);
    border-radius: 9999px;
    filter: blur(48px);
    transform: translateY(-50%);
    pointer-events: none;
}

.footer-content-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.footer-cta-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.footer-logo {
    height: 2rem;
    width: auto;
}

/* --- Typography Updates --- */

.footer-headline {
    font-family: 'Inter', sans-serif; /* Updated */
    font-size: clamp(1.5rem, 4vw, 2.7rem); /* Updated */
    font-weight: 700;
    color: #fff;
    line-height: 1.07; /* Updated */
    letter-spacing: -0.01em; /* Added */
}

.footer-tagline {
    color: #b8e5f6; /* Updated */
    max-width: 42rem;
    font-size: 0.97rem; /* Added */
    font-weight: 400; /* Added */
    line-height: 1.54; /* Added */
}

/* Added: Style for a button in the footer */
.footer-cta-column .btn {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.95rem;
}

/* --- Updated CTA button (now matches Hero style) --- */
.footer-cta-button {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #009fff;
    border: 2px solid #009fff;
    border-radius: 2rem;
    background: transparent;
    display: inline-block;
    margin-top: 14px;
    padding: 10px 28px;
    box-shadow: none;
    text-shadow: none;
    transition: all 0.25s ease;
    outline: none;
    cursor: pointer;
}

.footer-cta-button:hover,
.footer-cta-button:focus {
    background: #012144;
    color: #fff;
    border-color: #fff;
    box-shadow: 0 8px 20px 0 rgba(0,180,255,0.13);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer-links-title {
    font-size: .875rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #fff;
}

.footer-links-list {
    margin-top: 1rem;
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.footer-links-list a {
    color: #9ca3af;
    transition: color .2s;
    text-decoration: none;
}

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

.footer-socials {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link-item {
    display: inline-block;
    padding: .5rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, .05);
    transition: background-color .2s;
}

.social-link-item:hover {
    background-color: rgba(255, 255, 255, .1);
}

.social-link-item svg {
    height: 1.25rem;
    width: 1.25rem;
    color: #9ca3af;
    transition: color .2s;
}

.social-link-item:hover svg {
    color: #fff;
}

.footer-copyright {
    margin-top: 3rem;
    text-align: center;
}

.footer-copyright p {
    font-size: .875rem;
    color: #6b7280;
}

@media (min-width:768px) {
    .footer-glass-card {
        padding: 3rem;
    }
    .footer-headline {
        font-size: 2.25rem;
    }
}

@media (min-width:1024px) {
    .footer-content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Modal System --- */

.modal-hidden {
    display: none !important;
}

#contactModal,
#waitlistModal {
    position: fixed;
    inset: 0;
    z-index: 100001; /* appear over navbar & bubble */
    display: flex;
    align-items: center; /* center for vertical alignment */
    justify-content: center;
    background: rgba(19, 25, 48, 0.85);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
    visibility: hidden;
    transition: opacity .3s ease-out, transform .3s ease-out, visibility .3s;
    padding: 2rem; /* container padding */
}

#contactModal.modal-visible,
#waitlistModal.modal-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    visibility: visible;
}

.modal-content {
    position: relative;
    transition: transform .3s cubic-bezier(.21, .53, .29, 1.21);
    transform: translateY(8px);
}

#contactModal.modal-visible .modal-content,
#waitlistModal.modal-visible .modal-content {
    transform: translateY(0);
}

.modal-content {
    width: 100%;
    max-width: 560px;
    background: linear-gradient(135deg, rgba(30, 40, 70, .6), rgba(15, 23, 42, .5));
    border: 1.3px solid #2e427733;
    border-radius: 14px;
    box-shadow: 0 8px 32px #12348833;
    padding: 32px 36px;
    color: #e6eefb;
    text-align: left;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    color: #d8eaff;
    font-size: 24px;
    line-height: 30px;
    opacity: .6;
    transition: opacity .2s, transform .2s, background-color .2s;
    cursor: pointer;
    z-index: 20;
}

.close-modal:hover {
    opacity: 1;
    background-color: #2e427733;
    transform: rotate(90deg);
}

.modal-content.form-glass {
    display: flex;
    padding: 0;
    max-width: 58rem; /* larger contact modal */
    width: calc(100% - 4rem);
    height: auto;
    max-height: 540px;
    background: #0D1428;
    text-align: left;
    overflow: hidden;
}

.contact-modal-video-wrap {
    flex: 0 0 45%;
    position: relative;
}

.contact-modal-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-modal-video-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, .35);
}

.contact-modal-form-wrap {
    flex: 1 1 55%;
    padding: 1.75rem 2.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 1.25rem;
    text-align: center;
}

.form-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.form-header p {
    color: #9CA3AF;
    margin-top: .5rem;
    font-size: 0.875rem;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.form-cta {
    padding-top: .5rem;
}

.form-input {
    padding: .7rem .9rem;
    font-size: .875rem;
}

.form-label {
    top: .7rem;
    font-size: .875rem;
}

.form-input:focus+.form-label,
.form-input:not(:placeholder-shown)+.form-label {
    transform: translateY(-1.4rem) scale(.8);
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .modal-content.form-glass {
        max-height: 500px;
    }
    .contact-modal-video-wrap {
        flex-basis: 40%;
    }
    .contact-modal-form-wrap {
        flex-basis: 60%;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .modal-content.form-glass {
        flex-direction: column;
        width: calc(100vw - 2rem);
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }
    .contact-modal-video-wrap {
        display: none;
    }
    .contact-modal-form-wrap {
        width: 100%;
        flex-basis: auto;
        justify-content: flex-start;
        padding: 2rem 1.5rem;
    }
}

/* --- Motion reduction (global) --- */
@media (prefers-reduced-motion: reduce) {
    .ritrek-navbar,
    .nav-menu a::after,
    .contact-btn,
    .floating-waitlist-bubble {
        transition: none !important;
        animation: none !important;
        --mx: 0px; --my: 0px; --rot: 0deg; --floatY: 0px;
    }
}
/* Magnetic wrapper (moves, not the button’s look) */
.magnet{
  display:inline-block;
  --mx:0px; --my:0px; --rot:0deg; --floatY:0px;
  --gx:50%; --gy:50%;
  transform: translate3d(var(--mx), calc(var(--my) + var(--floatY)), 0) rotate(var(--rot));
  will-change: transform;
}
@keyframes magnet-bob{ 0%,100%{--floatY:0px} 50%{--floatY:-6px} }
.magnet--float{ animation: magnet-bob 4.8s ease-in-out infinite; }

/* Subtle glow tied to cursor hotspot (doesn’t change base visuals) */
.magnetic-btn{ position:relative; }
.magnetic-btn::before{
  content:"";
  position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background: radial-gradient(220px 220px at var(--gx) var(--gy),
             rgba(255,255,255,.14), rgba(255,255,255,0) 60%);
  opacity:.85; transition: opacity .25s ease;
}
.magnetic-btn::after{
  content:"";
  position:absolute; inset:-6px; border-radius:inherit; pointer-events:none;
  box-shadow:0 0 0 0 rgba(72,149,255,.26);
  opacity:0; transition: box-shadow .35s ease, opacity .35s ease;
}
.magnetic-btn:hover::after,
.magnetic-btn:focus-visible::after{
  opacity:1; box-shadow:0 0 0 8px rgba(72,149,255,.18);
}

/* Touch + a11y */
@media (pointer:coarse){ .magnetic-btn::before{ opacity:.6 } }
@media (prefers-reduced-motion:reduce){
  .magnet{ animation:none !important; transform: none !important; }
  .magnetic-btn::after{ opacity:.12; }
}

/* Start hidden */
#waitlistBubble.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: opacity .4s ease, transform .4s ease;
}

/* Visible state */
#waitlistBubble.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
