/**
 * Orbit Code Lab — Custom Styles
 * Tema: Merah Maroon Light Mode
 */

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --brand: #7B2D26;
    --brand-light: #A0413A;
    --brand-dark: #5C2019;
    --brand-50: #fef2f0;
    --brand-100: #fde3df;
    --brand-200: #fcc7bf;
    --brand-400: #f47058;
    --brand-600: #d63520;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   GLOBAL
   ============================================ */
::selection {
    background: rgba(123, 45, 38, 0.15);
    color: #5C2019;
}

html {
    scroll-behavior: smooth;
}

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

/* ============================================
   NAVBAR
   ============================================ */
    ============================================ */

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    position: relative;
    transition: color 0.3s ease;
    background: transparent;
    z-index: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border: 1px solid var(--brand);
    border-radius: 9999px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand);
    background: transparent;
}

.nav-link:hover::after,
.nav-link.active::after {
    opacity: 1;
    transform: scale(1);
}

.mobile-nav-link {
    display: block;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    border-radius: 0.75rem;
    transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--brand-50);
    color: var(--brand);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: var(--brand);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0.875rem;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(123, 45, 38, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: 0.5s;
}

.btn-primary:hover {
    background: var(--brand-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 45, 38, 0.35);
}

.btn-primary:hover::before {
    left: 100%;
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: white;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--brand-200);
    border-radius: 0.875rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--brand-50);
    border-color: var(--brand);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
    border-radius: 0.625rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: white;
    border-radius: 1.25rem;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.module-card {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    border-bottom: 6px solid #d1d5db;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.module-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-bottom-color: var(--card-accent, var(--brand));
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 999px;
    text-transform: uppercase;
}

.badge-free {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.badge-paid {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.badge-coming {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section-padding {
    padding: 5rem 0;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.2;
}

/* Make entire body use the hero gradient for a pageless feel */
body {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 40%, #ffffff 60%, #f1f5f9 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

.section-subtitle {
    font-size: 1.05rem;
    color: #6b7280;
    max-width: 600px;
    line-height: 1.7;
}

/* Hero gradient background (kept for blobs) */
.hero-bg {
    background: transparent;
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(123, 45, 38, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
    border-radius: 50%;
}

/* Alternating sections */
.section-alt {
    background: transparent; /* Changed to transparent for pageless feel */
}

.section-brand {
    background: linear-gradient(135deg, #7B2D26, #A0413A);
    color: white;
}

.section-brand .section-title {
    color: white;
}

/* ============================================
   ORNAMENTS
   ============================================ */
.ornament {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.ornament-planet {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-200), var(--brand-100));
    box-shadow: inset -8px -8px 20px rgba(0,0,0,0.1), 0 0 30px rgba(123, 45, 38, 0.1);
}

.ornament-planet::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -20%;
    width: 140%;
    height: 20%;
    border: 2px solid rgba(123, 45, 38, 0.15);
    border-radius: 50%;
    transform: rotate(-20deg);
}

.ornament-star {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid var(--brand-200);
    position: relative;
}

.ornament-star::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 20px solid var(--brand-200);
    position: absolute;
    top: 6px;
    left: -10px;
}

.ornament-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-200);
    opacity: 0.6;
}

.ornament-ring {
    width: 40px;
    height: 40px;
    border: 3px solid var(--brand-100);
    border-radius: 50%;
    opacity: 0.4;
}

.ornament-code {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: var(--brand-200);
    opacity: 0.3;
    font-weight: bold;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-item {
    border: 1px solid #f0f0f0;
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--brand-200);
}

.faq-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: left;
    color: #1a1a2e;
    transition: var(--transition);
}

.faq-btn:hover {
    background: var(--brand-50);
}

.faq-btn .faq-icon {
    transition: transform 0.3s ease;
    color: var(--brand);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.active .faq-content {
    max-height: 500px;
}

.faq-content-inner {
    padding: 0 1.5rem 1.25rem;
    color: #6b7280;
    line-height: 1.7;
    font-size: 0.9rem;
}

/* ============================================
   STEP INDICATOR
   ============================================ */
.step-line {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 2px;
    height: calc(100% - 48px);
    background: linear-gradient(to bottom, var(--brand-200), var(--brand-100));
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 0.875rem;
    font-size: 0.9rem;
    color: #1a1a2e;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--brand);
    background: white;
    box-shadow: 0 0 0 4px rgba(123, 45, 38, 0.08);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

/* ============================================
   COUNTER ANIMATION
   ============================================ */
.counter-value {
    font-variant-numeric: tabular-nums;
}

/* ============================================
   BLOG ARTICLE CONTENT
   ============================================ */
.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: #4a5568;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.article-content img {
    border-radius: 1rem;
    margin: 1.5rem 0;
}

.article-content code {
    background: #f3f4f6;
    padding: 0.15rem 0.4rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    color: var(--brand);
}

.article-content pre {
    background: #1a1a2e;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.article-content blockquote {
    border-left: 4px solid var(--brand);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: #6b7280;
    font-style: italic;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .section-padding {
        padding: 3rem 0;
    }
    
    .ornament {
        display: none;
    }
    
    .hero-bg::before,
    .hero-bg::after {
        display: none;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-light);
}

/* ============================================
   LOADING/SKELETON
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

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