:root {
    --primary: #0F172A;
    --primary-light: #1E293B;
    --accent: #2DD4BF;
    --accent-dark: #14B8A6;
    --text: #334155;
    --text-light: #64748B;
    --bg: #F8FAFC;
    --white: #FFFFFF;
    --gradient-start: #0F172A;
    --gradient-end: #334155;

    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background-color: rgba(15, 23, 42, 0.05);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(90deg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    color: var(--text);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary);
    transition: 0.3s;
}

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

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

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-gradient-orb {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.2) 0%, rgba(15, 23, 42, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 8s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    background-color: #E2E8F0;
    border-radius: 50%;
}

.skeleton-line {
    height: 12px;
    width: 60%;
    background-color: #E2E8F0;
    border-radius: 6px;
}

.schedule-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.avatar {
    width: 32px;
    height: 32px;
    background-color: #E2E8F0;
    border-radius: 50%;
}

.bar {
    height: 24px;
    flex: 1;
    background-color: #F1F5F9;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 60%;
    background-color: var(--accent);
    opacity: 0.3;
    border-radius: 4px;
}

.success-badge {
    margin-top: 2rem;
    background-color: #ECFDF5;
    color: #059669;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background-color: var(--white);
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

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

.feature-card {
    padding: 2rem;
    border-radius: 1rem;
    background-color: var(--bg);
    transition: transform 0.2s;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(45, 212, 191, 0.3);
    background-color: #F0FDF4;
}

.icon-box {
    width: 48px;
    height: 48px;
    background-color: var(--primary);
    color: var(--accent);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-light);
}

/* How It Works - Animated Workflow */
.how-it-works {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}

