@import "tailwindcss";
@import "../../vendor/livewire/flux/dist/flux.css";

@source '../views';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../vendor/livewire/flux-pro/stubs/**/*.blade.php';
@source '../../vendor/livewire/flux/stubs/**/*.blade.php';

@custom-variant dark (&:where(.dark, .dark *));

/* ================================================================
   KEYFRAMES — di luar @theme agar browser kenali
   ================================================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}
@keyframes fadeInUp {
    0%   { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes slideInLeft {
    0%   { opacity: 0; transform: translateX(-40px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    0%   { opacity: 0; transform: translateX(40px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* ================================================================
   THEME TOKENS
   ================================================================ */
@theme {
    --font-sans:
        "Instrument Sans", ui-sans-serif, system-ui, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
        "Noto Color Emoji";

    --font-display: "Playfair Display", ui-serif, Georgia, serif;
    --font-body:    "Inter", ui-sans-serif, system-ui, sans-serif;
    --font-arabic:  "Amiri", ui-serif, Georgia, serif;

    --color-zinc-50:  #fafafa;
    --color-zinc-100: #f5f5f5;
    --color-zinc-200: #e5e5e5;
    --color-zinc-300: #d4d4d4;
    --color-zinc-400: #a3a3a3;
    --color-zinc-500: #737373;
    --color-zinc-600: #525252;
    --color-zinc-700: #404040;
    --color-zinc-800: #262626;
    --color-zinc-900: #171717;
    --color-zinc-950: #0a0a0a;

    --color-accent:            var(--color-neutral-800);
    --color-accent-content:    var(--color-neutral-800);
    --color-accent-foreground: var(--color-white);

    --color-brand: #63e073;

    --color-primary-50:  #f0fdf4;
    --color-primary-100: #dcfce7;
    --color-primary-200: #bbf7d0;
    --color-primary-300: #86efac;
    --color-primary-400: #63e073;
    --color-primary-500: #4ade80;
    --color-primary-600: #16a34a;
    --color-primary-700: #15803d;
    --color-primary-800: #166534;
    --color-primary-900: #14532d;

    /* Daftarkan animation ke Tailwind v4 — ini yang membuat class animate-* tersedia */
    --animate-float:          float 6s ease-in-out infinite;
    --animate-fade-in-up:     fadeInUp 0.7s ease-out forwards;
    --animate-fade-in:        fadeIn 0.7s ease-out forwards;
    --animate-slide-in-left:  slideInLeft 0.7s ease-out forwards;
    --animate-slide-in-right: slideInRight 0.7s ease-out forwards;
}

/* ================================================================
   DARK MODE TOKEN OVERRIDES
   ================================================================ */
@layer theme {
    .dark {
        --color-accent:            var(--color-white);
        --color-accent-content:    var(--color-white);
        --color-accent-foreground: var(--color-neutral-800);
    }
}

/* ================================================================
   BASE
   ================================================================ */
