/* ==========================================================================
   Bryntix Labs Design System & Styling
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
    --bg-obsidian: #0D0E12;
    --bg-space: #141620;
    --bg-card: rgba(20, 22, 32, 0.6);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glass-active: rgba(0, 242, 254, 0.3);
    
    --color-teal: #00F2FE;
    --color-purple: #9d4edd;
    --color-purple-bright: #7F00FF;
    --color-blue: #0077b6;
    
    --text-primary: #F7FAFC;
    --text-secondary: #A0AEC0;
    --text-muted: #718096;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* CSS Resets & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-obsidian);
    color: var(--text-primary);
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    background-color: var(--bg-obsidian);
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-obsidian);
}
::-webkit-scrollbar-thumb {
    background: #2D3748;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-teal);
}

/* Text Selection */
::selection {
    background: rgba(0, 242, 254, 0.25);
    color: var(--text-primary);
}

/* Global Container Utility */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* ==========================================================================
   Background Dynamics
   ========================================================================== */

#bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(
        700px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(0, 242, 254, 0.05),
        rgba(127, 0, 255, 0.04),
        transparent 80%
    );
    transition: opacity 0.8s ease;
}

/* ==========================================================================
   Typography & Accents
   ========================================================================== */

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-purple-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-purple {
    background: linear-gradient(135deg, var(--color-purple-bright) 0%, #FF007F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.accent-text {
    color: var(--color-teal);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    background: rgba(0, 242, 254, 0.06);
    border: 1px solid rgba(0, 242, 254, 0.15);
    color: var(--color-teal);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.purple-badge {
    background: rgba(127, 0, 255, 0.08);
    border-color: rgba(127, 0, 255, 0.25);
    color: #b388ff;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-teal);
    box-shadow: 0 0 10px var(--color-teal);
    display: inline-block;
}

/* ==========================================================================
   Buttons Setup
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-purple-bright) 100%);
    color: var(--bg-obsidian);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
}

/* ==========================================================================
   Glassmorphism Standard Panels
   ========================================================================== */

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.glass-nav {
    background: rgba(13, 14, 18, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass) !important;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: var(--transition-smooth);
}

#main-header.scrolled .header-container {
    height: 65px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#nav-logo, .footer-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.03em;
}

#nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-teal);
    transition: var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

#mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.5rem;
}

/* Mobile Nav Drawer */
#mobile-nav {
    position: fixed;
    top: 80px;
    left: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    z-index: 99;
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

#mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 120px;
    padding-bottom: 80px;
    overflow: hidden;
}

.hero-glow-1 {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.08) 0%, transparent 70%);
    filter: blur(40px);
    z-index: -1;
    animation: pulse 8s infinite alternate;
}

.hero-glow-2 {
    position: absolute;
    bottom: 20%;
    right: 10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(127, 0, 255, 0.08) 0%, transparent 70%);
    filter: blur(40px);
    z-index: -1;
    animation: pulse 12s infinite alternate-reverse;
}

.hero-container {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
}

#hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
}

.hero-bottom-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--bg-obsidian) 0%, transparent 100%);
    pointer-events: none;
}

/* ==========================================================================
   Section Settings
   ========================================================================== */

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

.dark-bg {
    background-color: var(--bg-space);
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 4rem auto;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ==========================================================================
   Services Grid & Cards
   ========================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-glass-active);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.service-card:hover::before {
    opacity: 1;
}

.card-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}

.card-icon {
    width: 28px;
    height: 28px;
    z-index: 2;
}

/* Custom glow backgrounds for cards */
.teal-glow {
    background: rgba(0, 242, 254, 0.1);
    color: var(--color-teal);
    border: 1px solid rgba(0, 242, 254, 0.2);
}
.purple-glow {
    background: rgba(127, 0, 255, 0.1);
    color: var(--color-purple);
    border: 1px solid rgba(127, 0, 255, 0.2);
}
.blue-glow {
    background: rgba(0, 119, 182, 0.1);
    color: #4ea8de;
    border: 1px solid rgba(0, 119, 182, 0.2);
}
.pink-glow {
    background: rgba(255, 0, 127, 0.1);
    color: #ff4d6d;
    border: 1px solid rgba(255, 0, 127, 0.2);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================================================
   How We Work (Process Timeline)
   ========================================================================== */

.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
}

.process-card {
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.process-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glass-active);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.step-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(127, 0, 255, 0.15) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.8;
}

.process-card h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.process-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==========================================================================
   Specialized Tech Stack Grid
   ========================================================================== */

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.tech-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-glass-active);
    box-shadow: 0 10px 25px rgba(0, 242, 254, 0.1);
}

