/* Apple-style smooth scrolling and typography */
html {
    /* Smooth overlay scrollbar that doesn't affect layout */
    overflow-y: scroll;
    scrollbar-width: thin; /* Firefox: thin scrollbar */
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent; /* Firefox: thumb and track */
}

/* Webkit/Blink browsers (Chrome, Safari, Edge) */
html::-webkit-scrollbar {
    width: 8px;
}

html::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

html::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Hide scrollbar on mobile devices */
@media (max-width: 768px) {
    html {
        scrollbar-width: none; /* Firefox */
    }
    html::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Edge */
    }
}

[x-cloak] {
    display: none !important;
}

body {
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* Apple cubic-bezier easing function */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.parallax-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 200%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.glass-effect {
    /* macOS Tahoe liquid glass style */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.06) 100%
    );
    backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
    border: 0.5px solid rgba(255, 255, 255, 0.22);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.1),
        0 2px 8px 0 rgba(0, 0, 0, 0.06),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 0 rgba(255, 255, 255, 0.05);
}

/* Glass card for content sections */
.glass-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(30px) saturate(180%) brightness(1.05);
    -webkit-backdrop-filter: blur(30px) saturate(180%) brightness(1.05);
    border: 0.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 24px;
    box-shadow:
        0 4px 16px 0 rgba(0, 0, 0, 0.08),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px 0 rgba(0, 0, 0, 0.12),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
}

/* Apple-style button */
.glass-button {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 10px 20px;
    color: white;
    font-weight: 600;
    letter-spacing: -0.02em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px 0 rgba(0, 0, 0, 0.08),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
}

.glass-button:hover {
    transform: scale(1.02);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.12) 100%
    );
    box-shadow:
        0 4px 12px 0 rgba(0, 0, 0, 0.12),
        0 0 20px 0 rgba(255, 255, 255, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.25);
}

.glass-button:active {
    transform: scale(0.98);
}

/* Focus states with glow */
a:focus-visible, button:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.15),
        0 0 20px 0 rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

/* Icon hover animation */
.icon-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-hover:hover {
    transform: translateY(-2px) scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.2));
}

/* Nav link enhancement */
.nav-link {
    position: relative;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after {
    width: 80%;
}

/* Enhanced text readability with stronger shadows and contrast */
.drop-shadow-lg {
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.7),
        0 4px 8px rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.98);
    font-weight: 600;
}

/* Text on glass backgrounds */
.text-on-glass {
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 2px 6px rgba(0, 0, 0, 0.6);
    color: white;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Body text with better contrast */
.body-text {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Reusable glass-styled <select> dropdown. Native <option> popups can't
   pick up backdrop-filter, so they fall back to a solid dark background
   that matches the glass palette instead of the browser default. */
.glass-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 500;
    padding: 0.875rem 2.5rem 0.875rem 1.5rem;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-select:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.glass-select:focus {
    background-color: rgba(255, 255, 255, 0.1);
    outline: none;
}

.glass-select option {
    background-color: #2b2438;
    color: white;
}

/* Reusable glass-styled text <input>/<textarea>. Matches .glass-select's
   visual language (transparent background, translucent border, subtle
   hover/focus states) — unlike .glass-select these need their own visible
   border since they aren't sitting inside a divided glass-effect bar. */
.glass-input,
.glass-textarea {
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    color: white;
    font-weight: 500;
    padding: 0.875rem 1.25rem;
    width: 100%;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-input::placeholder,
.glass-textarea::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.glass-input:hover,
.glass-textarea:hover {
    background-color: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.6);
}

.glass-input:focus,
.glass-textarea:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.75);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.glass-textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
}

/* Checkbox accent matching the site's purple/pink brand gradient. */
.glass-checkbox {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: #c084fc;
    cursor: pointer;
}

/* Honeypot wrapper for the contact form: pulls the field off-screen instead
   of display:none/visibility:hidden — some spam bots specifically skip
   fields hidden via those two properties but still blindly fill anything
   else. Paired with aria-hidden + tabindex="-1"/autocomplete="off" on the
   field itself (see contact.html / pages/forms.py) so real users —
   including keyboard/screen-reader users — never encounter it. */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Smooth gradient text */
.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
    font-weight: 700;
}
