/* Global Styles */
:root {
    --bs-font-sans-serif: 'Inter', sans-serif;
    --bs-body-color: #1a1a1a;
    --bs-secondary-color: #6c757d;
}

body {
    font-family: var(--bs-font-sans-serif);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
    overflow-x: hidden;
    padding-top: 100px;
    /* Offset for fixed navbar */
}

section,
header {
    scroll-margin-top: 100px;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.03em;
}

.display-1 {
    font-weight: 700;
    font-size: 3.5rem;
}

@media (min-width: 992px) {
    .display-1 {
        font-size: 5rem;
    }
}

.lh-xs {
    line-height: 1;
}

.fs-7 {
    font-size: 0.85rem;
}

.extra-small {
    font-size: 0.75rem;
}

.tracking-tight {
    letter-spacing: -0.05em;
}

.tracking-widest {
    letter-spacing: 0.15em;
}

/* Layout & Spacing */
.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 992px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

.mb-6 {
    margin-bottom: 5rem !important;
}

/* Navbar */
.bg-light-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.nav-link {
    color: var(--bs-body-color) !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #0d6efd;
    transition: width 0.3s ease;
}

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

/* Floating Navigation - Sidebar */
.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.nav-dot:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: scale(1.2);
}

.nav-dot.active {
    background-color: transparent;
    border-color: #000;
    transform: scale(1.4);
}

/* Project Cards */
.image-wrapper {
    position: relative;
    overflow: hidden;
    /* Aspect ratio for consistency if images vary */
    aspect-ratio: 16/10;
    background-color: #f8f9fa;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-card:hover .image-wrapper img {
    transform: scale(1.03);
}

.magnetic-link {
    display: inline-flex;
    align-items: center;
    transition: gap 0.2s ease;
}

.magnetic-link:hover {
    gap: 0.5rem;
}

/* Process Section */
.grayscale-hover {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.process-item:hover .grayscale-hover {
    filter: grayscale(0%);
}

.cursor-pointer {
    cursor: pointer;
}

/* Animations */
.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* Utility */
.transition-all {
    transition: all 0.3s ease;
}

/* Case Study Specifics */
.badge.bg-primaryless {
    background-color: rgba(13, 110, 253, 0.1) !important;
    color: #0d6efd !important;
}

/* Hero Canvas */
#hero-canvas {
    pointer-events: auto;
    /* Allow mouse interaction */
}

/* New Grid Hero Styles */
.hero-grid-border {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.text-gradient-x {
    background: linear-gradient(135deg, #FF3B30 0%, #FF2D55 50%, #0d6efd 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fs-mega {
    font-size: 15rem;
    line-height: 0.8;
    letter-spacing: -0.05em;
    font-weight: 800;
}

@media (max-width: 991.98px) {
    #floating-nav {
        display: none !important;
    }

    .fs-mega {
        font-size: 8rem;
    }

    .hero-grid-border {
        border: none !important;
    }
}

/* Carousel Control Customization */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.4);
    /* 40% opacity black */
    border-radius: 50%;
    /* Circular shape */
    width: 3rem;
    /* Adjust size as needed */
    height: 3rem;
    background-size: 50%;
    /* Adjust icon size within the circle */
}

/* ============================
   Contact Modal
   ============================ */

/* Overlay — full-screen dark backdrop */
.contact-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1055;
    /* sits above Bootstrap's navbar (1030) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Animate in when not hidden */
.contact-modal-overlay:not([hidden]) {
    opacity: 1;
}

/* Fully hide when the hidden attribute is present */
.contact-modal-overlay[hidden] {
    display: none !important;
}

/* White card */
.contact-modal-card {
    background: #fff;
    border-radius: 1.25rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.contact-modal-overlay:not([hidden]) .contact-modal-card {
    transform: translateY(0);
}

/* Header row: title + close button */
.contact-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.contact-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
    color: #1a1a1a;
}

.contact-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.contact-modal-close:hover {
    color: #1a1a1a;
    background: #f1f3f5;
}

/* Form fields */
.contact-field-group {
    margin-bottom: 1.25rem;
}

.contact-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a1a1a;
    margin-bottom: 0.4rem;
}

.contact-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #dee2e6;
    border-radius: 0.6rem;
    font-family: var(--bs-font-sans-serif);
    font-size: 0.95rem;
    color: #1a1a1a;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.contact-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.contact-input.is-invalid {
    border-color: #dc3545;
}

.contact-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.contact-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Inline error messages */
.contact-error {
    display: block;
    font-size: 0.78rem;
    color: #dc3545;
    margin-top: 0.3rem;
    min-height: 1.1rem;
}

/* Success / error status banner */
.contact-status-banner {
    padding: 0.75rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.contact-status-banner.is-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.contact-status-banner.is-error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* Submit button */
.contact-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 2rem;
    font-family: var(--bs-font-sans-serif);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.contact-submit-btn:hover:not(:disabled) {
    background: #333;
}

.contact-submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.contact-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Loading spinner */
.contact-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: contact-spin 0.7s linear infinite;
}

@keyframes contact-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile tweaks */
@media (max-width: 575.98px) {
    .contact-modal-card {
        padding: 1.5rem;
        border-radius: 1rem;
        max-height: 95vh;
    }
}