/* ===== MONOLITH - REDESIGN ===== */

/* ---- Reset & Base ---- */
.monolith-page {
    background-color: var(--bg-0, #08090b);
    color: var(--text-1, #f4f6fa);
    font-family: var(--font-primary, sans-serif);
    line-height: 1.5;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.monolith-page * {
    box-sizing: border-box;
}

.monolith-page a:not(.m-btn) {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.monolith-page a:not(.m-btn):hover {
    color: var(--accent-cine, #5fa6b1);
}

.m-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.m-container--narrow {
    max-width: 800px;
}

/* ---- Typography ---- */
.m-hero__title {
    font-family: var(--font-mono, monospace);
    font-weight: 800;
    font-size: clamp(4rem, 18vw, 14rem); /* Large title for mask */
    text-transform: uppercase;
    letter-spacing: -0.06em;
    line-height: 0.85;
    text-align: center;
    margin: 0;
    
    /* Gradient text for fallback */
    background: linear-gradient(135deg, var(--text-1) 0%, var(--text-3) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    /* transition: opacity 0.8s ease; */
}

.m-section-title {
    font-family: var(--font-primary, sans-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.m-text-lead {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--text-2, #a9b1c3);
    margin-bottom: 2.5rem;
    max-width: 640px;
    line-height: 1.6;
    font-weight: 400;
}

.m-text-muted {
    color: var(--text-3, #7c8598);
}

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

/* ---- Navigation ---- */
.m-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(8, 9, 11, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.4s ease;
}

.m-nav--scrolled {
    padding: 1rem 2rem;
    background: rgba(8, 9, 11, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.m-nav__brand {
    font-family: var(--font-mono, monospace);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.m-nav__links {
    display: none; /* Hidden on mobile by default */
}

@media (min-width: 768px) {
    .m-nav__links {
        display: flex;
        gap: 2.5rem;
    }
}

.m-nav__link {
    font-size: 0.9rem;
    color: var(--text-2);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.m-nav__link:hover {
    color: var(--text-1);
}

.m-nav__cta {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 99px;
    transition: box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease, color 0.22s ease;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: var(--font-mono, monospace);
    color: var(--text-2);
}

.m-nav__cta:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 12px rgba(95, 166, 177, 0.15);
}

/* ---- Hero Section ---- */
.m-hero {
    position: relative;
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at center, var(--bg-1), var(--bg-0));
}

.m-hero__background {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-hero__canvas {
    width: 100% !important; 
    height: 100% !important;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.shader-active .m-hero__canvas {
    opacity: 1;
}

.m-hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding-top: 6rem; /* Offset for nav */
}

.m-hero__tagline {
    font-family: var(--font-mono, monospace);
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-2);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.5rem;
    padding: 0 1rem;
    opacity: 0.9;
    font-weight: 400;
}

.m-hero__actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2.25rem;
    font-weight: 600;
    border-radius: 99px;
    transition: box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.88rem;
}

.m-btn--primary {
    background: var(--text-1);
    color: #08090b;
    border: 1.5px solid var(--text-1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    font-family: var(--font-mono, monospace);
    font-weight: 700;
}

.m-btn--primary:hover {
    background: rgba(8, 9, 11, 0.72);
    color: var(--text-1);
    border-color: rgba(244, 246, 250, 0.7);
    box-shadow:
        0 0 0 1px rgba(244, 246, 250, 0.15),
        0 0 20px rgba(95, 166, 177, 0.22),
        0 12px 30px rgba(0, 0, 0, 0.5);
}

.m-btn--primary:active {
    box-shadow:
        0 0 10px rgba(95, 166, 177, 0.15),
        0 6px 16px rgba(0, 0, 0, 0.4);
}

.m-btn--primary:focus-visible {
    outline: 2px solid var(--accent-cine);
    outline-offset: 3px;
}

.m-btn--text {
    background: transparent;
    color: var(--text-2);
    padding: 0.95rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-family: var(--font-mono, monospace);
}

.m-btn--text:hover {
    color: var(--text-1);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 12px rgba(95, 166, 177, 0.15);
}

/* ---- Intro / Grid ---- */
.m-intro {
    padding: 12rem 0;
    background: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
}

.m-intro__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 900px) {
    .m-intro__grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 8rem;
    }
}

.m-feature-list {
    list-style: none;
    padding: 0;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.m-feature-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-1);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.m-feature-list li::before {
    content: "→";
    color: var(--accent-cine);
    font-family: var(--font-mono);
}

.m-device-frame {
    width: 100%;
    max-width: 380px;
    border-radius: 36px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.15);
    margin: 0 auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.m-device-frame:hover {
    transform: translateY(-15px) scale(1.02);
}

/* ---- Carousel ---- */
.m-showcase {
    padding: 10rem 0;
    background: var(--bg-1);
    overflow: hidden;
}

.m-carousel {
    max-width: 1100px;
    margin: 0 auto;
}

.m-carousel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.m-carousel__controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-2);
}

.m-carousel__controls button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease, color 0.22s ease;
    font-family: var(--font-mono, monospace);
}

.m-carousel__controls button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 12px rgba(95, 166, 177, 0.15);
}

.m-carousel__controls button:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.m-carousel__stage {
    position: relative;
    height: 75vh;
    min-height: 600px;
    /* background: radial-gradient(circle at center, var(--bg-2), var(--bg-1)); */
    border-radius: 32px;
    /* overflow: hidden; */
    display: grid;
    place-items: center;
    /* box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 40px rgba(0,0,0,0.4); */
}

.m-carousel__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    pointer-events: none;
}

.m-carousel__slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 1;
}

.m-carousel__slide img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.1);
    cursor: zoom-in;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.m-carousel__slide.is-active img:hover {
    transform: scale(1.04);
    box-shadow: 0 40px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.15);
}

.m-carousel__indicators {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2.5rem;
}

.m-carousel__thumb {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.m-carousel__thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.m-carousel__thumb.is-active {
    background: var(--text-1);
    width: 60px;
}

.m-carousel__caption {
    text-align: center;
    margin-top: 1.5rem;
    font-family: var(--font-mono);
    color: var(--text-2);
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---- Lightbox ---- */
.m-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.m-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.m-lightbox__img {
    max-width: min(90vw, 900px);
    max-height: 90vh;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: opacity 0.2s ease, transform 0.2s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.m-lightbox__close {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-1, #f4f6fa);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: grid;
    place-items: center;
    transition: background 0.2s ease, border-color 0.2s ease;
    z-index: 1;
}

.m-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.m-lightbox__arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-1, #f4f6fa);
    cursor: pointer;
    font-size: 1.4rem;
    display: grid;
    place-items: center;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    z-index: 1;
    font-family: var(--font-mono, monospace);
}

.m-lightbox__arrow--prev { left: 1.25rem; }
.m-lightbox__arrow--next { right: 1.25rem; }

.m-lightbox__arrow:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.32);
}

.m-lightbox__arrow:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 600px) {
    .m-lightbox__arrow--prev { left: 0.5rem; }
    .m-lightbox__arrow--next { right: 0.5rem; }
    .m-lightbox__close { top: 0.75rem; right: 0.75rem; }
}

