/* ============================================
   RERIGHT SOLUTIONS - STYLES
   ============================================ */

/* --- 1. CSS Custom Properties --- */
:root {
    --bg-primary: #0B0D17;
    --bg-secondary: #111827;
    --bg-tertiary: #1F2937;
    --border: #2A3441;
    --accent-cyan: #00D4FF;
    --accent-blue: #0066FF;
    --accent-purple: #7C3AED;
    --gradient-primary: linear-gradient(135deg, #00D4FF, #0066FF);
    --gradient-hero: linear-gradient(135deg, #00D4FF, #7C3AED);
    --text-primary: #F0F4FF;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(0, 212, 255, 0.1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --nav-height: 64px;
    --max-width: 1200px;
    --transition: 0.3s ease;
}

/* --- 2. Reset / Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- 3. Typography --- */
h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

h2 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.gradient-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.inline-link {
    color: var(--accent-cyan);
    transition: opacity var(--transition);
}

.inline-link:hover {
    opacity: 0.8;
}

/* --- 4. Particles Background --- */
#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* --- 5. Navigation --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(11, 13, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.nav-logo {
    flex-shrink: 0;
}

.brand-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-primary);
}

.brand-re {
    color: var(--accent-cyan);
}

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

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

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

.nav-link.active {
    color: var(--accent-cyan);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition);
    border-radius: 1px;
}

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

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(11, 13, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 999;
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    gap: 0.25rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
}

.mobile-link {
    display: block;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color var(--transition);
}

.mobile-link:last-child {
    border-bottom: none;
}

.mobile-link.active {
    color: var(--accent-cyan);
}

/* --- 6. Page / Section System --- */
.page {
    display: none;
    padding: calc(var(--nav-height) + 3rem) 1.5rem 4rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.page.active {
    display: block;
    animation: fadeInUp 0.45s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    text-align: center;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* --- 7. Hero Section --- */
.hero {
    text-align: center;
    padding: 2rem 0 4rem;
}

.hero-logo {
    margin-bottom: 2rem;
    animation: logoFloat 6s ease-in-out infinite;
    display: inline-block;
    cursor: pointer;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo-main {
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.3));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    cursor: pointer;
}

.logo-main:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 50px rgba(0, 212, 255, 0.6)) drop-shadow(0 0 20px rgba(0, 102, 255, 0.4));
}

.hero-title {
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- 8. Glass Card Component --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
    border-color: rgba(0, 212, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.08);
}

/* Scroll animation (elements animate in) */
.glass-card {
    opacity: 0;
    transform: translateY(24px);
}

.glass-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.glass-card.animate-in:hover {
    transform: translateY(-3px);
}

/* --- 9. Features Grid (Home) --- */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

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

.feature-icon {
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.95rem;
}

/* --- 10. Projects Grid (Created) --- */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-badge.live {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-cyan);
}

.project-badge.meta {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-purple);
}

.project-badge.muted {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 212, 255, 0.08);
    color: var(--accent-cyan);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(0, 212, 255, 0.12);
}

.project-link {
    display: inline-block;
    color: var(--accent-cyan);
    font-weight: 500;
    font-size: 0.9rem;
    transition: gap var(--transition);
}

.project-link:hover {
    text-decoration: underline;
}

.orbi-title {
    display: flex;
    align-items: center;
}

.orbi-logo {
    display: block;
    flex-shrink: 0;
}

.project-card.coming-soon {
    border-style: dashed;
    opacity: 0.6;
}

.project-card.coming-soon:hover {
    transform: none;
    box-shadow: none;
}

/* --- 11. Services Grid (Consulting) --- */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.service-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-icon {
    margin-bottom: 0.5rem;
}

.service-card h3 {
    color: var(--text-primary);
}

.service-list {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.service-list li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-left: 1.25rem;
    position: relative;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    opacity: 0.6;
}

.client-section {
    text-align: center;
    padding: 2rem;
}

.client-section h3 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* --- 12. Team Grid (About) --- */
.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

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

.team-avatar {
    margin-bottom: 1rem;
}

.avatar-circle {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.25);
}

.team-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.team-role {
    color: var(--accent-cyan) !important;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.team-bio {
    font-size: 0.95rem;
    max-width: 380px;
    margin: 0 auto;
}

.team-email {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.company-about {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.company-about h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* --- 13. Contact --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.contact-info h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.contact-item svg {
    flex-shrink: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(11, 13, 23, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

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

.btn-submit {
    width: 100%;
    justify-content: center;
}

.btn-loading {
    display: none;
}

.form-status {
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.5em;
}

.form-status.success {
    color: #4ade80;
}

.form-status.error {
    color: #f87171;
}

/* --- 14. Footer --- */
#footer {
    border-top: 1px solid var(--glass-border);
    padding: 2rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- 16. Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    background: var(--gradient-primary);
    color: white;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* --- 17. Typewriter / Terminal Effect --- */
.typewriter-target {
    position: relative;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--accent-cyan);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.6s step-end infinite;
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.5);
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- 18. Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #tsparticles {
        display: none;
    }
}

/* --- 19. Responsive --- */

/* Tablet and up */
@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    .contact-container {
        grid-template-columns: 1fr 2fr;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    h1 {
        font-size: 4rem;
    }
}

/* Mobile - show hamburger, hide desktop nav */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    #navbar {
        padding: 0 1.25rem;
    }

    .page {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .page {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .glass-card {
        padding: 1.25rem;
    }

    .features-grid,
    .projects-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
}
