/* ========================================
   BABYLON IT SOLUTIONS - Main Stylesheet
   Ancient Wisdom Meets Modern Innovation
======================================== */

/* ============== CSS Variables ============== */
:root {
    /* Color Palette - Unified Base60 Theme */
    --royal-gold: #0A84FF;
    --royal-gold-light: #50AFFF;
    --royal-gold-dark: #0066CC;

    --deep-blue: #050A14;
    /* Matches Tailwind darkBlue */
    --midnight: #05070A;
    /* Matches Tailwind void */

    --digital-blue: #0A84FF;
    /* Matches Tailwind blue */
    --digital-blue-glow: rgba(10, 132, 255, 0.3);

    --warm-beige: #1A1C1E;
    --warm-beige-light: #2C2F33;
    --stone: #3E4247;

    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #0A84FF 0%, #50AFFF 50%, #0A84FF 100%);
    --gradient-blue: linear-gradient(135deg, #0A84FF 0%, #0066FF 100%);
    --gradient-dark: linear-gradient(180deg, #05070A 0%, #050A14 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);

    /* Typography */
    --font-display: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-digital: 'JetBrains Mono', monospace;
    /* Consolidated */

    /* Spacing */
    --section-padding: clamp(40px, 8vw, 120px);
    --container-width: 1400px;
    --container-padding: clamp(15px, 4vw, 60px);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Borders */
    --border-radius-sm: 4px;
    --border-radius-md: 12px;
    --border-radius-lg: 24px;

    /* Shadows */
    --shadow-glow: 0 0 40px rgba(10, 132, 255, 0.2);
    --shadow-gold: 0 0 40px rgba(10, 132, 255, 0.2);
    --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ============== Reset & Base ============== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--gradient-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-Orbitron {
    font-family: 'Orbitron', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ============== Typography ============== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-digital);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--digital-blue);
    padding: 0.5rem 1rem;
    border: 1px solid var(--digital-blue);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    background: rgba(0, 217, 255, 0.05);
}

.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
}

/* ============== Buttons ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--midnight);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.btn-primary .btn-arrow {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-medium);
}

.btn-primary:hover .btn-arrow {
    transform: translateX(5px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    border-color: var(--royal-gold);
    color: var(--royal-gold);
    background: rgba(212, 175, 55, 0.1);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* ============== Base60 Time Wheel ============== */
.time-wheel-container {
    /* Kept for potential future use or reference, but mostly unused in new hero */
    display: none;
}

/* ============== Base60 Time Wheel ============== */
.time-wheel-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.time-wheel {
    position: relative;
    width: 320px;
    height: 320px;
    cursor: pointer;
    transition: var(--transition-medium);
}

.time-wheel:hover {
    transform: scale(1.05);
}

.wheel-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.wheel-ring {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 2;
}

.wheel-ring-outer {
    stroke: rgba(0, 217, 255, 0.1);
}

.wheel-ring-middle {
    stroke: rgba(212, 175, 55, 0.1);
}

.wheel-ring-inner {
    stroke: rgba(201, 184, 150, 0.1);
}

