/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
    /* Brand Colors (Strictly Preserved) */
    --primary: #6564db;
    --primary-light: #8474FB;
    --primary-dark: #556BEF;
    --primary-soft: rgba(101, 100, 219, 0.08);
    --secondary: #F1F1FF;
    --white: #FFFFFF;
    --dark: #1A202C;
    /* Darker for better contrast */
    --gray: #718096;
    --light-gray: #EDF2F7;
    --success: #48BB78;

    /* 3D & Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --shadow-3d:
        0 20px 40px -10px rgba(101, 100, 219, 0.3),
        0 0 20px rgba(101, 100, 219, 0.1) inset;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6564db 0%, #8474FB 50%, #556BEF 100%);
    --gradient-glow: radial-gradient(circle at top left, rgba(132, 116, 251, 0.4), transparent 40%);
    --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
    /* Increased for breathing room */

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'DM Sans', sans-serif;

    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 40px;

    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    color: var(--dark);
    line-height: 1.6;
    background-color: #F8F9FD;
    /* Slightly off-white for depth */
    width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    /* Tighter headings */
    color: var(--dark);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    /* Reduced from 4.5rem */
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

p {
    font-size: 1.125rem;
    color: var(--gray);
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

/* ============================================
   Components
   ============================================ */
/* Glass Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    /* Fully rounded */
    font-weight: 600;
    font-size: 0.95rem;
    /* Slightly smaller button text */
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(101, 100, 219, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #556BEF 0%, #6564db 100%);
    /* Reverse gradient */
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(101, 100, 219, 0.5);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary);
    border: 1px solid var(--primary-light);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(101, 100, 219, 0.15);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: rgba(101, 100, 219, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    border: 1px solid rgba(101, 100, 219, 0.1);
    backdrop-filter: blur(5px);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

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

.logo img {
    height: 48px;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05) rotate(-2deg);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    /* Reduced from 2.5rem */
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.nav-link {
    font-weight: 500;
    color: var(--dark);
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   Hero Section (3D & Glass)
   ============================================ */
.hero {
    padding-top: 80px;
    /* Adjusted for navbar */
    padding-bottom: 0;
    background: transparent;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Aurora Background */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: aurora 10s infinite alternate;
}

.hero::before {
    background: var(--primary-light);
    top: -100px;
    right: -100px;
}

.hero::after {
    background: #FFD1D1;
    /* Subtle warm glow */
    bottom: 50px;
    left: -200px;
    animation-delay: -5s;
}

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

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* 3D Dashboard Mockup */
.hero-image {
    perspective: 1500px;
    display: flex;
    justify-content: center;
}

.dashboard-mockup {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3d);
    transform-style: preserve-3d;
    transform: rotateY(-12deg) rotateX(5deg);
    transition: transform 0.1s ease-out;
    /* JavaScript will drive this */
    position: relative;
    width: 100%;
    max-width: 480px;
    /* Reduced from 550px */
}

.mockup-header {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.mockup-dots {
    display: flex;
    gap: 8px;
}

.mockup-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-dots span:nth-child(1) {
    background: #FF5F56;
}

.mockup-dots span:nth-child(2) {
    background: #FFBD2E;
}

.mockup-dots span:nth-child(3) {
    background: #27C93F;
}

.mockup-content {
    display: flex;
    height: 350px;
    padding: 1rem;
    gap: 1rem;
}

.mockup-sidebar {
    width: 70px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-item {
    height: 8px;
    background: #E2E8F0;
    border-radius: 4px;
    width: 100%;
}

.sidebar-item:nth-child(1) {
    height: 30px;
    background: var(--primary-light);
    width: 30px;
    border-radius: 8px;
    margin-bottom: 10px;
    align-self: center;
}

.mockup-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stats-cards {
    display: flex;
    gap: 1rem;
}

.stat-card {
    flex: 1;
    height: 80px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--gradient-primary);
}

.chart-area {
    flex: 1;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Floating Elements around mockup */
.hero-image::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-3d);
    right: -30px;
    top: 20%;
    z-index: 2;
    transform: translateZ(50px);
    animation: float 6s ease-in-out infinite;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236564db' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-4l-3 9L9 3l-3 9H2'/%3E%3C/svg%3E");
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

/* ============================================
   Features Section (Bento Grid)
   ============================================ */
.features {
    background: var(--white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    /* Reduced gap */
    padding: 1rem;
}

.feature-card {
    background: var(--white);
    padding: 1.25rem;
    /* Further reduced from 1.5rem */
    border-radius: var(--radius-lg);
    border: 1px solid var(--light-gray);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

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

/* Glow Border Effect */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    /* Reduced from 64px */
    height: 48px;
    background: var(--primary-soft);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    /* Reduced margin */
    color: var(--primary);
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: var(--white);
    transform: rotateY(180deg);
    margin-bottom: 0.75rem;
    /* Reduced margin */
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-title {
    font-size: 1rem;
    /* Smaller icon text */
    /* Reduced from 1.25rem */
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
    color: var(--gray);
}

/* Bento Spans Removed for Balance */
/* .feature-card:nth-child(1) { grid-column: span 2; background: linear-gradient(135deg, #F8F9FD, #fff); } */
/* .feature-card:nth-child(4) { grid-column: span 2; } */

/* ============================================
   Benefits Section (Floating Cards)
   ============================================ */
.benefits {
    background: #F8F9FD;
    overflow: hidden;
}

.benefits-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    /* Reduced from 6rem */
    align-items: center;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.benefit-item {
    background: var(--white);
    padding: 1rem 1.5rem;
    /* Reduced from 1.5rem 2rem */
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    /* Changed from flex-start based on text size update */
    gap: 1rem;
    /* Reduced from 1.5rem */
    transition: var(--transition);
    border: 1px solid transparent;
}

.benefit-item:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-soft);
}

.benefit-icon {
    min-width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
    font-size: 1rem;
    /* Smaller icon text */
}

.benefit-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.benefits-visual {
    position: relative;
    height: 600px;
}

.visual-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem;
    /* Increased back to 2rem */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3d);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    max-width: 280px;
    /* Increased from 220px/260px */
}

.visual-card h5 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.visual-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--gray);
    margin-bottom: 0;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Staggered Floating Positions */
