/* ============================================================
   ZeroKeepChat — Shared Stylesheet
   Warm Minimalist Design System & Performance-Optimized Styling
   ============================================================ */

:root {
    /* Color Palette */
    --color-text-primary: #141414;
    --color-text-secondary: #262626;
    --color-text-tertiary: #4E4D4C;
    --color-bg-primary: #F9F6F2;
    --color-bg-secondary: #F4EEE5;
    --color-stroke-buttons: #A1A1A1;
    --color-stroke-cards: #E7E7E7;

    /* Status Colors & Utilities */
    --success: #1a7f37;
    --error: #cf222e;
    --glass-blur: blur(24px);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
    position: relative;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* --- Ambient Soft Background Orbs --- */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: floatOrb 25s infinite alternate ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: #FFFFFF;
    top: -150px;
    left: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #EADCD0;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--color-bg-secondary);
    top: 40%;
    left: 40%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    animation-delay: -10s;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(40px, 40px) scale(1.1);
    }
}

/* --- Typography --- */
h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}

h2 {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--color-text-primary);
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
}

p {
    font-size: 1.125rem;
    color: var(--color-text-tertiary);
    margin-bottom: 2rem;
    font-weight: 400;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 6rem 0;
    position: relative;
}

/* --- Navbar (Light Frosted Glass) --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    left: 0;
    z-index: 100;
    background: rgba(249, 246, 242, 0.75);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--color-stroke-cards);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-primary);
}

.logo-img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    display: block;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-text-primary);
    letter-spacing: -0.03em;
}

@media (max-width: 767px) {
    .brand-name {
        display: none;
    }
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switch {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.6) url("data:image/svg+xml;charset=US-ASCII,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 1rem center;
    border: 1px solid var(--color-stroke-cards);
    color: var(--color-text-primary);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 2.5rem 0.75rem 1.25rem;
    border-radius: 50px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.lang-switch:hover,
.lang-switch:focus {
    border-color: var(--color-stroke-buttons);
    background-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.lang-switch-desktop {
    display: inline-block;
}

.lang-switch-mobile {
    display: none;
}

@media (max-width: 767px) {
    .lang-switch-desktop {
        display: none;
    }
    .lang-switch-mobile {
        display: inline-block;
        padding: 0.6rem 1.8rem 0.6rem 0.75rem;
        background-position: right 0.5rem center;
        font-size: 1.1rem;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
    border: 1px solid var(--color-text-primary);
}

.btn-primary:hover {
    background: var(--color-text-tertiary);
    border-color: var(--color-stroke-buttons);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(20,20,20,0.1);
}

/* --- Hero Section --- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12rem 0 8rem;
    min-height: 100vh;
    justify-content: center;
}

.hero p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Refined Light Glass Chat Animation --- */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 350px;
    height: 280px;
    margin: 0 auto 3rem;
    perspective: 1000px;
}

.glass-bubble {
    position: absolute;
    width: fit-content;
    max-width: 85%;
    padding: 1.2rem 1.5rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(255,255,255,0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-stroke-cards);
    box-shadow: 0 12px 32px rgba(20,20,20,0.06);
    opacity: 0;
    animation: floatAndVanish 6s infinite ease-in-out;
    color: var(--color-text-secondary);
}

.glass-bubble.left {
    left: 0;
    border-bottom-left-radius: 4px;
    transform-origin: left bottom;
}

.glass-bubble.right {
    right: 0;
    border-bottom-right-radius: 4px;
    transform-origin: right bottom;
    background: var(--color-text-primary);
    border-color: var(--color-text-primary);
    color: var(--color-bg-primary);
    box-shadow: 0 12px 32px rgba(20,20,20,0.15);
}

.gb-1 {
    bottom: 10px;
    animation-delay: 0s;
}

.gb-2 {
    bottom: 85px;
    animation-delay: 1.5s;
}

.gb-3 {
    bottom: 165px;
    animation-delay: 3s;
}

