/* ============================================
   Simple Attendance — Shared Stylesheet
   ============================================ */

:root {
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0f1c;
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

/* Animated background with gradient orbs */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.18) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(20, 184, 166, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #0a0f1c 0%, #0f172a 50%, #0a0f1c 100%);
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    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;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Floating orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    z-index: -1;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4), transparent);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.35), transparent);
    bottom: -80px;
    right: -80px;
    animation-delay: -10s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2), transparent);
    top: 40%;
    right: 30%;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* Glass surfaces */
.glass {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(30, 41, 59, 0.65);
    box-shadow: 0 20px 40px -12px rgba(16, 185, 129, 0.15);
}

.glass-card-static {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.03);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    position: relative;
    overflow: hidden;
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
    position: relative;
    z-index: 1;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #d1fae5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .logo-text { font-size: 1.1rem; }
    .logo-icon { width: 34px; height: 34px; }
    .logo-icon svg { width: 20px; height: 20px; }
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
    color: white;
    font-weight: 600;
    border-radius: 0.875rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px -8px rgba(16, 185, 129, 0.5);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, #059669 0%, #0f766e 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary > * {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -8px rgba(16, 185, 129, 0.6);
}

.btn-primary:hover::before {
    opacity: 1;
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-weight: 600;
    border-radius: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Section headings */
.section-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, #d1fae5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6ee7b7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    background: linear-gradient(135deg, #ffffff 0%, #a7f3d0 50%, #5eead4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rotating-text {
    display: grid;
    grid-template-areas: "stack";
    place-items: center;
    margin-top: 0.15em;
    min-height: 1.15em;
}

.rotating-word {
    grid-area: stack;
    opacity: 0;
    transform: translateY(10px);
    filter: blur(6px);
    transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
    pointer-events: none;
    background: linear-gradient(135deg, #ffffff 0%, #a7f3d0 50%, #5eead4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rotating-word.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .rotating-word {
        transition: opacity 0.2s ease;
        transform: none;
        filter: none;
    }
    .rotating-word.active {
        transform: none;
    }
}

/* Feature icon container */
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(20, 184, 166, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin-bottom: 1.25rem;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-card:hover .feature-icon {
    transform: scale(1.1) rotate(-3deg);
}

.glass-card:hover .feature-icon::before {
    opacity: 1;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: #6ee7b7;
    position: relative;
    z-index: 1;
}

/* Image Slider */
.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out, transform 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.98);
}

.slider-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    position: relative;
    width: 100%;
    transform: scale(1);
}

.slider-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 1.25rem;
    display: block;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-arrow:hover {
    background: linear-gradient(135deg, #10b981, #0d9488);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.slider-arrow.prev { left: 1rem; }
.slider-arrow.next { right: 1rem; }

.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.slider-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.slider-indicator.active {
    background: linear-gradient(90deg, #10b981, #14b8a6);
    width: 32px;
    border-radius: 6px;
}

@media (max-width: 640px) {
    .slider-arrow { width: 40px; height: 40px; }
    .slider-arrow.prev { left: 0.5rem; }
    .slider-arrow.next { right: 0.5rem; }
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

/* Step number for "How it works" sections */
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #0d9488);
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    margin-bottom: 1rem;
}

/* Stats counter card */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #6ee7b7, #5eead4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Marquee / logo strip */
.marquee {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 3rem;
    animation: marqueeScroll 30s linear infinite;
    width: max-content;
}

@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* FAQ accordion */
.faq-item {
    overflow: hidden;
}

.faq-question {
    cursor: pointer;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.faq-icon svg {
    width: 14px;
    height: 14px;
    color: #6ee7b7;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    background: rgba(16, 185, 129, 0.3);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    margin-top: 0.875rem;
}

/* Pulsing dot */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Dropdown menu */
.has-dropdown { position: relative; }

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 280px;
    background: #0f172a;
    background-image: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(20, 184, 166, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.2);
    z-index: 60;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.625rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(16, 185, 129, 0.1);
    color: white;
}

.dropdown-item-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(20, 184, 166, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-item-icon svg {
    width: 18px;
    height: 18px;
    color: #6ee7b7;
}

.dropdown-item-title {
    font-weight: 600;
    color: white;
    font-size: 0.875rem;
}

.dropdown-item-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.125rem;
}

/* Mobile feature menu */
.mobile-feature-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.mobile-feature-link:hover {
    background: rgba(16, 185, 129, 0.1);
}

/* Step list (process) */
.process-line {
    position: relative;
}

@media (min-width: 768px) {
    .process-line::before {
        content: '';
        position: absolute;
        top: 22px;
        left: 8%;
        right: 8%;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), rgba(16, 185, 129, 0.4), transparent);
        z-index: 0;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #10b981, #0d9488);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #059669, #0f766e);
}

/* Selection */
::selection {
    background: rgba(16, 185, 129, 0.4);
    color: white;
}

/* Utility classes */
.text-emerald-gradient {
    background: linear-gradient(135deg, #6ee7b7, #5eead4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-grid-overlay {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Floating CTA card */
.cta-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(20, 184, 166, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.25), transparent 50%);
    pointer-events: none;
}

/* Animated check list */
.check-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.check-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #0d9488);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.check-icon svg {
    width: 12px;
    height: 12px;
    color: white;
    stroke-width: 3;
}

/* Responsive helpers */
@media (max-width: 768px) {
    .orb-1, .orb-2, .orb-3 {
        opacity: 0.3;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
