/*==========================================================

    SUN QUEST — 1 Road at A Time
    Main stylesheet (index.html)

    CONTENTS
    01  Base
    02  Loader
    03  Navigation
    04  Hero
    05  Chapters (the bordered sections)
    06  Stats
    07  Chapter 4 — The Road So Far
    08  Chapter 5 — Gallery
    09  Chapter 6 — Stories
    10  Chapter 7 — Family
    11  Chapter 8 — Goals
    12  Contact form
    13  Footer
    14  Lightbox
    15  Back-to-top button
    16  Journal page (older page, kept so it doesn't break)
    17  Animations
    18  Responsive (tablet, phone, touch, reduced motion)

==========================================================*/


/*==========================================================
    01  BASE
==========================================================*/

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

html{
    scroll-behavior:smooth;
}

body{
    background:#080B10;
    color:#F5F5F5;
    font-family:'Inter',sans-serif;
    overflow-x:hidden;
}

body.no-scroll{
    overflow:hidden;
}

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

:focus-visible{
    outline:2px solid #C9A227;
    outline-offset:3px;
}

::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-track{
    background:#111;
}

::-webkit-scrollbar-thumb{
    background:#C9A227;
    border-radius:50px;
}

::-webkit-scrollbar-thumb:hover{
    background:#e0b83c;
}


/*==========================================================
    02  LOADER
==========================================================*/

#loader{
    position:fixed;
    inset:0;
    background:#000;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:20px;
    z-index:10000;          /* above the navigation */
    transition:opacity .6s ease;
}

#loader.hide{
    opacity:0;
    pointer-events:none;
}

/* The logo is a circle from the very first frame */
#loader img{
    width:140px;
    height:140px;
    border-radius:50%;
    object-fit:cover;
    border:2px solid #C9A227;
    box-shadow:
        0 0 0 8px rgba(201,162,39,.08),
        0 0 45px rgba(201,162,39,.35);
    margin-bottom:30px;
    animation:loaderLogo .9s ease both;
}

#loader h1{
    font-family:'Cinzel',serif;
    font-size:4rem;
    letter-spacing:8px;
    color:white;
    animation:loaderText .8s ease .35s both;
}

#loader p{
    margin-top:20px;
    color:#C9A227;
    letter-spacing:4px;
    animation:loaderText .8s ease .7s both;
}


/*==========================================================
    03  NAVIGATION
==========================================================*/

#navbar{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    padding:28px 70px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    transition:.6s;
    z-index:9999;
}

#navbar.scrolled{
    background:rgba(8,11,16,.75);
    backdrop-filter:blur(18px);
    box-shadow:0 8px 30px rgba(0,0,0,.35);
    padding:16px 70px;
}

/* Round logo */
.logo img{
    display:block;
    width:70px;
    height:70px;
    border-radius:50%;
    object-fit:cover;
    border:2px solid rgba(201,162,39,.6);
    transition:.6s;
}

#navbar.scrolled .logo img{
    width:58px;
    height:58px;
}

#navMenu{
    display:flex;
    gap:38px;
    list-style:none;
}

#navMenu a{
    position:relative;
    color:white;
    text-decoration:none;
    font-size:15px;
    letter-spacing:2px;
    transition:.4s;
}

#navMenu a:hover,
#navMenu a.active{
    color:#C9A227;
}

#navMenu a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-8px;
    width:0;
    height:2px;
    background:#C9A227;
    transition:.4s;
}

#navMenu a:hover::after{
    width:100%;
}

#menuBtn{
    display:none;
    width:48px;
    height:48px;
    background:none;
    border:0;
    color:#fff;
    font-size:30px;
    line-height:1;
    cursor:pointer;
}


/*==========================================================
    04  HERO
==========================================================*/

#hero{
    position:relative;
    width:100%;
    height:100vh;
    height:100dvh;
    overflow:hidden;
}

#hero-video{
    position:absolute;
    width:100%;
    height:100%;
    object-fit:cover;
    filter:blur(8px);
    transform:scale(1.1);
}

.overlay{
    position:absolute;
    inset:0;
    background:
        linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.75)),
        radial-gradient(circle at center, rgba(201,162,39,.15), transparent 60%);
}

.hero-content{
    position:relative;
    z-index:5;
    height:100%;
    max-width:900px;
    margin:auto;
    padding:20px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
}

.hero-content h1{
    font-family:'Cinzel',serif;
    font-size:6rem;
    letter-spacing:6px;
    margin-bottom:15px;
    text-shadow:
        0 0 20px rgba(255,255,255,.2),
        0 0 50px rgba(201,162,39,.4);
}

