/*
  ----------------------------------------
  Application (Global styles)
  ----------------------------------------
*/

@layer styles {
    /* Semantic background utilities not covered by Prewind's generated color set */
    .bg-background {
        background-color: var(--background);
    }
    .bg-card-bg {
        background-color: var(--card-bg);
    }
    .bg-surface-bg {
        background-color: var(--surface-bg);
    }

    /* Desktop nav links */
    .desktop {
        display: flex;
        position: relative;
        align-items: center;
        gap: var(--space-md);
        height: 100%;
        min-height: var(--height-md);

        .nav-link {
            position: relative;
            display: flex;
            align-items: center;
            height: 100%;
            text-decoration: none;
            color: var(--darker);
            font-weight: 600;

            &.active::after {
                content: "";
                position: absolute;
                left: 0;
                right: 0;
                bottom: 0;
                height: 4px;
                background-color: var(--brand-1);
            }
        }
    }

    /* Mobile menu */
    .mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: start;
        padding-top: var(--space-md);
        gap: 1rem;

        .nav-link {
            padding: 1rem;
            font-size: var(--text-lg);
            font-weight: var(--font-semibold);
            text-decoration: none;
            color: var(--white);

            &:active {
                background-color: var(--brand-1);
            }
        }
    }

    /* Landing logo with soft glow */
    .landing-logo {
        display: flex;
        justify-content: center;
        filter: drop-shadow(0 0 30px oklch(73.87% 0.121 199.627 / 0.35));
    }

    /* Landing hero resets default h1/p margins so flex gap controls spacing */
    .landing-hero {
        h1,
        p {
            margin: 0;
        }
        h1 {
            line-height: 1.1;
        }
        p {
            line-height: 1.5;
        }
    }

    /* Pillar separator dots */
    .pillar-dot {
        display: inline-block;
        width: 0.35rem;
        height: 0.35rem;
        border-radius: 50%;
        background: var(--brand-2);
        opacity: 0.9;
    }

    /* Waitlist inline pill form */
    .waitlist-form {
        width: 100%;
        max-width: 30rem;
        display: flex;
        justify-content: center;
    }
    .waitlist-pill {
        display: flex;
        align-items: center;
        gap: var(--space-2xs);
        background: var(--card-bg);
        border-radius: 9999px;
        padding: 3px;
        border: 1px solid var(--surface-bg);
        box-shadow: 0 0 40px oklch(73.87% 0.121 199.627 / 0.15);
        width: 100%;
    }
    .waitlist-input {
        flex: 1;
        min-width: 0;
        height: 3rem;
        background: transparent;
        border: none;
        outline: none;
        color: var(--white);
        font-size: var(--ui-field-font-size, 0.9rem);
        padding: 0.4rem var(--space-sm);
        &::placeholder {
            color: var(--midtone);
        }

        /* Override Chrome/Safari autofill yellow background */
        &:-webkit-autofill,
        &:-webkit-autofill:hover,
        &:-webkit-autofill:focus,
        &:-webkit-autofill:active {
            -webkit-text-fill-color: var(--white);
            -webkit-box-shadow: 0 0 0 1000px var(--card-bg) inset;
            caret-color: var(--white);
            transition: background-color 9999s ease-in-out 0s;
        }
    }
    .waitlist-btn {
        flex-shrink: 0;
        height: 3rem;
        padding: 0.55rem var(--space-sm);
        border-radius: 9999px;
        border: none;
        background: linear-gradient(
            135deg,
            var(--brand-1) 0%,
            var(--brand-2) 100%
        );
        color: var(--white);
        font-weight: var(--font-semibold);
        font-size: var(--ui-field-font-size, 0.9rem);
        cursor: pointer;
        white-space: nowrap;
        transition: filter 150ms ease;
        &:hover {
            filter: brightness(1.1);
        }
    }

    /* Crud Header (for tables, forms – also used in custom scaffolds /erb/scaffold/*) */
    .crud-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: var(--space-2xl);

        h3 {
            margin: 0;
        }
    }
}
