* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

/* Allow scrolling on mobile project pages */
body:has(.project-page-mobile) {
    overflow-y: auto;
    overflow-x: hidden;
}

html:has(.project-page-mobile) {
    overflow-y: auto;
    overflow-x: hidden;
}

/* Hide scrollbars but keep scrolling functionality */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none;
}

html,
body,
* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html:focus-within {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: "Public Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

/* Global headline styles */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Public Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial !important;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

/* Global paragraph and text styles */
p,
span,
div,
a {
    font-family: "Public Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* Remove pointer cursor on clickable elements */
a,
button,
.site-nav__link,
.hero__arrow,
input,
textarea,
select,
label {
    cursor: none !important;
}

/* Custom Cursor */
.custom-cursor {
    display: none;
}

.custom-cursor-dot {
    position: fixed;
    width: 24px;
    height: 24px;
    will-change: transform;
    transform: translateZ(0);
    background: rgba(0, 19, 230, 0.15);
    border: 1px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    opacity: 1;
}


/* Hide custom cursor on mobile and enable default cursor */
@media (pointer: coarse) {
    body {
        cursor: auto;
    }

    .custom-cursor,
    .custom-cursor-dot {
        display: none;
    }

    a,
    button,
    .site-nav__link,
    .hero__arrow,
    input,
    textarea,
    select,
    label {
        cursor: pointer !important;
    }
}

/* Mobile optimizations for base elements */
@media (max-width: 480px) {
    body {
        cursor: auto;
        -webkit-tap-highlight-color: rgba(0, 19, 230, 0.1);
        background: #ffffff !important;
    }

    /* Enable pointer cursor on mobile */
    a,
    button,
    .site-nav__link,
    .hero__arrow,
    input,
    textarea,
    select,
    label {
        cursor: pointer !important;
    }

    /* Disable custom cursor on mobile */
    .custom-cursor,
    .custom-cursor-dot {
        display: none !important;
    }

    /* Improve touch target sizes */
    a,
    button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Responsive text sizing */
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 22px;
    }

    h4 {
        font-size: 18px;
    }

    p {
        font-size: 16px;
    }
}

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

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--link-hover);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}