@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Premium Tech Startup Palette */
    --primary: #0a0a0b;
    --primary-soft: #141418;
    --surface: #18181b;
    --surface-elevated: #27272a;
    
    --accent: #00d4aa;
    --accent-glow: rgba(0, 212, 170, 0.4);
    --accent-subtle: rgba(0, 212, 170, 0.1);
    --accent-secondary: #0ea5e9;
    
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    
    --bg-gradient: linear-gradient(135deg, #0a0a0b 0%, #141418 50%, #1a1a1f 100%);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow-glow: 0 0 60px rgba(0, 212, 170, 0.15);
    --shadow-card: 0 4px 24px -4px rgba(0, 0, 0, 0.5);
    --shadow-elevated: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body.template-safehandmedi-landing {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', system-ui, sans-serif;
    color: var(--text-primary);
    background: var(--primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Animated Background Noise Texture */
body.template-safehandmedi-landing::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.shm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 1;
}

/* Typography */
h1, h2, h3, h4 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

/* Animated gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--accent) 50%, var(--accent-secondary) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Buttons */
.shm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: var(--primary);
    padding: 14px 32px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.shm-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.shm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px var(--accent-glow), 0 10px 30px -10px var(--accent-glow);
}

.shm-btn:hover::before {
    transform: translateX(100%);
}

.shm-btn.outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    box-shadow: none;
}

.shm-btn.outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

/* Arrow animation for buttons */
.shm-btn .arrow {
    transition: transform 0.3s ease;
}

.shm-btn:hover .arrow {
    transform: translateX(4px);
}

/* ==================== HERO SECTION ==================== */
.shm-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

/* Animated gradient orbs */
.shm-hero::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    top: -200px;
    right: -200px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(80px);
    animation: float 20s ease-in-out infinite;
    z-index: 0;
}

.shm-hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    bottom: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3) 0%, transparent 70%);
    filter: blur(80px);
    animation: float 25s ease-in-out infinite reverse;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* Grid pattern overlay */
.shm-hero .grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
    z-index: 0;
}

.shm-hero .shm-container {
    text-align: center;
    z-index: 2;
}

/* Badge/Label */
.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent-subtle);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.hero-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.shm-hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    margin-bottom: 28px;
    line-height: 1.05;
    animation: fadeInUp 0.8s ease 0.1s forwards;
    opacity: 0;
}

.shm-hero .tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 400;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.shm-hero .hero-actions {
    margin-top: 48px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.shm-hero .location-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    padding: 10px 20px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    color: var(--text-muted);
    margin-top: 56px;
    border: 1px solid var(--border-subtle);
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.location-badge svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== SECTIONS ==================== */
.shm-section {
    padding: 140px 0;
    position: relative;
}

.shm-section.bg-dark {
    background: var(--surface);
}

.shm-section.bg-gradient {
    background: linear-gradient(180deg, var(--primary) 0%, var(--surface) 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.shm-section h2 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    color: var(--text-primary);
    margin-bottom: 20px;
}

.shm-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ==================== INTRO SECTION ==================== */
.intro-section {
    background: var(--surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.intro-text {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.intro-text p {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0 0 28px;
    font-weight: 400;
}

.intro-text p:last-child {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.intro-text p strong {
    color: var(--accent);
    font-weight: 600;
}

/* ==================== CARDS GRID ==================== */
.shm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.shm-card {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.shm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.shm-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-elevated);
}

.shm-card:hover::before {
    opacity: 1;
}

.shm-card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-subtle), transparent);
    border: 1px solid rgba(0, 212, 170, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    font-size: 26px;
    transition: all 0.3s ease;
}

.shm-card:hover .shm-card-icon {
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--accent-glow);
}

.shm-card h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 14px;
    font-weight: 600;
}

.shm-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.7;
}

/* Number-based cards for "Who We Work With" */
.shm-card.numbered {
    counter-increment: card-counter;
    padding-top: 60px;
}

.shm-card.numbered::after {
    content: counter(card-counter, decimal-leading-zero);
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: 'Outfit', monospace;
}

/* ==================== MISSION BOX ==================== */
.mission-section {
    position: relative;
    overflow: hidden;
}

.mission-box {
    background: linear-gradient(135deg, var(--surface) 0%, var(--primary-soft) 100%);
    border: 1px solid var(--border-subtle);
    padding: 80px 60px;
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mission-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--accent-subtle), transparent 60%);
    pointer-events: none;
}

.mission-box p {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto 24px;
    position: relative;
    z-index: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.mission-box .mission-cta {
    font-size: 1.1rem;
    margin-top: 32px;
    color: var(--accent);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ==================== APPROACH SECTION ==================== */
.approach-section {
    background: var(--surface);
}

.approach-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
    counter-reset: approach-counter;
}

.approach-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 32px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    counter-increment: approach-counter;
    position: relative;
}

.approach-item:hover {
    border-color: var(--accent);
    transform: translateX(8px);
}

.approach-item-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--accent-subtle);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}

.approach-item h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-weight: 600;
}

.approach-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==================== FOOTER ==================== */
.shm-footer {
    background: var(--primary);
    border-top: 1px solid var(--border-subtle);
    padding: 120px 0 60px;
    position: relative;
}

.shm-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-subtle), transparent 70%);
    filter: blur(100px);
    pointer-events: none;
}

.shm-footer-cta {
    text-align: center;
    margin-bottom: 100px;
    position: relative;
    z-index: 1;
}

.shm-footer-cta h3 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 32px;
    color: var(--text-primary);
    font-weight: 700;
}

.shm-footer-cta p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.shm-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 60px;
    position: relative;
    z-index: 1;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col .brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col .brand-logo {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--primary);
    font-weight: 800;
}

.footer-col .company-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.footer-col strong {
    display: block;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.footer-col a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.footer-col a svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: var(--accent);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .shm-container {
        padding: 0 24px;
    }
    
    .shm-section {
        padding: 100px 0;
    }
}

@media (max-width: 768px) {
    .shm-hero {
        min-height: auto;
        padding: 100px 0 80px;
    }
    
    .shm-hero h1 {
        font-size: 2.8rem;
    }
    
    .shm-hero .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .shm-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .shm-grid {
        grid-template-columns: 1fr;
    }
    
    .shm-footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .mission-box {
        padding: 50px 30px;
    }
    
    .approach-item {
        flex-direction: column;
        gap: 16px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ==================== SCROLL ANIMATIONS ==================== */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .shm-card {
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .shm-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .shm-card:nth-child(1) { transition-delay: 0s; }
    .shm-card:nth-child(2) { transition-delay: 0.1s; }
    .shm-card:nth-child(3) { transition-delay: 0.2s; }
    .shm-card:nth-child(4) { transition-delay: 0.3s; }
}

/* Selection color */
::selection {
    background: var(--accent);
    color: var(--primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