.progress-arc {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.seconds-arc {
    stroke: url(#cyanGrad);
    stroke-dasharray: 1131;
    stroke-dashoffset: 1131;
    filter: drop-shadow(0 0 8px rgba(0, 217, 255, 0.5));
}

.minutes-arc {
    stroke: url(#goldGrad);
    stroke-dasharray: 880;
    stroke-dashoffset: 880;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

.hours-arc {
    stroke: var(--warm-beige);
    stroke-dasharray: 628;
    stroke-dashoffset: 628;
    filter: drop-shadow(0 0 6px rgba(201, 184, 150, 0.5));
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 5;
}

.time-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.time-value {
    font-family: var(--font-digital);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 2.5rem;
    text-align: center;
    transition: color 0.3s ease;
}

.time-separator {
    font-family: var(--font-digital);
    font-size: 1.5rem;
    color: var(--royal-gold);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.base60-label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.base60-label .accent {
    color: var(--digital-blue);
    font-weight: 700;
}

.wheel-info {
    text-align: center;
    opacity: 0.8;
}

.wheel-info .info-tag {
    font-family: var(--font-digital);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--digital-blue);
    display: block;
    margin-bottom: 0.5rem;
}

.wheel-info p {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* Tick marks */
.tick-mark {
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 1;
}

.tick-mark.major {
    stroke: var(--royal-gold);
    stroke-width: 2;
}

.tick-mark.active {
    stroke: var(--digital-blue);
    stroke-width: 2;
    filter: drop-shadow(0 0 4px rgba(0, 217, 255, 0.8));
}



/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow svg {
    width: 24px;
    height: 24px;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* ============== Base60 History Section ============== */
.base60-history {
    padding: var(--section-padding) 0;
    position: relative;
    overflow: hidden;
}

.history-content {
    text-align: center;
}

.history-content .section-title {
    margin-bottom: 3rem;
}

.history-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
    text-align: left;
    margin-top: 2rem;
}

.history-intro {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 2.5rem;
}

.history-intro strong {
    color: var(--royal-gold);
    font-weight: 600;
}

.history-facts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(20, 36, 64, 0.6) 0%, rgba(10, 22, 40, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--border-radius-md);
    transition: var(--transition-medium);
}

.fact-item:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateX(10px);
    box-shadow: -5px 0 20px rgba(212, 175, 55, 0.1);
}

.fact-number {
    font-family: var(--font-digital);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--digital-blue);
    min-width: 80px;
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.fact-content h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--royal-gold);
    margin-bottom: 0.5rem;
}

.fact-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.history-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cuneiform-display {
    text-align: center;
    padding: 3rem;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: var(--border-radius-lg);
}

.cuneiform-large {
    font-size: 12rem;
    color: var(--royal-gold);
    text-shadow: 0 0 60px rgba(212, 175, 55, 0.5), 0 0 120px rgba(212, 175, 55, 0.3);
    line-height: 1;
    margin-bottom: 1.5rem;
    animation: cuneiform-glow 3s ease-in-out infinite;
}

@keyframes cuneiform-glow {

    0%,
    100% {
        text-shadow: 0 0 60px rgba(212, 175, 55, 0.5), 0 0 120px rgba(212, 175, 55, 0.3);
    }

    50% {
        text-shadow: 0 0 80px rgba(212, 175, 55, 0.7), 0 0 150px rgba(212, 175, 55, 0.5), 0 0 200px rgba(0, 217, 255, 0.2);
    }
}

.cuneiform-meaning {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meaning-num {
    font-family: var(--font-digital);
    font-size: 2rem;
    font-weight: 700;
    color: var(--digital-blue);
}

.meaning-or {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.cuneiform-note {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ============== Constellation Section ============== */
.constellation-section {
    padding: calc(var(--section-padding) * 1.5) 0;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.constellation-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 80% 60%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 10% 80%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(2px 2px at 90% 10%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(1px 1px at 70% 40%, rgba(212, 175, 55, 0.3), transparent),
        radial-gradient(1px 1px at 30% 60%, rgba(0, 217, 255, 0.2), transparent);
    background-size: 250px 250px;
    animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.constellation-wrapper {
    position: relative;
}

.stars-pattern {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 600px;
    margin: 0 auto;
}

/* Star Points */
.star-point {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition-medium);
    z-index: 5;
}

.star-point:hover {
    transform: scale(1.3);
}

.star-point:hover .star-glow {
    opacity: 1;
    transform: scale(1.5);
}

.star-glow {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.5;
    transition: var(--transition-medium);
}

.star-icon {
    width: 32px;
    height: 32px;
    color: var(--royal-gold);
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
    position: relative;
    z-index: 2;
    animation: star-pulse 2s ease-in-out infinite;
}

@keyframes star-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.star-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

/* Star Positions */
.star-1 {
    top: 5%;
    left: 8%;
}

.star-2 {
    top: 5%;
    right: 8%;
}

.star-3 {
    bottom: 10%;
    left: 8%;
}

.star-4 {
    bottom: 10%;
    right: 8%;
}

/* Constellation Lines */
.constellation-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.constellation-line {
    stroke: url(#lineGradient);
    stroke-width: 2;
    stroke-dasharray: 8 4;
    animation: line-pulse 3s ease-in-out infinite;
    opacity: 0.6;
}

.constellation-line:nth-child(2) {
    animation-delay: 0.5s;
}

.constellation-line:nth-child(3) {
    animation-delay: 1s;
}

.constellation-line:nth-child(4) {
    animation-delay: 1.5s;
}

@keyframes line-pulse {

    0%,
    100% {
        opacity: 0.4;
        stroke-dashoffset: 0;
    }

    50% {
        opacity: 0.8;
        stroke-dashoffset: 12;
    }
}

/* Center Constellation (Time Wheel) */
.constellation-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.time-wheel-constellation {
    width: 280px;
    height: 280px;
}

.constellation-title {
    text-align: center;
    margin-top: 1.5rem;
}

.constellation-title h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-primary);
    letter-spacing: 0.1em;
}

.constellation-title .accent {
    color: var(--digital-blue);
    font-weight: 700;
}

.constellation-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 300px;
    margin-top: 0.5rem;
    line-height: 1.6;
}

/* Constellation Time Wheel Specific Styles */
.seconds-arc-constellation {
    stroke: url(#cyanGrad2);
    stroke-dasharray: 1131;
    stroke-dashoffset: 1131;
    filter: drop-shadow(0 0 8px rgba(0, 217, 255, 0.5));
}

.minutes-arc-constellation {
    stroke: url(#goldGrad2);
    stroke-dasharray: 880;
    stroke-dashoffset: 880;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

.hours-arc-constellation {
    stroke: var(--warm-beige);
    stroke-dasharray: 628;
    stroke-dashoffset: 628;
    filter: drop-shadow(0 0 6px rgba(201, 184, 150, 0.5));
}

/* ============== Services Section ============== */
.services {
    padding: var(--section-padding) 0;
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: transparent;
    pointer-events: none;
}

.section-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header .section-subtitle {
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: linear-gradient(145deg, rgba(20, 36, 64, 0.8) 0%, rgba(10, 22, 40, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: var(--border-radius-md);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-medium);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
}

.service-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: var(--shadow-card);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1.5rem;
    color: var(--royal-gold);
    transition: var(--transition-medium);
}

.service-card:hover .service-icon {
    color: var(--digital-blue);
    transform: scale(1.1);
}

.service-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    margin-bottom: 1.5rem;
}

.service-features li {
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.service-features li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--royal-gold);
    font-size: 0.6rem;
}

.service-link {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--digital-blue);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.service-link:hover {
    color: var(--royal-gold);
}

/* ============== Portfolio Section - Premium Bento Grid ============== */
.portfolio {
    padding: var(--section-padding) 0;
    position: relative;
    overflow: hidden;
}

.portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: transparent;
    pointer-events: none;
}

.portfolio .section-header {
    margin-bottom: 4rem;
}

/* Bento Grid Layout */
.portfolio-bento {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 1024px) {
    .portfolio-bento {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-bento {
        grid-template-columns: 1fr;
    }

    .bento-featured {
        grid-column: span 1 !important;
        min-height: 400px !important;
    }
}

.bento-item {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.bento-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, rgba(0, 217, 255, 0.1) 50%, rgba(212, 175, 55, 0.3) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.bento-item:hover::before {
    opacity: 1;
}

.bento-item:hover {
    transform: translateY(-8px) scale(1.02);
    z-index: 10;
}

.bento-bg {
    position: absolute;
    inset: 0;
    transition: transform 0.6s ease;
}

.bento-item:hover .bento-bg {
    transform: scale(1.1);
}

.bento-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 217, 255, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.bento-item:hover .bento-glow {
    opacity: 1;
}

.bento-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bento-category {
    font-family: var(--font-digital);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--digital-blue);
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 50px;
    width: fit-content;
}

.bento-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.bento-item:hover .bento-title {
    color: var(--royal-gold);
}

.bento-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.bento-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bento-stat {
    display: flex;
    flex-direction: column;
}

.bento-stat .stat-value {
    font-family: var(--font-digital);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--digital-blue);
}

.bento-stat .stat-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.bento-tags span {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--warm-beige);
    background: rgba(201, 184, 150, 0.1);
    border: 1px solid rgba(201, 184, 150, 0.2);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.bento-item:hover .bento-tags span {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--royal-gold);
}

.bento-icon {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 4rem;
    opacity: 0.15;
    transition: all 0.4s ease;
    z-index: 1;
}

.bento-item:hover .bento-icon {
    opacity: 0.3;
    transform: scale(1.2) rotate(10deg);
}

.bento-link {
    position: absolute;
    inset: 0;
    z-index: 5;
}

/* Bento Grid Sizes */
.bento-featured {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 450px;
}

.bento-featured .bento-title {
    font-size: 2.5rem;
}

.bento-featured .bento-icon {
    font-size: 8rem;
    bottom: 2rem;
    right: 2rem;
}

.bento-medium {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 280px;
}

.bento-small {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 200px;
}

.bento-small .bento-content {
    padding: 1.5rem;
}

.bento-small .bento-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.bento-small .bento-desc {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.bento-small .bento-icon {
    font-size: 3rem;
    bottom: 1rem;
    right: 1rem;
}

/* Portfolio CTA */
.portfolio-cta {
    text-align: center;
    margin-top: 2rem;
}

/* ============== About Section ============== */
.about {
    padding: var(--section-padding) 0;
    overflow: hidden;
}

.about-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: center;
}

.about-images {
    position: relative;
    height: 500px;
}

.about-image {
    position: absolute;
    width: 220px;
    height: 280px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.2);
    box-shadow: var(--shadow-card);
    transition: var(--transition-slow);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.about-img-1 {
    top: 0;
    left: 10%;
    transform: rotate(-8deg);
    z-index: 4;
}

.about-img-2 {
    top: 20%;
    left: 30%;
    transform: rotate(5deg);
    z-index: 3;
}

.about-img-3 {
    top: 35%;
    left: 5%;
    transform: rotate(-3deg);
    z-index: 2;
}

.about-img-4 {
    top: 15%;
    left: 50%;
    transform: rotate(10deg);
    z-index: 1;
}

/* Drifting effect applied via JS */
.about-images.drifted .about-img-1 {
    transform: translateX(-40px) translateY(-30px) rotate(-15deg);
}

.about-images.drifted .about-img-2 {
    transform: translateX(60px) translateY(20px) rotate(12deg);
}

.about-images.drifted .about-img-3 {
    transform: translateX(-50px) translateY(50px) rotate(-10deg);
}

.about-images.drifted .about-img-4 {
    transform: translateX(80px) translateY(-40px) rotate(18deg);
}

.about-content .section-tag {
    margin-bottom: 1rem;
}

.about-content .section-title {
    margin-bottom: 2rem;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.about-values {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.value-icon {
    font-size: 1.5rem;
}

.value-text {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* ============== CTA Section ============== */
.cta-section {
    padding: var(--section-padding) 0;
    background: var(--midnight);
    position: relative;
    overflow: hidden;
}

.cta-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem var(--container-padding);
    text-align: center;
    position: relative;
    z-index: 1;
    background: linear-gradient(145deg, rgba(20, 36, 64, 0.8) 0%, rgba(10, 22, 40, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--border-radius-lg);
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cta-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    pointer-events: none;
}

.cta-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 60%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ============== Footer ============== */
.footer {
    padding: 4rem 0 2rem;
    background: var(--deep-blue);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--royal-gold);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a,
.footer-column ul li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-column ul li a:hover {
    color: var(--digital-blue);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition-medium);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

.social-link:hover {
    border-color: var(--royal-gold);
    color: var(--royal-gold);
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-3px);
}

/* ============== Scroll Animations ============== */
[data-scroll] {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-scroll].visible {
    opacity: 1;
    transform: translateY(0);
}

[data-scroll="scale-in"] {
    transform: scale(0.9);
}

[data-scroll="scale-in"].visible {
    transform: scale(1);
}

[data-scroll="fade-up"][data-delay="100"] {
    transition-delay: 0.1s;
}

[data-scroll="fade-up"][data-delay="200"] {
    transition-delay: 0.2s;
}

[data-scroll="fade-up"][data-delay="300"] {
    transition-delay: 0.3s;
}

/* ============== Responsive Design ============== */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .about-images {
        height: 400px;
        order: 2;
    }

    .about-content {
        text-align: center;
        order: 1;
    }

    .about-values {
        justify-content: center;
    }

    /* History Section Responsive */
    .history-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .history-visual {
        order: -1;
    }

    .cuneiform-large {
        font-size: 8rem;
    }

    /* Constellation Responsive */
    .stars-pattern {
        height: 500px;
    }

    .time-wheel-constellation {
        width: 240px;
        height: 240px;
    }

    /* Bento Grid Responsive */
    .portfolio-bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-featured {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 380px;
    }

    .bento-featured .bento-title {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 700px;
        margin: 0 auto;
    }

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
    }

    .bento-stats {
        gap: 1.5rem;
    }

    /* Constellation Section */
    .stars-pattern {
        height: 450px;
    }

    .star-point {
        display: none;
    }

    .constellation-lines {
        display: none;
    }

    #base60-reveal {
        position: relative;
        z-index: 10;
        background: rgba(0, 0, 0, 0);
        font-family: var(--font-orbitron);
    }

    .constellation-center {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }

    .time-wheel-constellation {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-bento {
        grid-template-columns: 1fr;
    }

    .bento-featured {
        grid-column: span 1;
        min-height: 400px;
    }

    .bento-medium,
    .bento-small {
        min-height: 250px;
    }

    .bento-featured .bento-icon {
        font-size: 5rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        width: 160px;
        height: 200px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .hero-bg {
        background-position: center bottom;
    }

    .b60-ring {
        display: none;
    }

    #hero {
        height: auto;
        min-height: 100vh;
        padding-bottom: 2rem;
    }

    #solutions,
    #about {
        max-width: 100vw;
        overflow: hidden;
        text-align: center;
    }

    .section-header {
        align-items: center;
        text-align: center;
    }

    .section-tag {
        margin: 0 auto 1rem;
    }

    #starmap-hero-canvas {
        display: none;
    }

    #hero-badge {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta-container {
        padding: 2.5rem 1.5rem;
    }

    .bento-content {
        padding: 1.25rem;
    }

    .bento-title {
        font-size: 1.35rem;
    }

    .bento-featured .bento-title {
        font-size: 1.75rem;
    }

    .bento-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* --- MOBILE SPECIFIC OVERRIDES --- */
@media (max-width: 480px) {
    .section-container {
        padding: 0 15px;
    }

    .bento-content {
        padding: 1.5rem;
    }

    .bento-title {
        font-size: 1.5rem;
    }
}

/* --- HEADER OVERLAP FIX --- */
.nav-blur {
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* --- PREVENT OVERFLOW --- */
* {
    max-width: 100vw;
}

#hero-threejs-container canvas {
    max-width: 100% !important;
}

@media (max-width: 375px) {
    #hero-title {
        font-size: 2.25rem !important;
        /* Force reduction for very small screens */
        line-height: 1.1;
    }
}

/* --- MOBILE MENU OVERLAY --- */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(100%);
    z-index: 1050;
    pointer-events: none;
}

#mobile-menu.active {
    transform: translateX(0);
    pointer-events: auto;
}

.mobile-link {
    transition: all 0.3s;
    position: relative;
}

/* --- OVERFLOW FIXES --- */
.container,
.section-container {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}