/* ============================================
   ONWARD — Midnight Editorial Style
   ============================================
   Table of Contents:
   1. Fonts & Variables
   2. Base / Reset
   3. Custom Cursor
   4. Navigation
   5. Hero
   6. Marquee
   7. Scroll Reveal Animations
   8. Cards & Tilt
   9. Stats
   10. Services
   11. Portfolio / Work
   12. Links & Buttons
   13. Social Icons
   14. Utility / Misc
   ============================================ */


/* ------------------------------------------
   1. FONTS & VARIABLES
   ------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

@font-face {
    font-family: 'Satoshi';
    src: url('https://vgbujcuwptvheqijyjbe.supabase.co/storage/v1/object/public/hmac-uploads/uploads/4aed2f49-a476-436f-bae8-f31aa18f46fa/1767920861040-60c1c779/Satoshi-Variable.woff2') format('woff2');
    font-weight: 300 900;
    font-display: swap;
    font-style: normal;
}

:root {
    --font-satoshi: 'Satoshi', 'Inter', sans-serif;
    --color-bg: #050505;
    --color-accent: #FF6B50;
    --color-accent-hover: #E55A40;
    --color-text: #ebebeb;
    --color-text-muted: #888888;
    --color-text-dim: #666666;
    --color-text-faint: #444444;
    --color-text-ghost: #333333;
    --color-surface: #111111;
    --color-surface-hover: #161616;
    --color-surface-dark: #0a0a0a;
    --color-border: #1a1a1a;
    --color-border-light: #222222;
    --color-border-mid: #333333;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* ------------------------------------------
   2. BASE / RESET
   ------------------------------------------ */
* { cursor: none; }

body {
    font-family: var(--font-satoshi);
    background-color: var(--color-bg);
    color: var(--color-text);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.selection-coral::selection {
    background-color: var(--color-accent);
    color: white;
}


/* ------------------------------------------
   3. CUSTOM CURSOR
   ------------------------------------------ */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

.cursor-ring {
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(255, 107, 80, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, transform 0.15s ease;
}

.cursor-ring.hovering {
    width: 60px;
    height: 60px;
    border-color: rgba(255, 107, 80, 0.9);
}


/* ------------------------------------------
   4a. THEME TOGGLE (bottom nav)
   ------------------------------------------ */
.theme-toggle {
    color: #888888;
    background: transparent;
    border: none;
    outline: none;
    cursor: none;
    transition: color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
    color: #ffffff;
    background: #222222;
}

.theme-toggle.active {
    color: #000000;
    background: #FF6B50;
}

.theme-toggle:focus-visible {
    outline: 2px solid #FF6B50;
    outline-offset: 2px;
}


/* ------------------------------------------
   4. NAVIGATION
   ------------------------------------------ */
.glass-nav {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Top nav — blur background on scroll */
.top-nav {
    transition: background 0.3s ease, padding 0.3s ease;
}

.top-nav.scrolled {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(12px);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Nav link sliding underline */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: -100%;
    width: 100%;
    height: 1px;
    background: white;
    transition: left 0.4s var(--ease-out-expo);
}

.nav-link:hover::before {
    left: 0;
}

/* Floating bottom nav — always visible */
.bottom-nav {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}


/* ------------------------------------------
   5. HERO
   ------------------------------------------ */
.hero-text {
    font-size: 13vw;
    line-height: 0.9;
    letter-spacing: -0.05em;
}

/* Character-by-character reveal */
.hero-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: charReveal 0.6s var(--ease-out-expo) forwards;
    transition: transform 0.6s var(--ease-out-expo),
                color 0.4s ease,
                text-shadow 0.4s ease,
                filter 0.4s ease;
    will-change: transform;
}

@keyframes charReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero hover — scattered state */
.hero-char.scattered {
    color: var(--color-accent);
    text-shadow: 0 0 30px rgba(255, 107, 80, 0.6),
                 0 0 60px rgba(255, 107, 80, 0.3);
    filter: brightness(1.2);
}

/* Hero hover — reassemble snap-back */
.hero-char.reassemble {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                color 0.5s ease,
                text-shadow 0.5s ease,
                filter 0.3s ease;
}

/* Hover cursor hint on hero text */
#heroText {
    cursor: none;
}


/* ------------------------------------------
   6. MARQUEE
   ------------------------------------------ */
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-track {
    animation: marquee 25s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}


/* ------------------------------------------
   7. SCROLL REVEAL ANIMATIONS
   ------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
    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; }

/* Image clip-path wipe */
.img-reveal {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1s var(--ease-out-expo);
}

.img-reveal.visible {
    clip-path: inset(0 0% 0 0);
}


/* ------------------------------------------
   8. CARDS & TILT
   ------------------------------------------ */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}


/* ------------------------------------------
   9. STATS
   ------------------------------------------ */
.stat-glow {
    text-shadow: 0 0 40px rgba(255, 107, 80, 0.3);
}

.counter {
    font-variant-numeric: tabular-nums;
}


/* ------------------------------------------
   10. SERVICES
   ------------------------------------------ */
/* Service card icon spin on hover */
.service-icon {
    transition: transform 0.5s var(--ease-out-expo);
}

.group:hover .service-icon {
    transform: rotate(360deg) scale(1.1);
}


/* ------------------------------------------
   11. PORTFOLIO / WORK
   (hover overlays handled via Tailwind inline)
   ------------------------------------------ */


/* ------------------------------------------
   12. LINKS & BUTTONS
   ------------------------------------------ */
/* Expanding underline from left */
.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.4s var(--ease-out-expo);
}

.link-underline:hover::after {
    width: 100%;
}

/* Magnetic button base */
.magnetic-btn {
    transition: transform 0.3s var(--ease-smooth);
}


/* ------------------------------------------
   13. SOCIAL ICONS
   ------------------------------------------ */
.social-btn {
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: scale(0);
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.social-btn:hover::before {
    transform: scale(2);
}


/* ------------------------------------------
   14. UTILITY / MISC
   ------------------------------------------ */
/* Pulsing ring on accent dots */
.pulse-ring {
    position: relative;
}

.pulse-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid var(--color-accent);
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0%   { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* ──────────────────────────────────────────────
   15. CONTACT FORM
   ────────────────────────────────────────────── */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888888;
}

.form-input {
    background: #0d0d0d;
    border: 1px solid #222222;
    border-radius: 8px;
    padding: 14px 16px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input::placeholder {
    color: #444444;
}

.form-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 80, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    padding: 16px 32px;
    background: var(--color-accent);
    color: #050505;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: none;
    transition: transform 0.3s var(--ease-out-expo),
                background 0.3s ease,
                box-shadow 0.3s ease;
}

.form-submit:hover {
    background: #ff8266;
    box-shadow: 0 8px 30px rgba(255, 107, 80, 0.3);
    transform: translateY(-2px);
}

.form-submit:active {
    transform: translateY(0) scale(0.97);
}

.form-submit-icon {
    transition: transform 0.3s ease;
}

.form-submit:hover .form-submit-icon {
    transform: translateX(4px);
}

.form-submit.sending {
    pointer-events: none;
    opacity: 0.7;
}

.form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px;
    text-align: center;
    animation: fadeUp 0.5s var(--ease-out-expo) forwards;
}

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