.hero-content h2{
    color:#C9A227;
    font-size:1.8rem;
    font-weight:300;
    margin-bottom:35px;
}

.hero-content p{
    font-size:1.15rem;
    line-height:2;
    color:#ddd;
    margin-bottom:45px;
}

/* Fade-in one after another (added by script.js) */
.hero-content.in .hero-title      { animation:fadeUp 1.4s ease 0s   backwards; }
.hero-content.in .hero-tagline    { animation:fadeUp 1.4s ease .5s  backwards; }
.hero-content.in .hero-description{ animation:fadeUp 1.4s ease 1s   backwards; }
.hero-content.in .btn             { animation:fadeUp 1.4s ease 1.5s backwards; }

.btn{
    display:inline-block;
    padding:18px 45px;
    border:2px solid #C9A227;
    color:white;
    text-decoration:none;
    border-radius:40px;
    letter-spacing:2px;
    transition:.4s;
}

.btn:hover{
    background:#C9A227;
    color:#000;
    transform:translateY(-5px);
}

.scroll-indicator{
    position:absolute;
    bottom:40px;
    left:50%;
    transform:translateX(-50%);
    z-index:5;
    text-align:center;
}

.scroll-indicator span{
    display:block;
    width:2px;
    height:70px;
    background:white;
    margin:auto;
    animation:scrollLine 2s infinite;
}

.scroll-indicator p{
    margin-top:10px;
    font-size:14px;
    letter-spacing:3px;
}


/*==========================================================
    05  CHAPTERS  (every chapter sits inside its own border)
==========================================================*/

/* Space between one chapter and the next */
.chapter{
    padding:45px 6%;
}

/* The bordered frame */
.chapter .container{
    position:relative;
    max-width:1200px;
    margin:auto;
    padding:80px 70px 75px;
    border:1px solid rgba(201,162,39,.3);
    border-radius:28px;
    background:linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.01));
    box-shadow:0 25px 60px rgba(0,0,0,.35);
}

/* Small gold line on the top edge */
.chapter .container::before{
    content:"";
    position:absolute;
    top:-2px;
    left:70px;
    width:90px;
    height:3px;
    border-radius:3px;
    background:#C9A227;
}

/* "Chapter One" label */
.chapter h2{
    color:#C9A227;
    font-size:1.5rem;
    letter-spacing:4px;
    text-transform:uppercase;
    margin-bottom:15px;
}

/* Chapter title */
.chapter h1{
    font-family:'Cinzel',serif;
    font-size:3rem;
    margin-bottom:30px;
}

.chapter p{
    color:#cfcfcf;
    font-size:18px;
    line-height:2;
    max-width:850px;
}

/* "Read My Story" style links — kept well away from the text */
.section-btn{
    display:inline-block;
    margin-top:50px;
    padding-bottom:8px;
    color:white;
    text-decoration:none;
    border-bottom:2px solid #C9A227;
    transition:.35s;
}

.section-btn:hover{
    color:#C9A227;
    padding-left:10px;
}

/* Fade-in while scrolling (the .js class is added in index.html) */
.js .reveal{
    opacity:0;
    transform:translateY(60px);
    transition:opacity 1s ease, transform 1s ease;
}

.js .reveal.show{
    opacity:1;
    transform:none;
}

section[id]{
    scroll-margin-top:40px;
}


/*==========================================================
    06  STATS
==========================================================*/

#stats{
    padding:120px 10%;
    background:#0B1017;
    border-top:1px solid rgba(201,162,39,.2);
    border-bottom:1px solid rgba(201,162,39,.2);
}

.stats-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:30px;
    max-width:1200px;
    margin:auto;
}

.stat-card{
    background:rgba(255,255,255,.05);
    backdrop-filter:blur(15px);
    border:1px solid rgba(255,255,255,.08);
    border-radius:25px;
    padding:45px;
    text-align:center;
    transition:.5s;
}

.stat-card:hover{
    transform:translateY(-12px);
    border-color:#C9A227;
    box-shadow:0 20px 45px rgba(0,0,0,.4);
}

.stat-icon{
    font-size:50px;
    margin-bottom:20px;
}

.stat-card h1{
    font-family:'Cinzel',serif;
    font-size:3rem;
    color:#C9A227;
}

.stat-card p{
    margin-top:15px;
    color:#ccc;
    letter-spacing:1px;
}


/*==========================================================
    07  CHAPTER 4 — THE ROAD SO FAR
==========================================================*/

.journey-map{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    margin-top:50px;
}