/* ---- Tone Section ---- */
.m-tones {
    padding: 12rem 0;
    background: var(--bg-0);
}

.m-tone-selector {
    display: grid;
    gap: 4rem;
    margin-top: 4rem;
}

@media (min-width: 900px) {
    .m-tone-selector {
        grid-template-columns: 1.2fr 1fr;
        align-items: center;
    }
}

.m-tone-display {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: #000;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.15);
}

@media (min-width: 900px) {
    .m-tone-display {
        aspect-ratio: 3/4;
    }
}

.m-tone-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tone switching animation class handled by JS */
.m-tone-switching {
    opacity: 0.6; 
    filter: blur(4px);
}

.m-tone-overlay {
    position: absolute;
    bottom: 2.5rem;
    left: 2.5rem;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #fff;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.15);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.m-tone-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-content: flex-start;
}

/* Dynamic Tone Buttons */
.m-tone-btn {
    background: transparent;
    color: var(--text-2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.75rem 1.2rem;
    border-radius: 99px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    cursor: pointer;
    transition: box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease, color 0.22s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.m-tone-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-1);
    box-shadow: 0 0 12px rgba(95, 166, 177, 0.15);
}

.m-tone--active {
    background: var(--text-1);
    color: var(--bg-0);
    border-color: var(--text-1);
    font-weight: 700;
}

