/* ========================================
   SmartQR Kit - Apple Design Language
   ======================================== */

:root {
    /* Apple Color Palette */
    --color-bg: #ffffff;
    --color-bg-secondary: #f5f5f7;
    --color-text: #1d1d1f;
    --color-text-secondary: #86868b;
    --color-accent: #0071e3;
    --color-accent-hover: #0077ed;
    --color-border-light: #e5e5e7;
    --color-surface: rgba(255, 255, 255, 0.8);
    --color-shadow: rgba(0, 0, 0, 0.04);

    /* Apple System Fonts */
    --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Spacing */
    --max-width: 980px;
    --max-width-wide: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    font-weight: var(--font-weight-regular);
    font-size: 17px;
    line-height: 1.47059;
    letter-spacing: -0.022em;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent-hover);
}

/* ========================================
   Navigation Bar
   ======================================== */

.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 44px;
    background: var(--color-surface);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--color-shadow);
}

.nav-bar-inner {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 0 22px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-bar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
}

.nav-bar-logo img {
    width: 20px;
    height: 20px;
}

.nav-bar-links {
    display: flex;
    gap: 28px;
}

.nav-bar-links a {
    font-size: 13px;
    color: var(--color-text);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.nav-bar-links a:hover {
    opacity: 1;
    color: var(--color-text);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 60px;
    background: var(--color-bg-secondary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 860px;
}

.hero-eyebrow {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.hero-title {
    font-size: clamp(48px, 10vw, 80px);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 16px;
    background: linear-gradient(180deg, #1d1d1f 0%, #424245 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: var(--font-weight-regular);
    color: var(--color-text);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.hero-description {
    font-size: 19px;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    border-radius: 980px;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--color-accent);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-secondary:hover {
    background: var(--color-accent);
    color: #ffffff;
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   iPhone Showcase
   ======================================== */

.iphone-showcase {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    perspective: 1200px;
}

.iphone-device {
    position: relative;
    width: 260px;
    height: 530px;
    transform: rotateY(-8deg) rotateX(5deg);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.iphone-device:hover {
    transform: rotateY(-3deg) rotateX(2deg);
}

.iphone-frame {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #2a2a2c 0%, #1a1a1b 50%, #2a2a2c 100%);
    border-radius: 44px;
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 0.25),
        0 30px 60px -30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateZ(0);
}

.iphone-frame::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 28px;
    background: #1a1a1b;
    border-radius: 20px;
    z-index: 10;
}

.iphone-screen {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
    border-radius: 36px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.iphone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 28px;
    background: #1a1a1b;
    border-radius: 0 0 18px 18px;
}

.app-icon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 40px 20px;
}

.app-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--color-accent) 0%, #5856d6 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.3);
    position: relative;
}

.app-icon::after {
    content: '';
    position: absolute;
    inset: 6px;
    background: white;
    border-radius: 4px;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 7V5a2 2 0 012-2h2M17 3h2a2 2 0 012 2v2M21 17v2a2 2 0 01-2 2h-2M7 21H5a2 2 0 01-2-2v-2M7 8h10M7 12h10M7 16h10'/%3E%3C/svg%3E") center/60% no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 7V5a2 2 0 012-2h2M17 3h2a2 2 0 012 2v2M21 17v2a2 2 0 01-2 2h-2M7 21H5a2 2 0 01-2-2v-2M7 8h10M7 12h10M7 16h10'/%3E%3C/svg%3E") center/60% no-repeat;
}

.app-icon:nth-child(2) {
    background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
    box-shadow: 0 8px 24px rgba(52, 199, 89, 0.3);
}

.app-icon:nth-child(2)::after {
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 4v16M4 12h16'/%3E%3C/svg%3E") center/50% no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 4v16M4 12h16'/%3E%3C/svg%3E") center/50% no-repeat;
}

.app-icon:nth-child(3) {
    background: linear-gradient(135deg, #ff9500 0%, #ff9f0a 100%);
    box-shadow: 0 8px 24px rgba(255, 149, 0, 0.3);
}

.app-icon:nth-child(3)::after {
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 21H5a2 2 0 01-2-2V5a2 2 0 012-2h11l5 5v11a2 2 0 01-2 2z'/%3E%3Cpath d='M17 21v-8H7v8M7 3v5h8'/%3E%3C/svg%3E") center/55% no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 21H5a2 2 0 01-2-2V5a2 2 0 012-2h11l5 5v11a2 2 0 01-2 2z'/%3E%3Cpath d='M17 21v-8H7v8M7 3v5h8'/%3E%3C/svg%3E") center/55% no-repeat;
}

.app-icon:nth-child(4) {
    background: linear-gradient(135deg, #5856d6 0%, #af52de 100%);
    box-shadow: 0 8px 24px rgba(88, 86, 214, 0.3);
}

.app-icon:nth-child(4)::after {
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8'/%3E%3Cpath d='M16 6l-4-4-4 4'/%3E%3Cpath d='M12 2v13'/%3E%3C/svg%3E") center/55% no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8'/%3E%3Cpath d='M16 6l-4-4-4 4'/%3E%3Cpath d='M12 2v13'/%3E%3C/svg%3E") center/55% no-repeat;
}

/* ========================================
   Features Section
   ======================================== */

.features {
    padding: 100px 24px;
    background: var(--color-bg);
}

.features-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 80px;
}

.section-label {
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.section-description {
    font-size: 19px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.features-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-card {
    padding: 48px 40px;
    background: var(--color-bg-secondary);
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    background: var(--color-bg);
}

.feature-icon-wrapper {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    position: relative;
}

.feature-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent) 0%, #5856d6 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.25);
}

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

.feature-card:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
    box-shadow: 0 8px 24px rgba(52, 199, 89, 0.25);
}

.feature-card:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, #ff9500 0%, #ff9f0a 100%);
    box-shadow: 0 8px 24px rgba(255, 149, 0, 0.25);
}

.feature-card:nth-child(4) .feature-icon {
    background: linear-gradient(135deg, #5856d6 0%, #af52de 100%);
    box-shadow: 0 8px 24px rgba(88, 86, 214, 0.25);
}

.feature-title {
    font-size: 21px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.feature-description {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ========================================
   Large Feature Card
   ======================================== */

.large-feature {
    padding: 100px 24px;
    background: var(--color-bg-secondary);
}

.large-feature-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.large-feature-text h2 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.large-feature-text p {
    font-size: 17px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

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

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--color-text);
}

.feature-list li svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-accent);
    flex-shrink: 0;
}

.large-feature-visual {
    display: flex;
    justify-content: center;
}

.qr-showcase {
    width: 280px;
    height: 280px;
    object-fit: contain;
    border-radius: 32px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.06),
        0 12px 48px rgba(0, 0, 0, 0.04);
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    padding: 120px 24px;
    background: var(--color-bg);
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.cta-description {
    font-size: 19px;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.app-store-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--color-text);
    color: #ffffff;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.app-store-button:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

.app-store-button svg {
    width: 28px;
    height: 28px;
}

.app-store-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.app-store-text .small {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    opacity: 0.8;
}

.app-store-text .large {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    padding: 60px 24px 40px;
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border-light);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--color-border-light);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-brand img {
    width: 28px;
    height: 28px;
}

