/* ═══════════════════════════════════════════════════════════════════════════
   CreativeAlt — Core Stylesheet
   Design System: Minimalist white, editorial typography, lime accent
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ──────────────────────────────────────────────────────── */
:root {
    --color-bg: #F1F1F1;
    --color-card: #FDFDFD;
    --color-bg-alt: #EAEAEA;
    --color-text: #101010;
    --color-text-secondary: #5E5E5E;
    --color-text-muted: #8E8E93;
    --color-border: #E5E5E5;
    --color-border-card: #EAEAEA;
    
    /* Design System Tokens */
    --color-brand: #101010;
    --color-accent: #101010;
    --color-accent-hover: #262626;
    --color-accent-light: #F1F1F1;
    --color-primary: #101010;
    --color-dark: #0A0A0A;
    --color-dark-card: #161616;
    --color-dark-gray: #161616;
    --color-gray: #5E5E5E;
    --color-light-gray: #F1F1F1;
    --color-white: #FFFFFF;
    
    /* Status Tokens from image */
    --color-status-success: #30B26B;
    --color-status-success-dark: #83BF6E;
    --color-status-orange: #ECA235;
    --color-status-coral: #F86749;
    --color-status-blue: #2E7FF4;
    --color-status-red: #D63025;
    
    /* Tag Tokens from image */
    --color-tag-peach: #FBB698;
    --color-tag-yellow: #FDD180;
    --color-tag-green: #B6E8CA;
    --color-tag-blue: #B7E2FA;
    --color-tag-slate: #D5DAE1;
    
    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #101010 0%, #262626 50%, #404040 100%);
    --gradient-accent: linear-gradient(135deg, #101010 0%, #262626 100%);
    
    --font-heading: 'Inter', 'Syne', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'Geist Mono', monospace;
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* ─── Base Reset Enhancements ────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input[type="submit"],
input[type="button"],
.btn,
.button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    border-radius: 12px;
}

/* ─── Hero Typography ────────────────────────────────────────────────────── */
.hero-title {
    max-width: 22ch;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.25rem !important;
        line-height: 1.15 !important;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* ─── Selection ──────────────────────────────────────────────────────────── */
::selection {
    background: var(--color-accent);
    color: #ffffff;
}

/* ─── Branding Gradient Utilities ────────────────────────────────────────── */
.bg-brand-gradient {
    background: var(--gradient-brand);
}

.bg-orange-gradient {
    background: var(--gradient-orange);
}

.text-brand-gradient {
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─── Header States: Floating Dynamic Island ─────────────────────────────── */
#site-header {
    background: transparent;
    transition: all 0.4s var(--ease-smooth);
}

/* Seamless Integrated Hero for Non-Homepage Pages */
body:not(.home-page):not(.page-404) #main-content {
    padding-top: 0 !important;
}

body:not(.home-page) #main-content > section:first-of-type,
body:not(.home-page) .page-hero {
    position: relative;
    padding-top: clamp(6.5rem, 12vw, 9.5rem) !important;
    margin-top: 0 !important;
}

/* Subtle atmospheric ambient glow blending header with hero */
body:not(.home-page) #main-content > section:first-of-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

.dynamic-island {
    font-family: var(--font-heading);
    border-radius: 12px;
    background-color: rgba(13, 15, 18, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), background-color 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth);
}

#site-header.header-scrolled .dynamic-island,
#site-header.scrolled .dynamic-island {
    transform: translateY(2px) scale(0.985);
    background-color: rgba(10, 11, 14, 0.97);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 18px 45px -8px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Nav links inside dynamic island */
.dynamic-link {
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
    border-radius: 8px;
    color: #e2e8f0;
    font-weight: 600;
    transition: all 0.2s var(--ease-smooth);
}

.dynamic-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.dynamic-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.16) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.dynamic-link.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 9999px;
    background-color: #FFFFFF;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Nav link active state fallback */
.nav-link.active .nav-indicator {
    transform: scaleX(1);
}

.nav-link.active {
    color: var(--color-text);
}

