/* 
  ChronMira Landing Page Styles 
  Matches application aesthetic (modern, clean, secure)
*/

:root {
    /* Color Palette derived from okLCH/Tailwind aesthetic */
    --background: #ffffff;
    --foreground: #0f172a;
    /* Slate 900 */

    --card: #ffffff;
    --card-foreground: #0f172a;

    --muted: #f1f5f9;
    /* Slate 100 */
    --muted-foreground: #64748b;
    /* Slate 500 */

    --primary: #0f172a;
    /* Slate 900 */
    --primary-foreground: #f8fafc;
    /* Slate 50 */

    --border: #e2e8f0;
    /* Slate 200 */
    --input: #e2e8f0;
    --ring: #94a3b8;
    /* Slate 400 */

    --radius: 0.75rem;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

    /* Gradients & Glows */
    --glow-color: rgba(15, 23, 42, 0.05);
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #020617;
        /* Slate 950 */
        --foreground: #f8fafc;
        /* Slate 50 */

        --card: #0f172a;
        /* Slate 900 */
        --card-foreground: #f8fafc;

        --muted: #1e293b;
        /* Slate 800 */
        --muted-foreground: #94a3b8;

        --primary: #f8fafc;
        --primary-foreground: #020617;

        --border: #1e293b;
        --input: #1e293b;
        --ring: #cbd5e1;

        --glow-color: rgba(248, 250, 252, 0.03);
    }
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to right, var(--foreground), var(--muted-foreground));
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

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

.container-sm {
    max-width: 600px;
}

/* Glow Background effect */
.glow-bg {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 500px;
    background: radial-gradient(circle at top, var(--glow-color) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: calc(var(--radius) - 2px);
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-secondary {
    background-color: var(--background);
    color: var(--foreground);
    border-color: var(--border);
}

.btn-secondary:hover {
    background-color: var(--muted);
}

.btn-block {
    width: 100%;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--border);
    background-color: rgba(var(--background), 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.025em;
}

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

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--foreground);
}

.nav .btn-secondary {
    padding: 0.5rem 1rem;
    color: var(--foreground);
}

/* Hero Section */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--foreground);
    background-color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 9999px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.04em;
    animation: fade-in-up 0.6s ease-out;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 600px;
    animation: fade-in-up 0.6s ease-out 0.1s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    animation: fade-in-up 0.6s ease-out 0.2s both;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Features */
.features {
    padding: 5rem 0;
    background-color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--muted-foreground);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border-color: var(--ring);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: calc(var(--radius) - 4px);
    background-color: var(--muted);
    color: var(--foreground);
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-desc {
    color: var(--muted-foreground);
    font-size: 0.95rem;
}

/* Waitlist Form Section */
.waitlist-section {
    padding: 6rem 0;
}

.waitlist-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 0.5rem);
    padding: 3rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

.waitlist-header {
    text-align: center;
    margin-bottom: 2rem;
}

.waitlist-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.waitlist-header p {
    color: var(--muted-foreground);
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    background-color: var(--background);
    border: 1px solid var(--input);
    color: var(--foreground);
    border-radius: calc(var(--radius) - 2px);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    outline: none;
}

.form-input::placeholder {
    color: var(--muted-foreground);
}

.form-input:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
}

.form-result {
    text-align: center;
    font-size: 0.875rem;
    margin-top: 1rem;
    display: none;
    padding: 0.75rem;
    border-radius: calc(var(--radius) - 2px);
}

.form-result.success {
    display: block;
    background-color: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-result.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

@media (prefers-color-scheme: dark) {
    .form-result.success {
        color: #4ade80;
    }

    .form-result.error {
        color: #f87171;
    }
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 640px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .waitlist-card {
        padding: 2rem 1.5rem;
    }

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}