.card-1 {
    top: 50px;
    left: 0;
    animation: float 6s ease-in-out infinite;
}

.card-2 {
    top: 200px;
    right: 0;
    animation: float 7s ease-in-out infinite 1s;
    z-index: 2;
}

.card-3 {
    bottom: 50px;
    left: 50px;
    animation: float 8s ease-in-out infinite 2s;
}

/* ============================================
   Statistics Section
   ============================================ */
.statistics {
    background: var(--dark);
    color: var(--white);
    padding: var(--spacing-lg) 0;
    position: relative;
    overflow: hidden;
}

.statistics::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(101, 100, 219, 0.2) 0%, transparent 70%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #9CA3AF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

/* ============================================
   CTA & Footer
   ============================================ */
.cta-section {
    position: relative;
    background: var(--white);
    text-align: center;
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 2;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: 5rem 2rem;
    color: var(--white);
    max-width: 1000px;
    margin: 0 auto;
    box-shadow: 0 30px 60px rgba(101, 100, 219, 0.3);
}

.cta-title {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
}

.footer {
    background: #F8F9FD;
    padding-top: 6rem;
    border-top: 1px solid #E2E8F0;
}

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

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark);
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
    display: block;
}

/* ============================================
   Animations
   ============================================ */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* The following HTML tag was provided in the instruction but cannot be directly inserted into a CSS file.
   If this was intended for an HTML file, please insert it there.
   <h2 class="section-title" style="margin-bottom: 3rem;">Mengapa Memilih Catatan Dokter?</h2>
*/
@keyframes aurora {
    0% {
        transform: translate(0, 0) scale(1);
        filter: blur(60px);
    }

    100% {
        transform: translate(20px, 20px) scale(1.1);
        filter: blur(80px);
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-card:nth-child(1),
    .feature-card:nth-child(4) {
        grid-column: span 1;
    }

    .benefits-content {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .benefits-visual {
        height: 400px;
        display: flex;
        justify-content: center;
    }

    /* Reset float positions for mobile */
    .visual-card {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        clip-path: circle(0% at 100% 0);
        transition: clip-path 0.5s ease-in-out;
        border-radius: 0;
    }

    .nav-menu.active {
        clip-path: circle(150% at 100% 0);
    }

    .hamburger {
        display: flex;
    }

    .nav-buttons {
        display: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-image {
        display: none;
        /* Hide 3D mockup on mobile for performance space */
    }

    .feature-card {
        padding: 1rem;
        /* Reduced padding for mobile */
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns for mobile */
        gap: 1rem;
        /* Tighter gap */
    }

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

    section {
        padding: 100px 0;
        /* Increased to ensure content clears navbar on scroll */
    }

    .hero {
        padding-top: 100px;
        padding-bottom: var(--spacing-lg);
    }

    h1 {
        font-size: 2.5rem;
    }

    /* Benefits Section Mobile Optimization */
    .benefits-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .benefits-visual {
        display: none;
        /* Hide complex floating visuals on mobile */
    }

    .benefit-item {
        padding: 1rem;
    }
}