/* Tight AI - Main Stylesheet */

:root {
    --orange-primary: #FF6B35;
    --orange-light: #FF8C61;
    --orange-dark: #E55A2B;
    --orange-gradient: linear-gradient(135deg, #FF6B35 0%, #FF8C61 100%);
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-white: #ffffff;
    --bg-light: #fafafa;
    --spacing-xl: 120px;
    --spacing-lg: 80px;
    --spacing-md: 40px;
    --spacing-sm: 20px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--orange-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--orange-primary);
}

.cta-button {
    background: var(--orange-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

/* Investor Banner */
.investor-banner {
    background: transparent;
    padding: var(--spacing-md) 0;
    overflow: hidden;
}

.investor-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.investor-banner h3 {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.investor-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.investor-logo {
    height: 150px;
    width: auto;
    opacity: 0.4;
    filter: grayscale(100%) brightness(0.5) sepia(100%) hue-rotate(10deg) saturate(500%);
    transition: opacity 0.5s ease, transform 0.5s ease;
    cursor: pointer;
}

.investor-logo:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg);
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 24px;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
}

.hero .description {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
}

/* Feature Sections */
.feature-section {
    padding: var(--spacing-xl) var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
}

.feature-section h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
    text-align: center;
}

.feature-section .subtitle {
    font-size: 20px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature-card {
    background: var(--bg-white);
    padding: var(--spacing-md);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.15);
}

.feature-card h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--orange-primary);
}

.feature-card .stat {
    font-size: 48px;
    font-weight: 700;
    color: var(--orange-primary);
    margin: var(--spacing-sm) 0;
}

.feature-card .stat-label {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.1);
}

.stat-item .number {
    font-size: 56px;
    font-weight: 700;
    color: var(--orange-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
    word-break: break-word;
}

.stat-item .label {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Responsive Stats Grid */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .stat-item .number {
        font-size: 48px;
    }
    
    .stat-item .label {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .stat-item {
        padding: var(--spacing-sm);
    }
    
    .stat-item .number {
        font-size: 42px;
    }
    
    .stat-item .label {
        font-size: 16px;
    }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: var(--spacing-xl) var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.footer-section h4 {
    margin-bottom: var(--spacing-sm);
    color: var(--orange-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--orange-primary);
}

.footer-bottom {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: var(--spacing-lg);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    font-size: 28px;
    font-weight: 300;
    color: var(--text-light);
    cursor: pointer;
    border: none;
    background: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--orange-primary);
}

.modal h2 {
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--orange-primary);
}

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

/* Page Content */
.page-content {
    padding-top: 100px;
    min-height: calc(100vh - 100px);
    position: relative;
    z-index: 10;
    background: transparent;
}

/* Floating 3D Boxes */
.floating-box {
    position: fixed;
    width: 50px;
    height: 50px;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, 
        rgba(255, 107, 53, 0.15) 0%, 
        rgba(255, 140, 97, 0.1) 50%,
        rgba(255, 107, 53, 0.15) 100%);
    border: 2px solid rgba(255, 107, 53, 0.4);
    border-radius: 4px;
    cursor: pointer;
    z-index: 50;
    pointer-events: auto !important;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: opacity 0.6s ease;
    box-shadow: 
        0 0 30px rgba(255, 107, 53, 0.6),
        0 0 60px rgba(255, 140, 97, 0.4),
        0 8px 16px rgba(255, 107, 53, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.3),
        inset 0 0 40px rgba(255, 107, 53, 0.2);
    animation: float 6s ease-in-out infinite, rotate3d var(--rotation-duration, 8s) linear infinite;
    user-select: none;
    -webkit-user-select: none;
    backdrop-filter: blur(1px);
    will-change: transform, left, top;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    touch-action: manipulation;
}

/* Light shining through effect */
.floating-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, 
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 140, 97, 0.3) 30%,
        rgba(255, 107, 53, 0.2) 60%,
        transparent 100%);
    border-radius: 50%;
    animation: lightRotate 4s linear infinite;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* Additional light layer */
