@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;800&display=swap');

@font-face {
    font-family: 'Brigends Expanded';
    src: url('Assets/Brigends%20Expanded.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Rostex Outline';
    src: url('Assets/rostex.oblique-outline.woff2') format('woff2'),
         url('Assets/rostex.oblique-outline.woff') format('woff'),
         url('Assets/rostex.oblique-outline.ttf') format('truetype'),
         url('Assets/rostex.oblique-outline.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Rostex Italic';
    src: url('Assets/rostex.italic.woff2') format('woff2'),
         url('Assets/rostex.italic.woff') format('woff'),
         url('Assets/rostex.italic.ttf') format('truetype'),
         url('Assets/rostex.italic.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
}

:root {
    --bg-primary: #e0e0e0; /* Fallback */
    --bg-gradient: radial-gradient(circle at center, #f5f5f5 0%, #b8b8b8 100%);
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent: #0066FF; /* Electric Blue */
    --accent-dark: #0052CC;
    --border: rgba(0, 0, 0, 0.06);
    --glass: rgba(255, 255, 255, 0.7);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -100;
    pointer-events: none;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        var(--bg-gradient);
    background-size: 50px 50px, 50px 50px, 100% 100%;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
    border: 1px solid rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background-color: var(--accent-dark);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.3);
}

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--transition);
}

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

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s var(--transition);
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background-color: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-mark {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    height: 18px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 100px;
    transition: all 0.2s var(--transition);
}

.nav-links li a.active {
    background-color: var(--accent);
    color: #000;
}

.nav-links li a:hover:not(.active) {
    background-color: rgba(0,0,0,0.05);
    color: var(--text-primary);
}

.chevron {
    font-size: 0.7rem;
    margin-left: 2px;
    opacity: 0.5;
}

.nav-actions {
    display: flex;
    align-items: center;
}

.cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--accent);
    color: #fff;
    border-radius: 50%;
    transition: transform 0.2s var(--transition);
}

.cart-btn:hover {
    transform: scale(1.05);
}

/* Hero Section */
#hero {
    padding-top: 260px; /* Increased to bring text down */
    padding-bottom: 120px;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 0, 0, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

#hero .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0;
    position: relative;
    z-index: 5;
    width: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    max-width: 50%;
}

#hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem); /* Slightly smaller for better fit */
    line-height: 1.1; /* Better breathing room */
    margin-bottom: 1rem;
    letter-spacing: -3px;
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
    position: relative;
    z-index: 20;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.hero-cta {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
    align-items: center;
}

.btn-link {
    font-weight: 600;
    color: var(--accent);
}

/* 3D Canvas Wrapper */
.macropad-3d-wrapper {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

#macropad-3d-canvas {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

#macropad-3d-canvas.loaded {
    opacity: 1;
}

/* Canvas Loading Overlay */
.canvas-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out;
    pointer-events: none;
}

#macropad-3d-canvas.loaded ~ .canvas-loading-overlay {
    opacity: 0;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 102, 255, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}



/* Features Grid */
.section-header {
    text-align: left !important;
    max-width: 50%;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 55%;
}

.feature-card {
    padding: 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Deep Dive */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.image-box img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.text-box h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.text-box p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Buy Section */
.buy-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.buy-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 69, 0, 0.08), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.buy-info,
.buy-visual {
    position: relative;
    z-index: 1;
}

.buy-info h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.price span {
    color: var(--accent);
}

.selector-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option {
    padding: 1.5rem;
    border: 1px solid var(--border);
    background: none;
    border-radius: var(--radius-md);
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--transition);
    color: var(--text-primary);
}

.option.active {
    border-color: var(--accent);
    background: rgba(255, 69, 0, 0.1);
    box-shadow: 0 0 0 1px var(--accent);
}

.buy-btn {
    width: 100%;
    padding: 20px;
    font-size: 1.1rem;
}

.buy-visual img {
    width: 100%;
    transform: rotate(-5deg);
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 968px) {

    .split-layout,
    .buy-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #hero h1 {
        font-size: 4rem;
    }

    .nav-links {
        display: none;
        /* Mobile menu needed but simplified for now */
    }
}

/* Background Grid Effect */
#bg-grid-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -20;
    pointer-events: none;
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
}

.bg-grid-cell {
    width: 50px;
    height: 50px;
    background-color: transparent;
    transition: background-color 0.8s ease-out;
}

.bg-grid-cell.filled {
    background-color: rgba(0, 0, 0, 0.04);
    transition: background-color 0.1s ease-in;
}

/* Marquee Section */
.marquee-section {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%); /* Force full width to break out of container if necessary */
    padding: 3rem 0;
    overflow: hidden;
    z-index: -5; /* Set below 3D canvas which is -1 */
    background: transparent;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.marquee-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.marquee-track {
    display: flex;
    width: max-content;
}

.marquee-left {
    animation: marquee-left 40s linear infinite;
}

.marquee-right {
    animation: marquee-right 45s linear infinite;
}

.bg-text-row {
    font-size: clamp(3rem, 6vw, 5rem); 
    white-space: nowrap;
    line-height: 1;
    padding-right: 2vw; 
}

.outline-font {
    font-family: 'Rostex Outline', 'Outfit', sans-serif;
    color: transparent;
    -webkit-text-stroke: 1px #ffffff;
}

.italic-font {
    font-family: 'Rostex Italic', 'Outfit', sans-serif;
    color: #ffffff;
}

@keyframes marquee-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes marquee-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Ensure dat.gui is clickable above the fixed header */
.dg.ac {
    z-index: 9999 !important;
}