/* Basic Reset & Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    /* Add a background image to see the transparency effect */
    background-color:slategrey;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
}

/* Hero Intro Section */
.hero-intro {
    position: relative;
    background-color: #000000;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-start; /* align to top instead of center */
    justify-content: center;
    padding-top: clamp(60px, 60px, 260px); /* navbar height (60px) + max 200px spacing */
    overflow: hidden; /* contain background drift */
}

.hero-center {
    position: relative;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column; /* natural order: logo, line, tagline */
    align-items: center;
    justify-content: center; /* center content vertically within available height */
    min-height: calc(100vh - 60px); /* viewport minus fixed navbar */
    margin-top: 0;
    z-index: 1; /* above background */
}

/* The expanding line */
.hero-line {
    height: 2px;
    width: 0; /* start collapsed */
    background: #ffffff;
    opacity: 0.9;
}

/* Center the line and make it expand relative to the logo size (125% of logo) */
.hero-line {
    display: block;
    margin: 0 auto;
    height: 2px;
    width: 0; /* start collapsed */
    background: #ffffff;
    opacity: 0.9;
}

/* Tagline with typewriter effect */
.hero-tagline {
    color: #ffffff;
    font-family: "new-order", sans-serif;
    font-weight: 400;
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    line-height: 1.8;
    text-align: center;
    max-width: clamp(250px, 20vw, 325px);
    margin: 24px auto 0;
    opacity: 0;
    letter-spacing: 0.5px;
}

.hero-tagline .cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #ffffff;
    margin-left: 2px;
    animation: cursor-blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* About Section */
.aboutContainer {
    width: 100%;
}
.aboutInnerContainer {
    width: 100%;
    background: #006d6d;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    height: auto;
    flex-wrap: wrap;
}
.aboutContent {
    width: 100vw;
    max-width: 100vw;
    aspect-ratio: 1 / 1;
    margin: 0;
    border-radius: 0;
}
/* Desktop: place the two full-width squares side-by-side when viewport is wide */
@media (min-width: 600px) {
  /* All squares become half-width at >=600px */
  .aboutContent { width: 50vw; max-width: 50vw; }
}
#rightSide {
    background-image: url('Graphics/Portfolio Backgrounds/Homepage/StudioBackground.png');
    background-position: center;
    background-size: 150%;
    display: grid;
    place-items: center; /* center text block */
    padding: clamp(10px, 3vmin, 24px);
    position: relative;
}

#leftSide {
    display: grid;
    place-items: center; /* center the text block */
    padding: clamp(8px, 2vmin, 16px);
    position: relative; /* create containing block for ::before */
    overflow: hidden;   /* clip zoomed background edges */
    /* Reusable background var so ::before can share it */
    --bg-image: url('Graphics/Portfolio Backgrounds/Homepage/SecondaryBackground.svg');
    background-image: var(--bg-image);
    background-position: center;
}

/* Zoomable background layer */
#leftSide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    transform: scale(var(--bg-scale, 1));
    transform-origin: center center;
    will-change: transform;
    z-index: 0; /* behind text */
}

.leftside-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(6px, 1.6vmin, 12px);
    text-align: center;
    position: relative;
    z-index: 1; /* ensure above zoom layer */
}

.rightside-text {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: min(78ch, 86%);
    position: relative;
    z-index: 1; /* above background */
}

.rightside-line {
    color: #ffffff;
    font-family: "new-order", sans-serif;
    font-weight: 400;
    letter-spacing: 0.3px;
    font-size: clamp(1.125rem, 3.2vw, 2rem);
    line-height: 1.55;
    opacity: 0;
    transform: translateX(28px); /* slide from right to left */
    transition: transform 700ms ease, opacity 700ms ease;
    will-change: transform, opacity;
}

#rightSide.reveal .rightside-line {
    opacity: 1;
    transform: translateX(0);
}

.leftside-line {
    color: #000000; /* requested color */
    font-family: "new-order", sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: clamp(2rem, 8vw, 5.5rem);
    line-height: 1.05;
    opacity: 0;
    transform: translateX(-28px);
    transition: transform 600ms ease, opacity 600ms ease;
    will-change: transform, opacity;
}

#leftSide.reveal .leftside-line {
    opacity: 1;
    transform: translateX(0);
}

#leftSide.reveal .leftside-line:nth-child(1) { transition-delay: 0ms; }
#leftSide.reveal .leftside-line:nth-child(2) { transition-delay: 150ms; }
#leftSide.reveal .leftside-line:nth-child(3) { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
    .leftside-line {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    .rightside-line {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    #leftSide::before {
        transform: none !important; /* no zoom animation */
    }
}

/* Expertise Section */
.expertise-section {
    width: 100%;
    background-color: #003d33;
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.expertise-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 3rem);
}

