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

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* better browser compatibility than restricting on body*/
}

body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0 auto;
    font-family: "Rubik", sans-serif;
    background-color: #ffffff;
    max-width: 1800px;
    overflow-x: hidden; /*quick fix for hero overflow, check back*/
}

h2 {
    font-size: 18px;
    font-weight: 600;
}

p {
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    color: #888;
    line-height: 1.5;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bold {
    font-weight: 600;
    font-size: 18px;
}

/* ---------- MAIN CONTENT SECTIONS ---------- */
/* homepage feature section */
.home-page-feature {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: auto;
    overflow-y: visible; /* for vertical image positioning */
    margin: 75px 50px;
    padding: 0 40px 0 40px;
    position: relative;
}

.feature-text-section {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 10px;
    font-family: "Rubik", sans-serif;
    color: #000;
    width: 50%;
    min-width: 640px;
    max-width: 700px;
    padding-right: 40px; /* Add some spacing from the image */
    z-index: 2;
}

.feature-image-section {
    width: 50%;
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.feature-image-section img {
    width: 1200px; /* Scale image to be larger than container */
    height: auto;
    position: absolute;
    top: -250px;
    max-width: none; /* Allow image to exceed container width */
    filter: drop-shadow(24px 12px 24px rgba(0, 0, 0, 0.45));
    -webkit-filter: drop-shadow(24px 12px 24px rgba(0, 0, 0, 0.45));
    /* animation: fadeIn 1.5s ease-in-out; */
    z-index: 1;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -moz-user-drag: none;
    -ms-user-drag: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.feature-header {
    font-size: 60px;
    flex-wrap: wrap;
    font-weight: 1000;
}

/* Special style for "more" in main heading */
.more {
    position: relative;
    display: inline-block;
    font-style: italic;
    padding: 0 2px;
    background: linear-gradient(
        60deg,
        #ff4081,
        #ff80ab,
        #e3af2e,
        #89b0fd,
        #4a9eff,
        #ff4081,
        #e63939
    );
    background-size: 800% 800%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 20s ease-in-out infinite;
}

.more-link {
    text-decoration: none;
}

.more-dot {
    font-style: normal;
    margin-left: 2px;
}

/* Position the ping more precisely - adjust the right value to match your dot position */
.more::after {
    content: '';
    position: absolute;
    right: 5.9%;
    top: 69.8%;
    width: 7px;
    height: 7px;
    background: linear-gradient(
        60deg,
        #ff4081,
        #ff80ab,
        #e3af2e,
        #89b0fd,
        #4a9eff,
        #ff4081,
        #e63939
    );
    background-size: 800% 800%;
    border-radius: 10%; /* Square shape to match font dot */
    transform: translate(50%, -50%); /* maybe don't need this? */
    animation: gradientShift 20s ease-in-out infinite, dotPing 2s ease-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* The ping animation */
@keyframes dotPing {
    0% {
        transform: translate(50%, -50%) scale(1);
        opacity: 0.8;
    }
    90% {
        transform: translate(50%, -50%) scale(5);
        opacity: 0;
    }
    100% {
        transform: translate(50%, -50%) scale(5);
        opacity: 0;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.feature-subtitle {
    flex-wrap: wrap;
    font-family: "Comfortaa", sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 2;
    color: #888;
    user-select: none;
}

.feature-item, .bullet {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.feature-item.fade-in, .bullet.fade-in {
    opacity: 1;
}

.bullet {
    color: #888; /* Same color as your subtitle */
    margin: 0 8px;
}

.open-metro-button {
    background-color: #4a9eff;
    font-family: "Rubik", sans-serif;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    padding: 16px 24px;
    width: 250px;
    align-self: flex-start; /* check */
    margin-left: 125px;
    cursor: pointer;
    transition: all 0.5s ease;
}

.open-metro-button:hover {
    background-color: #2a7edd;
    scale: 1.01;
    transform-origin: center;
}

/* Metro feature overview grid section */
.feature-grid-section {
    margin: 100px auto 0 auto;
    max-width: 1280px;
    display: grid;
    gap: 40px;
    padding: 40px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    z-index: 2;
}

.grid-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /*padding: 10px;
    background-color: #f5f5f5;
    border-radius: 8px;*/
    min-height: 300px;
    gap: 20px;
}

.grid-item-icon {
    width: auto;
    height: 60px;
    align-self: center;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -moz-user-drag: none;
    -ms-user-drag: none;
}

.grid-item-title {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.grid-item-text {
    color: #888;
}

.special-term {
    color: #4a9eff;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    border-bottom: 1px dotted #4a9eff;
    transition: color 0.2s ease;
}

.special-term:hover {
    opacity: 0.75;
}

/* Icon drop-shadow styles */
/*.grid-item-icon {
    filter: drop-shadow(5px 2px 15px rgba(74, 158, 255, 0.25));
    -webkit-filter: drop-shadow(5px 2px 15px rgba(74, 158, 255, 0.25));
    transform: translateZ(0);

}*/
    /* for individual styles */
    /*
    #gridIcon1 {
        filter: drop-shadow(5px 2px 15px rgba(74, 158, 255, 0.25)); }

    #gridIcon2 {
        filter: drop-shadow(5px 2px 15px rgba(74, 158, 255, 0.25)); }  

    #gridIcon3 {
        filter: drop-shadow(5px 2px 15px rgba(74, 158, 255, 0.33)); }

    #gridIcon4 {
        filter: drop-shadow(5px 2px 15px rgba(74, 158, 255, 0.25)); }

    #gridIcon5 {
        filter: drop-shadow(5px 2px 15px rgba(74, 158, 255, 0.25)); }

    #gridIcon6 {
        filter: drop-shadow(5px 2px 15px rgba(74, 158, 255, 0.25)); 
}*/

.about-section {
    display: flex;
    flex-direction: column;
    align-self: center;
    max-width: 1200px;
    gap: 20px;
    margin: 0 40px;
}

.about-tonecat {
    font-size: 28px;
    color: #4a9eff;
}

.social-links, .social-links a {
    display: flex;
    flex-direction: row;
    gap: 40px;
    text-decoration: none;
}

/* Footer section */
.footer {
    margin-top: 80px;
    padding: 40px 40px;
    border-top: 1px solid #eee;
    background-color: #2a2a2a;
    font-family: 'Rubik', sans-serif;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-self: center;
    justify-self: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.footer-grid {
    display: grid;
    padding-bottom: 40px;
    width: 100%;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
    /*background-color: rgba(0, 255, 0, 0.143);*/
    border-bottom: 1px solid #4a4a4a;
    margin-bottom: 10px;
}

.footer-column h3 {
    font-weight: 500;
    color: #f0f0f0;
    margin-bottom: 15px;
}

.footer-column a, li {
    text-decoration: none;
    font-weight: 400;
    font-size: 15px;
    color: #888;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #4a9eff;
}

.footer-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#listNote {
    opacity: 0.5;
    font-style: italic;
    pointer-events: none;
    user-select: none;
}

.footer-end {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 40px;
    color: #888;
    font-size: 14px;
}

.footer-end span {
    pointer-events: none;
    user-select: none;
}

.social-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-link {
    display: inline-block;
    width: 24px;
    height: 24px;
    color: #888;
    transition: color 0.2s ease;
}

.social-link:hover {
    color: #4a9eff;
}

.social-link svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}


/* ========== Responsive Design ========== */

@media (max-width: 1150px) {
    .home-page-feature {
        margin: 50px 15px;
    }
    
    .feature-text-section {
        min-width: 525px;
    }
    
    .feature-header {
        min-width: 540px;
        scale: 0.9;
        transform-origin: left;
    }

    .feature-subtitle {
        font-size: 16px;
        margin-top: -20px;
    }

    .open-metro-button {
        margin-left: 110px;
    }

    .feature-image-section img {
        width: 1000px;
        top: -200px;
    }
}

@media (max-width: 940px) {
    .home-page-feature {
        margin: 50px 0;
    }
    
    .feature-text-section {
        min-width: 500px;
    }
    
    .feature-header {
        scale: 0.8;
    }

    .feature-subtitle {
        font-size: 15px;
        margin-top: -20px;
    }

    .open-metro-button {
        margin-left: 90px;
    }

    .feature-image-section img {
        width: 900px;
        top: -150px;
    }
}

@media (max-width: 870px) {
    .home-page-feature {
        margin: 0px 0;
        padding: 0;
        flex-direction: column;
    }
    
    .feature-text-section {
        display: flex;
        min-width: 500px;
        width: auto;
        max-width: 100%;
        margin: 0 40px;
        padding: 0;
        align-items: center;
    }
    
    .feature-header {
        scale: 0.9;
        transform-origin: center center;
        width: auto;
        max-width: 100%;
        padding: 0 18px;
        /* background-color: #8080803a; */
    }

    .feature-subtitle {
        font-size: 16px;
        margin: 0;
        padding: 0;
        width: auto;
        max-width: 680px;
        text-align: center;
        /* background-color: #8080803a; */
    }

    .open-metro-button {
        align-self: center;
        margin-left: 0;
        border: 2px solid #bbdbff;
        box-shadow: 8px 8px 16px rgba(255, 255, 255, 0.2);
    }

    .feature-image-section {
        min-width: 500px;
        width: auto;
        max-width: 100%;
    }

    .feature-image-section img {
        scale: 0.95;
        width: 900px;
        left: 0;
        top: -210px;
    }

    .feature-grid-section {
        margin: 400px auto 30px auto;
        gap: 40px;
        padding: 40px;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }

    .grid-item {
        height: fit-content;
        min-height: 0px;
        gap: 15px;

    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .header {
        padding: 16px 20px;
    }

    .logo-section {
        scale: 0.8;
        transform-origin: left center;
    }

    .navigation {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .feature-text-section {
        display: flex;
        min-width: 0px;
        width: auto;
        max-width: 100%;
        margin: 0 30px;
        padding: 0;
        align-items: center;
    }
    
    .feature-header {
        scale: 0.7;
        transform-origin: center center;
        width: auto;
        max-width: 100%;
        padding: 0 18px;
        /* background-color: #8080803a; */
    }

    .feature-subtitle {
        font-size: 15px;
        margin-top: -30px;
        padding: 0;
        width: auto;
        max-width: 100%;
        text-align: center;
        /* background-color: #8080803a; */
    }

    .open-metro-button {
        align-self: center;
        margin-left: 0;
        border: 2px solid #bbdbff;
        box-shadow: 8px 8px 16px rgba(255, 255, 255, 0.2);
    }

    .feature-image-section img {
        scale: 0.8;
        left: -80px;
        width: 900px;
        top: -210px;
    }

    .feature-grid-section {
        margin: 350px auto 50px auto;
        gap: 60px;
        padding: 50px;
        grid-template-columns: repeat(1, auto);
        grid-template-rows: repeat(6, auto);
        max-width: 575px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        /*background-color: rgba(0, 255, 0, 0.143);*/
    }

    .footer-column {
        gap: 20px;
    }
}