/* lotus.dev - Anti-Design / Industrial-Organic / Circuit-Botanical */
/* Palette: #0D0D0D, #1A1A1A, #F5F5F0, #E8175D, #FF2D78, #2D8A6E, #E8E4DC, #5A5A5A, #D4A84B */
/* Fonts: Playfair Display (display), Source Serif 4 (body), IBM Plex Mono (accent) */

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

html {
    scroll-behavior: auto;
    overflow-x: hidden;
}

body {
    background: #0D0D0D;
    color: #E8E4DC;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 1.15rem;
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
}

/* =============================================
   BACKGROUND CIRCUIT TEXTURE
   ============================================= */
.bg-circuit-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* =============================================
   NAVIGATION
   ============================================= */
#nav-trigger {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s linear, transform 0.3s linear;
}

#nav-trigger.visible {
    opacity: 1;
    transform: translateY(0);
}

#menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    width: 44px;
}

.nav-line {
    display: block;
    height: 2px;
    background: #F5F5F0;
    transition: width 0.15s linear;
}

.nav-line--1 {
    width: 100%;
}

.nav-line--2 {
    width: 65%;
}

.nav-line--3 {
    width: 40%;
}

#menu-btn:hover .nav-line {
    width: 100%;
}

/* Nav Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0D0D0D;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 10%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s linear;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    overflow: hidden;
}

.nav-link {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 7rem);
    color: #F5F5F0;
    text-decoration: none;
    letter-spacing: -0.04em;
    line-height: 1.1;
    transform: translateY(110%);
    transition: transform 0.3s linear, color 0.15s linear;
    padding-left: 0;
}

.nav-overlay.active .nav-link {
    transform: translateY(0);
}

.nav-links li:nth-child(1) .nav-link { transition-delay: 0ms; padding-left: 0; }
.nav-links li:nth-child(2) .nav-link { transition-delay: 200ms; padding-left: 5vw; }
.nav-links li:nth-child(3) .nav-link { transition-delay: 400ms; padding-left: 10vw; }
.nav-links li:nth-child(4) .nav-link { transition-delay: 600ms; padding-left: 15vw; }
.nav-links li:nth-child(5) .nav-link { transition-delay: 800ms; padding-left: 20vw; }

.nav-link:hover {
    color: #E8175D;
    transform: translateX(-2px);
}

/* =============================================
   SECTIONS (common)
   ============================================= */
.section {
    position: relative;
    width: 100%;
    z-index: 1;
}

/* =============================================
   SECTION 1: HERO
   ============================================= */
.section--hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero__lotus-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.hero__title {
    position: relative;
    z-index: 10;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(4rem, 15vw, 12rem);
    color: #F5F5F0;
    letter-spacing: -0.04em;
    line-height: 0.9;
    text-align: center;
    white-space: nowrap;
    /* Extend beyond viewport edges */
    margin-left: -5vw;
    margin-right: -5vw;
    width: 110vw;
    user-select: none;
}

.hero__subtitle {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 10;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8A8A8A;
}

/* =============================================
   INTERRUPT BANDS
   ============================================= */
.interrupt-band {
    width: 100%;
    height: 60px;
    position: relative;
    z-index: 5;
    overflow: hidden;
}

.interrupt-band--1 {
    background: #1A1A1A;
}

.interrupt-band--2 {
    background: #0D0D0D;
}

.interrupt-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* =============================================
   SECTION 2: MANIFESTO
   ============================================= */
.section--manifesto {
    min-height: 100vh;
    background: #F5F5F0;
    position: relative;
    overflow: hidden;
    padding: 10vh 0;
}

.manifesto__circuit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.manifesto__content {
    position: relative;
    z-index: 10;
    margin-left: 15%;
    margin-top: 10vh;
    max-width: 38em;
    padding-right: 2rem;
}

.manifesto__text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 1.35rem;
    line-height: 1.75;
    color: #0D0D0D;
}

.manifesto__image {
    position: absolute;
    bottom: -15%;
    right: -5%;
    width: 45%;
    max-width: 500px;
    z-index: 2;
    opacity: 0.85;
}

.manifesto__pcb-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* =============================================
   SECTION 3: LOTUS-CIRCUIT DIAGRAM
   ============================================= */
.section--diagram {
    min-height: 120vh;
    background: #0D0D0D;
    position: relative;
    padding: 8vh 0 6vh 0;
    overflow: hidden;
}

.diagram__container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
}

.diagram__svg {
    width: 100%;
    max-width: 600px;
    height: auto;
}

.diagram-label {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s linear, transform 0.4s linear;
}