@keyframes floatAndVanish {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9) rotateX(5deg);
        filter: blur(5px);
    }
    15% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0px);
    }
    50% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0px);
    }
    80% {
        opacity: 0;
        transform: translateY(-30px) scale(1.02);
        filter: blur(8px);
    }
    100% {
        opacity: 0;
    }
}

/* --- Elegant Features Grid --- */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 4rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 4rem;
}

@media (min-width: 640px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

.glass-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-stroke-cards);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-align: left;
    transition: all 0.4s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.02);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-stroke-buttons);
    box-shadow: 0 16px 48px rgba(0,0,0,0.06);
    background: rgba(255, 255, 255, 0.6);
}

.glass-card p {
    font-size: 1rem;
    margin-bottom: 0;
}

.icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-stroke-cards);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* --- Minimalist Support Form --- */
.support-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

form {
    text-align: left;
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--color-stroke-cards);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 12px 40px rgba(0,0,0,0.03);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

input,
textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-stroke-cards);
    border-radius: 12px;
    background: rgba(255,255,255,0.8);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--color-stroke-buttons);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-text-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(20,20,20,0.05);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.visually-hidden {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    display: none;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
}

.status-success {
    background: #E8F5E9;
    color: var(--success);
    border: 1px solid #C8E6C9;
    display: block;
}

.status-error {
    background: #FFEBEE;
    color: var(--error);
    border: 1px solid #FFCDD2;
    display: block;
}

.loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-bg-primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-left: 10px;
}

.btn-loading .loader {
    display: inline-block;
}

.btn-loading {
    opacity: 0.8;
    pointer-events: none;
}

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

/* --- Scroll Animations --- */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

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

/* --- Skip to Main Content Link (Accessibility) --- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1.5rem;
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    z-index: 9999;
    font-weight: 600;
    transition: top 0.2s ease;
    text-decoration: none;
}

.skip-link:focus {
    top: 1.5rem;
}

/* --- Section Headers & Badges --- */
.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3.5rem;
}

.section-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-primary);
    background: rgba(20, 20, 20, 0.05);
    border: 1px solid var(--color-stroke-cards);
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

/* --- Step Grid (How It Works) --- */
.step-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.step-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-stroke-cards);
    padding: 2rem 1.5rem;
    border-radius: 20px;
    position: relative;
    transition: all 0.35s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-stroke-buttons);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.04);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.step-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.step-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.55;
}

/* --- FAQ Accordion --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-stroke-cards);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover,
.faq-item[open] {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--color-stroke-buttons);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
}

.faq-question {
    list-style: none;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-text-primary);
    user-select: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    margin-left: 1rem;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem 1.25rem;
    color: var(--color-text-tertiary);
    font-size: 0.98rem;
    line-height: 1.65;
}

.faq-answer p {
    margin-bottom: 0;
}

/* --- Footer --- */
footer {
    padding: 4rem 0 2.5rem;
    border-top: 1px solid var(--color-stroke-cards);
    color: var(--color-text-tertiary);
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
    background: rgba(249, 246, 242, 0.6);
    backdrop-filter: var(--glass-blur);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 2rem;
}

.footer-link {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.footer-languages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    max-width: 800px;
}

.footer-lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--color-stroke-cards);
    border-radius: 50px;
    transition: all 0.2s ease;
}

.footer-lang-pill:hover {
    background: #ffffff;
    border-color: var(--color-stroke-buttons);
    color: var(--color-text-primary);
    transform: translateY(-1px);
}

.footer-lang-pill.active {
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
    border-color: var(--color-text-primary);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid var(--color-stroke-cards);
    padding-top: 1.5rem;
    width: 100%;
}

/* --- Media Queries --- */
@media (min-width: 640px) {
    .step-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    .hero-visual {
        height: 320px;
        max-width: 450px;
    }
    .glass-bubble {
        font-size: 1.05rem;
        padding: 1.25rem 2rem;
    }
    form {
        padding: 3rem;
    }
}

@media (min-width: 1024px) {
    .step-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}
