/* ============================================================
   SHACK STUDIOS — Premium Redesign
   Palette: #0a0a0a / #FAFAF8 / #D97706 (accent)
   Fonts: Outfit (body/headlines), JetBrains Mono (labels)
   ============================================================ */

/* --- Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #FAFAF8;
    color: #0a0a0a;
    margin: 0;
    line-height: 1.6;
}

/* --- Grain / noise overlay --- */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* --- Icon font --- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1px;
    background-color: rgba(10, 10, 10, 0.12);
    border: 1px solid rgba(10, 10, 10, 0.12);
}

.bento-item {
    background-color: #FAFAF8;
    padding: 2rem;
}

/* --- Focus states (accessibility) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D97706;
    outline-offset: 2px;
}

/* --- Smooth transitions for interactive elements --- */
a,
button {
    transition: opacity 0.25s ease, background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* --- Button press feedback --- */
.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.97) translateY(1px);
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn-primary:hover::after {
    opacity: 1;
}

/* --- Section rhythm --- */
section {
    position: relative;
}

/* --- Scroll reveal animations --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* --- Accent line --- */
.accent-line {
    width: 32px;
    height: 3px;
    background-color: #D97706;
    display: block;
    margin-bottom: 1.25rem;
}

/* --- Service card hover --- */
.service-card {
    position: relative;
    overflow: hidden;
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #D97706;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-2px);
}

/* --- Spotlight border on proof cards --- */
.proof-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.proof-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(10, 10, 10, 0.06), 0 2px 8px rgba(10, 10, 10, 0.04);
}

/* --- Manifesto counter --- */
.manifesto-item {
    position: relative;
    padding-left: 2rem;
    transition: transform 0.3s ease;
}

.manifesto-item:hover {
    transform: translateX(4px);
}

.manifesto-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background-color: #D97706;
    transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.manifesto-item:hover::before {
    height: 100%;
}

/* --- Nav active indicator --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #D97706;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Mobile bento grid override --- */
@media (max-width: 767px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item {
        padding: 1.5rem;
    }
}

/* --- Mobile menu overlay --- */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    background-color: rgba(250, 250, 248, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-menu-link {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #71717a;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: color 0.25s ease;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
    color: #0a0a0a;
}

.mobile-menu-cta {
    display: inline-block;
    margin-top: 1rem;
    background-color: #0a0a0a;
    color: #FAFAF8;
    padding: 1rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    min-height: 48px;
    display: flex;
    align-items: center;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mobile-menu-cta:hover,
.mobile-menu-cta:active {
    opacity: 0.85;
}

.mobile-menu-cta:active {
    transform: scale(0.97);
}

/* Hide mobile menu on desktop */
@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
}

/* --- Touch targets --- */
@media (max-width: 767px) {
    a,
    button {
        min-height: 44px;
    }

    section {
        padding-left: max(1.5rem, env(safe-area-inset-left));
        padding-right: max(1.5rem, env(safe-area-inset-right));
    }
}

/* --- Engine step cards --- */
.engine-step {
    cursor: pointer;
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.engine-step .material-symbols-outlined {
    transition: color 0.4s ease;
}

.engine-step[style*="color: rgb(250"] .material-symbols-outlined {
    color: #D97706;
}

/* --- Readable line length cap --- */
.max-w-prose {
    max-width: 65ch;
}

/* --- Form inputs focus glow --- */
input:focus,
select:focus,
textarea:focus {
    border-color: #D97706 !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

/* --- Horizontal scroll trust bar --- */
@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.trust-scroll {
    animation: scroll-left 20s linear infinite;
}

.trust-scroll:hover {
    animation-play-state: paused;
}

/* --- Hero gradient ambient light --- */
.hero-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(ellipse at center, rgba(217, 119, 6, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* --- Skip to content --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 100;
    background: #D97706;
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}
