/* Custom styles for Castellucci MD website */

/* ===== Base & Typography ===== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
}

.font-display {
    font-family: 'Playfair Display', Georgia, serif;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(59, 7, 100, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

/* ===== Hero Animations ===== */
.hero-badge {
    animation: fadeInDown 0.8s ease-out both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero h1 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

#hero p {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

#hero .flex-col {
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

#hero .mt-16 {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

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

/* ===== Geometric Shapes ===== */
.geo-shape {
    position: absolute;
    opacity: 0.08;
    pointer-events: none;
}

.geo-circle-1 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.4) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.geo-circle-2 {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.5) 0%, transparent 70%);
    bottom: 10%;
    left: 5%;
    animation: float 10s ease-in-out infinite reverse;
}

.geo-circle-3 {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid rgba(251, 191, 36, 0.3);
    top: 30%;
    left: 10%;
    animation: spin 20s linear infinite;
}

.geo-square-1 {
    width: 120px;
    height: 120px;
    background: rgba(168, 85, 247, 0.15);
    border-radius: 24px;
    top: 20%;
    right: 15%;
    transform: rotate(45deg);
    animation: float 6s ease-in-out infinite;
}

.geo-square-2 {
    width: 80px;
    height: 80px;
    background: rgba(251, 191, 36, 0.2);
    border-radius: 16px;
    bottom: 25%;
    right: 25%;
    transform: rotate(30deg);
    animation: float 7s ease-in-out infinite reverse;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(147, 51, 234, 0.2);
    top: 60%;
    left: 20%;
    animation: spin 15s linear infinite;
}

.geo-ring-1 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid rgba(251, 191, 36, 0.15);
    top: 40%;
    right: 5%;
    animation: pulse-ring 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* ===== Dots Pattern ===== */
.dots-pattern {
    position: absolute;
    opacity: 0.06;
    pointer-events: none;
}

.dots-top-right {
    top: 15%;
    right: 8%;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, rgba(251, 191, 36, 0.8) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
}

.dots-bottom-left {
    bottom: 20%;
    left: 5%;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, rgba(168, 85, 247, 0.8) 1.5px, transparent 1.5px);
    background-size: 14px 14px;
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .geo-shape, .dots-pattern {
        animation: none;
    }
    .hero-badge, #hero h1, #hero p, #hero .flex-col, #hero .mt-16 {
        animation: none;
        opacity: 1;
    }
}

/* ===== Service Cards ===== */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Procedure Cards ===== */
.procedure-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.procedure-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* ===== Back to Top ===== */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== Form Styles ===== */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.15);
}

select {
    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='%239333ea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== Selection Color ===== */
::selection {
    background: rgba(147, 51, 234, 0.2);
    color: #3b0764;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #faf5ff;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #9333ea, #f59e0b);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7e22ce;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .geo-circle-1 {
        width: 200px;
        height: 200px;
    }
    .geo-circle-2 {
        width: 150px;
        height: 150px;
    }
    .geo-square-1 {
        width: 60px;
        height: 60px;
    }
    .geo-square-2 {
        width: 40px;
        height: 40px;
    }
    .geo-triangle-1 {
        border-left: 30px solid transparent;
        border-right: 30px solid transparent;
        border-bottom: 52px solid rgba(147, 51, 234, 0.2);
    }
    .geo-ring-1 {
        width: 100px;
        height: 100px;
    }
}