@layer base {
    *,
    ::after,
    ::before,
    ::backdrop,
    ::file-selector-button {
        border-color: var(--color-gray-200, currentColor);
    }

    html { scroll-behavior: smooth; }

    body {
        font-family: var(--font-body);
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    ::-webkit-scrollbar       { width: 6px; }
    ::-webkit-scrollbar-track { background: #0d1f0e; }
    ::-webkit-scrollbar-thumb { background: #63e073; border-radius: 9999px; }
}

/* ================================================================
   FLUX FORM OVERRIDES
   ================================================================ */
[data-flux-field]:not(ui-radio, ui-checkbox) {
    @apply grid gap-2;
}
[data-flux-label] {
    @apply !mb-0 !leading-tight;
}
input:focus[data-flux-control],
textarea:focus[data-flux-control],
select:focus[data-flux-control] {
    @apply outline-hidden ring-2 ring-accent ring-offset-2 ring-offset-accent-foreground;
}

/* ================================================================
   UTILITIES — AR RUHAMA' WELCOME PAGE
   ================================================================ */
@layer utilities {

    /* Scroll Reveal */
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition:
            opacity   0.7s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.reveal-left  { transform: translateX(-40px); }
    .reveal.reveal-right { transform: translateX(40px); }
    .reveal.revealed     { opacity: 1; transform: translate(0, 0); }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }

    /* Hero Gradient */
    .hero-gradient {
        background: linear-gradient(135deg,
            #0d1f0e 0%, #1a2e1c 40%, #1f3d21 70%, #0d1f0e 100%);
    }
    .dark .hero-gradient {
        background: linear-gradient(135deg,
            #050d06 0%, #0d1a0e 40%, #122015 70%, #050d06 100%);
    }

    /* Navbar Glass */
    .navbar-glass {
        backdrop-filter: blur(16px) saturate(180%);
        -webkit-backdrop-filter: blur(16px) saturate(180%);
        background: rgba(13, 31, 14, 0.85);
        border-bottom: 1px solid rgba(99, 224, 115, 0.12);
    }
    .dark .navbar-glass { background: rgba(5, 13, 6, 0.92); }

    /* Card Hover */
    .card-hover {
        transition:
            transform  0.3s cubic-bezier(0.22, 1, 0.36, 1),
            box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .card-hover:hover {
        transform:  translateY(-6px);
        box-shadow: 0 20px 48px rgba(99, 224, 115, 0.15);
    }

    /* Stat Gradient Text */
    .stat-number {
        font-family: var(--font-display);
        font-weight: 900;
        background: linear-gradient(135deg, #63e073, #4ade80);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    /* Section Divider */
    .divider-brand {
        width: 56px;
        height: 3px;
        background: linear-gradient(90deg, #63e073, #4ade80);
        border-radius: 9999px;
    }

    /* Arabic Quote */
    .arabic-quote {
        font-family: var(--font-arabic);
        direction: rtl;
        text-align: center;
        line-height: 1.8;
    }

    /* Geo Pattern BG */
    .geo-pattern {
        background-image:
            radial-gradient(circle at 20% 50%, rgba(99, 224, 115, 0.04) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(99, 224, 115, 0.06) 0%, transparent 40%),
            radial-gradient(circle at 60% 80%, rgba(99, 224, 115, 0.04) 0%, transparent 40%);
    }

    /* Ornament Glow */
    .ornament-glow {
        filter: drop-shadow(0 0 20px rgba(99, 224, 115, 0.35));
    }

    /* Jenjang Cards */
    .jenjang-ra  { background: linear-gradient(135deg, #1a3d1c, #2d5c30); }
    .jenjang-mi  { background: linear-gradient(135deg, #1c3a2f, #2d5c4a); }
    .jenjang-mts { background: linear-gradient(135deg, #1a2e3d, #2d4a5c); }

    /* Section BG — Light */
    .section-light { background-color: #ffffff; }
    .section-alt   { background-color: #f0fdf4; }

    .card-light {
        background-color: #ffffff;
        border: 1px solid #dcfce7;
        box-shadow: 0 4px 24px rgba(99, 224, 115, 0.08);
    }

    .text-muted-custom   { color: #4b6b50; }
    .text-heading-custom { color: #1a2e1c; }

    /* Section BG — Dark */
    .dark .section-light { background-color: #111f12; }
    .dark .section-alt   { background-color: #0d1a0e; }

    .dark .card-light {
        background-color: #1a2e1c;
        border: 1px solid rgba(99, 224, 115, 0.12);
        box-shadow: none;
    }

    .dark .text-muted-custom   { color: #86a88a; }
    .dark .text-heading-custom { color: #e8f5e9; }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}
@keyframes pulse-ring {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.6;
    }
}

@keyframes pulse-ring-inner {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.5;
    }
}

.animate-pulse-ring {
    animation: pulse-ring 4s ease-in-out infinite;
}

.animate-pulse-ring-inner {
    animation: pulse-ring-inner 4s ease-in-out infinite;
}
