/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    overflow-x: hidden;
    background: var(--pmrj-blue);
}

/* Color Palette - PMRJ Brand Colors */
:root {
    --pmrj-blue: #3985c3;
    --pmrj-light: #5ba0d4;
    --pmrj-dark: #2a6ba3;
    --pmrj-accent: #f0f8ff;
    --pmrj-gold: #D4AF37;
    --pmrj-white: #ffffff;
    --dark-bg: #1a1a1a;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--pmrj-dark) 0%, var(--pmrj-blue) 50%, var(--pmrj-light) 100%);
    animation: gradientShift 25s ease-in-out infinite;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.float-element {
    position: absolute;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

.songket-pattern {
    width: 200px;
    height: 200px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><pattern id="songket" patternUnits="userSpaceOnUse" width="20" height="20"><rect width="20" height="20" fill="%23D4AF37"/><circle cx="10" cy="10" r="3" fill="%23C41E3A"/></pattern><rect width="100" height="100" fill="url(%23songket)"/></svg>');
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.betawi-ornament {
    width: 150px;
    height: 150px;
    background: var(--pmrj-light);
    border-radius: 50% 20% 50% 20%;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.riau-motif {
    width: 180px;
    height: 180px;
    background: var(--melayu-green);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

/* Hero Content */
.hero-content {
    text-align: center;
    z-index: 10;
    color: white;
    animation: fadeInUp 1.5s ease-out;
    max-width: 95vw;
    margin: 0 auto;
    padding: 0.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.logo-container {
    margin-bottom: 0.5rem;
}

.logo-circle {
    width: 120px;
    height: 120px;
    border: 3px solid var(--pmrj-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: pulse 6s infinite;
    background: rgba(57, 133, 195, 0.1);
}

.logo-svg {
    width: 80px;
    height: 80px;
    filter: brightness(0) invert(1);
}

.title-container {
    margin-bottom: 1rem;
}

.main-title {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
}

.main-title.highlight {
    color: white;
    animation: glow 6s ease-in-out infinite alternate;
}

.subtitle {
    font-size: clamp(1rem, 3vw, 2rem);
    opacity: 0.9;
    max-width: 90%;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Hand Trigger */
.hand-trigger {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hand-trigger h4 {
    font-size: clamp(1rem, 3.5vw, 2rem);
    margin-bottom: 1.5rem;
    color: var(--pmrj-accent);
    font-weight: 700;
}

.hand-container {
    display: flex;
    justify-content: center;
    gap: clamp(1.5rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.hand-item {
    text-align: center;
}

.hand-scanner {
    width: clamp(100px, 20vw, 150px);
    height: clamp(100px, 20vw, 150px);
    border: 4px solid var(--pmrj-blue);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: rgba(57, 133, 195, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hand-scanner:hover {
    background: rgba(57, 133, 195, 0.2);
    transform: scale(1.05);
}

.hand-scanner.scanned {
    background: rgba(0, 255, 0, 0.2);
    border-color: #00ff00;
}

.hand-placeholder {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hand-placeholder svg {
    transition: all 0.3s ease;
}

.hand-scanner.scanned .hand-placeholder svg path {
    stroke: #00ff00;
}

.hand-scanner.scanned .hand-placeholder svg text {
    fill: #00ff00;
}

.scan-line {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--pmrj-blue);
    transition: top 0.5s ease;
}

.hand-scanner.scanning .scan-line {
    animation: scanAnimation 1s ease-in-out;
}

.hand-item p {
    font-size: clamp(0.9rem, 2.5vw, 1.5rem);
    color: var(--pmrj-accent);
    font-weight: 600;
}

.instruction {
    font-size: clamp(0.8rem, 2.5vw, 1.4rem);
    color: var(--pmrj-accent);
    opacity: 0.9;
    margin-top: 0.5rem;
    font-weight: 500;
}

@keyframes scanAnimation {
    0% { top: -100%; }
    50% { top: 50%; }
    100% { top: 100%; }
}

/* Launch Animation */
.launch-animation {
    margin-bottom: 0;
    text-align: center;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.website-preview {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.browser-frame {
    width: min(600px, 90vw);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 3px solid var(--pmrj-blue);
    overflow: hidden;
    animation: browserGlow 8s ease-in-out infinite;
    margin: 0 auto;
}

.browser-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.browser-dots {
    display: flex;
    gap: 0.5rem;
}

.browser-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pmrj-blue);
    animation: dotPulse 6s ease-in-out infinite;
}

.browser-dots span:nth-child(2) { animation-delay: 1s; }
.browser-dots span:nth-child(3) { animation-delay: 2s; }

.url-bar {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 15px;
    color: var(--pmrj-accent);
    font-weight: 600;
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
}

.website-content {
    padding: 2rem 1rem;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-animation {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-text {
    font-size: clamp(1.5rem, 5vw, 3rem);
    color: white;
    margin-bottom: 2rem;
    animation: textPulse 6s ease-in-out infinite;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pmrj-blue), var(--pmrj-light));
    border-radius: 10px;
    animation: progressLoad 12s ease-in-out infinite;
}

.launch-text {
    font-size: clamp(1rem, 3vw, 2rem);
    color: var(--pmrj-accent);
    font-weight: 600;
    animation: fadeInUp 2s ease-out;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin-top: 0.5rem;
}

/* CTA Buttons */
.cta-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button.primary {
    background: linear-gradient(45deg, var(--pmrj-blue), var(--pmrj-light));
    color: white;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.cta-button.secondary {
    background: transparent;
    color: var(--pmrj-accent);
    border: 2px solid var(--pmrj-accent);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 3px solid var(--pmrj-blue);
    border-bottom: 3px solid var(--pmrj-blue);
    transform: rotate(45deg);
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background: var(--dark-bg);
    color: white;
}

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

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

.section-header h2 {
    font-family: 'Quicksand', sans-serif;
    font-size: 3rem;
    color: var(--pmrj-blue);
    margin-bottom: 1rem;
}

.ornament-line {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--riau-red), var(--pmrj-light));
    margin: 0 auto;
}

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

.about-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--pmrj-blue);
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2a2a2a 100%);
    color: white;
}

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

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--pmrj-light);
    margin-bottom: 1rem;
    opacity: 0.7;
}

.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--pmrj-blue);
}

/* Animations */
@keyframes gradientShift {
    0%, 100% { background: linear-gradient(135deg, var(--pmrj-dark) 0%, var(--pmrj-blue) 50%, var(--pmrj-light) 100%); }
    50% { background: linear-gradient(135deg, var(--pmrj-light) 0%, var(--pmrj-blue) 50%, var(--pmrj-dark) 100%); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), 0 0 20px var(--pmrj-blue); }
    to { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), 0 0 30px var(--pmrj-blue), 0 0 40px var(--pmrj-blue); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes browserGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.3); }
    50% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.6), 0 0 60px rgba(255, 107, 53, 0.3); }
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes textPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes progressLoad {
    0% { width: 0%; }
    25% { width: 30%; }
    50% { width: 60%; }
    75% { width: 85%; }
    100% { width: 100%; }
}

/* Modal Popup */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    position: relative;
    animation: modalSlideIn 0.5s ease-out;
}