.location{
    display:flex;
    justify-content:center;
    align-items:center;
    padding:22px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    border-radius:15px;
    color:inherit;
    font:inherit;
    font-size:18px;
    text-align:center;
    cursor:pointer;
    transition:.4s;
}

.location:hover{
    transform:translateY(-6px);
    border-color:#C9A227;
    background:rgba(201,162,39,.15);
}

.location.active{
    background:#28a745;
    color:white;
    border-color:#28a745;
    transform:translateY(-6px);
    box-shadow:0 15px 35px rgba(40,167,69,.4);
}

#locationCard{
    margin-top:50px;
    padding:35px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    border-radius:20px;
    transition:.5s;
}

#locationCard h2{
    color:#C9A227;
    margin-bottom:15px;
}

.story-btn{
    display:inline-block;
    margin-top:25px;
    padding:14px 30px;
    background:#C9A227;
    color:white;
    text-decoration:none;
    font-weight:600;
    border-radius:50px;
    transition:.4s;
}

.story-btn:hover{
    transform:translateY(-4px);
    box-shadow:0 12px 30px rgba(201,162,39,.4);
}


/*==========================================================
    08  CHAPTER 5 — GALLERY
==========================================================*/

.gallery-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:25px;
    margin-top:60px;
}

.gallery-card{
    overflow:hidden;
    border-radius:18px;
    background:#111;
    cursor:pointer;
    transition:.4s;
}

.gallery-card img{
    display:block;
    width:100%;
    height:300px;
    object-fit:cover;
    transition:.5s;
}

.gallery-card:hover{
    transform:translateY(-10px);
    box-shadow:0 20px 40px rgba(0,0,0,.45);
}

.gallery-card:hover img{
    transform:scale(1.08);
}


/*==========================================================
    09  CHAPTER 6 — STORIES
==========================================================*/

.blog-preview{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:30px;
    margin-top:60px;
}

.blog-preview article{
    padding:35px;
    background:rgba(255,255,255,.04);
    border:1px solid transparent;
    border-radius:20px;
    backdrop-filter:blur(10px);
    transition:.4s;
}

.blog-preview article:hover{
    transform:translateY(-10px);
    border-color:rgba(201,162,39,.4);
}

.blog-preview h3{
    margin-bottom:20px;
    color:#C9A227;
    font-family:'Cinzel',serif;
}

.blog-preview p{
    line-height:1.8;
    color:#d5d5d5;
}


/*==========================================================
    10  CHAPTER 7 — FAMILY
==========================================================*/

.family-preview{
    margin-top:60px;
}

.family-preview img{
    width:100%;
    max-height:600px;
    object-fit:cover;
    border-radius:20px;
    box-shadow:0 20px 50px rgba(0,0,0,.4);
}


/*==========================================================
    11  CHAPTER 8 — GOALS
==========================================================*/

.goal-list{
    margin-top:40px;
    list-style:none;
}

.goal-list li{
    padding:18px 0;
    border-bottom:1px solid rgba(255,255,255,.08);
    font-size:18px;
    color:#ddd;
}


/*==========================================================
    12  CONTACT FORM
==========================================================*/

form{
    margin-top:60px;
    display:flex;
    flex-direction:column;
    gap:25px;
}

form input,
form textarea{
    width:100%;
    padding:18px 22px;
    border:none;
    outline:none;
    border-radius:15px;
    background:#14181f;
    color:white;
    font-family:inherit;
    font-size:16px;
}

form input:focus,
form textarea:focus{
    box-shadow:0 0 0 2px #C9A227;
}

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

form .btn{
    align-self:flex-start;
    background:none;
    font-family:inherit;
    font-size:16px;
    cursor:pointer;
}

form .btn:hover{
    background:#C9A227;
}


/* Hidden spam trap */
.hp{
    position:absolute !important;
    left:-9999px;
    width:1px;
    height:1px;
    opacity:0;
    pointer-events:none;
}

/* Message shown after pressing "Send Message" */
.chapter .form-status{
    min-height:1.6em;
    font-size:16px;
    line-height:1.6;
    max-width:none;
}

.chapter .form-status.success{
    color:#4cd07d;
}

.chapter .form-status.error{
    color:#ff7b72;
}

form .btn:disabled{
    opacity:.6;
    cursor:wait;
    transform:none;
    background:none;
    color:white;
}


/*==========================================================
    13  FOOTER
==========================================================*/

footer{
    margin-top:45px;
    padding:70px 10%;
    text-align:center;
    background:#050608;
    border-top:1px solid rgba(201,162,39,.2);
}

footer h2{
    font-family:'Cinzel',serif;
    letter-spacing:5px;
    margin-bottom:20px;
}

