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

:root {
    --primary-color: #007AFF;
    --primary-dark: #0056CC;
    --success-color: #34C759;
    --text-color: #1D1D1F;
    --text-secondary: #86868B;
    --background: #FFFFFF;
    --background-secondary: #F5F5F7;
    --border-color: #D2D2D7;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-color);
    background: var(--background);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul a {
    color: var(--text-color);
    font-weight: 500;
}

nav ul a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Main Content */
main {
    padding-top: 80px;
}

section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding-top: 2rem;
    padding-bottom: 2rem;
}

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

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.cta-button:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 280px;
    height: 580px;
    background: #1D1D1F;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.2);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--background-secondary);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-preview {
    text-align: center;
}

.preview-total {
    font-size: 3rem;
    font-weight: 700;
    color: var(--success-color);
}

.preview-palindrome {
    font-size: 1.5rem;
    font-family: monospace;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.preview-label {
    color: var(--success-color);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* How It Works */
.how-it-works {
    background: var(--background-secondary);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step p {
    color: var(--text-secondary);
}

/* Why Palindromes */
.why-content {
    max-width: 800px;
    margin: 0 auto;
}

.why-content > p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.why-content ul {
    list-style: none;
    margin-bottom: 2rem;
}

.why-content li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
}

.why-content li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.example-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    background: var(--background-secondary);
    padding: 2rem;
    border-radius: 16px;
}

.example-calc {
    font-family: monospace;
    font-size: 1.1rem;
}

.example-row {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 0.25rem 0;
}

.example-row.total {
    font-weight: 700;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

.example-result {
    text-align: center;
}

.palindrome-display {
    font-size: 2rem;
    font-family: monospace;
    color: var(--success-color);
}

.palindrome-label {
    color: var(--success-color);
    font-weight: 600;
}

/* Features */
.features {
    background: var(--background-secondary);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature p {
    color: var(--text-secondary);
}

/* Privacy Highlight */
.privacy-highlight {
    text-align: center;
}

.privacy-points {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.privacy-point {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.privacy-point .check {
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.25rem;
}

/* Download Section */
.download {
    text-align: center;
    background: linear-gradient(180deg, var(--background-secondary) 0%, var(--background) 100%);
}

.download p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.app-store-badge img {
    height: 60px;
}

/* Footer */
footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: #AEAEB2;
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    text-align: right;
    color: var(--text-secondary);
}

/* Legal Pages */
.legal-page {
    padding-top: 120px;
    padding-bottom: 4rem;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.last-updated {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.legal-content section {
    padding: 0;
    margin-bottom: 2.5rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    text-align: left;
    margin-bottom: 1rem;
}

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

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

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

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        flex-direction: row;
        justify-content: center;
    }

    .footer-copyright {
        text-align: center;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

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

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

    .example-box {
        flex-direction: column;
        gap: 1.5rem;
    }

    .privacy-points {
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        gap: 1rem;
    }

    .phone-mockup {
        width: 240px;
        height: 500px;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    section {
        padding: 3rem 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .legal-content {
        padding: 0 1rem;
    }
}
