/* =============================================
   FISHEREAS - Designed by Kakarotdevs
   Moreton Bay Region
   ============================================= */

/* Inter Font - Self-hosted */
@font-face {
    font-family: "Inter";
    src: url("../public/fonts/Inter-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../public/fonts/Inter-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../public/fonts/Inter-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../public/fonts/Inter-Light.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* A-Space Font - Self-hosted */
@font-face {
    font-family: "A-Space";
    src: url("../public/fonts/A_Space/A-Space Light Demo.otf")
        format("opentype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

:root {
    --black: #0a0a0a;
    --charcoal: #1a1a1a;
    --slate: #4a4a4a;
    --stone: #8a8a8a;
    --silver: #c4c4c4;
    --offwhite: #f4f4f4;
    --white: #ffffff;
    --google-blue: #4285f4;
    --google-green: #00ffa3; /* Ultra Electric Green */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 160px 40px 0;
}

/* Subtle background texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(
            ellipse 100% 50% at 50% 0%,
            rgba(0, 0, 0, 0.015) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse 60% 40% at 80% 80%,
            rgba(0, 0, 0, 0.01) 0%,
            transparent 40%
        );
    pointer-events: none;
    z-index: -1;
}

/* Header Glassmorphism Layer */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.4) 100%
    );
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    z-index: 40;
    pointer-events: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.05),
        0 1px 0 rgba(0, 0, 0, 0.02);
}

/* Logo area */
.logo {
    position: fixed;
    top: 24px;
    left: 40px;
    z-index: 50;
}

.logo img {
    height: 58px;
    width: auto;
    display: block;
}

/* Links & Interactive Underlines */
.header-link,
.page-link,
.services-item {
    position: relative;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-link,
.page-link {
    display: inline-block;
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--google-blue);
    letter-spacing: -0.01em;
}

.header-link {
    position: fixed;
    top: 36px;
    right: 40px;
    z-index: 50;
    width: 160px; /* Fixed width to prevent shifting */
    text-align: left;
}

.header-link:hover {
    background: linear-gradient(90deg, var(--google-blue), var(--google-green));
    background-size: 200% 100%;
    background-position: left;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-2px);
}

.header-link::after,
.page-link::after,
.services-item::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--google-blue), var(--google-green));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.services-item::after {
    bottom: -1px;
}

.header-link:hover,
.page-link:hover {
    background: linear-gradient(90deg, var(--google-blue), var(--google-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-2px);
}

.header-link:hover::after,
.page-link:hover::after,
.services-item:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hero Section */
.hero {
    padding-top: 25vh;
    padding-bottom: 12vh;
    max-width: 1000px;
}

.hero h1 {
    font-size: clamp(3rem, 11vw, 8.5rem);
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--black);
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
}

.hero h1 span:nth-child(1) {
    font-family: "A-Space", sans-serif;
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 0.8;
    margin-bottom: 0.25em;
    display: block;
}

.hero h1 span:nth-child(2) {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 0.14em; /* Slightly smaller for elegance */
    color: var(--black);
    text-transform: uppercase;
    display: block;
    text-align: justify;
    text-align-last: justify;
    letter-spacing: 0.5em;
    padding-left: 0.5em; /* Compensate for letter spacing on last char */
    opacity: 0.7;
}

.tagline {
    margin-top: 40px;
    font-size: 1.125rem;
    color: var(--slate);
    max-width: 500px;
    line-height: 1.6;
}

/* Services Section */
.services {
    margin-top: 160px;
    padding-top: 30px;
}

.services h2 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--stone);
    margin-bottom: 20px;
}

.services-list {
    list-style: none;
}

.services-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    border-bottom: 1px solid var(--offwhite);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.services-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 30px 0;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    background: transparent;
}

.services-name-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.services-name-wrapper::after {
    content: "+";
    font-family: "Inter", sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--silver);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
    width: 20px;
}

.services-item.active .services-name-wrapper::after {
    content: "−";
    color: var(--google-blue);
    transform: rotate(180deg);
}

.services-item.active .services-header {
    padding-left: 12px;
}

.services-item:hover .services-header {
    padding-left: 12px;
}