footer p{
    margin-top:10px;
    color:#999;
}


/*==========================================================
    14  LIGHTBOX
==========================================================*/

#lightbox{
    position:fixed;
    inset:0;
    display:flex;
    justify-content:center;
    align-items:center;
    background:rgba(0,0,0,.95);
    opacity:0;
    visibility:hidden;
    transition:.5s;
    z-index:99999;
}

#lightbox.show{
    opacity:1;
    visibility:visible;
}

#lightbox img{
    max-width:90%;
    max-height:85%;
    border-radius:15px;
    box-shadow:0 25px 60px rgba(0,0,0,.5);
    transform:scale(.85);
    transition:.5s;
}

#lightbox.show img{
    transform:scale(1);
}

#closeLightbox{
    position:absolute;
    top:30px;
    right:40px;
    background:none;
    border:0;
    color:white;
    font-size:45px;
    line-height:1;
    cursor:pointer;
}

#prevImage,
#nextImage{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:60px;
    height:60px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.15);
    color:white;
    font-size:28px;
    cursor:pointer;
    transition:.3s;
}

#prevImage:hover,
#nextImage:hover{
    background:#C9A227;
}

#prevImage{ left:40px;  }
#nextImage{ right:40px; }


/*==========================================================
    15  BACK-TO-TOP BUTTON  (created by script.js)
==========================================================*/

#topBtn{
    position:fixed;
    right:30px;
    bottom:30px;
    width:55px;
    height:55px;
    border:none;
    border-radius:50%;
    background:#C9A227;
    color:black;
    font-size:24px;
    cursor:pointer;
    opacity:0;
    pointer-events:none;
    transition:.4s;
    z-index:999;
}

#topBtn.visible{
    opacity:1;
    pointer-events:auto;
}

#topBtn:hover{
    transform:translateY(-5px);
    box-shadow:0 10px 25px rgba(0,0,0,.35);
}


/*==========================================================
    16  JOURNAL PAGE  (older page, kept so it doesn't break)
==========================================================*/

.journal-hero{
    height:60vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    background:url(images/gallery1.jpg) center/cover;
}

.journal-hero h1{
    font-size:5rem;
}

.journal-content{
    max-width:1100px;
    margin:auto;
    padding:100px 10%;
}

.journal-image img{
    width:100%;
    margin-bottom:40px;
    border-radius:20px;
}

.ride-info{
    margin-bottom:40px;
    padding:35px;
    background:#111827;
    border-radius:20px;
}

.ride-info ul{
    list-style:none;
}

.ride-info li{
    margin:15px 0;
    font-size:18px;
}

.story{
    font-size:18px;
    line-height:2;
}


/*==========================================================
    17  ANIMATIONS
==========================================================*/

@keyframes loaderLogo{
    from{ opacity:0; transform:scale(.8); }
    to  { opacity:1; transform:scale(1);  }
}

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

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

@keyframes scrollLine{
    0%  { opacity:0; transform:translateY(-15px); }
    50% { opacity:1; }
    100%{ opacity:0; transform:translateY(20px);  }
}


/*==========================================================
    18  RESPONSIVE
==========================================================*/

/* ---------- Laptops / tablets ---------- */
@media(max-width:992px){

    .hero-content h1{
        font-size:4rem;
    }

    .chapter .container{
        padding:70px 45px 65px;
    }

    .chapter .container::before{
        left:45px;
    }
}


/* ---------- Tablets + phones: menu button ---------- */
@media(max-width:900px){

    #navbar,
    #navbar.scrolled{
        padding:12px 20px;
        padding-top:max(12px, env(safe-area-inset-top));
    }

    body.no-scroll #navbar{
        background:#080B10;
    }

    .logo img,
    #navbar.scrolled .logo img{
        width:46px;
        height:46px;
    }

    #menuBtn{
        display:block;
    }

    #navMenu{
        position:absolute;
        top:100%;
        left:0;
        width:100%;
        display:none;
        flex-direction:column;
        gap:0;
        padding:8px 20px;
        background:#080B10;
        text-align:center;
        max-height:calc(100vh - 72px);
        max-height:calc(100dvh - 72px);
        overflow-y:auto;
    }

    #navMenu.show{
        display:flex;
    }

    #navMenu a{
        display:block;
        padding:16px 0;
        font-size:17px;
        border-bottom:1px solid rgba(255,255,255,.08);
    }

    #navMenu a::after{
        display:none;
    }
}