/* Header & Footer navigation typography classes */
.nav-sublink span.block.font-semibold,
.nav-sublink span.font-semibold {
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

/* ─── Dynamic Island Services Dropdown ───────────────────────────────────── */
.nav-dropdown-wrapper {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 660px;
    max-width: calc(100vw - 32px);
    background: rgba(13, 15, 18, 0.98);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

/* Invisible bridge so mouse doesn't fall through the gap */
.nav-dropdown-menu::after {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-wrapper:focus-within .nav-dropdown-menu,
.nav-dropdown-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu-compact {
    width: 300px;
}

.nav-dropdown-menu-products {
    width: 540px;
}

/* Pointer arrow */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(13, 15, 18, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.nav-sublink {
    transition: all 0.2s ease;
}
.nav-sublink:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* ─── Profile Dropdown Menu Panel ────────────────────────────────────────── */
.profile-dropdown-panel {
    z-index: 120 !important;
}

.profile-dropdown-panel::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 18px;
    transform: rotate(45deg);
    width: 12px;
    height: 12px;
    background: #0C0D12;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1;
}

/* ─── Hamburger Menu Icon (Luxury Editorial Studio Design) ───────────────── */
.hamburger-icon {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    width: 20px;
    height: 18px;
    gap: 4px;
    pointer-events: none;
}

.hamburger-line {
    display: block;
    height: 1.75px;
    background: #ffffff;
    border-radius: 9999px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                background-color 0.25s ease;
    transform-origin: center;
}

/* Default state: progressive staggered architectural lengths */
.hamburger-line-1 {
    width: 20px;
}

.hamburger-line-2 {
    width: 14px;
    background: #E85002; /* Brand orange accent */
}

.hamburger-line-3 {
    width: 18px;
}

/* Hover preview effect */
#mobile-menu-btn:hover .hamburger-line-2 {
    width: 20px;
}

#mobile-menu-btn:hover .hamburger-line-3 {
    width: 20px;
}

/* Active / Open state: morphs into a clean geometric 'X' */
.menu-open .hamburger-icon,
#mobile-menu-btn.active .hamburger-icon {
    align-items: center;
}

.menu-open .hamburger-line-1,
#mobile-menu-btn.active .hamburger-line-1 {
    width: 20px;
    background: #ffffff;
    transform: translateY(5.75px) rotate(45deg);
}

.menu-open .hamburger-line-2,
#mobile-menu-btn.active .hamburger-line-2 {
    width: 0;
    opacity: 0;
    transform: scaleX(0);
}

.menu-open .hamburger-line-3,
#mobile-menu-btn.active .hamburger-line-3 {
    width: 20px;
    background: #ffffff;
    transform: translateY(-5.75px) rotate(-45deg);
}

/* ─── Header & Footer Menu Syne Typography ───────────────────────────────── */
.mobile-nav-link,
#site-header .dynamic-island,
#site-header .nav-dropdown-menu h4,
#site-header .dynamic-link,
footer h4,
footer .footer-nav-link,
footer ul li a {
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

/* ─── Mobile Menu ────────────────────────────────────────────────────────── */
.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

body.menu-open {
    overflow: hidden;
}

/* ─── Form Styling ───────────────────────────────────────────────────────── */
.form-input:focus {
    border-color: var(--color-text);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.05);
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
    display: none;
}

.form-error.visible {
    display: block;
}

/* Select arrow */
select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ─── Service Rows ───────────────────────────────────────────────────────── */
.service-panel {
    transition: max-height 0.5s var(--ease-smooth);
    will-change: max-height;
}

.service-row[data-expanded="true"] .service-icon {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.service-row[data-expanded="true"] .service-icon-plus {
    transform: rotate(45deg);
}

.service-icon-plus {
    transition: transform 0.3s var(--ease-smooth);
}

/* ─── FAQ Accordion ──────────────────────────────────────────────────────── */
.faq-panel {
    transition: max-height 0.5s var(--ease-smooth);
    will-change: max-height;
}

.faq-item[data-expanded="true"] .faq-icon {
    background: var(--color-text);
    border-color: var(--color-text);
}

.faq-item[data-expanded="true"] .faq-icon-svg {
    transform: rotate(45deg);
    color: #FFFFFF !important;
}

.faq-icon-svg {
    transition: transform 0.3s var(--ease-smooth);
}

/* ─── Brand Marquee ──────────────────────────────────────────────────────── */
.brand-marquee {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.brand-marquee-track {
    animation: marquee 30s linear infinite;
    width: max-content;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─── Process Section ────────────────────────────────────────────────────── */
.process-dot.active {
    border-color: #101010;
    background: #101010;
}

.process-dot.active span {
    color: #FFFFFF !important;
    font-weight: 700;
}

.process-dot-mobile.active {
    border-color: #101010;
    background: #101010;
}

.process-dot-mobile.active span {
    background: #FFFFFF !important;
}

/* ─── Testimonial Transitions ────────────────────────────────────────────── */
.testimonial-slide {
    animation: fadeInUp 0.5s var(--ease-smooth);
}

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

/* ─── Back to Top ────────────────────────────────────────────────────────── */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ─── Page Loader ────────────────────────────────────────────────────────── */
@keyframes loaderBar {
    0% { transform: scaleX(0); }
    50% { transform: scaleX(1); }
    100% { transform: scaleX(0); transform-origin: right; }
}

.animate-loader-bar {
    animation: loaderBar 1.5s var(--ease-smooth) infinite;
}

#page-loader.loaded {
    opacity: 0;
    pointer-events: none;
}

/* ─── Focus Styles ───────────────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ─── Portfolio Cards ────────────────────────────────────────────────────── */
.portfolio-card:nth-child(odd) {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .portfolio-card:nth-child(even) {
        transform: translateY(2rem);
    }
}

/* ─── Utility: text gradient ─────────────────────────────────────────────── */
.text-gradient {
    background: linear-gradient(135deg, var(--color-text), var(--color-text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
