/* ========================================
   Affiliaters Media — Premium Stylesheet
   ======================================== */

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

:root {
    --blue: #2196F3;
    --blue-dark: #1565C0;
    --green: #7CB342;
    --green-light: #8BC34A;
    --dark: #1a1d2b;
    --dark-light: #2d3142;
    --white: #ffffff;
    --off-white: #f8f9fc;
    --gray-light: #e8ecf0;
    --gray: #94a3b8;
    --gradient: linear-gradient(135deg, var(--blue), var(--green));
    --gradient-text: linear-gradient(135deg, var(--blue), var(--green-light));
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-sm: 8px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--dark);
    overflow-x: hidden;
    line-height: 1.6;
    font-weight: 400;
}

/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

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

/* ========================================
   Sidebar Navigation
   ======================================== */
.sidebar-nav {
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-dots {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-md);
}

.nav-dot {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-light);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.nav-dot:hover,
.nav-dot.active {
    background: var(--blue);
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(33, 150, 243, 0.4);
}

.dot-label {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(-50%) translateX(-4px);
}

.nav-dot:hover .dot-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ========================================
   Mobile Navigation
   ======================================== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    justify-content: space-between;
    align-items: center;
}

.mobile-logo {
    height: 36px;
    width: auto;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

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

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-link:hover {
    color: var(--blue);
}

/* ========================================
   Sections
   ======================================== */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 100px 60px;
}

.section-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--green);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    margin-bottom: 48px;
    color: var(--dark);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-logo {
    height: 60px;
    width: auto;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 16px;
    color: var(--dark);
}

.hero-tagline {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 17px;
    font-weight: 300;
    color: var(--gray);
    max-width: 480px;
    line-height: 1.7;
}

/* ========================================
   Phone Device Frame
   ======================================== */
.hero-device {
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-frame {
    width: 280px;
    height: 560px;
    background: #1a1d2b;
    border-radius: 40px;
    padding: 12px;
    position: relative;
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.15),
        0 0 0 2px rgba(255, 255, 255, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
}

.phone-frame:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #1a1d2b;
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
    border-radius: 30px;
    overflow: hidden;
    padding: 48px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.screen-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.screen-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
}

.screen-dot.green {
    background: var(--green);
}

.screen-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
}

.screen-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--gray);
}

.metric-fill {
    height: 6px;
    background: var(--gradient);
    border-radius: 3px;
    animation: fillBar 2s ease-in-out infinite alternate;
}

.metric-fill.green-fill {
    background: linear-gradient(135deg, var(--green), var(--green-light));
}

@keyframes fillBar {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.screen-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    padding: 12px 0;
    flex: 1;
}

.chart-bar {
    flex: 1;
    background: var(--gradient);
    border-radius: 4px 4px 0 0;
    animation: chartPulse 3s ease-in-out infinite alternate;
    opacity: 0.8;
}

.chart-bar:nth-child(even) {
    background: linear-gradient(180deg, var(--green), var(--green-light));
}

@keyframes chartPulse {
    0% { transform: scaleY(0.9); }
    100% { transform: scaleY(1); }
}

.screen-footer {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 12px;
}

.screen-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-light);
}

.screen-icon.active {
    background: var(--blue);
}

/* ========================================
   About Section
   ======================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    font-size: 17px;
    font-weight: 300;
    line-height: 1.8;
    color: var(--dark-light);
    margin-bottom: 20px;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-weight: 500;
    font-size: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.highlight-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.highlight-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.highlight-icon.blue {
    background: var(--blue);
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.4);
}

.highlight-icon.green {
    background: var(--green);
    box-shadow: 0 0 8px rgba(124, 179, 66, 0.4);
}

/* ========================================
   Cards (Services)
   ======================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.card-icon.blue-icon {
    background: rgba(33, 150, 243, 0.1);
    color: var(--blue);
}

.card-icon.green-icon {
    background: rgba(124, 179, 66, 0.1);
    color: var(--green);
}

.card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.card p {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--gray);
}

/* ========================================
   Platform Features
   ======================================== */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.platform-feature {
    padding: 36px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--gray-light);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.platform-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-number {
    font-size: 36px;
    font-weight: 900;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.platform-feature h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.platform-feature p {
    font-size: 14px;
    font-weight: 300;
    color: var(--gray);
    line-height: 1.7;
}

/* ========================================
   Info Blocks (Advertisers / Publishers)
   ======================================== */
.info-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.info-text p {
    font-size: 17px;
    font-weight: 300;
    line-height: 1.8;
    color: var(--dark-light);
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-list li {
    position: relative;
    padding-left: 24px;
    font-size: 15px;
    font-weight: 400;
    color: var(--dark-light);
    line-height: 1.6;
}

.info-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient);
}

/* ========================================
   Contact Section
   ======================================== */
.contact-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 80px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 18px;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    color: var(--blue);
    flex-shrink: 0;
}

.contact-item a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: var(--blue);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    padding-top: 40px;
    border-top: 1px solid var(--gray-light);
    width: 100%;
    max-width: 400px;
}

.site-footer p {
    font-size: 13px;
    color: var(--gray);
    font-weight: 400;
}

/* ========================================
   Reveal Animations
   ======================================== */
.section-content {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .sidebar-nav {
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .section {
        padding: 100px 40px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .hero-logo {
        margin: 0 auto 24px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

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

    .info-block {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 24px;
        min-height: auto;
    }

    .hero-section {
        min-height: 100vh;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 32px;
    }

    .platform-grid {
        grid-template-columns: 1fr;
    }

    .phone-frame {
        width: 240px;
        height: 480px;
        transform: none;
    }

    .phone-frame:hover {
        transform: none;
    }

    .card {
        padding: 28px;
    }

    .hero-title {
        font-size: 36px;
    }
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 3px;
}

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

/* Selection */
::selection {
    background: rgba(33, 150, 243, 0.15);
    color: var(--dark);
}