.m-tone--active:hover {
    background: var(--text-1);
    color: var(--bg-0);
    box-shadow: none;
}


/* ---- Manifesto ---- */
.m-manifesto {
    position: relative;
    padding: 14rem 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.m-manifesto__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6; /* Subtle background */
    z-index: 0;
    mix-blend-mode: screen;
}

.m-manifesto__content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
}

.m-manifesto__title {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--accent-film);
    margin-bottom: 4rem;
    opacity: 0.9;
    font-weight: 600;
}

.m-manifesto__content p {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    line-height: 1.4;
    font-weight: 300;
    color: var(--text-1);
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
    letter-spacing: -0.02em;
}


/* ---- Access Form / Footer ---- */
.m-access {
    padding: 12rem 0 4rem;
    text-align: center;
    background: linear-gradient(to bottom, #000, var(--bg-1));
}

.m-form {
    max-width: 560px;
    margin: 4rem auto;
}

.m-form__group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.6rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.m-form__group:focus-within {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    transform: translateY(-2px);
}

.m-form__group input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 1.2rem 1.5rem;
    color: var(--text-1);
    font-family: var(--font-primary);
    font-size: 1.1rem;
    outline: none;
}

.m-form__group input::placeholder {
    color: var(--text-3);
}

.m-form__group button {
    background: var(--text-1);
    color: #08090b;
    border: 1.5px solid var(--text-1);
    padding: 1.2rem 2rem;
    border-radius: 12px;
    font-family: var(--font-mono, monospace);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.m-form__group button:hover {
    background: rgba(8, 9, 11, 0.72);
    color: var(--text-1);
    border-color: rgba(244, 246, 250, 0.7);
    box-shadow:
        0 0 0 1px rgba(244, 246, 250, 0.15),
        0 0 20px rgba(95, 166, 177, 0.22),
        0 8px 20px rgba(0, 0, 0, 0.4);
}

.m-form__status {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    min-height: 1.4em;
    font-family: var(--font-mono);
}
.m-hero__status--success { color: #6ece98; }
.m-hero__status--error { color: #e56b6f; }

.m-footer {
    margin-top: 8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 3rem;
    color: var(--text-3);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 600px) {
    .m-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.m-footer a {
    color: var(--text-2);
    transition: color 0.3s ease;
}

.m-footer a:hover {
    color: var(--text-1);
}

/* ---- Scroll Reveal Animations ---- */
.m-features, .m-mockup, .m-tones, .m-manifesto, .m-footer {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.m-features--visible, 
.m-mockup--visible, 
.m-tones--visible, 
.m-manifesto--visible, 
.m-footer--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- iPhone 3D Reveal ---- */
.m-phone-reveal {
    height: 220vh;
    background: var(--bg-0, #08090b);
    position: relative;
}

.m-phone-reveal__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#phoneCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.m-phone-reveal__copy {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    width: max-content;
    max-width: 90vw;

    opacity: 0;
    transform: translateX(-50%) translateY(16px);
    transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.m-phone-reveal__copy.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.m-phone-reveal__eyebrow {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-cine, #5fa6b1);
    margin: 0 0 0.5rem;
}

.m-phone-reveal__headline {
    font-family: var(--font-primary, sans-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-1, #f4f6fa);
    margin: 0 0 0.75rem;
}

.m-phone-reveal__sub {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: var(--text-2, #a9b1c3);
    margin: 0;
    font-weight: 400;
}