/* ---------- Phones ---------- */
@media(max-width:768px){

    /* Loader */
    #loader img{
        width:110px;
        height:110px;
    }

    #loader h1{
        font-size:2.2rem;
        letter-spacing:4px;
    }

    #loader p{
        font-size:.9rem;
        letter-spacing:3px;
    }

    /* Hero */
    #hero-video{
        filter:none;            /* blur is heavy on phones */
    }

    .hero-content{
        padding:90px 22px 80px;
    }

    .hero-content h1{
        font-size:clamp(2.4rem, 13vw, 3.5rem);
        letter-spacing:3px;
    }

    .hero-content h2{
        font-size:1.3rem;
        margin-bottom:22px;
    }

    .hero-content p{
        font-size:1rem;
        line-height:1.8;
        margin-bottom:32px;
    }

    .btn{
        padding:16px 34px;
    }

    .scroll-indicator span{
        height:40px;
    }

    /* Stats */
    #stats{
        padding:70px 6%;
    }

    .stats-container{
        grid-template-columns:1fr 1fr;
        gap:14px;
    }

    .stat-card{
        padding:24px 10px;
        border-radius:18px;
    }

    .stat-icon{
        font-size:34px;
        margin-bottom:10px;
    }

    .stat-card h1{
        font-size:1.8rem;
    }

    .stat-card p{
        margin-top:8px;
        font-size:.85rem;
    }

    /* Chapters */
    .chapter{
        padding:22px 4%;
    }

    .chapter .container{
        padding:55px 24px 45px;
        border-radius:22px;
    }

    .chapter .container::before{
        left:24px;
        width:70px;
    }

    .chapter h2{
        font-size:1.1rem;
        letter-spacing:3px;
    }

    .chapter h1{
        font-size:1.9rem;
        margin-bottom:22px;
    }

    .chapter p{
        font-size:16px;
        line-height:1.8;
    }

    .section-btn{
        display:inline-flex;
        align-items:center;
        min-height:48px;
        margin-top:38px;
    }

    /* Road so far */
    .journey-map{
        grid-template-columns:1fr 1fr;
        gap:10px;
        margin-top:30px;
    }

    .location{
        min-height:56px;
        padding:14px 8px;
        font-size:15px;
    }

    #locationCard{
        padding:24px;
        margin-top:30px;
    }

    /* Gallery / stories / family */
    .gallery-grid{
        grid-template-columns:1fr 1fr;
        gap:10px;
        margin-top:35px;
    }

    .gallery-card{
        border-radius:12px;
    }

    .gallery-card img{
        height:170px;
    }

    .blog-preview{
        grid-template-columns:1fr;
        gap:18px;
        margin-top:35px;
    }

    .blog-preview article{
        padding:24px;
    }

    .family-preview{
        margin-top:35px;
    }

    .family-preview img{
        max-height:360px;
    }

    .goal-list li{
        font-size:16px;
    }

    form{
        margin-top:35px;
    }

    form .btn{
        align-self:stretch;
        text-align:center;
    }

    /* Lightbox */
    #lightbox img{
        max-width:96%;
    }

    #closeLightbox{
        top:12px;
        right:16px;
        font-size:40px;
    }

    #prevImage,
    #nextImage{
        width:48px;
        height:48px;
        font-size:22px;
    }

    #prevImage{ left:10px;  }
    #nextImage{ right:10px; }

    /* Misc */
    #topBtn{
        right:16px;
        bottom:calc(16px + env(safe-area-inset-bottom));
        width:48px;
        height:48px;
    }

    footer{
        padding:50px 6%;
    }

    .journal-hero{
        height:45vh;
        padding:0 6%;
    }

    .journal-hero h1{
        font-size:2.4rem;
    }

    .journal-content{
        padding:50px 6%;
    }

    .ride-info{
        padding:24px;
    }
}


/* ---------- Small phones ---------- */
@media(max-width:380px){

    .chapter .container{
        padding:50px 18px 40px;
    }

    .chapter .container::before{
        left:18px;
    }

    .chapter h1{
        font-size:1.65rem;
    }
}


/* ---------- Touch screens: no sticky hover effects ---------- */
@media(hover:none){

    .stat-card:hover,
    .blog-preview article:hover,
    .gallery-card:hover,
    .btn:hover,
    .story-btn:hover,
    #topBtn:hover{
        transform:none;
    }

    .gallery-card:hover img{
        transform:none;
    }
}


/* ---------- People who prefer less motion ---------- */
@media(prefers-reduced-motion:reduce){

    *{
        transition-duration:.01ms !important;
        animation-duration:.01ms !important;
        animation-delay:0s !important;
    }

    .js .reveal{
        opacity:1;
        transform:none;
    }
}
