body {
    font-family: 'Schibsted Grotesk', sans-serif;
}

h1, h2, h3, h4, h5, h6,
.logo-wordmark,
.font-display {
    font-family: 'Schibsted Grotesk', 'Inter', sans-serif;
}

/* ============ ANIMATIONS ============ */

/* Fade in on page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hero section animation */
header {
    animation: fadeInUp 0.8s ease-out;
}

header h1 {
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

header p {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

header a {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* Navigation fade in */
nav {
    animation: fadeIn 0.6s ease-out;
}

/* Section animations on scroll */
section {
    animation: fadeInUp 0.8s ease-out both;
}

.grid>div {
    animation: fadeInUp 0.8s ease-out both;
}

/* Stagger animations for grid items */
.grid>div:nth-child(1) {
    animation-delay: 0s;
}

.grid>div:nth-child(2) {
    animation-delay: 0.1s;
}

.grid>div:nth-child(3) {
    animation-delay: 0.2s;
}

.grid>div:nth-child(4) {
    animation-delay: 0.3s;
}

.grid>div:nth-child(5) {
    animation-delay: 0.4s;
}

.grid>div:nth-child(6) {
    animation-delay: 0.5s;
}

/* Service items stagger */
.space-y-12>div:nth-child(1) {
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.space-y-12>div:nth-child(2) {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.space-y-12>div:nth-child(3) {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.space-y-12>div:nth-child(4) {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* About section columns */
#about>div>div:nth-child(1) {
    animation: slideInLeft 0.8s ease-out;
}

#about>div>div:nth-child(2) {
    animation: slideInRight 0.8s ease-out;
}

/* Partners section */
#partners {
    animation: fadeInUp 0.8s ease-out;
}

/* Partner logo items scroll animation */
.partner-logo-item {
    transition: all 0.4s ease-out;
    opacity: 0.8;
}

.partner-logo-item:hover {
    opacity: 1;
}

.partner-logo-item img {
    transition: all 0.4s ease-out;
    filter: grayscale(100%);
}

.partner-logo-item:hover img {
    filter: grayscale(0%);
}

/* Smooth scroll behavior for partners - removed to not conflict with JS marquee */

/* Stagger animations for first visible partners - removed as they now animate as a group */

/* Form and contact animations */
.md\:col-span-8>form {
    animation: slideInRight 0.8s ease-out;
}

/* ============ HOVER & TRANSITIONS ============ */

.hover-underline-animation {
    display: inline-block;
    position: relative;
}

.hover-underline-animation:after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #F15A24;
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.hover-underline-animation:hover:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Smooth transitions for all interactive elements */
a,
button,
input,
textarea,
.group,
.hover\:text-euclid,
.hover\:border-euclid {
    transition: all 0.3s ease-out;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid rgba(17, 17, 17, 0.12);
    border-left: 1px solid rgba(17, 17, 17, 0.12);
    background: #fff;
}

.project-item {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border-right: 1px solid rgba(17, 17, 17, 0.12);
    border-bottom: 1px solid rgba(17, 17, 17, 0.12);
    background: #f7f7f5;
    transition: background 0.35s ease, transform 0.35s ease;
}

.project-item:hover {
    background: #f0f0ee;
}

.project-item-full {
    grid-column: 1 / -1;
}

.project-item-half {
    grid-column: span 1;
}

.project-image-wrap {
    position: relative;
    overflow: hidden;
    background: #e9e5df;
    aspect-ratio: 4 / 5;
    min-height: 360px;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-image-wrap-full {
        aspect-ratio: 16 / 9;
        min-height: 460px;
    }

    .project-image-wrap-half {
        aspect-ratio: 3 / 4;
        min-height: 460px;
    }

    .project-caption {
        padding: 1.25rem 1.75rem 1.75rem;
    }
}

.project-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.6s ease;
}

.project-item:hover .project-image {
    transform: scale(1.06);
}

.project-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 1.25rem 1.25rem;
    background: #ffffff;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
    z-index: 10;
}

.project-index {
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #f15a24;
}

.project-caption h3 {
    margin: 0;
    font-size: clamp(1.25rem, 3.5vw, 2.1rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: #111111;
    word-break: break-word;
    transition: color 0.3s ease;
}

.project-caption p {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(17, 17, 17, 0.58);
}

.project-item:hover .project-caption h3 {
    color: #f15a24;
}

/* Partner cards hover effect */
.partner-card {
    transition: all 0.4s ease-out;
}

.partner-card:hover {
    border-color: #F15A24;
}

/* Input focus animations */
input:focus,
textarea:focus {
    animation: none;
    border-bottom-color: #F15A24;
}

/* Button hover effect */
button:hover {
    transition: background-color 0.3s ease-out, color 0.3s ease-out;
}

/* Service item border animation */
.space-y-12>div {
    transition: all 0.4s ease-out;
}


/* ============ PREMIUM ENHANCEMENTS ============ */

/* Custom Cursor */
@media (hover: hover) {
    body {
        cursor: none;
    }

    a,
    button,
    .group,
    input,
    textarea {
        cursor: none;
    }
}

@media (hover: none) {
    #cursor-dot,
    #cursor-outline {
        display: none !important;
    }
}

#cursor-outline.hovering {
    width: 60px;
    height: 60px;
    background-color: rgba(241, 90, 36, 0.1);
    border-color: transparent;
}

/* Service Card Effect */
#services .animate-on-scroll {
    position: relative;
    padding: 2rem;
    border: 1px solid transparent;
    overflow: hidden;
}

#services .animate-on-scroll:hover {
    background: #ffffff;
    border-color: #F15A24;
}

/* Modal Animations */
#project-modal.active #modal-overlay {
    opacity: 1;
}

#project-modal.active #modal-container {
    opacity: 1;
    transform: translateY(0);
}

/* Hide scrollbar but keep scrolling functional */
.scrollbar-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* Rich Text Formatting Styles */
.rich-text-content {
    text-align: justify;
    text-align-last: left;
}

.rich-text-content p {
    margin-bottom: 0.75rem;
}
.rich-text-content p:last-child {
    margin-bottom: 0;
}
.rich-text-content strong,
.rich-text-content b {
    font-weight: 800;
    color: #111111;
}
.rich-text-content em,
.rich-text-content i {
    font-style: italic;
}
.rich-text-content u {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.rich-text-content a {
    color: #F15A24;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}
.rich-text-content a:hover {
    opacity: 0.8;
}
.rich-text-content ul {
    list-style-type: disc;
    padding-left: 1.25rem;
    margin: 0.5rem 0 0.75rem;
}
.rich-text-content ol {
    list-style-type: decimal;
    padding-left: 1.25rem;
    margin: 0.5rem 0 0.75rem;
}
.rich-text-content li {
    margin-bottom: 0.35rem;
}
.rich-text-content h3,
.rich-text-content h4 {
    font-weight: 900;
    font-size: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    color: #111111;
}

/* Partner Logo Greyscale Effect */
.partner-logo {
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.partner-logo:hover {
    filter: grayscale(0%);
}