.floating-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 25%,
        rgba(255, 140, 97, 0.15) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 100%);
    border-radius: 4px;
    animation: lightSweep 3s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
}

@keyframes rotate3d {
    0% {
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateZ(0);
    }
    25% {
        transform: perspective(1000px) rotateX(90deg) rotateY(90deg) rotateZ(45deg) translateZ(10px);
    }
    50% {
        transform: perspective(1000px) rotateX(180deg) rotateY(180deg) rotateZ(90deg) translateZ(0);
    }
    75% {
        transform: perspective(1000px) rotateX(270deg) rotateY(270deg) rotateZ(135deg) translateZ(-10px);
    }
    100% {
        transform: perspective(1000px) rotateX(360deg) rotateY(360deg) rotateZ(180deg) translateZ(0);
    }
}

@keyframes lightRotate {
    0% {
        transform: rotate(0deg);
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(360deg);
        opacity: 0.6;
    }
}

@keyframes lightSweep {
    0%, 100% {
        transform: translateX(-100%) translateY(-100%);
        opacity: 0;
    }
    50% {
        transform: translateX(100%) translateY(100%);
        opacity: 1;
    }
}


.floating-box.dissolving {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Pixel particles for dissolve effect */
.pixel-particle {
    position: fixed;
    z-index: 1000;
    border-radius: 2px;
    pointer-events: none;
    will-change: transform, opacity, background-color, box-shadow;
    transform-origin: center center;
    display: block;
    visibility: visible;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: translateY(-20px) rotateX(5deg) rotateY(5deg);
    }
    50% {
        transform: translateY(-10px) rotateX(-5deg) rotateY(-5deg);
    }
    75% {
        transform: translateY(-15px) rotateX(3deg) rotateY(-3deg);
    }
}

/* Ensure content is above boxes but allow clicks through to boxes */
.hero,
.feature-section,
.content-section,
.page-content > * {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

header,
footer,
.investor-banner {
    position: relative;
    z-index: 10;
}

/* Box hover effect */
.floating-box:hover {
    background: linear-gradient(135deg, 
        rgba(255, 107, 53, 0.3) 0%, 
        rgba(255, 140, 97, 0.25) 50%,
        rgba(255, 107, 53, 0.3) 100%);
    border-color: rgba(255, 107, 53, 0.7);
    box-shadow: 
        0 0 50px rgba(255, 107, 53, 0.9),
        0 0 100px rgba(255, 140, 97, 0.7),
        0 12px 24px rgba(255, 107, 53, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.5),
        inset 0 0 60px rgba(255, 107, 53, 0.4);
    animation-duration: 4s, 6s;
}

.content-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.content-section h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

.content-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

.content-section p {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

/* Careers Section */
.careers-list {
    margin-top: var(--spacing-lg);
}

.career-item {
    background: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: 12px;
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--orange-primary);
}

.career-item h3 {
    font-size: 24px;
    color: var(--orange-primary);
    margin-bottom: var(--spacing-sm);
}

.career-item p {
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 40px;
    }
    
    .hero .subtitle {
        font-size: 20px;
    }
    
    .feature-section h2 {
        font-size: 36px;
    }
    
    .nav-links {
        gap: var(--spacing-sm);
        font-size: 14px;
    }
    
    .investor-logos {
        gap: var(--spacing-md);
    }
    
    .investor-logo {
        height: 100px;
    }
    
    :root {
        --spacing-xl: 80px;
        --spacing-lg: 60px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        gap: var(--spacing-sm);
    }
    
    .stat-item .number {
        font-size: 36px;
    }
    
    .stat-item .label {
        font-size: 14px;
    }
}

/* Testnet Analytics Styles */
.chart-container {
    margin-bottom: var(--spacing-lg);
}

.chart-container h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

#timeRangeSelector {
    transition: border-color 0.3s ease;
}

#timeRangeSelector:focus {
    outline: none;
    border-color: var(--orange-primary);
}

#timeRangeSelector:hover {
    border-color: var(--orange-light);
}

/* Chart canvas styling */
canvas {
    max-width: 100%;
}
