/* ===================================
   MaxdMedia - Apple-Style Premium Design
   =================================== */

/* CSS Variables */
:root {
    /* Colors - Apple Style */
    --color-black: #1d1d1f;
    --color-gray-dark: #424245;
    --color-gray: #86868b;
    --color-gray-light: #f5f5f7;
    --color-white: #ffffff;
    --color-accent: #0071e3;
    --color-accent-hover: #0077ed;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;

    /* Spacing */
    --section-padding: 120px;
    --container-max: 980px;
    --container-wide: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.4s ease;
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: 17px;
    line-height: 1.47;
    color: var(--color-black);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===================================
   Navigation - Apple Style
   =================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 48px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: var(--container-wide);
    height: 100%;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 24px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-black);
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.nav-links a:hover {
    opacity: 1;
    color: var(--color-black);
}

.nav-cta {
    font-size: 14px;
    font-weight: 400;
    padding: 8px 16px;
    background: var(--color-accent);
    color: var(--color-white) !important;
    border-radius: 980px;
    transition: background var(--transition-fast);
}

.nav-cta:hover {
    background: var(--color-accent-hover);
    color: var(--color-white) !important;
}

.nav-mobile-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-mobile-btn span {
    display: block;
    width: 17px;
    height: 1px;
    background: var(--color-black);
    transition: var(--transition-fast);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px 80px;
    background: linear-gradient(180deg, #fbfbfd 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--color-black);
    margin-bottom: 24px;
}

.hero-title-accent {
    background: linear-gradient(90deg, #0071e3, #6e56cf, #9e8cfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 400;
    color: var(--color-gray-dark);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 17px;
    font-weight: 500;
    color: var(--color-white);
    background: var(--color-accent);
    border: none;
    border-radius: 980px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    color: var(--color-white);
    transform: scale(1.02);
}

.btn-full {
    width: 100%;
}

.btn-text {
    font-size: 17px;
    font-weight: 400;
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn-text .arrow {
    transition: transform var(--transition-fast);
}

.btn-text:hover .arrow {
    transform: translateX(4px);
}

/* Hero Visual */
.hero-visual {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 100px;
    opacity: 0.15;
}

.waveform-svg {
    width: 100%;
    height: 100%;
}

.wave {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 2;
    animation: wave 3s ease-in-out infinite;
}

.wave-1 {
    animation-delay: 0s;
}

.wave-2 {
    animation-delay: 0.5s;
    opacity: 0.5;
}

.wave-3 {
    animation-delay: 1s;
    opacity: 0.3;
}

@keyframes wave {

    0%,
    100% {
        d: path("M0,50 Q50,20 100,50 T200,50 T300,50 T400,50");
    }

    50% {
        d: path("M0,50 Q50,80 100,50 T200,50 T300,50 T400,50");
    }
}

/* ===================================
   Stats Section
   =================================== */
.stats {
    padding: 60px 24px;
    background: var(--color-black);
}

.stats-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 14px;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
}

/* ===================================
   Feature Sections
   =================================== */
.feature {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--section-padding) 24px;
}

.feature-dark {
    background: var(--color-black);
    color: var(--color-white);
}

.feature-dark .feature-eyebrow {
    color: var(--color-gray);
}

.feature-dark .text-muted {
    color: var(--color-gray);
}

.feature-dark .btn-text {
    color: var(--color-white);
}

.feature-light {
    background: var(--color-gray-light);
}

.feature-light .text-muted {
    color: var(--color-gray);
}

.feature-content {
    max-width: 600px;
    text-align: center;
}

.feature-eyebrow {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.feature-title {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 24px;
}

.text-muted {
    opacity: 0.6;
}

.feature-description {
    font-size: 19px;
    line-height: 1.5;
    color: inherit;
    opacity: 0.8;
    margin-bottom: 32px;
}

.feature-visual {
    position: absolute;
    right: 10%;
    opacity: 0.1;
}

.feature-icon-large {
    font-size: 200px;
}

/* ===================================
   CTA Section
   =================================== */
.cta-section {
    padding: var(--section-padding) 24px;
    background: var(--color-white);
    text-align: center;
}

.cta-container {
    max-width: 500px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 17px;
    color: var(--color-gray-dark);
    margin-bottom: 48px;
}

.cta-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cta-form input,
.cta-form select {
    width: 100%;
    padding: 16px 20px;
    font-size: 17px;
    font-family: var(--font-family);
    color: var(--color-black);
    background: var(--color-gray-light);
    border: 1px solid transparent;
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.cta-form input::placeholder {
    color: var(--color-gray);
}

.cta-form input:focus,
.cta-form select:focus {
    outline: none;
    border-color: var(--color-accent);
    background: var(--color-white);
}

.cta-form select {
    cursor: pointer;
    color: var(--color-gray);
}

.cta-form select:valid {
    color: var(--color-black);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--color-gray-light);
    padding: 48px 24px 24px;
    font-size: 14px;
    color: var(--color-gray-dark);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    height: 28px;
    margin-bottom: 12px;
}

.footer-brand p {
    color: var(--color-gray);
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 64px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 8px;
}

.footer-col a {
    font-size: 13px;
    color: var(--color-gray);
}

.footer-col a:hover {
    color: var(--color-black);
}

.footer-bottom {
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--color-gray);
}

/* ===================================
   Reveal Animations
   =================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.15s;
}

.reveal-delay-2 {
    transition-delay: 0.3s;
}

.reveal-delay-3 {
    transition-delay: 0.45s;
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1s ease, transform 1s ease;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===================================
   Responsive Design - Enhanced Mobile
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .stats-container {
        gap: 40px;
    }

    .feature-icon-large {
        font-size: 150px;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* Mobile Navigation */
    .nav {
        height: 56px;
    }

    .nav-container {
        padding: 0 16px;
    }

    .nav-links {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links a {
        display: block;
        padding: 20px;
        font-size: 17px;
        font-weight: 500;
    }

    .nav-cta {
        display: none;
    }

    .nav-mobile-btn {
        display: flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
    }

    .nav-mobile-btn span {
        width: 20px;
        height: 2px;
        transition: all 0.3s ease;
    }

    .nav-mobile-btn.active span:first-child {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .nav-mobile-btn.active span:last-child {
        transform: rotate(-45deg) translate(4px, -4px);
    }

    /* Hero Mobile */
    .hero {
        min-height: 100vh;
        min-height: 100dvh;
        /* Dynamic viewport height for mobile browsers */
        padding: 80px 20px 60px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 36px;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 17px;
        margin-bottom: 32px;
        padding: 0 10px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 16px;
        width: 100%;
        padding: 0 20px;
    }

    .btn-primary {
        width: 100%;
        padding: 18px 32px;
        font-size: 17px;
    }

    .btn-text {
        font-size: 17px;
    }

    .hero-visual {
        width: 280px;
        bottom: 5%;
    }

    /* Stats Mobile */
    .stats {
        padding: 48px 20px;
    }

    .stats-container {
        flex-direction: column;
        gap: 24px;
    }

    .stat-value {
        font-size: 40px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    /* Feature Sections Mobile */
    .feature {
        min-height: auto;
        padding: 60px 20px;
    }

    .feature-content {
        max-width: 100%;
    }

    .feature-eyebrow {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .feature-title {
        font-size: 32px;
        margin-bottom: 16px;
    }

    .feature-description {
        font-size: 17px;
        margin-bottom: 24px;
        padding: 0 10px;
    }

    .feature-visual {
        display: none;
    }

    /* CTA Mobile */
    .cta-section {
        padding: 60px 20px;
    }

    .cta-container {
        max-width: 100%;
    }

    .cta-title {
        font-size: 28px;
    }

    .cta-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cta-form input,
    .cta-form select {
        padding: 18px 20px;
        font-size: 16px;
        /* Prevents iOS zoom on focus */
        border-radius: 12px;
    }

    .cta-form .btn-primary {
        padding: 18px 32px;
        margin-top: 8px;
    }

    /* Footer Mobile */
    .footer {
        padding: 40px 20px 24px;
    }

    .footer-top {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-logo {
        margin: 0 auto 12px;
        display: block;
    }

    .footer-links {
        flex-direction: row;
        justify-content: center;
        gap: 48px;
    }

    .footer-col {
        text-align: left;
    }

    .footer-bottom {
        padding-top: 20px;
    }
}

/* Small Mobile */
@media (max-width: 380px) {
    .hero-title {
        font-size: 30px;
    }

    .feature-title {
        font-size: 28px;
    }

    .cta-title {
        font-size: 24px;
    }

    .footer-links {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-col {
        text-align: center;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn-primary:hover {
        transform: none;
    }

    .btn-text:hover {
        text-decoration: none;
    }

    .btn-text:active {
        text-decoration: underline;
    }

    .nav-links a:active {
        background: rgba(0, 0, 0, 0.05);
    }
}