.expertise-heading {
    color: #ffffff;
    font-family: "new-order", sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-align: center;
    letter-spacing: 0.5px;
    margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.expertise-categories {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.expertise-category {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    background-color: transparent;
    transition: background-color 0.4s ease;
}

.expertise-category.expanded {
    background-color: #005244; /* Slightly lighter green for highlight */
}

.expertise-category:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.expertise-label {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.expertise-label:hover,
.expertise-label:focus {
    opacity: 0.8;
    outline: none;
}

.label-text {
    color: #ffffff;
    font-family: "new-order", sans-serif;
    font-weight: 500;
    font-size: clamp(1.125rem, 2.8vw, 1.75rem);
    letter-spacing: 0.5px;
    text-align: left;
}

.toggle-icon {
    color: #ffffff;
    font-family: "new-order", sans-serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    line-height: 1;
    transition: transform 0.5s ease;
}

.expertise-label[aria-expanded="true"] .toggle-icon {
    transform: rotate(45deg);
}

.expertise-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: scaleY(0.95);
    transform-origin: top;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                margin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 clamp(1rem, 3vw, 2rem);
    margin-bottom: 0;
}

.expertise-content[hidden] {
    display: none;
}

.expertise-content[aria-hidden="false"] {
    max-height: 500px;
    opacity: 1;
    transform: scaleY(1);
    padding: 0 clamp(1rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

.expertise-content ol {
    list-style-position: inside;
    padding-left: 0;
    margin: 0;
}

.expertise-content li {
    color: #ffffff;
    font-family: "new-order", sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 2.2vw, 1.125rem);
    line-height: 1.8;
    letter-spacing: 0.3px;
    padding: 0.4rem 0;
}

@media (prefers-reduced-motion: reduce) {
    .expertise-content {
        transition: none !important;
    }
    .toggle-icon {
        transition: none !important;
    }
}

/* Logo Carousel Section */
.logo-carousel-section {
    width: 100%;
    background-color: #000000;
    padding: clamp(3rem, 8vw, 6rem) 0;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    position: relative;
}

.carousel-track {
    display: flex;
    gap: clamp(3rem, 8vw, 8rem);
    width: max-content;
    animation: scroll-logos 30s linear infinite;
}

.carousel-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: clamp(120px, 18vw, 200px);
}

.carousel-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Makes logos white for visibility on black background */
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.carousel-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Move exactly half since we duplicated the set */
    }
}

@media (prefers-reduced-motion: reduce) {
    .carousel-track {
        animation: none !important;
    }
    .carousel-logo {
        transition: none !important;
    }
}

/* Contact Section */
.contact-section {
    position: relative;
    width: 100%;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('Graphics/Portfolio Backgrounds/Homepage/ContactBackground.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 4vw, 3rem);
}

.contact-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.45); /* Darkened overlay for contrast */
    z-index: 0;
}

.contact-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(2.5rem, 6vw, 4rem);
    text-align: center;
}

.contact-heading {
    color: #ffffff;
    font-family: "new-order", sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin: 0;
}

