/* ===================================
   CSS Variables
   =================================== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #60a5fa;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-light: #6b7280;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --bg-light: #f3f4f6;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Space Grotesk', var(--font-primary);
    
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s ease;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-name {
    color: var(--primary-color);
}

.brand-suffix {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-base);
    position: relative;
}

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

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

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

.nav-link-cta {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta:hover {
    background: var(--primary-dark);
    color: white;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-svg {
    width: 100%;
    height: 100%;
}

.hero-line {
    animation: flowLine 8s ease-in-out infinite;
}

.hero-line-1 {
    animation-delay: 0s;
}

.hero-line-2 {
    animation-delay: 0.5s;
}

.hero-line-3 {
    animation-delay: 1s;
}

@keyframes flowLine {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px);
        opacity: 0.6;
    }
}

.hero-circle {
    animation: float 6s ease-in-out infinite;
}

.hero-circle-1 {
    animation-delay: 0s;
}

.hero-circle-2 {
    animation-delay: 1s;
}

.hero-circle-3 {
    animation-delay: 2s;
}

.hero-circle-4 {
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(10px, -10px);
    }
    50% {
        transform: translate(-5px, -20px);
    }
    75% {
        transform: translate(-10px, -10px);
    }
}

.hero-polygon {
    animation: rotate 20s linear infinite;
    transform-origin: center;
}

.hero-polygon-2 {
    animation: rotate 25s linear infinite reverse;
    transform-origin: center;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.title-line {
    display: block;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.title-line:nth-child(2) {
    animation-delay: 0.4s;
}

.title-line:nth-child(3) {
    animation-delay: 0.6s;
}

.title-highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

.scroll-dot {
    animation: scrollBounce 2s ease-in-out infinite;
}

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

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
    font-family: var(--font-primary);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* ===================================
   Section Styles
   =================================== */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   Services Section
   =================================== */
.services {
    background: var(--bg-gray);
}

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

.service-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    opacity: 0;
    transform: translateY(30px);
}

.service-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

.service-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-10px);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card:hover .icon-rect,
.service-card:hover .icon-cloud,
.service-card:hover .icon-circle,
.service-card:hover .icon-polygon {
    animation: iconPulse 0.6s ease;
}

.service-card:hover .icon-line {
    animation: drawLine 0.8s ease;
}

.service-card:hover .icon-dot {
    animation: dotPulse 0.6s ease;
}

.service-card:hover .icon-path {
    animation: drawLine 1s ease;
}

.service-card:hover .icon-check {
    animation: drawLine 1.2s ease;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes drawLine {
    from {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dasharray: 1000;
        stroke-dashoffset: 0;
    }
}

@keyframes dotPulse {
    0%, 100% {
        r: 3;
        opacity: 1;
    }
    50% {
        r: 5;
        opacity: 0.7;
    }
}

.service-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===================================
   Why Us Section
   =================================== */
.why-us {
    background: white;
    position: relative;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.why-card {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
}

.why-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.why-card:nth-child(1) { animation-delay: 0.1s; }
.why-card:nth-child(2) { animation-delay: 0.3s; }
.why-card:nth-child(3) { animation-delay: 0.5s; }

.why-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: var(--bg-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.why-icon svg {
    width: 50px;
    height: 50px;
}

.why-card:hover .why-icon {
    background: var(--primary-color);
    transform: scale(1.1);
}

.why-card:hover .why-path,
.why-card:hover .why-circle,
.why-card:hover .why-polygon {
    stroke: white;
    animation: drawLine 1s ease;
}

.why-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.why-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

.decorative-lines {
    margin-top: 4rem;
    opacity: 0.5;
}

.decorative-lines svg {
    width: 100%;
    height: auto;
}

.deco-line {
    animation: flowLine 10s ease-in-out infinite;
}

.deco-dot {
    animation: float 5s ease-in-out infinite;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    background: var(--bg-gray);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-base);
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.btn-submit {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-submit.loading .btn-text {
    opacity: 0;
}

.btn-submit.loading .btn-loader {
    opacity: 1;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    display: none;
    font-weight: 500;
}

.form-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.form-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.contact-visual svg {
    width: 100%;
    height: auto;
}

.contact-envelope {
    animation: iconPulse 3s ease-in-out infinite;
}

.contact-flap {
    animation: drawLine 2s ease-in-out infinite;
}

.contact-dot {
    animation: float 4s ease-in-out infinite;
}

.contact-dot:nth-child(2) {
    animation-delay: 1s;
}

.contact-dot:nth-child(3) {
    animation-delay: 2s;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 968px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-visual {
        order: -1;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition-base);
        align-items: flex-start;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .why-us-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