.workflow-animation {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.animation-stage {
    position: relative;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.workflow-step {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.workflow-step.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.workflow-step.exiting {
    opacity: 0;
    transform: translateX(-100px);
}

.step-visual {
    width: 100%;
    display: flex;
    justify-content: center;
}

.animated-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    min-height: 320px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Step 1: Rules Card */
.rule-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    animation: slideInRule 0.5s ease forwards;
    opacity: 0;
}

.workflow-step.active .rule-item:nth-child(2) {
    animation-delay: 0.2s;
}

.workflow-step.active .rule-item:nth-child(3) {
    animation-delay: 0.4s;
}

.workflow-step.active .rule-item:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes slideInRule {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rule-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.rule-text {
    flex: 1;
    color: var(--text);
    font-weight: 500;
}

.rule-check {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.25rem;
}

/* Step 2: Preferences Card */
.staff-member {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    animation: popIn 0.4s ease forwards;
    opacity: 0;
}

.workflow-step.active .staff-member:nth-child(2) {
    animation-delay: 0.2s;
}

.workflow-step.active .staff-member:nth-child(3) {
    animation-delay: 0.4s;
}

.workflow-step.active .staff-member:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.staff-member .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.staff-member .avatar.small {
    width: 40px;
    height: 40px;
}

.staff-info {
    flex: 1;
}

.staff-name {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.preference-tag {
    font-size: 0.875rem;
    color: var(--text-light);
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    display: inline-block;
}

.status-icon {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.5rem;
}

/* Step 3: Algorithm Card */
.processing-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.brain-icon {
    font-size: 4rem;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.process-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
}

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

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

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    font-family: var(--font-heading);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg);
    border-radius: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
    width: 0%;
    animation: fillProgress 2s ease-in-out forwards;
}

.workflow-step.active .progress-fill {
    animation: fillProgress 2s ease-in-out forwards;
}

@keyframes fillProgress {
    to {
        width: 100%;
    }
}

.processing-text {
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
}

/* Step 4: Schedule Card */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.calendar-day {
    background: var(--bg);
    border-radius: 0.5rem;
    padding: 0.75rem;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.workflow-step.active .calendar-day:nth-child(1) {
    animation-delay: 0.2s;
}

.workflow-step.active .calendar-day:nth-child(2) {
    animation-delay: 0.4s;
}

.workflow-step.active .calendar-day:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.day-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-align: center;
}

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

.shift {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.shift.morning {
    background: rgba(45, 212, 191, 0.2);
    color: var(--accent-dark);
}

.shift.night {
    background: rgba(15, 23, 42, 0.1);
    color: var(--primary);
}

.publish-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: bounceIn 0.6s ease 0.8s forwards;
    opacity: 0;
}

.workflow-step.active .publish-btn {
    animation: bounceIn 0.6s ease 0.8s forwards;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.publish-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.publish-icon {
    font-size: 1.25rem;
}

/* Step 5: Swap Card */
.swap-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.swap-participant {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    animation: slideInSwap 0.5s ease forwards;
    opacity: 0;
}

.workflow-step.active .swap-participant:first-child {
    animation-delay: 0.2s;
}

.workflow-step.active .swap-participant:last-child {
    animation-delay: 0.5s;
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.swap-detail {
    flex: 1;
}

.detail-name {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
}

.detail-shift {
    font-size: 0.75rem;
    color: var(--text-light);
}

.swap-arrows {
    font-size: 2rem;
    color: var(--accent);
    animation: swapPulse 1.5s infinite ease-in-out;
}

@keyframes swapPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.swap-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.swap-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease 0.8s forwards;
    opacity: 0;
}

.workflow-step.active .swap-btn {
    animation: fadeIn 0.5s ease 0.8s forwards;
}

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

.swap-btn.approve {
    background: #ECFDF5;
    color: #059669;
}

.swap-btn.approve:hover {
    background: #D1FAE5;
    transform: translateY(-2px);
}

.swap-btn.reject {
    background: #FEF2F2;
    color: #DC2626;
}

.swap-btn.reject:hover {
    background: #FEE2E2;
    transform: translateY(-2px);
}

/* Step Labels */
.step-label {
    text-align: center;
    animation: fadeInLabel 0.6s ease 0.3s forwards;
    opacity: 0;
}

.workflow-step.active .step-label {
    animation: fadeInLabel 0.6s ease 0.3s forwards;
}

@keyframes fadeInLabel {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.step-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: #E2E8F0;
    line-height: 1;
    display: block;
    margin-bottom: 0.5rem;
}

.step-label h3 {
    font-size: 1.5rem;
    color: var(--primary);
}

/* Animation Controls */
.animation-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.control-btn {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--primary);
    position: relative;
}

.control-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.control-btn.play-pause {
    width: 56px;
    height: 56px;
    background: var(--accent);
    color: white;
}

.control-btn.play-pause:hover {
    background: var(--accent-dark);
}

.control-btn svg {
    flex-shrink: 0;
}

.control-btn .hidden {
    display: none;
}

.step-indicators {
    display: flex;
    gap: 0.75rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #E2E8F0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator:hover {
    background: rgba(45, 212, 191, 0.5);
    transform: scale(1.2);
}

.indicator.active {
    background: var(--accent);
    width: 32px;
    border-radius: 6px;
}

/* Footer */
.footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col .logo {
    color: var(--white);
    margin-bottom: 1rem;
    display: block;
}

.footer-col p {
    color: #94A3B8;
    max-width: 300px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-col a {
    display: block;
    color: #94A3B8;
    margin-bottom: 0.75rem;
}

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

.copyright {
    border-top: 1px solid #1E293B;
    padding-top: 2rem;
    text-align: center;
    color: #64748B;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .btn-secondary {
        margin-left: 0;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 2rem;
        flex-direction: column;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Workflow Animation Mobile */
    .animation-stage {
        min-height: 650px;
    }

    .animated-card {
        padding: 1.5rem;
        max-width: 100%;
    }

    .card-title {
        font-size: 1.125rem;
    }

    .step-num {
        font-size: 2.5rem;
    }

    .step-label h3 {
        font-size: 1.25rem;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .swap-visual {
        flex-direction: column;
    }

    .swap-arrows {
        transform: rotate(90deg);
    }

    .animation-controls {
        gap: 1rem;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }

    .control-btn.play-pause {
        width: 48px;
        height: 48px;
    }
}