/**
 * CARRI ID - Regional Digital Identity Styles
 * Separated for security and maintainability
 */

/* Base body styling */
.carri-body {
    font-family: 'Inter', sans-serif;
    background-color: #030712; /* gray-950 */
    background-image: 
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(20, 184, 166, 0.1) 0px, transparent 50%);
}

/* Smooth fade in animations */
.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

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

/* Holographic Card Effect */
.id-card {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

.id-card:hover {
    transform: rotateY(10deg) rotateX(5deg) scale(1.02);
}

/* Shimmer effect for holographic feel */
.shimmer {
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.1) 45%, transparent 60%);
    background-size: 200% 100%;
    animation: shimmer 5s infinite linear;
}

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

/* Scan line animation for ID card */
@keyframes scan {
    0%, 100% { top: 0; }
    50% { top: 100%; }
}

/* Custom Checkbox styling */
.custom-checkbox:checked + div {
    background-color: #0d9488; /* teal-600 */
    border-color: #0d9488;
}

.custom-checkbox:checked + div svg {
    display: block;
}

/* Globe rotation animation for decorative elements */
@keyframes orbit {
    0% { transform: rotate(0deg) translateX(10px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(10px) rotate(-360deg); }
}

.orbit-dot {
    animation: orbit 10s linear infinite;
}

/* Navigation styling */
.carri-nav {
    position: fixed;
    width: 100%;
    z-index: 50;
    top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.carri-nav-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo styling */
.carri-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.carri-logo-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: linear-gradient(to top right, #14b8a6, #0284c7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(20, 78, 82, 0.2);
    transition: all 0.3s ease;
}

.carri-logo:hover .carri-logo-icon {
    box-shadow: 0 10px 15px -3px rgba(20, 184, 166, 0.3);
}

.carri-logo-text {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.05em;
    color: white;
}

/* Navigation links */
.carri-nav-links {
    display: none;
}

@media (min-width: 768px) {
    .carri-nav-links {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
}

.carri-nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    transition: color 0.2s ease;
    text-decoration: none;
}

.carri-nav-link:hover {
    color: white;
}

/* CTA Button */
.carri-cta-btn {
    background-color: white;
    color: black;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.carri-cta-btn:hover {
    background-color: #e2e8f0;
}

/* Primary action button (teal) */
.carri-primary-btn {
    height: 3rem;
    padding: 0 2rem;
    border-radius: 9999px;
    background-color: #0d9488;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carri-primary-btn:hover {
    background-color: #14b8a6;
}

/* Secondary button */
.carri-secondary-btn {
    height: 3rem;
    padding: 0 2rem;
    border-radius: 9999px;
    border: 1px solid #334155;
    color: #cbd5e1;
    background-color: rgba(15, 23, 42, 0.5);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carri-secondary-btn:hover {
    border-color: #64748b;
    color: white;
}

/* Hero section */
.carri-hero {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 6rem;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .carri-hero {
        padding-top: 12rem;
        padding-bottom: 8rem;
    }
}

.carri-hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 600px;
    background-color: rgba(13, 148, 136, 0.1);
    filter: blur(120px);
    border-radius: 9999px;
    pointer-events: none;
}

/* Status badge */
.carri-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(20, 184, 166, 0.2);
    background-color: rgba(20, 184, 166, 0.05);
    color: #2dd4bf;
    font-size: 0.75rem;
    font-weight: 500;
}

.carri-status-dot {
    position: relative;
    display: flex;
    height: 0.5rem;
    width: 0.5rem;
}

.carri-status-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
    position: absolute;
    display: inline-flex;
    height: 100%;
    width: 100%;
    border-radius: 9999px;
    background-color: #2dd4bf;
    opacity: 0.75;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.carri-status-core {
    position: relative;
    display: inline-flex;
    border-radius: 9999px;
    height: 0.5rem;
    width: 0.5rem;
    background-color: #14b8a6;
}

/* Feature cards */
.carri-feature-card {
    padding: 2rem;
    border-radius: 1.5rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.carri-feature-card:hover {
    border-color: rgba(20, 184, 166, 0.3);
    background-color: rgba(255, 255, 255, 0.04);
}

.carri-feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease;
}

.carri-feature-card:hover .carri-feature-icon {
    transform: scale(1.1);
}

.carri-feature-icon-teal {
    background-color: rgba(20, 184, 166, 0.1);
    color: #2dd4bf;
}

.carri-feature-icon-sky {
    background-color: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

.carri-feature-icon-indigo {
    background-color: rgba(129, 140, 248, 0.1);
    color: #818cf8;
}

/* Code block styling */
.carri-code-block {
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.carri-code-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(255, 255, 255, 0.05);
}

.carri-code-dots {
    display: flex;
    gap: 0.375rem;
}

.carri-code-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
}

.carri-code-dot-red { background-color: rgba(239, 68, 68, 0.5); }
.carri-code-dot-yellow { background-color: rgba(234, 179, 8, 0.5); }
.carri-code-dot-green { background-color: rgba(34, 197, 94, 0.5); }

.carri-code-filename {
    font-size: 0.625rem;
    color: #64748b;
    font-family: monospace;
    margin-left: 0.5rem;
}

.carri-code-content {
    padding: 1.5rem;
    font-family: monospace;
    font-size: 0.75rem;
    line-height: 1.75;
    color: #cbd5e1;
    overflow-x: auto;
}

/* Footer */
.carri-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: black;
    padding: 3rem 0;
}

.carri-footer-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .carri-footer-container {
        flex-direction: row;
    }
}

.carri-footer-links {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.carri-footer-link {
    text-decoration: none;
    color: #64748b;
    transition: color 0.2s ease;
}

.carri-footer-link:hover {
    color: white;
}

/* Form elements */
.carri-input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.carri-input::placeholder {
    color: #64748b;
}

.carri-input:focus {
    outline: none;
    border-color: rgba(20, 184, 166, 0.5);
    box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.5);
}

/* Utility classes */
.carri-gradient-text {
    background: linear-gradient(to right, #2dd4bf, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.carri-section-dark {
    background-color: #020617;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Content Security Policy safe styles - no inline event handlers */
.carri-interactive {
    cursor: pointer;
    user-select: none;
}

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

/* Focus states for accessibility */
.carri-focus-ring:focus {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

.carri-focus-ring:focus:not(:focus-visible) {
    outline: none;
}

.carri-focus-ring:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}
