/* ========================================
   Artificial Automation - Main Stylesheet
   Professional Dark Theme
   ======================================== */

/* CSS Variables */
:root {
    /* Colors - Professional Dark Theme */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #1a1a24;
    --bg-card: #13131a;
    
    /* Accent - Teal (professional, not AI cliché) */
    --accent-primary: #0d9488;
    --accent-secondary: #14b8a6;
    --accent-muted: #0d948820;
    
    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Borders */
    --border-subtle: #1e293b;
    --border-accent: #0d948840;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --container-max: 1200px;
    --container-padding: 1.5rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ========================================
   Entrance Animations
   ======================================== */

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes gridScan {
    0% {
        background-position: 0 -100%;
    }
    100% {
        background-position: 0 100%;
    }
}

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

/* Animation Classes */
.animate-on-load {
    opacity: 0;
    animation-fill-mode: forwards;
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-down {
    animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.scale-in {
    animation: scaleIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* Typing cursor effect for hero label */
.hero-label {
    position: relative;
    display: inline-block;
}

.hero-label::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 1em;
    background: var(--accent-primary);
    animation: blink 1s step-end infinite;
    animation-delay: 1.5s;
    opacity: 0;
}

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

/* Scroll reveal animation base */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Grid overlay animation */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(13, 148, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 148, 136, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridScan 3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: transparent;
    transition: background var(--transition-base), 
                backdrop-filter var(--transition-base),
                box-shadow var(--transition-base);
}

.nav.scrolled {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border-subtle);
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.logo-bracket {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 500;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.3);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-primary:hover::after {
    left: 100%;
}

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

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.1);
}

.btn-full {
    width: 100%;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.hero-content {
    max-width: 720px;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

/* Character animation for artimasi */
.hero-title {
    font-size: clamp(5.2rem, 15.6vw, 10.4rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: charReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title .char:nth-child(1) { animation-delay: 0.1s; }
.hero-title .char:nth-child(2) { animation-delay: 0.2s; }
.hero-title .char:nth-child(3) { animation-delay: 0.3s; }
.hero-title .char:nth-child(4) { animation-delay: 0.4s; }
.hero-title .char:nth-child(5) { animation-delay: 0.5s; }
.hero-title .char:nth-child(6) { animation-delay: 0.6s; }
.hero-title .char:nth-child(7) { animation-delay: 0.7s; }
.hero-title .char:nth-child(8) { animation-delay: 0.8s; }

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 2.5rem;
}

.hero-subtitle-large {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 3rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent-primary);
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ========================================
   About Section
   ======================================== */
.about {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: start;
}

.about-text {
    max-width: 600px;
}

.about-lead {
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.about-text p:not(.about-lead) {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   Products Section
   ======================================== */
.products {
    padding: 8rem 0;
}

.product-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    padding: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 2rem;
    transition: border-color var(--transition-base), transform var(--transition-base);
}

.product-card:hover {
    border-color: var(--border-accent);
}

.product-card-alt {
    background: var(--bg-secondary);
}

.product-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.product-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--bg-tertiary);
}

.product-icon svg {
    width: 48px;
    height: 48px;
}

.product-icon-health {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.product-icon-business {
    color: var(--accent-primary);
    background: var(--accent-muted);
}

.product-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.badge {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 4px;
    white-space: nowrap;
}

.product-content {
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.product-tagline {
    font-size: 1.125rem;
    color: var(--accent-primary);
    margin-bottom: 1.25rem;
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.product-features {
    list-style: none;
    margin-bottom: 2rem;
}

.product-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.product-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.product-actions {
    margin-top: auto;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    transition: border-color var(--transition-fast);
}

.contact-method:hover {
    border-color: var(--accent-primary);
}

.contact-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-muted);
    border-radius: 8px;
    color: var(--accent-primary);
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

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

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 4rem 0 2rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    color: var(--text-muted);
    max-width: 300px;
}

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

.footer-col h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-stats {
        flex-direction: row;
        justify-content: space-around;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .product-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .product-visual {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .product-badges {
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right var(--transition-base);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1.25rem;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .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(5px, -5px);
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .about-stats {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        gap: 2rem;
    }
    
    .product-features li {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .product-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