.contact-buttons {
    display: flex;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-button {
    width: clamp(80px, 12vw, 120px);
    height: clamp(80px, 12vw, 120px);
    border-radius: 50%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact-button:hover,
.contact-button:focus {
    transform: translateY(-4px) scale(1.05);
    background-color: #1de9b6;
    box-shadow: 0 8px 24px rgba(29, 233, 182, 0.4);
    outline: none;
}

.contact-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 4px;
}

.contact-icon {
    width: 50%;
    height: 50%;
    color: #000000;
    transition: color 0.3s ease;
}

.contact-button:hover .contact-icon,
.contact-button:focus .contact-icon {
    color: #000000;
}

@media (prefers-reduced-motion: reduce) {
    .contact-button {
        transition: none !important;
    }
}

/* Protected Portfolio Overlay */
.portfolio-overlay {
    position: fixed;
    top: 56px; /* below navbar */
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(0,0,0,0.96);
    color: #fff;
    transform: translateX(-100%);
    transition: transform 500ms ease, opacity 400ms ease;
    opacity: 0;
    z-index: 999; /* above hero, below navbar is 1000 so we set 1010 */
}

.portfolio-overlay.open {
    transform: translateX(0);
    opacity: 1;
}

.overlay-inner {
    max-width: 720px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    gap: 18px;
}

.overlay-title {
    font-family: "new-order", sans-serif;
    text-align: center;
    font-size: clamp(1.1rem, 3.6vw, 1.6rem);
    line-height: 1.5;
    letter-spacing: .5px;
    max-width: 32ch;
}

.overlay-form {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overlay-form input[type="password"] {
    background: #000;
    color: #fff;
    border: 1px solid #444;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 1rem;
}

.error-message {
    color: #ff4444;
    font-family: "new-order", sans-serif;
    font-size: 0.9rem;
    text-align: center;
    margin: 0;
    padding: 8px;
}

.error-message.shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.overlay-submit,
.overlay-close {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 10px 16px;
    font-family: "new-order", sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 6px;
}

.overlay-submit:hover,
.overlay-submit:focus,
.overlay-close:hover,
.overlay-close:focus {
    background-color: #1de9b6;
    color: #000;
}

.overlay-close {
    margin-top: 6px;
}

.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-overlay {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* CTA (portfolio) */
.hero-cta {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    width: 100%;
    opacity: 0;
    transition: opacity 600ms ease-in-out, transform 400ms ease-in-out;
    transform: translateY(6px);
}

.hero-cta.show {
    opacity: 1;
    transform: translateY(0);
}

.cta-button {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 0.75rem 1.25rem;
    font-family: "new-order", sans-serif;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap; /* prevent wrapping on small widths */
}

.cta-button {
    transition: background-color 200ms ease, color 200ms ease, transform 120ms ease;
}

.cta-button:hover,
.cta-button:focus {
    background-color: #1de9b6; /* light cyan */
    color: #000000; /* black text */
    outline: none;
    transform: translateY(-2px);
}

.cta-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}

@media (prefers-reduced-motion: reduce) {
    .hero-cta, .hero-cta.show {
        transition: none !important;
        transform: none !important;
    }
}

/* Logo placeholder with fixed size constraints */
.hero-logo {
    width: clamp(250px, 20vw, 325px); /* min 250px, scales with viewport, max 325px */
    color: #ffffff;
    text-align: center;
    font-family: "new-order", sans-serif;
    letter-spacing: 0.2rem;
    font-size: clamp(1.2rem, 6vw, 3rem);
    margin-bottom: 32px; /* spacing below the logo, above the line */
    opacity: 0; /* start hidden */
    transform: translateY(12px); /* start slightly below the line */
}

.hero-logo span {
    display: inline-block;
    width: 100%;
}

.hero-logo-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* When page is ready, start animations */
.hero-intro.animate .hero-line {
    animation: line-expand 800ms ease-out forwards;
}

.hero-intro.animate .hero-logo {
    animation: logo-fade-up 600ms ease-out 700ms forwards;
}

@keyframes line-expand {
    from { width: 0; }
    to { width: calc(clamp(250px, 20vw, 325px) * 1.25); }
}

@keyframes logo-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-intro.animate .hero-line,
    .hero-intro.animate .hero-logo {
        animation: none !important;
    }
    .hero-line { width: calc(clamp(250px, 20vw, 325px) * 1.25); }
    .hero-logo { opacity: 1; transform: none; }
}

/* Hero animated background (scoped) */
.hero-bg {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 0;
}

.hero-bg-grid {
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    grid-template-rows: repeat(14, 1fr);
    width: min(92vmin, 92vw);
    height: min(92vmin, 92vh);
}

.hero-bg-cell {
    position: relative;
    overflow: visible;
    will-change: transform, opacity;
}

.hero-bg-line {
    position: absolute;
    left: 50%;
    top: 50%;
    height: 1px;
    width: 500px;
    transform-origin: left center;
    border: 0px solid rgba(120, 160, 255, 0.8);
    border-radius: 2px;
    background: #ffffff;
    opacity: 0.8;
    will-change: transform, opacity;
}

/* Navigation Bar Styling */
.navbar {
    display: flex;
    justify-content: space-between; /* Pushes artist name and menu to opposite ends */
    align-items: center;
    padding: 1rem 2rem; /* 1rem top/bottom, 2rem left/right */
    background-color: rgba(0, 0, 0, 0.8); /* Dark, transparent black */
    color: #ffffff; /* White text */
    position: fixed; /* Makes the navbar stick to the top */
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* Artist Name Styling */
.artist-name a {
    text-decoration: none;
    color: #ffffff;
    font-size: 1rem; /* Larger font size */
    font-family: "new-order", sans-serif;
    font-weight: 500;
    font-style: normal;
    letter-spacing: 1px;
}

/* Hamburger Menu Styling */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    cursor: pointer; /* Changes cursor to a pointer on hover */
}

.hamburger-menu .line {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 5px;
    transition: transform 0.4s ease-in-out; /* Smooth transition for movement */
}

/* --- NEW: Hamburger Menu Animation --- */
/* Move the top line left when the 'open' class is active */
.hamburger-menu.open .line:first-child {
    transform: translateX(-25px);
}

/* Move the bottom line right when the 'open' class is active */
.hamburger-menu.open .line:last-child {
    transform: translateX(25px);
}

/* --- NEW: Mobile Menu Container --- */
.mobile-menu-container {
    position: fixed;
    top: 56px; /* Position it directly below the navbar */
    left: 0;
    width: 100%;
    height: calc(100vh - 60px); /* Full screen height minus navbar */
    background-color: #000000; /* Solid black background */
    z-index: 999; /* Below the navbar but above other content */

    /* Start hidden and prepare for fade-in effect */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

/* Make the container visible when it has the 'open' class */
.mobile-menu-container.open {
    opacity: 1;
    visibility: visible;
}

/* Styling for the placeholder links inside the mobile menu */
.menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 3rem 2rem;
    height: 100%;
    width: 100%;
}

.menu-links a {
    color: #ffffff;
    text-decoration: none;
    font-family: "new-order", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: clamp(1.5rem, 8vw, 4rem);
    letter-spacing: 1px;
    padding: clamp(1rem, 3vh, 2.5rem) 2rem;
    width: 100%;
    max-width: 800px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.menu-links a:hover,
.menu-links a:focus {
    opacity: 0.7;
}