/* ===== CSS Custom Properties ===== */
:root {
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
}

/* ===== Base / Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }

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

.geo-circle-1 {
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
    top: -100px;
    right: -150px;
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.2) 0%, transparent 70%);
    bottom: 150px;
    left: -80px;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-circle-3 {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(45, 212, 191, 0.1);
    top: 30%;
    left: 40%;
    animation: float-slow 12s ease-in-out infinite;
}

.geo-square-1 {
    width: 120px;
    height: 120px;
    background: rgba(20, 184, 166, 0.08);
    border: 2px solid rgba(20, 184, 166, 0.15);
    top: 20%;
    right: 10%;
    transform: rotate(45deg);
    animation: spin-slow 30s linear infinite;
}

.geo-square-2 {
    width: 60px;
    height: 60px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    bottom: 25%;
    right: 25%;
    transform: rotate(20deg);
    animation: spin-slow 20s linear infinite reverse;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(20, 184, 166, 0.06);
    top: 40%;
    left: 5%;
    animation: float-slow 18s ease-in-out infinite;
}

.geo-dots {
    width: 200px;
    height: 200px;
    background-image: radial-gradient(circle, rgba(20, 184, 166, 0.2) 1px, transparent 1px);
    background-size: 16px 16px;
    bottom: 10%;
    right: 5%;
    opacity: 0.5;
}

/* ===== Hero Diagonal ===== */
.hero-diagonal {
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    background: var(--slate-50);
}

/* ===== Animations ===== */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(2deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal-500), var(--teal-600));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover::after {
    transform: scaleX(1);
}

/* ===== Scroll Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ===== Navbar Scroll State ===== */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 4px 20px rgba(0, 0, 0, 0.05);
}
.navbar-scrolled .menu-line {
    background: var(--slate-700) !important;
}

/* ===== Mobile Menu ===== */
#mobile-menu.active {
    display: block;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.hidden {
    display: none;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Mobile Toggle Active State ===== */
.mobile-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
.mobile-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
.mobile-toggle.active .menu-line:nth-child(3) {
    width: 20px;
    margin-left: 0;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ===== Focus Styles ===== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--teal-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Selection ===== */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: var(--slate-900);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--slate-100); }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }

/* ===== Responsive tweaks ===== */
@media (max-width: 640px) {
    .geo-circle-1 { width: 300px; height: 300px; right: -100px; }
    .geo-circle-2 { width: 150px; height: 150px; }
    .geo-square-1 { width: 60px; height: 60px; }
    .geo-square-2 { display: none; }
    .geo-triangle-1 { display: none; }
    .geo-dots { display: none; }
}
