/* ============================================
   Orthotics At Home — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: #D4A843;
    color: #0d1b2a;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d1b2a;
}
::-webkit-scrollbar-thumb {
    background: #D4A843;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #EABF34;
}

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

.circle-1 {
    top: 8%;
    left: 5%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, #D4A843 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.circle-2 {
    top: 15%;
    right: 8%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid #D4A843;
    animation: float 6s ease-in-out infinite reverse;
}

.circle-3 {
    bottom: 20%;
    left: 10%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #D4A843;
    opacity: 0.06;
    animation: float 10s ease-in-out infinite;
}

.square-1 {
    top: 25%;
    right: 15%;
    width: 100px;
    height: 100px;
    background: #D4A843;
    opacity: 0.05;
    transform: rotate(45deg);
    animation: spin 20s linear infinite;
}

.square-2 {
    bottom: 30%;
    right: 5%;
    width: 60px;
    height: 60px;
    border: 2px solid #D4A843;
    transform: rotate(30deg);
    animation: spin 15s linear infinite reverse;
}

.triangle-1 {
    top: 60%;
    left: 3%;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid #D4A843;
    opacity: 0.04;
    animation: float 7s ease-in-out infinite;
}

.diamond-1 {
    top: 40%;
    left: 50%;
    width: 80px;
    height: 80px;
    background: #D4A843;
    opacity: 0.03;
    transform: rotate(45deg);
    animation: spin 25s linear infinite;
}

.line-1 {
    top: 10%;
    left: 0;
    width: 200px;
    height: 2px;
    background: linear-gradient(to right, transparent, #D4A843, transparent);
    transform: rotate(-15deg);
    animation: slide 12s ease-in-out infinite;
}

.line-2 {
    bottom: 15%;
    right: 0;
    width: 160px;
    height: 2px;
    background: linear-gradient(to right, transparent, #D4A843, transparent);
    transform: rotate(10deg);
    animation: slide 10s ease-in-out infinite reverse;
}

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

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

@keyframes slide {
    0%, 100% { transform: translateX(0) rotate(-15deg); opacity: 0.08; }
    50% { transform: translateX(30px) rotate(-10deg); opacity: 0.15; }
}

/* ============================================
   Navigation
   ============================================ */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #D4A843;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after {
    width: 60%;
}
.nav-link:hover {
    color: #F4DF8F !important;
}

/* Mobile menu */
#mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}
#mobile-menu.closed {
    opacity: 0 !important;
    pointer-events: none !important;
}

.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #D4A843;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.mobile-link:hover::after {
    width: 80%;
}

/* Hamburger animation */
#menu-btn.active #bar1 {
    transform: translateY(3.5px) rotate(45deg);
}
#menu-btn.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}
#menu-btn.active #bar3 {
    transform: translateY(-3.5px) rotate(-45deg);
    width: 5px;
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal[data-delay="100ms"] { transition-delay: 100ms; }
    .reveal[data-delay="200ms"] { transition-delay: 200ms; }
    .reveal[data-delay="300ms"] { transition-delay: 300ms; }
}

/* Fallback: always visible when reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Form Styles
   ============================================ */
select option {
    background: #0d1b2a;
    color: #fff;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .geo-shape {
        opacity: 0.06;
    }
    .circle-1 {
        width: 180px;
        height: 180px;
    }
    .circle-2 {
        width: 100px;
        height: 100px;
    }
    .square-1 {
        width: 60px;
        height: 60px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .geo-shape {
        opacity: 0.08;
    }
}

/* ============================================
   Focus Visible for Accessibility
   ============================================ */
:focus-visible {
    outline: 2px solid #D4A843;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid #D4A843;
    outline-offset: 2px;
    border-radius: 0.5rem;
}