.diagram-label.visible {
    opacity: 1;
    transform: translateY(0);
}

.diagram__text {
    max-width: 70%;
    margin: 4rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.diagram__col {
    max-width: 38em;
}

.diagram__col:nth-child(1) {
    align-self: flex-start;
    margin-left: 10%;
}

.diagram__col:nth-child(3) {
    align-self: flex-end;
    margin-right: 10%;
}

.diagram__col p {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 1.15rem;
    line-height: 1.75;
    color: #E8E4DC;
}

.diagram__divider {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.diagram__divider svg {
    width: 100%;
    height: 4px;
    display: block;
}

/* =============================================
   SECTION 4: COLLISION GALLERY
   ============================================= */
.section--gallery {
    min-height: 130vh;
    position: relative;
    overflow: hidden;
    background: #0D0D0D;
}

.gallery__image {
    width: 100%;
    position: relative;
    margin-top: -15%;
    will-change: transform;
}

.gallery__image--1 {
    margin-top: 0;
    z-index: 1;
}

.gallery__image--2 {
    z-index: 2;
}

.gallery__image--3 {
    z-index: 3;
}

.gallery__duotone-svg {
    width: 100%;
    height: auto;
    display: block;
}

.gallery__overlay-text {
    position: absolute;
    z-index: 10;
    pointer-events: none;
}

.gallery__overlay-text span {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2rem, 6vw, 4.5rem);
    color: #F5F5F0;
    letter-spacing: -0.04em;
    line-height: 0.9;
    text-transform: lowercase;
    opacity: 0;
    transition: opacity 0.4s linear;
}

.gallery__overlay-text.visible span {
    opacity: 1;
}

.gallery__overlay-text--1 {
    top: 15%;
    left: 8%;
}

.gallery__overlay-text--2 {
    top: 48%;
    right: 12%;
}

.gallery__overlay-text--3 {
    bottom: 12%;
    left: 15%;
}

/* =============================================
   SECTION 5: TERMINAL
   ============================================= */
.section--terminal {
    min-height: 50vh;
    background: #000000;
    padding: 6rem 0 4rem;
    position: relative;
    z-index: 1;
}

.terminal__content {
    padding-left: 2rem;
    max-width: 700px;
}

.terminal__line {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    line-height: 2;
    color: #8A8A8A;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s linear, transform 0.2s linear;
}

.terminal__line.visible {
    opacity: 1;
    transform: translateY(0);
}

.terminal__prompt {
    color: #5A5A5A;
    margin-right: 0.5em;
}

.terminal__muted {
    color: #5A5A5A;
}

.terminal__link {
    color: #8A8A8A;
    text-decoration: none;
    transition: color 0.15s linear, transform 0.15s linear;
    display: inline-block;
}

.terminal__link:hover {
    color: #E8175D;
    transform: translateX(-2px);
}

.terminal__cursor {
    color: #E8175D;
    animation: blink 1s linear infinite;
}

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

/* =============================================
   CIRCUIT TRACE ANIMATIONS
   ============================================= */
.circuit-trace-anim {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    transition: stroke-dashoffset 1.2s linear;
}

.circuit-trace-anim.drawn {
    stroke-dashoffset: 0;
}

/* =============================================
   CORNER ACCENTS (small circuit-node clusters)
   ============================================= */
.manifesto__content::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: -1rem;
    width: 30px;
    height: 30px;
    border-top: 1.5px solid #2D8A6E;
    border-left: 1.5px solid #2D8A6E;
    opacity: 0.4;
}

.manifesto__content::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    border-bottom: 1.5px solid #2D8A6E;
    border-right: 1.5px solid #2D8A6E;
    opacity: 0.4;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .hero__title {
        font-size: clamp(3rem, 15vw, 8rem);
    }

    .manifesto__content {
        margin-left: 5%;
        margin-right: 5%;
        padding-right: 1rem;
    }

    .manifesto__text {
        font-size: 1.1rem;
    }

    .manifesto__image {
        width: 60%;
        bottom: -10%;
        right: -10%;
    }

    .diagram__text {
        max-width: 90%;
    }

    .diagram__col:nth-child(1) {
        margin-left: 5%;
    }

    .diagram__col:nth-child(3) {
        margin-right: 5%;
    }

    .terminal__content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .nav-overlay {
        padding-left: 5%;
    }

    #nav-trigger {
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .hero__subtitle {
        bottom: 1.5rem;
        left: 1.5rem;
        font-size: 0.7rem;
    }

    .manifesto__text {
        font-size: 1rem;
    }

    .gallery__overlay-text span {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }

    .terminal__line {
        font-size: 0.75rem;
    }
}
