/* Custom Fonts */
@font-face {
    font-family: 'Camphor';
    src: url('../fonts/Camphor-W01-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Camphor';
    src: url('../fonts/Camphor-W01-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

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

html {
    scroll-behavior: smooth;
    font-display: swap;
}

body {
    font-family: 'Camphor', 'Bricolage Grotesque', sans-serif;
    line-height: 1.5;
    color: #333;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

.logo a:hover {
    opacity: 0.8;
}

.logo-img {
    height: 32px;
    width: auto;
}

.mobile-logo {
    display: none;
}

.brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

button {
    font-family: 'Camphor', 'Bricolage Grotesque', sans-serif;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
}

.download-btn {
    background: #ef476f;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.download-btn:hover {
    background: #e63e66;
    transform: translateY(-1px);
}

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

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    padding: 2rem 2rem 4rem;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 3rem;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 4rem;
    max-width: 540px;
}

.store-buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 2rem;
}

.store-button img {
    height: 7rem;
    transition: transform 0.2s ease;
}

.store-button:hover img {
    transform: scale(1.05);
}

/* Hero Images */
.hero-images {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
}

.hero-screen {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 1rem;
    margin: 0 auto;
    display: block;
}

.mobile-hero-image {
    display: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
}

.hero-content .mobile-hero-image {
    margin-bottom: 2rem;
}

/* CTA Section */
.cta {
    background: black;
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.cta h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta p {
    color: #999;
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta button {
    background: white;
    color: black;
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

/* Footer */
footer {
    padding: 3rem 2rem;
    text-align: center;
    color: #333;
    background: #f8f9fa;
}

footer p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

footer p:first-child {
    font-size: 1.125rem;
    font-weight: 500;
}

footer p:nth-child(2) {
    color: #999;
    font-size: 0.875rem;
}

.footer-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: #333;
}

.footer-links span {
    display: inline-block;
    color: #ddd;
}

.footer-contact {
    margin-top: 1.5rem;
}

.footer-contact a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9375rem;
}

.footer-contact a:hover {
    color: #333;
}

/* Legal Pages Styling */
.legal-content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.legal-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
}

.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.legal-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #666;
}

.legal-content a:hover {
    border-bottom-color: #333;
}

/* 404 Error Page */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.error-content {
    max-width: 600px;
}

.error-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-content p {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.error-actions a {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.home-button {
    background: black;
    color: white;
}

.app-button {
    background: white;
    color: black;
    border: 2px solid black;
}

.home-button:hover,
.app-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Info Sections */
.info-section {
    padding: 6rem 2rem;
    background: #f8f9fa;
    scroll-margin-top: 80px;
}

#how-it-works {
    background: #f0f7ff;
}

#reliability {
    background: #fff8f0;
}

.content-card {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

#how-it-works .content-card {
    grid-template-columns: 1fr 1fr;
}

#how-it-works .card-text {
    grid-column: 2;
    grid-row: 1;
}

#how-it-works .card-image {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    background-color: #f0f7ff;
    padding: 2rem 0;
}

#reliability .content-card {
    grid-template-columns: 1fr 1fr;
}

#reliability .card-text {
    grid-column: 1;
    grid-row: 1;
}

#reliability .card-image {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    background-color: #fff8f0;
    padding: 2rem 0;
}

.card-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.card-text p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #666;
}

.card-image {
    aspect-ratio: 1;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border-radius: 2rem;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 2rem;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    font-size: 1.125rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.dropdown-btn::after {
    content: 'Features';
}

.dropdown-btn::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 6px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease, border-color 0.2s ease;
    order: 1;
}

.dropdown-btn:hover::before {
    border-color: #ef476f;
}

