/* ========================================
   Lunchdate — Minimal, polished
   ======================================== */

:root {
    --bg-color: #F6F1E8;
    --surface-color: #FFFFFF;
    --text-primary: #1B1F24;
    --text-secondary: rgba(27, 31, 36, 0.5);
    --text-tertiary: rgba(27, 31, 36, 0.32);
    --accent-color: #E76F51;
    --accent-hover: #d4613f;
    --warm-orange: #F4A261;
    --shadow-color: rgba(27, 31, 36, 0.06);
    --border-color: rgba(27, 31, 36, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121416;
        --surface-color: #1C1F24;
        --text-primary: #F5F5F5;
        --text-secondary: rgba(245, 245, 245, 0.5);
        --text-tertiary: rgba(245, 245, 245, 0.32);
        --shadow-color: rgba(0, 0, 0, 0.2);
        --border-color: rgba(245, 245, 245, 0.08);
    }
}

/* ========================================
   Base
   ======================================== */

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

@keyframes subtleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ========================================
   Main — centered, full viewport
   ======================================== */

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Background orbs — layered depth */
main::before,
main::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

main::before {
    top: 30%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(231, 111, 81, 0.06) 0%, transparent 60%);
}

main::after {
    bottom: 15%;
    left: 30%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(244, 162, 97, 0.04) 0%, transparent 60%);
}

/* ========================================
   Logo
   ======================================== */

.logo-container {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        0 0 0 0.5px rgba(255, 255, 255, 0.5),
        0 0 0 1px var(--border-color),
        0 24px 56px -12px rgba(0, 0, 0, 0.1),
        0 8px 20px -8px rgba(231, 111, 81, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: fadeIn 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.1s both;
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

.logo-container:hover {
    transform: scale(1.04) translateY(-2px);
    box-shadow:
        0 0 0 0.5px rgba(255, 255, 255, 0.6),
        0 0 0 1px var(--border-color),
        0 32px 64px -12px rgba(0, 0, 0, 0.12),
        0 12px 28px -8px rgba(231, 111, 81, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

@media (prefers-color-scheme: dark) {
    .logo-container {
        background: rgba(28, 31, 36, 0.6);
        box-shadow:
            0 0 0 0.5px rgba(255, 255, 255, 0.08),
            0 24px 56px -12px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }
    .logo-container:hover {
        box-shadow:
            0 0 0 0.5px rgba(255, 255, 255, 0.12),
            0 32px 64px -12px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================
   Typography
   ======================================== */

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 0.875rem;
    letter-spacing: -0.045em;
    line-height: 1;
    animation: fadeIn 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.2s both;
    position: relative;
    z-index: 1;
}

p.subtitle {
    font-size: 1.1875rem;
    color: var(--text-secondary);
    max-width: 380px;
    margin: 0 0 2.5rem;
    line-height: 1.5;
    letter-spacing: -0.01em;
    font-weight: 400;
    /* Reserve ~2 lines so the rotating tagline doesn't shift the layout as it cycles */
    min-height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: opacity, transform;
    position: relative;
    z-index: 1;
}

/* ========================================
   App Store Button
   ======================================== */

.app-store-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.5s both;
    position: relative;
    z-index: 1;
}

.app-store-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: 0.875rem 2rem;
    border-radius: 980px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.35s ease, opacity 0.2s ease;
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.12);
}

.app-store-button:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 8px 28px -6px rgba(0, 0, 0, 0.16);
}

.app-store-button:active {
    transform: translateY(0) scale(0.97);
    opacity: 0.85;
}

.app-store-button svg {
    fill: currentColor;
}

.coming-soon {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    margin-top: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

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

.site-footer {
    padding: 1.25rem 2rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 1.25rem;
    border-top: 0.5px solid var(--border-color);
}

.footer-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: -0.005em;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-color);
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.lang-switcher-main {
    display: flex;
    align-items: center;
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 0.5px solid var(--border-color);
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.4rem 1.25rem 0.4rem 0;
    min-height: 44px;
    transition: color 0.2s ease;
    font-family: inherit;
    letter-spacing: -0.005em;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231B1F24%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 0.45rem auto;
}

@media (prefers-color-scheme: dark) {
    .lang-select {
        background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23F5F5F5%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    }
}

.lang-select:hover,
.lang-select:focus {
    color: var(--text-secondary);
    outline: none;
}

/* ========================================
   Legal Document Pages
   ======================================== */

body.legal-doc-page {
    display: block;
    min-height: 100vh;
}

.legal-header {
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--shadow-color);
    z-index: 10;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    color: var(--accent-color);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
    text-align: left;
    display: block;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content p,
.legal-content li {
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

/* ========================================
   Responsive: Mobile
   ======================================== */

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

    p.subtitle {
        font-size: 1.0625rem;
        max-width: 320px;
    }

    .app-store-button {
        padding: 0.75rem 1.75rem;
        font-size: 1rem;
    }

    .logo-container {
        width: 100px;
        height: 100px;
        border-radius: 24px;
        margin-bottom: 1.75rem;
    }

    .site-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }

    .lang-switcher-main {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        padding-top: 0.375rem;
        border-top: 0.5px solid var(--border-color);
    }
}

/* Fallback letter styling */
.logo-container {
    font-family: ui-rounded, 'SF Pro Rounded', -apple-system, sans-serif;
}