.footer-brand span {
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
}

.footer-tagline {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    max-width: 280px;
}

.footer-column h4 {
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column a,
.footer-column li {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.footer-column a:hover {
    color: var(--color-text);
}

.footer-bottom {
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copyright {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* ========================================
   Animations
   ======================================== */

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

@keyframes float {
    0%, 100% {
        transform: rotateY(-8deg) rotateX(5deg) translateY(0);
    }
    50% {
        transform: rotateY(-8deg) rotateX(5deg) translateY(-10px);
    }
}

.animate-in {
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

.iphone-device {
    animation: float 6s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

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

    .feature-list {
        align-items: center;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-bar-links {
        display: none;
    }

    .hero {
        padding: 100px 20px 60px;
    }

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

    .hero-subtitle {
        font-size: 24px;
    }

    .hero-description {
        font-size: 17px;
    }

    .iphone-device {
        width: 220px;
        height: 450px;
        transform: rotateY(-5deg) rotateX(3deg);
    }

    .app-icon-grid {
        gap: 18px;
        padding: 30px 15px;
    }

    .app-icon {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }

    .features {
        padding: 80px 20px;
    }

    .feature-card {
        padding: 36px 28px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .app-store-button {
        width: 100%;
        max-width: 240px;
        justify-content: center;
    }
}