.dropdown:hover .dropdown-btn::before {
    transform: rotate(-135deg) translateX(-2px);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    padding: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 0.5rem 1rem;
        box-shadow: none;
    }

    .mobile-logo {
        display: block !important;
        height: 56px !important;
    }

    .desktop-logo {
        display: none !important;
    }

    .desktop-hero-image {
        display: none !important;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem 1.5rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        text-decoration: none;
        width: 100%;
    }

    .nav-links button {
        width: 100%;
        text-align: left;
        padding: 0.75rem 0;
        color: #333;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 0.75rem 0;
        font-size: 1rem;
        font-weight: normal;
    }

    .dropdown-btn::before {
        display: none;
    }

    .dropdown:hover .dropdown-btn::before {
        display: none;
    }

    .dropdown-content {
        position: static;
        display: block;
        box-shadow: none;
        padding: 0;
        background: transparent;
    }

    .dropdown-content a {
        padding: 0.75rem 0;
        color: #666;
    }

    .dropdown-content a::before {
        display: none;
    }

    .hero {
        padding: 1rem;
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    h1 {
        font-size: 2.25rem;
        margin-bottom: 2rem;
        line-height: 1.3;
    }

    h1 br {
        display: block;
        content: "";
        margin-top: 0.5rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mobile-hero-image {
        display: block;
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .hero-screen {
        max-width: 250px;
        border-radius: 1rem;
        margin: 0 auto;
    }

    .hero-description {
        font-size: 1.125rem;
        margin-bottom: 2.5rem;
        text-align: center;
    }

    .store-buttons {
        justify-content: center;
        margin-bottom: 1.5rem;
    }

    .store-button img {
        height: 5rem;
    }

    .download-btn {
        width: 100%;
        margin-top: 0.5rem;
        text-align: center !important;
        font-size: 1.125rem;
        padding: 0.5rem 1.25rem;
        color: white !important;
    }

    .info-section {
        padding: 4rem 1rem;
    }

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

    #how-it-works .content-card,
    #reliability .content-card {
        display: flex;
        flex-direction: column;
    }

    #how-it-works .card-text,
    #reliability .card-text {
        order: 1;
    }

    #how-it-works .card-image,
    #reliability .card-image {
        order: 2;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        padding: 2rem;
    }

    .card-image {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        padding: 2rem;
    }

    .card-image img {
        width: 100%;
        max-width: 600px;
        height: auto;
        margin: 0 auto;
        display: block;
    }

    .cta {
        padding: 4rem 1.5rem;
    }

    .cta h2 {
        font-size: 2.5rem;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }

    .card-text h2 {
        font-size: 2rem;
        margin-bottom: 1.25rem;
    }

    .card-text p {
        font-size: 1.125rem;
        line-height: 1.6;
        color: #666;
        font-weight: normal;
    }

    .dropdown-btn::after {
        content: '';
    }

    .loading-screen {
        display: flex;
        z-index: 99999;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #ef476f;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.5rem 1rem;
    }

    .hero {
        padding: 0.5rem 1rem 2rem;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .store-button img {
        height: 4.5rem;
    }

    .store-buttons {
        margin-bottom: 1rem;
    }

    .mobile-hero-image {
        margin-bottom: 1.5rem;
    }

    .hero-screen {
        max-width: 200px;
    }

    .card-image {
        padding: 1rem;
    }

    #how-it-works .card-image,
    #reliability .card-image {
        padding: 1rem;
    }

    .card-image img {
        max-width: 100%;
    }

    .cta {
        padding: 3rem 1rem;
    }

    .cta h2 {
        font-size: 1.75rem;
    }

    .cta p {
        font-size: 1rem;
    }

    .card-text h2 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .card-text p {
        font-size: 1rem;
    }
}

/* GIF Container */
.gif-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gif-container img.placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.gif-container img.placeholder.hidden {
    opacity: 0;
}

.gif-container img.main-gif {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease-in;
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translate3d(0, 0, 0);
}

.gif-container img.main-gif.loaded {
    opacity: 1;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ef476f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Image Loading Optimization */
img {
    max-width: 100%;
    height: auto;
}

.card-image img,
.footer img {
    loading: lazy;
}

/* Critical CSS */
.hero,
.nav,
.logo {
    content-visibility: auto;
    contain-intrinsic-size: auto;
} 