/* ======================================================= */
/* === TOKSEN HEAD DEVELOPER STYLESHEET V5.2 (FINAL) === */
/* ======================================================= */

/* --- Variabel & Global Reset --- */
:root {
    /* DEFAULT THEME IS DARK */
    --bg-color: #0D1117;
    --card-bg: #161B22;
    --text-primary: #F0F6FC;
    --text-secondary: #8B949E;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --navbar-bg: rgba(13, 17, 23, 0.8);
    --gradient-bg: radial-gradient(circle at 50% -20%, var(--card-bg) 0%, var(--bg-color) 40%);
    --timeline-step-bg: var(--primary-yellow);
    --timeline-step-color: #000;
    --timeline-line-color: var(--border-color);


    /* Universal Variables */
    --primary-yellow: #FFEB00;
    --error-color: #f85149;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="light"] {
    /* LIGHT MODE OVERRIDES */
    --bg-color: #F9FAFB;
    --card-bg: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --shadow-color: rgba(99, 99, 99, 0.1);
    --navbar-bg: rgba(255, 255, 255, 0.7);
    --gradient-bg: var(--bg-color);

    /* === TIMELINE COLOR FIX FOR LIGHT MODE === */
    --timeline-step-bg: #FBBF24;
    --timeline-step-color: #1F2937;
    --timeline-line-color: #D1D5DB;
}

/* --- Global Styles using Variables --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
}

section {
    padding: 120px 0;
    overflow-x: hidden;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px auto;
    font-size: 1.1rem;
}

.cta-button {
    background-color: var(--primary-yellow);
    color: #000;
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 235, 0, 0.3);
}

/* --- Navbar --- */
.navbar {
    min-height: 80px;
    padding: 0;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

.navbar .container {
    display: flex;
    align-items: center;
    width: 100%;
}

.nav-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.nav-logo img {
    height: 45px;
    margin-right: 16px;
}

.nav-links {
    margin: 0 auto;
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* --- Theme Toggle Button --- */
.theme-toggle-button {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.theme-toggle-button:hover {
    background-color: var(--border-color);
    transform: scale(1.1);
}

.theme-toggle-button svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
    position: absolute;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
}

.sun-icon {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
}

.moon-icon {
    transform: translateY(150%) rotate(90deg);
    opacity: 0;
}

[data-theme="light"] .sun-icon {
    transform: translateY(-150%) rotate(-90deg);
    opacity: 0;
}

[data-theme="light"] .moon-icon {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
}

/* --- Hero Section --- */
.hero-section {
    text-align: center;
    padding: 120px 0;
}

.hero-content h1 {
    font-size: clamp(3rem, 7vw, 5rem);
    line-height: 1.2;
}

.hero-content .highlight-text {
    position: relative;
    color: var(--primary-yellow);
    font-family: 'Courier New', monospace;
}

.cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-content p {
    max-width: 650px;
    margin: 24px auto 40px auto;
    font-size: 1.25rem;
}

.hero-cta {
    padding: 16px 40px;
    font-size: 1.2rem;
}

/* --- Features Section --- */
.features-section {
    background: var(--gradient-bg);
    transition: background 0.3s;
}

.feature-item {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 64px;
    margin-bottom: 120px;
}

.feature-item:nth-child(even) .feature-image {
    order: 2;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px var(--shadow-color), 0 10px 10px -5px var(--shadow-color);
    transition: var(--transition-smooth);
}

.feature-text {
    padding: 20px;
}

.feature-tag {
    display: inline-block;
    background-image: linear-gradient(to right, var(--primary-yellow), #FFC700);
    color: #000;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 16px;
}

.feature-text h3 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-text p {
    font-size: 1.1rem;
}

/* --- Timeline Section (FIXED) --- */
.timeline-section {
    background-color: var(--card-bg);
    transition: background-color 0.3s;
}

.timeline-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-wrapper::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--timeline-line-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
    transition: background-color 0.3s;
    z-index: -1;
    /* FIX: Paksa garis ke lapisan paling belakang */
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd) .timeline-content {
    text-align: right;
}

.timeline-step {
    position: absolute;
    top: 20px;
    right: -21.5px;
    z-index: 1;
    /* Cukup z-index 1 karena garis sudah di -1 */
    width: 40px;
    height: 40px;
    background-color: var(--timeline-step-bg);
    color: var(--timeline-step-color);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    border: 3px solid var(--card-bg);
    transition: var(--transition-smooth);
}

.timeline-item:nth-child(even) .timeline-step {
    left: -21.5px;
}

.timeline-content {
    padding: 20px 30px;
    background: var(--bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px var(--shadow-color);
    transition: var(--transition-smooth);
}

/* --- Testimonials Section --- */
#testimonials {
    padding: 120px 0;
}

.testimonial-scroller {
    width: 100%;
    overflow: hidden;
    -webkit-mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
    mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
}

.testimonial-grid {
    display: flex;
    gap: 32px;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.testimonial-grid:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    to {
        transform: translateX(calc(-100% / 2));
    }
}

.testimonial-card {
    background-color: var(--card-bg);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px var(--shadow-color);
    width: 400px;
    flex-shrink: 0;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-quote {
    font-size: 4rem;
    color: var(--primary-yellow);
    line-height: 1;
}

.testimonial-card p {
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: var(--text-primary);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.testimonial-author h4 {
    margin: 0;
}

.testimonial-author span {
    color: var(--text-secondary);
}

/* --- FAQ Section --- */
.faq-section {
    background-color: var(--card-bg);
    transition: background-color 0.3s;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px var(--shadow-color);
    transition: var(--transition-smooth);
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 20px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: var(--primary-yellow);
}

.faq-question.active::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.faq-answer p {
    padding: 0 20px 20px 20px;
}

/* --- Multi-Step Form --- */
#register {
    background: radial-gradient(circle, var(--card-bg) 0%, var(--bg-color) 100%);
    transition: background 0.3s;
}

#registrationFormWrapper {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 700px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px var(--shadow-color);
    transition: var(--transition-smooth);
}

#form-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

#form-progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 2px;
    background-color: var(--border-color);
    z-index: 0;
}

.progress-step {
    width: 33.33%;
    text-align: center;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.progress-step::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    margin: 8px auto 0;
    transition: var(--transition-smooth);
}

.progress-step.active {
    color: var(--primary-yellow);
    font-weight: 700;
}

.progress-step.active::after {
    background-color: var(--primary-yellow);
    border-color: var(--primary-yellow);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 24px;
}

.form-group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 3px rgba(255, 235, 0, 0.2);
}