.close {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: var(--pmrj-blue);
}

.modal-content h3 {
    font-family: 'Quicksand', sans-serif;
    color: var(--pmrj-blue);
    margin-bottom: 1rem;
    text-align: center;
}

.modal-content iframe {
    border-radius: 10px;
    margin: 1rem 0;
}

.modal-buttons {
    text-align: center;
    margin-top: 1rem;
}

.visit-btn {
    background: linear-gradient(45deg, var(--pmrj-blue), var(--pmrj-light));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.visit-btn:hover {
    transform: translateY(-2px);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Confetti Effect */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--pmrj-blue);
    animation: confettiFall 3s linear forwards;
}

.confetti:nth-child(2n) { background: var(--pmrj-light); }
.confetti:nth-child(3n) { background: var(--pmrj-gold); }
.confetti:nth-child(4n) { background: var(--pmrj-accent); }

@keyframes confettiFall {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Audio Control */
.audio-control {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
}

.audio-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--pmrj-accent);
    background: rgba(57, 133, 195, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-btn:hover {
    background: rgba(57, 133, 195, 0.4);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hand-container { flex-direction: column; align-items: center; gap: 1.5rem; }
    .website-content { padding: 1rem 0.5rem; }
    .hero-content { justify-content: center; align-items: center; gap: 1rem; }
}

@media (max-width: 480px) {
    .hero-content { padding: 0.25rem; gap: 0.5rem; justify-content: center; align-items: center; }
    .website-content { padding: 0.5rem; min-height: 200px; }
    .browser-frame { border-width: 2px; }
}

@media (max-height: 600px) {
    .hero-content { justify-content: center; align-items: center; gap: 0.5rem; }
    .logo-container { margin-bottom: 0.25rem; }
    .title-container { margin-bottom: 0.5rem; }
    .website-content { padding: 1rem 0.5rem; min-height: 180px; }
}