/* ==========================================================================
   MBDC Studio — Base styles
   --------------------------------------------------------------------------
   Tailwind utilities are compiled to css/tailwind.css (npm run build:css).
   This file holds the custom, non-utility styles utilities can't express.
   ========================================================================== */

:root {
    /* Exponential ease-outs — refined, no bounce/elastic */
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* contain the marquee + grain overflow */
}

html {
    scroll-behavior: smooth;
}

/* Square corners everywhere — part of the visual language */
img {
    border-radius: 0 !important;
}

::selection {
    background-color: #CCFF00;
    color: #111111;
}

/* --------------------------------------------------------------------------
   Sticky navigation — transparent at top, frosted on scroll
   -------------------------------------------------------------------------- */
#site-nav {
    transition: background 300ms ease, box-shadow 300ms ease, backdrop-filter 300ms ease;
}

#site-nav.scrolled {
    background: rgba(244, 243, 239, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(17, 17, 17, 0.08);
}

/* --------------------------------------------------------------------------
   Accordion — static structure (motion lives in animations.css)
   -------------------------------------------------------------------------- */
.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 350ms var(--ease-out-quart);
}

.accordion-icon {
    transition: transform 300ms var(--ease-out-quart);
}

/* --------------------------------------------------------------------------
   Button press — tactile feedback (keeps the existing colour transitions)
   -------------------------------------------------------------------------- */
a.bg-accent,
a.border,
a.bg-foreground {
    transition: background-color 300ms ease, color 300ms ease, transform 140ms var(--ease-out-quart);
}
a.bg-accent:active,
a.border:active,
a.bg-foreground:active {
    transform: translateY(1px);
}

/* --------------------------------------------------------------------------
   Hero — masked line reveal + staggered rise (gated behind .js)
   -------------------------------------------------------------------------- */
.hero-head .line {
    display: block;
    overflow: hidden;
    padding: 0.12em 0;
    margin: -0.12em 0;
}
.hero-head .line-inner {
    display: block;
    transition: transform 950ms var(--ease-out-expo);
}
.hero-head .line:nth-child(2) .line-inner {
    transition-delay: 80ms;
}
.js .hero-head .line-inner {
    transform: translateY(110%);
}
.hero-section.is-in .hero-head .line-inner {
    transform: translateY(0);
}

.hero-rise {
    transition: opacity 850ms var(--ease-out-quart), transform 850ms var(--ease-out-quart);
}
.js .hero-rise {
    opacity: 0;
    transform: translateY(22px);
}
.hero-section.is-in .hero-rise {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------------------------
   Marquee ribbon — auto-scrolling editorial band (keyframes in animations.css)
   -------------------------------------------------------------------------- */
.marquee-track {
    display: flex;
    width: max-content;
    will-change: transform;
}
.marquee-group {
    display: inline-block;
    white-space: nowrap;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: clamp(1.05rem, 2.3vw, 1.85rem);
}
.marquee:hover .marquee-track {
    animation-play-state: paused;
}

/* --------------------------------------------------------------------------
   Portfolio "View" tag — revealed on card hover
   -------------------------------------------------------------------------- */
.card-view {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    background: #CCFF00;
    color: #111111;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 400ms var(--ease-out-quart), transform 400ms var(--ease-out-quart);
}
.group:hover .card-view {
    opacity: 1;
    transform: none;
}
.card-view-arrow {
    transition: transform 400ms var(--ease-out-quart);
}
.group:hover .card-view-arrow {
    transform: translateX(3px);
}

/* Scroll progress bar scales horizontally (set by interactions.js) */
#scroll-progress {
    transform-origin: left;
    will-change: transform;
}

/* --------------------------------------------------------------------------
   Hero cube-volume background (WebGL) + legibility scrim + static fallback
   -------------------------------------------------------------------------- */
.hero-bg,
.hero-bg-fallback,
.hero-bg-scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero-bg-fallback {
    z-index: 0;
    background:
        radial-gradient(120% 120% at 85% 25%, rgba(204, 255, 0, 0.18), rgba(244, 243, 239, 0) 55%),
        linear-gradient(180deg, #EFEEE8, #F4F3EF);
}
.hero-bg {
    z-index: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.hero-bg-static .hero-bg {
    display: none;
}
/* Left-weighted scrim keeps the (left-aligned) headline crisp; cubes read on the right */
.hero-bg-scrim {
    z-index: 1;
    background: linear-gradient(
        90deg,
        #F4F3EF 0%,
        rgba(244, 243, 239, 0.97) 40%,
        rgba(244, 243, 239, 0.6) 68%,
        rgba(244, 243, 239, 0) 100%
    );
}

/* --------------------------------------------------------------------------
   Hero brand seal — slow-rotating circular wordmark (keyframe in animations.css)
   -------------------------------------------------------------------------- */
.hero-seal-svg {
    animation: seal-spin 22s linear infinite;
    transform-origin: center;
}
.hero-seal-text {
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    fill: #111111;
}