.form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

.prev-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.prev-btn:hover {
    background-color: var(--border-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 5px;
    min-height: 1em;
}

input.error,
select.error {
    border-color: var(--error-color);
}

.radio-group,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 20px;
}

#form-success-message {
    text-align: center;
    padding: 40px;
    color: var(--text-primary);
}

#form-success-message h3 {
    color: var(--primary-yellow);
}

/* --- Footer & Animations --- */
.footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    transition: background-color 0.3s, border-color 0.3s;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-social a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--primary-yellow);
}

.footer-copyright {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    font-size: 0.9rem;
}

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll[data-animation="fade-in-up"] {
    transform: translateY(30px);
}

.animate-on-scroll[data-animation="fade-in-left"] {
    transform: translateX(-30px);
}

.animate-on-scroll[data-animation="fade-in-right"] {
    transform: translateX(30px);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
    section {
        padding: 80px 0;
    }

    .feature-item,
    .feature-item:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-bottom: 80px;
    }

    .feature-item .feature-image {
        order: 1;
    }

    .feature-item .feature-text {
        order: 2;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .navbar .container {
        justify-content: space-between;
    }

    .nav-logo span {
        display: none;
    }

    .timeline-wrapper::after {
        left: 20px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: 60px;
        padding-right: 0;
    }

    .timeline-step,
    .timeline-item:nth-child(even) .timeline-step {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        text-align: left;
    }

    .form-group-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* CSS tambahan untuk layout baru, bisa dipindah ke style.css */
.keunggulan-layout {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-top: 3rem;
}

.keunggulan-image-wrapper {
    flex: 1;
    min-width: 40%;
}

.keunggulan-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.keunggulan-features-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature-block {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.feature-block-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color-light);
    color: var(--primary-color);
}

.feature-block-icon svg {
    width: 24px;
    height: 24px;
}

.feature-block-content h3 {
    font-family: 'Poppins', sans-serif;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.feature-block-content p {
    margin: 0;
    color: var(--text-secondary-color);
}

/* Responsive */
@media (max-width: 992px) {
    .keunggulan-layout {
        flex-direction: column;
    }
}