/* Meridian Form — dark glassmorphism design utilities & motion */

::selection {
    background: rgba(217, 119, 6, .35);
    color: #fff;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #111827;
    overflow-x: hidden;
}

/* ---------- glass ---------- */
.glass {
    background: rgba(31, 41, 55, .55);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .08);
}

.glass-card {
    background: linear-gradient(160deg, rgba(31, 41, 55, .72), rgba(17, 24, 39, .55));
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .07);
    transition: border-color .4s ease, transform .4s ease, box-shadow .4s ease;
}

.glass-card:hover {
    border-color: rgba(45, 212, 191, .35);
    transform: translateY(-4px);
    box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(217, 119, 6, .12);
}

#site-header.is-scrolled .glass {
    background: rgba(17, 24, 39, .86);
}

/* ---------- gradient text ---------- */
.gradient-text {
    background: linear-gradient(96deg, #F59E0B 0%, #D97706 45%, #2DD4BF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gradient-copper {
    background: linear-gradient(96deg, #FBBF24, #D97706);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- glow ---------- */
.hover-glow {
    transition: box-shadow .4s ease, transform .4s ease, border-color .4s ease, background-color .4s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 0 1px rgba(45, 212, 191, .5), 0 10px 40px -10px rgba(45, 212, 191, .45);
    transform: translateY(-2px);
}

/* ---------- reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s cubic-bezier(.22, .61, .36, 1), transform .8s cubic-bezier(.22, .61, .36, 1);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger > * {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
}

.stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

.stagger.is-visible > *:nth-child(1) { transition-delay: .04s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: .1s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: .16s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: .22s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: .28s; }
.stagger.is-visible > *:nth-child(6) { transition-delay: .34s; }
.stagger.is-visible > *:nth-child(7) { transition-delay: .4s; }
.stagger.is-visible > *:nth-child(8) { transition-delay: .46s; }

/* ---------- grid overlay ---------- */
.grid-overlay {
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, black 25%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, black 25%, transparent 75%);
}

/* ---------- orbs ---------- */
@keyframes orb-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    33% { transform: translate3d(40px, -30px, 0) scale(1.08); }
    66% { transform: translate3d(-30px, 24px, 0) scale(.96); }
}

.orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(90px);
    opacity: .55;
    animation: orb-float 14s ease-in-out infinite;
    pointer-events: none;
}

.orb-2 { animation-delay: -5s; animation-duration: 18s; }
.orb-3 { animation-delay: -9s; animation-duration: 16s; }

/* ---------- nav ---------- */
.nav-link { position: relative; }

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, #D97706, #2DD4BF);
    transition: transform .35s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

/* ---------- filter chips ---------- */
.filter-chip {
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(31, 41, 55, .5);
    color: #9CA3AF;
    transition: color .3s ease, border-color .3s ease, background-color .3s ease;
    cursor: pointer;
}

.filter-chip:hover {
    color: #fff;
    border-color: rgba(45, 212, 191, .4);
}

.filter-chip.is-active {
    background: rgba(45, 212, 191, .14);
    border-color: rgba(45, 212, 191, .55);
    color: #2DD4BF;
}

/* ---------- clamp ---------- */
.clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- form fields ---------- */
.field {
    width: 100%;
    border-radius: .85rem;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(17, 24, 39, .6);
    padding: .8rem 1rem;
    font-size: .9rem;
    color: #F9FAFB;
    outline: none;
    transition: border-color .3s ease, box-shadow .3s ease;
}

.field:focus {
    border-color: rgba(45, 212, 191, .55);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, .15);
}

.field::placeholder { color: #6B7280; }

select.field option { background: #1F2937; color: #F9FAFB; }

.field-invalid {
    border-color: rgba(248, 113, 113, .7);
}

.field-invalid:focus {
    border-color: rgba(248, 113, 113, .8);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, .15);
}

.field-error {
    margin-top: .4rem;
    font-size: .75rem;
    line-height: 1.4;
    color: #F87171;
}

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #111827; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #4B5563; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .orb { animation: none !important; }
    .reveal, .stagger > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
