* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

:root {
    --primary-color: #245d7d;
    --secondary-color: #7ea5bd;
    --accent-color: #2e8ad3;
    --surface-light: #f0eae2;
    --surface-dark: #414a56;
    --primary-light: #d8cab8;
    --tertiary: #B29881;
    --text-dark: #000000;
    --text-light: #535557;
    --bg-light: #f0eae2;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: url('../images/parchment-bg.jpg') center center;
    background-size: auto;
    background-repeat: repeat;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 1rem 80px;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(216, 202, 184, 0.7);
    backdrop-filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
    word-wrap: break-word;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    color: var(--text-dark);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1.2rem 3rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(36, 93, 125, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(36, 93, 125, 0.4);
    background: #1e4d68;
}

/* Features Section */
.features {
    padding: 80px 1rem;
    background: url('../images/parchment-bg.jpg') center center;
    background-size: auto;
    background-repeat: repeat;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(240, 234, 226, 0.95);
}

.features > * {
    position: relative;
    z-index: 1;
}

.features h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    color: var(--text-dark);
    font-weight: 700;
}

.feature-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 3rem;
}

.feature-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 0;
    box-shadow: 8px 8px 0 rgba(36, 93, 125, 0.15);
    border: 3px solid var(--primary-color);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0 rgba(36, 93, 125, 0.2);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* About Section */
.about {
    background: var(--primary-color);
    color: var(--white);
    padding: 80px 1rem;
    text-align: center;
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
    width: 100%;
    overflow: hidden;
}

.about h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.about p {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    font-size: 1.2rem;
    line-height: 1.8;
}

/* Download Section */
.download {
    padding: 80px 1rem;
    text-align: center;
    background: url('../images/parchment-bg.jpg') center center;
    background-size: auto;
    background-repeat: repeat;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.download::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(216, 202, 184, 0.9);
}

.download > * {
    position: relative;
    z-index: 1;
}

.download h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    word-wrap: break-word;
}

.download > p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.download-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.store-button {
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    height: 70px;
}

.store-button img {
    height: 100%;
    width: auto;
    display: block;
}

.store-button:hover {
    transform: scale(1.05);
}

.web-app-link {
    margin-top: 3rem;
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.8;
    font-style: italic;
}

.web-app-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 2px;
    transition: all 0.3s ease;
    display: inline;
    font-style: normal;
}

.web-app-link a:hover {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
}

/* Contact Section */
.contact {
    background: var(--surface-light);
    padding: 80px 1rem;
    text-align: center;
    width: 100%;
    overflow: hidden;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    word-wrap: break-word;
}

.contact > p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.contact-email {
    color: var(--primary-color);
    font-size: 1.4rem;
    text-decoration: none;
    font-weight: 700;
    padding: 1.2rem 2.5rem;
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 6px 6px 0 rgba(36, 93, 125, 0.15);
    word-break: break-all;
    max-width: 90%;
}

.contact-email:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 rgba(36, 93, 125, 0.2);
}

/* Footer */
footer {
    background: var(--surface-dark);
    color: var(--white);
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
    font-weight: 500;
}

.footer-links a:hover {
    opacity: 0.7;
}

.footer-content > p {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding: 100px 1rem 60px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .features h2,
    .about h2,
    .download h2,
    .contact h2 {
        font-size: 1.75rem;
    }
    
    .features,
    .about,
    .download,
    .contact {
        padding: 60px 1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
    
    .btn {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .contact-email {
        font-size: 1rem;
        padding: 1rem 1rem;
    }
    
    .store-button img {
        height: 60px;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.75rem 0.75rem;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .nav-links {
        gap: 0.75rem;
    }
    
    .nav-links a {
        font-size: 0.75rem;
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    .features h2,
    .about h2,
    .download h2,
    .contact h2 {
        font-size: 1.5rem;
    }
    
    .contact-email {
        font-size: 0.85rem;
        padding: 0.8rem 0.8rem;
    }
    
    .btn {
        padding: 0.9rem 1.2rem;
        font-size: 0.9rem;
    }
}
