/* =========================================================================
   VARIABLES & RESET
   ========================================================================= */
:root {
    --black: #000000;
    --dark-gray: #111111;
    --gray: #666666;
    --light-gray: #f2f2f2;
    --white: #ffffff;
    --font-main: 'Outfit', sans-serif;
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Custom cursor */
}

/* =========================================================================
   CUSTOM CURSOR
   ========================================================================= */
@media (min-width: 769px) {
    .cursor {
        position: fixed;
        width: 8px;
        height: 8px;
        background-color: var(--black);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s, background-color 0.2s;
    }

    .cursor-follower {
        position: fixed;
        width: 40px;
        height: 40px;
        border: 1px solid rgba(0, 0, 0, 0.2);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        transform: translate(-50%, -50%);
        transition: transform 0.1s;
    }

    body:hover .cursor {
        opacity: 1;
    }

    a:hover ~ .cursor, button:hover ~ .cursor, .interactive:hover ~ .cursor, .btn:hover ~ .cursor {
        width: 60px;
        height: 60px;
        background-color: rgba(0, 0, 0, 0.05);
        border: 1px solid var(--black);
        mix-blend-mode: difference;
    }
}

/* =========================================================================
   TYPOGRAPHY
   ========================================================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2.5rem, 5vw, 4rem); }
h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
p { font-size: 1.125rem; font-weight: 300; color: var(--gray); margin-bottom: 24px; }
.subtitle { font-size: 1.5rem; color: var(--black); font-weight: 400; }

/* =========================================================================
   LAYOUT
   ========================================================================= */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

section {
    padding: 120px 0;
    position: relative;
}

.bg-black {
    background-color: var(--black);
    color: var(--white);
}

.bg-black h2, .bg-black h3 {
    color: var(--white);
}

.bg-black p {
    color: #aaaaaa;
}

/* =========================================================================
   COMPONENTS
   ========================================================================= */
/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    text-decoration: none;
    letter-spacing: -0.03em;
    z-index: 101;
}

.fox-icon {
    width: 24px;
    height: 24px;
    background-color: var(--black);
    border-radius: 50% 0 50% 50%;
    transform: rotate(45deg);
    transition: var(--transition);
}

.logo:hover .fox-icon {
    transform: rotate(135deg) scale(1.1);
}

.bg-black .logo { color: var(--white); }
.bg-black .fox-icon { background-color: var(--white); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    background-color: var(--black);
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.125rem;
    border-radius: 0 20px 0 20px; /* Fox ear shape */
    transition: var(--transition);
    border: 1px solid var(--black);
    position: relative;
    overflow: hidden;
    cursor: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: var(--white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: 1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn span {
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.btn:hover span {
    color: var(--black);
}

.btn-small {
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-outline {
    background-color: transparent;
    color: var(--black);
}

.btn-outline::before {
    background-color: var(--black);
}

.btn-outline:hover span {
    color: var(--white);
}

.btn-white {
    background-color: var(--white);
    color: var(--black);
    border-color: var(--white);
}

.btn-white::before {
    background-color: var(--black);
}

.btn-white:hover span {
    color: var(--white);
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: transform 0.4s ease, background 0.4s ease, padding 0.4s ease, border 0.4s ease;
    padding: 30px 0;
    background-color: transparent;
}

.main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: var(--black);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.nav-link:not(.btn-small)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--black);
    transform: translateX(-101%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:not(.btn-small):hover::after {
    transform: translateX(0);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 101;
}

.mobile-menu-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--black);
    transition: var(--transition);
}

.mobile-menu-toggle span:first-child { top: 0; }
.mobile-menu-toggle span:last-child { bottom: 0; }
.mobile-menu-toggle.active span:first-child { top: 9px; transform: rotate(45deg); }
.mobile-menu-toggle.active span:last-child { bottom: 9px; transform: rotate(-45deg); }

/* Footer */
.main-footer {
    background-color: var(--light-gray);
    padding: 100px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.footer-links h4 {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    color: var(--gray);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--black);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.legal-links a {
    text-decoration: none;
    color: var(--gray);
    margin-left: 24px;
    font-size: 0.9rem;
}

/* =========================================================================
   ANIMATIONS
   ========================================================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Cards Hover Effects */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.service-card {
    background-color: var(--light-gray);
    padding: 50px 40px;
    border-radius: 0 40px 0 40px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
}

.service-card:hover {
    background-color: var(--white);
    border-color: rgba(0,0,0,0.1);
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.service-card p {
    font-size: 1rem;
    margin-bottom: 0;
}

.service-icon {
    width: 50px;
    height: 50px;
    background-color: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 30px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(10deg);
}

/* Process Flow */
.process-flow {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 80px;
}

.process-line {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(0,0,0,0.1);
    z-index: 1;
}

.process-line-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: var(--black);
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-step {
    position: relative;
    z-index: 2;
    background-color: var(--white);
    width: 25%;
    padding: 0 20px;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--white);
    border: 1px solid var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 auto 24px;
    transition: var(--transition);
}

.process-step:hover .step-number {
    background-color: var(--black);
    color: var(--white);
    transform: scale(1.1);
}

/* Forms */
.form-group {
    margin-bottom: 40px;
    position: relative;
}

.form-group input, 
.form-group textare { /* typo fix below */ }

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.2);
    font-family: var(--font-main);
    font-size: 1.1rem;
    color: var(--black);
    outline: none;
    transition: border-color 0.3s;
    resize: vertical;
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--gray);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--black);
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -15px;
    font-size: 0.85rem;
    color: var(--black);
    font-weight: 500;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 10;
}

.hero h1 {
    max-width: 900px;
    margin-bottom: 30px;
}

.hero .subtitle {
    max-width: 600px;
    margin-bottom: 50px;
}

/* Page Headers */
.page-header {
    padding-top: 180px;
    padding-bottom: 80px;
    background-color: var(--light-gray);
    text-align: center;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    font-weight: 500;
}
.alert-success { background-color: #e6f7eb; color: #1e7a3a; border: 1px solid #1e7a3a; }
.alert-error { background-color: #fcebeb; color: #d62828; border: 1px solid #d62828; }

/* =========================================================================
   MEDIA QUERIES
   ========================================================================= */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .process-flow {
        flex-direction: column;
        gap: 40px;
    }
    .process-line {
        top: 0;
        left: 30px;
        width: 1px;
        height: 100%;
    }
    .process-line-progress {
        width: 1px;
        height: 0; /* JS can animate height */
    }
    .process-step {
        width: 100%;
        display: flex;
        align-items: center;
        text-align: left;
        padding: 0;
        background: transparent;
    }
    .step-number {
        margin: 0 30px 0 0;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--white);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .main-nav.active {
        right: 0;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    .nav-link {
        font-size: 1.5rem;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .cursor, .cursor-follower {
        display: none !important;
    }
    body {
        cursor: auto !important;
    }
    .btn, a, button {
        cursor: pointer !important;
    }
}
