:root {
    --bg: #030303;
    --primary: #8B5CF6;
    --secondary: #06B6D4;
    --accent: #F43F5E;
    --white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --transition-slow: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    --hero-char-gradient: linear-gradient(to bottom, #fff 50%, rgba(255, 255, 255, 0.3));
}

body.light-theme {
    --bg: #ffffff;
    --white: #000000;
    --text-muted: rgba(0, 0, 0, 0.7);
    --glass: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --hero-char-gradient: linear-gradient(to bottom, #000 50%, rgba(0, 0, 0, 0.4));
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.custom-cursor-active * {
    cursor: none !important;
}

/* Force default cursor for touch/mobile regardless of flags */
@media (hover: none) {
    * {
        cursor: auto !important;
    }
}

body:not(.custom-cursor-active) * {
    cursor: auto !important;
}

/* Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.liquid {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--primary);
    border-radius: 35% 65% 63% 37% / 37% 33% 67% 63%;
    background: var(--gradient);
    animation: liquid-morph 3s infinite alternate ease-in-out;
    opacity: 0.6;
    filter: blur(5px);
}

.loader-logo {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 5px;
    color: var(--white);
    z-index: 1;
    animation: pulse 2s infinite;
}

@keyframes liquid-morph {
    0% {
        border-radius: 35% 65% 63% 37% / 37% 33% 67% 63%;
        transform: rotate(0deg) scale(1);
    }

    100% {
        border-radius: 65% 35% 33% 67% / 63% 67% 33% 37%;
        transform: rotate(180deg) scale(1.2);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.5;
    transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s ease;
}

.mesh-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
    opacity: 0.4;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: var(--primary);
    animation: move 20s infinite alternate;
}

.blob-2 {
    background: var(--secondary);
    width: 600px;
    height: 600px;
    right: -100px;
    top: -100px;
    animation-delay: -5s;
}

#bond-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.6;
}

.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--secondary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 12000;
    opacity: 0;
}

@keyframes move {
    from {
        transform: translate(-10%, -10%) scale(1);
    }

    to {
        transform: translate(20%, 20%) scale(1.2);
    }
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grain-y.com/images/grain.png');
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

[data-reveal].active {
    opacity: 1;
    transform: translateY(0);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10001;
    padding: 30px 0;
    transition: var(--transition-slow);
}

.navbar.scrolled {
    background: rgba(3, 3, 3, 0.1);
    backdrop-filter: blur(40px);
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
}

body.light-theme .navbar.scrolled {
    background: rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: 0.3s;
}

.logo-wrap {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--white);
    text-transform: uppercase;
}

.logo span {
    color: var(--primary);
    margin-left: 2px;
}

.logo-tagline {
    font-size: 0.55rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: -2px;
    opacity: 0.8;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    transition: color 0.3s, opacity 0.3s;
    display: block;
}

.nav-text {
    display: block;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-links li a:hover,
.nav-links li a.active {
    opacity: 1;
    color: var(--secondary);
}

.mobile-menu-info {
    display: none;
}

.nav-underline {
    position: absolute;
    bottom: -5px;
    height: 2px;
    background: var(--secondary);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
    opacity: 0;
}

.cta-btn {
    background: var(--white);
    color: var(--bg);
    padding: 12px 28px;
    font-size: 0.85rem;
    font-weight: 800;
    border-radius: 100px;
    border: none;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn:active,
.cta-btn:active,
.theme-toggle:active {
    transform: scale(0.94);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 10005;
}

.mobile-toggle span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: 0.3s;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 7.5rem);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -0.05em;
    margin-bottom: 30px;
    color: var(--white);
}

.char {
    display: inline-block;
    transform: translateY(115%);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    background: var(--hero-char-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 50px;
}

.btn {
    display: inline-block;
    padding: 20px 40px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn.primary {
    background: var(--white);
    color: var(--bg);
}

.btn.secondary {
    border: 1px solid var(--glass-border);
    color: var(--white);
    background: var(--glass);
    backdrop-filter: blur(10px);
}

/* ticker */
.ticker-wrap {
    background: rgba(139, 92, 246, 0.05);
    padding: 25px 0;
    overflow: hidden;
    margin-bottom: 100px;
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: moving-text 30s linear infinite;
}

.ticker__item {
    padding: 0 50px;
    font-size: 1.2rem;
    font-weight: 900;
    opacity: 0.2;
    letter-spacing: 2px;
}

@keyframes moving-text {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Sections */
section {
    padding: clamp(80px, 12vw, 150px) 0;
}

.section-title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: clamp(40px, 8vw, 80px);
    letter-spacing: -2px;
}

.section-title.left-align {
    text-align: left;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(20px, 4vw, 40px);
}

.stat-card {
    text-align: center;
    padding: 60px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
}

.stat-card h3 {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.product-card {
    padding: 80px 50px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    backdrop-filter: blur(40px);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
}

.product-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 30px;
}

.product-card h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.product-card p {
    color: var(--text-muted);
}

.compliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
}

.compliance-item {
    text-align: center;
}

.compliance-item .icon {
    font-size: 3rem;
    margin-bottom: 30px;
    color: var(--secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(40px, 8vw, 100px);
    align-items: center;
}

.about-text .desc {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--white);
    margin-bottom: 30px;
}

.about-text .desc-sub {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: var(--text-muted);
}

.about-stats {
    padding: clamp(30px, 5vw, 60px);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
}

.stat-item h4 {
    color: var(--primary);
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.stat-item p {
    font-size: 1.8rem;
    font-weight: 800;
}

.stat-item:not(:last-child) {
    margin-bottom: 40px;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--white);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 20px 50px;
    width: 50%;
    position: relative;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item .content {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 30px;
    transition: 0.3s;
}

.timeline-item:hover .content {
    border-color: var(--primary);
}

/* Contact Section */
.contact-section {
    position: relative;
    padding-bottom: 150px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.contact-card {
    padding: 60px 40px;
    text-align: center;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.contact-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    transition: var(--transition-slow);
}

.contact-card:hover .contact-icon {
    background: var(--gradient);
    color: var(--white);
    border-color: transparent;
    transform: rotateY(360deg);
}

.contact-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.contact-card p,
.contact-card a {
    color: var(--text-muted);
    font-size: 1.1rem;
    text-decoration: none;
    transition: 0.3s;
}

.contact-card a:hover {
    color: var(--primary);
}

/* Footer */
footer {
    padding: 100px 0 50px;
    border-top: 1px solid var(--glass-border);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.footer-bottom-genz {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10003;
    backdrop-filter: blur(10px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.4s ease;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 60px 40px;
    position: relative;
    border-radius: 40px;
    box-shadow: var(--shadow);
}

.close-modal {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px 0;
    background: none;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    color: var(--white);
    font-size: 1rem;
    outline: none;
}

.input-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--text-muted);
    pointer-events: none;
    transition: 0.3s;
}

.input-group input:focus~label,
.input-group input:not(:placeholder-shown)~label,
.input-group textarea:focus~label,
.input-group textarea:not(:placeholder-shown)~label {
    top: -15px;
    font-size: 0.8rem;
    color: var(--primary);
}

/* Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 11000;
    mix-blend-mode: difference;
    transition: transform 0.1s ease-out, opacity 0.3s ease;
    opacity: 0.9;
}

/* RESPONSIVENESS */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .container {
        padding: 0 30px;
    }
}

@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 140px 40px 60px;
        gap: 30px;
        z-index: 10004;
        transform: translateX(100%);
        transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        transform: translateX(50px);
        opacity: 0;
        transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
        width: 100%;
    }

    .nav-links.active li {
        transform: translateX(0);
        opacity: 1;
        transition-delay: calc(0.2s + var(--i) * 0.1s);
    }

    .nav-links a {
        font-size: 2.2rem;
        letter-spacing: -1px;
        text-transform: capitalize;
        font-weight: 800;
        opacity: 1;
    }

    .mobile-menu-info {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: auto;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.8s ease 0.8s;
    }

    .nav-links.active .mobile-menu-info {
        opacity: 1;
        transform: translateY(0);
    }

    .m-divider {
        width: 100%;
        height: 1px;
        background: var(--glass-border);
        margin-bottom: 30px;
    }

    .m-tagline {
        font-size: 0.7rem;
        letter-spacing: 5px;
        color: var(--primary);
        font-weight: 900;
        margin-bottom: 20px;
    }

    .m-presence {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 30px;
    }

    .m-presence span {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-muted);
        background: var(--glass);
        padding: 6px 12px;
        border-radius: 8px;
        border: 1px solid var(--glass-border);
    }

    .m-contact {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--white);
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-underline {
        display: none;
    }

    body.nav-open {
        overflow: hidden;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 5px);
    }

    .mobile-toggle.active span:nth-child(2) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .nav-right .cta-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 4rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .timeline::after {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 60px;
    }

    .timeline-item .content {
        padding: 30px;
    }

    .footer-top {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-bottom-genz {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 1024px) {
    .hero h1 {
        font-size: clamp(3.5rem, 12vw, 6rem);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: clamp(2.8rem, 10vw, 3.5rem);
        line-height: 1;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo-tagline {
        font-size: 0.45rem;
        letter-spacing: 2px;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 18px;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 40px;
    }
}

/* Transitions */
.split-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
}

.hero.reveal-active h1 .char {
    transform: translateY(0);
}

.hero p,
.hero-actions {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero.reveal-active p,
.hero.reveal-active .hero-actions {
    opacity: 1;
    transform: translateY(0);
}

.hero.reveal-active p {
    transition-delay: 0.6s;
}

.hero.reveal-active .hero-actions {
    transition-delay: 0.8s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Floating Action Button */
.fab-quote {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10002;
    background: #000;
    color: #fff;
    padding: 15px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: none;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(10px);
}

.fab-quote i {
    font-size: 1.1rem;
    transition: transform 0.4s ease;
}

.fab-quote:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

.fab-quote:not(.flying):hover i {
    transform: rotate(-15deg) translate(2px, -2px);
}

/* Page Reveal Animation (Morphing Effect) */
@keyframes modalPop {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal.active .modal-content {
    animation: modalPop 1.0s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}




/* Only show on mobile */
@media (max-width: 992px) {
    .fab-quote {
        display: flex;
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
    }
}

body.light-theme .fab-quote {
    background: #fff;
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