.tech-icon {
    width: 32px;
    height: 32px;
    transition: var(--transition-fast);
}

.tech-item:hover .tech-icon {
    transform: scale(1.1);
}

/* Icon custom colors */
.teal-text { color: var(--color-teal); }
.blue-text { color: #4ea8de; }
.purple-text { color: var(--color-purple); }
.pink-text { color: #ff4d6d; }
.orange-text { color: #f77f00; }
.red-text { color: #e63946; }
.blue-light-text { color: #90e0ef; }
.green-text { color: #52b788; }

/* ==========================================================================
   FAQ Accordions
   ========================================================================== */

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.faq-item {
    overflow: hidden;
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    text-align: left;
    cursor: pointer;
}

.faq-toggle-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

.faq-item:hover .faq-toggle-icon {
    color: var(--color-teal);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
    padding: 0 2rem;
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    padding-bottom: 1.5rem;
}

/* Active FAQ Item classes */
.faq-item.active {
    border-color: var(--border-glass-active);
    box-shadow: 0 8px 30px rgba(0, 242, 254, 0.05);
}

.faq-item.active .faq-answer {
    max-height: 250px;
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(45deg);
    color: var(--color-teal);
}

/* ==========================================================================
   About Section & Block Visuals
   ========================================================================== */

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 6rem;
    align-items: center;
}

.about-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-stack {
    position: relative;
    width: 300px;
    height: 300px;
}

.stack-box {
    position: absolute;
    width: 240px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.box-1 {
    top: 0;
    left: 0;
    z-index: 3;
    border-color: rgba(127, 0, 255, 0.2);
}

.box-2 {
    bottom: 0;
    right: 0;
    z-index: 2;
    border-color: rgba(0, 242, 254, 0.2);
}

.icon-accent {
    font-size: 2rem;
    color: var(--color-purple);
}

.icon-accent-teal {
    font-size: 2rem;
    color: var(--color-teal);
}

.stack-box h4 {
    font-size: 1.1rem;
}

.about-content h2 {
    font-size: 2.8rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.about-content > p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.bullet-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.bullet-item {
    display: flex;
    gap: 1.25rem;
}

.bullet-icon {
    width: 24px;
    height: 24px;
    color: var(--color-teal);
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.bullet-item strong {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.35rem;
}

.bullet-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   Contact Form Styles
   ========================================================================== */

.contact-container {
    display: flex;
    justify-content: center;
}

.contact-card {
    width: 100%;
    max-width: 800px;
    padding: 4rem;
}

.contact-header {
    text-align: center;
    max-width: 550px;
    margin: 0 auto 3rem auto;
}

.contact-header h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.contact-header p {
    color: var(--text-secondary);
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Float Label Input Framework */
.input-group {
    position: relative;
    width: 100%;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-fast);
}

.input-group select {
    color: var(--text-secondary);
    cursor: pointer;
}

.input-group select option {
    background-color: var(--bg-space);
    color: var(--text-primary);
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-bottom-color: var(--color-teal);
}

.input-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition-fast);
}

/* Floating behavior */
.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: -0.8rem;
    font-size: 0.8rem;
    color: var(--color-teal);
}

.form-submit-btn {
    align-self: center;
    padding: 1rem 2.5rem;
}

/* ==========================================================================
   Footer Layout
   ========================================================================== */

footer {
    border-top: 1px solid var(--border-glass);
    padding: 4rem 0;
    background: #08090C;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.footer-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legal-disclaimer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.legal-disclaimer .sub-disclaimer {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

.social-links a {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.social-links a:hover {
    color: var(--color-teal);
    transform: translateY(-2px);
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.15); opacity: 1; }
}

/* Page load transitions */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-teal) 0%, var(--color-purple-bright) 100%);
    z-index: 101;
    transition: width 0.1s ease-out;
}

/* 3D Hover Tilt Perspective */
.service-card, .process-card, .tech-item {
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1);
    transition: transform 0.1s ease, border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Scroll reveal initial states */
.scroll-reveal {
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-zoom {
    transform: scale(0.92);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* ==========================================================================
   Media Queries & Responsiveness
   ========================================================================== */

@media (max-width: 1024px) {
    #hero h1 {
        font-size: 3.5rem;
    }
    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .about-visual {
        order: 2;
        height: 320px;
    }
}

@media (max-width: 768px) {
    #nav-links {
        display: none;
    }
    #mobile-menu-toggle {
        display: block;
    }
    #hero h1 {
        font-size: 2.8rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    .btn {
        justify-content: center;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .process-timeline {
        grid-template-columns: 1fr;
    }
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-card {
        padding: 2rem 1.5rem;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .footer-container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    .footer-info {
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
}