.services-name {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.services-item.active .services-name {
    background: linear-gradient(90deg, var(--google-blue), var(--google-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.services-item:hover .services-name {
    background: linear-gradient(90deg, var(--google-blue), var(--google-green));
    background-size: 500% 100%;
    background-position: left;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.services-gallery {
    height: 0;
    opacity: 0;
    transition: 
        height 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s ease;
    position: relative;
    background: var(--white);
    overflow: hidden;
    will-change: height, opacity;
}

.services-item.active .services-gallery {
    height: clamp(300px, 50vh, 550px);
    opacity: 1;
    padding: 20px 0 60px;
}

.gallery-track {
    display: flex;
    gap: 40px;
    height: 100%;
    width: 100%;
    padding: 0 15vw;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    align-items: center;
    cursor: grab;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-track:active, .gallery-track.grabbing {
    cursor: grabbing;
}

.gallery-image-wrapper {
    position: relative;
    height: 90%;
    min-width: 450px;
    border-radius: 12px;
    scroll-snap-align: center;
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    cursor: pointer;
    outline: none;
    z-index: 1;
}

.services-item.active .gallery-image-wrapper {
    opacity: 1;
}

.gallery-image-wrapper:hover,
.gallery-image-wrapper:focus {
    transform: scale(1.04);
    z-index: 10;
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: var(--offwhite);
    display: block;
    z-index: 2;
}

/* Drawing Border Animation */
.border-anim {
    position: absolute;
    inset: -3px;
    border-radius: 15px;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.border-anim::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%;
    height: 250%;
    background: conic-gradient(
        from 0deg, 
        transparent 50%, 
        var(--google-green) 85%, 
        var(--google-blue) 100%
    );
    transform: translate(-50%, -50%) rotate(0deg);
}

.gallery-image-wrapper:hover .border-anim,
.gallery-image-wrapper:focus .border-anim {
    animation: sweepAndFade 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.gallery-image-wrapper:hover .border-anim::before,
.gallery-image-wrapper:focus .border-anim::before {
    animation: sweepRotate 1.2s linear forwards;
}

@keyframes sweepAndFade {
    0% { opacity: 0; }
    5% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes sweepRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}




.services-detail {
    font-size: 0.9375rem;
    color: var(--stone);
    text-align: right;
}

/* Contact Section */
.contact {
    margin-top: 160px;
    padding-top: 30px;
    margin-bottom: 40px;
}

.contact h2 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--stone);
    margin-bottom: 24px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 0.8125rem;
    color: var(--stone);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Footer */
footer {
    padding: 32px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border-top: 1px solid var(--offwhite);
}

.footer-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left; /* Explicitly left-aligned */
}

.footer-text {
    font-size: 0.75rem;
    color: var(--stone);
    text-align: left; /* Explicitly left-aligned */
}

.dev-credit {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.dev-credit:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.dev-credit img {
    height: 36px;
    width: auto;
    display: block;
}

.htmx-placeholder {
    min-height: 100px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.htmx-request {
    opacity: 0.5;
}
/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}
.delay-2 {
    animation-delay: 0.2s;
}
.delay-3 {
    animation-delay: 0.3s;
}
.delay-4 {
    animation-delay: 0.4s;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    main {
        padding: 220px 24px 0; /* Increased top padding, standard side padding */
    }

    .logo {
        top: 24px;
        left: 24px;
    }

    .logo img {
        height: 48px;
    }

    .hero {
        padding-top: 10vh; /* Reduced hero padding since main padding is high */
        padding-bottom: 8vh;
        width: 100%;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero h1 {
        font-size: clamp(3rem, 16vw, 10rem); /* Balanced size for mobile */
        width: fit-content;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .hero h1 span:nth-child(2) {
        font-size: 0.22em; /* Significantly larger to reduce awkward whitespace */
        letter-spacing: -0.02em; /* Tighter letter spacing for larger text */
        padding-left: 0;
        text-align: justify;
        text-align-last: justify;
        opacity: 0.8;
        margin-top: 2px;
    }

    .tagline {
        /* Padding now inherited from .hero container room */
    }

    .header-link {
        top: 30px;
        right: 24px;
        font-size: 1rem;
        width: 140px; /* Fixed width for mobile */
        text-align: left;
    }

    body::after {
        height: 80px;
    }

    .services,
    .contact {
        margin-top: 80px;
    }

    .services-item {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .services-header {
        flex-direction: column;
        gap: 4px;
        padding: 20px 0;
    }

    .services-item.active .services-gallery {
        height: 350px;
    }

    .gallery-image-wrapper {
        min-width: 280px;
        opacity: 1 !important;
        transform: scale(1) !important;
        transition-delay: 0s !important;
    }
    .border-anim {
        display: none !important;
    }
    .gallery-image {
        min-width: unset;
    }
    
    .gallery-track {
        gap: 8px;
        padding: 0 4px;
    }

    .services-detail {
        text-align: left;
    }

    .contact-grid {
        gap: 24px;
    }

    footer {
        padding: 32px 24px;
        flex-direction: column;
        gap: 24px;
        text-align: center;
        align-items: center;
    }

    .footer-group {
        order: 0;
        text-align: center;
    }

    .footer-text {
        text-align: center;
    }

    .dev-credit {
        justify-content: center;
        order: 1;
    }
}


/* Gallery Navigation */
.gallery-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.services-item.active .gallery-nav {
    opacity: 1;
    pointer-events: auto;
}

.nav-btn {
    font-family: "Inter", sans-serif;
    font-size: 2rem;
    font-weight: 300;
    color: var(--silver);
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn:hover {
    color: var(--google-blue);
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* Hide on Mobile */
@media (max-width: 768px) {
    .gallery-nav {
        display: none !important;
    }
}
