/* ======================================================
   simulai.xyz - Memphis Playground
   Palette: #7FDBFF #50E3C2 #FF6B8A #FFE156 #FFDDE1 #FFFAF0 #2D2B55
   Fonts: Bungee (display), DM Sans (body, accent)
   ====================================================== */

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

html, body {
    background: #FFFAF0;
    color: #2D2B55;
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ---- Dot-grid background ---- */
.dot-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: #FFFAF0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'><circle cx='15' cy='15' r='1.5' fill='%23FFDDE1'/></svg>");
    background-size: 30px 30px;
    pointer-events: none;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
}

/* ---- Block scaffolding ---- */
.block {
    position: relative;
    min-height: 100vh;
    padding: 80px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.block.is-visible { opacity: 1; transform: none !important; }

/* Initial offsets per block (overridden when .is-visible) */
.block-splash { transform: scale(0.9); }
.block-what   { transform: translateX(-40px); }
.block-how    { transform: translateX(40px); }
.block-play   { transform: translateY(30px); }
.block-go     { transform: scale(0.95); }

/* ---- Accent label ---- */
.label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #FF6B8A;
    display: inline-block;
}

/* ======================================================
   BLOCK 1: SPLASH
   ====================================================== */
.block-splash {
    align-items: center;
    text-align: center;
}

.splash-shape-triangle {
    position: absolute;
    top: 28%;
    left: 50%;
    transform: translateX(-30%);
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 200px solid #FF6B8A;
    z-index: 0;
}

.splash-stack {
    position: relative;
    z-index: 2;
}

.splash-title {
    font-family: 'Bungee', 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(72px, 16vw, 200px);
    line-height: 0.9;
    letter-spacing: -0.02em;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
}

.splash-title .ch {
    display: inline-block;
    margin-left: -0.04em;
    transform-origin: center;
}
.splash-title .ch1 { color: #FF6B8A; transform: rotate(-3deg); }
.splash-title .ch2 { color: #FFE156; transform: rotate(2deg); }
.splash-title .ch3 { color: #7FDBFF; transform: rotate(-1deg); }
.splash-title .ch4 { color: #50E3C2; transform: rotate(3deg); }
.splash-title .ch5 { color: #2D2B55; transform: rotate(-2deg); }
.splash-title .ch6 { color: #FF6B8A; transform: rotate(4deg); }
.splash-title .ch7 { color: #FFE156; transform: rotate(-3deg); }

.splash-tld {
    font-family: 'Bungee', sans-serif;
    font-size: clamp(40px, 8vw, 80px);
    color: #2D2B55;
    transform: rotate(2deg);
    margin-top: 8px;
    letter-spacing: 0.04em;
}

.splash-tagline {
    margin-top: 32px;
    font-size: 18px;
    color: #2D2B55;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Squiggly lines ---- */
.squiggle {
    position: absolute;
    height: 60px;
    pointer-events: none;
    z-index: 1;
}
.squiggle-1 { top: 22%; left: -6%; width: 70%; transform: rotate(-4deg); }
.squiggle-2 { top: 48%; right: -8%; width: 60%; transform: rotate(3deg); }
.squiggle-3 { top: 74%; left: 8%; width: 84%; transform: rotate(-2deg); }
.squiggle-4 { bottom: 6%; left: -4%; width: 70%; transform: rotate(2deg); }
.squiggle-5 { top: 38%; left: 0; width: 100%; transform: rotate(-1.5deg); }

/* ======================================================
   BLOCK 2: WHAT - overlapping panels
   ====================================================== */
.block-what {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-rows: 1fr;
    gap: 0;
    align-items: center;
}

.panel {
    border: 3px solid #2D2B55;
    padding: 40px 36px;
    position: relative;
}

.panel-yellow {
    background: #FFE156;
    transform: rotate(-2deg);
    z-index: 2;
    margin-right: -40px;
    align-self: start;
    margin-top: 60px;
}

.panel-blue {
    background: #7FDBFF;
    border-color: #FF6B8A;
    transform: rotate(3deg);
    z-index: 1;
    margin-left: -40px;
    align-self: end;
    margin-bottom: 60px;
}

.panel-title {
    font-family: 'Bungee', sans-serif;
    font-size: clamp(56px, 9vw, 120px);
    color: #2D2B55;
    line-height: 0.95;
    margin: 6px 0 18px;
}

.panel-subtitle {
    font-family: 'Bungee', sans-serif;
    font-size: clamp(28px, 4vw, 44px);
    color: #2D2B55;
    line-height: 1.05;
    margin: 6px 0 18px;
}

.panel-body {
    color: #2D2B55;
    max-width: 44ch;
}

.panel-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 3px solid #2D2B55;
    border-radius: 50%;
    right: -60px;
    top: 30%;
    background: transparent;
    pointer-events: none;
}

/* ======================================================
   BLOCK 3: HOW - centered strip + scattered shapes
   ====================================================== */
.block-how {
    align-items: center;
    text-align: center;
}

.how-label { color: #50E3C2; }

.how-title {
    font-family: 'Bungee', sans-serif;
    font-size: clamp(56px, 9vw, 120px);
    color: #2D2B55;
    line-height: 1;
    margin: 8px 0 24px;
    transform: rotate(-1.5deg);
}

.how-zigzag {
    width: 75%;
    max-width: 700px;
    height: 30px;
    margin: 24px 0;
}

.how-strip {
    width: 65%;
    min-width: 280px;
    border: 3px solid #2D2B55;
    background: #FFFAF0;
    padding: 32px 36px;
    transform: rotate(1.5deg);
    position: relative;
    z-index: 2;
}

.how-body {
    color: #2D2B55;
    font-size: 18px;
    text-align: left;
    line-height: 1.65;
}

.how-grid {
    position: absolute;
    display: grid;
    grid-template-columns: repeat(3, 16px);
    grid-template-rows: repeat(3, 16px);
    gap: 4px;
    bottom: 12%;
    left: 8%;
    transform: rotate(8deg);
}
.how-grid span {
    width: 16px;
    height: 16px;
    background: #FFE156;
}
.how-grid span:nth-child(2n) { background: #7FDBFF; }

.how-dotted-circle {
    position: absolute;
    width: 110px;
    height: 110px;
    top: 18%;
    right: 6%;
}

/* ======================================================
   BLOCK 4: PLAY - large dark square
   ====================================================== */
.block-play {
    align-items: center;
    justify-content: center;
}

.play-square {
    position: relative;
    width: min(480px, 92vw);
    background: #2D2B55;
    color: #FFFAF0;
    padding: 48px 44px;
    transform: rotate(-1.5deg);
    border: 3px solid #2D2B55;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.play-label { color: #FFE156; margin-bottom: 8px; }

.play-title {
    font-family: 'Bungee', sans-serif;
    font-size: clamp(56px, 9vw, 110px);
    color: #FFFAF0;
    line-height: 0.95;
    margin: 0 0 18px;
}

.play-body {
    color: #FFFAF0;
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.6;
}

.play-quote {
    color: #FFE156;
    font-size: 14px;
    line-height: 1.5;
    border-top: 2px solid #FFFAF0;
    padding-top: 12px;
    margin-top: 6px;
}

/* Corner accents for play square */
.corner {
    position: absolute;
    width: 36px;
    height: 36px;
    pointer-events: none;
}
.corner-tl {
    top: -18px;
    left: -18px;
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 32px solid #FF6B8A;
}
.corner-tr {
    top: -18px;
    right: -18px;
    background: #7FDBFF;
    border: 3px solid #2D2B55;
    border-radius: 50%;
}
.corner-bl {
    bottom: -22px;
    left: -22px;
    background: linear-gradient(135deg, transparent 45%, #50E3C2 45%, #50E3C2 55%, transparent 55%),
                linear-gradient(45deg, transparent 45%, #50E3C2 45%, #50E3C2 55%, transparent 55%);
    /* zigzag fallback: just show a colored swatch with rotation */
    width: 44px;
    height: 22px;
    background: transparent;
}
.corner-bl::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(135deg, #50E3C2 25%, transparent 25%) 0 0/12px 12px,
      linear-gradient(225deg, #50E3C2 25%, transparent 25%) 0 0/12px 12px;
}
.corner-br {
    bottom: -18px;
    right: -18px;
    width: 30px;
    height: 30px;
}
.corner-br::before, .corner-br::after {
    content: "";
    position: absolute;
    background: #FFE156;
}
.corner-br::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    transform: translateY(-50%);
}
.corner-br::after {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 6px;
    transform: translateX(-50%);
}

/* ======================================================
   BLOCK 5: GO - signature mark
   ====================================================== */
.block-go {
    align-items: center;
    text-align: center;
    justify-content: center;
}

.go-line {
    font-family: 'Bungee', sans-serif;
    font-size: clamp(28px, 4.5vw, 48px);
    color: #2D2B55;
    transform: rotate(-1deg);
    margin-bottom: 64px;
    letter-spacing: -0.01em;
}

.go-mark {
    position: relative;
    width: 320px;
    height: 240px;
    margin: 0 auto;
}

.mark-square {
    position: absolute;
    width: 140px;
    height: 140px;
    background: #FFE156;
    border: 3px solid #2D2B55;
    top: 30px;
    left: 30px;
    transform: rotate(-6deg);
    z-index: 1;
}

.mark-circle {
    position: absolute;
    width: 130px;
    height: 130px;
    background: #7FDBFF;
    border: 3px solid #2D2B55;
    border-radius: 50%;
    top: 50px;
    left: 130px;
    z-index: 2;
}

.mark-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 70px solid transparent;
    border-right: 70px solid transparent;
    border-bottom: 120px solid #FF6B8A;
    top: 80px;
    left: 80px;
    z-index: 3;
    transform: rotate(8deg);
    filter: drop-shadow(0 0 0 #2D2B55);
}

.mark-cross {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 0;
    right: 30px;
    z-index: 4;
}
.mark-cross::before, .mark-cross::after {
    content: "";
    position: absolute;
    background: #50E3C2;
    border: 3px solid #2D2B55;
}
.mark-cross::before {
    top: 50%; left: 0; right: 0; height: 14px; transform: translateY(-50%);
}
.mark-cross::after {
    left: 50%; top: 0; bottom: 0; width: 14px; transform: translateX(-50%);
}

.go-foot {
    margin-top: 64px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2D2B55;
}

/* ======================================================
   Geometric scatter shapes (auto-rotating)
   ====================================================== */
.scatter {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 0;
    animation: spin-cw 28s linear infinite;
}

.scatter-tri {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid #FF6B8A;
    animation-duration: 32s;
}

.scatter-circle {
    background: #FFE156;
    border-radius: 50%;
    border: 2px solid #2D2B55;
    animation-duration: 24s;
    animation-direction: reverse;
}

.scatter-circle-outline {
    background: transparent;
    border-radius: 50%;
    border: 3px solid #50E3C2;
    width: 24px; height: 24px;
    animation-duration: 36s;
}

.scatter-square {
    background: #7FDBFF;
    border: 2px solid #2D2B55;
    animation-duration: 30s;
}

.scatter-cross {
    width: 22px; height: 22px;
    animation-duration: 26s;
    animation-direction: reverse;
}
.scatter-cross::before, .scatter-cross::after {
    content: "";
    position: absolute;
    background: #50E3C2;
}
.scatter-cross::before {
    top: 45%; left: 0; right: 0; height: 4px;
}
.scatter-cross::after {
    left: 45%; top: 0; bottom: 0; width: 4px;
}

@keyframes spin-cw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ======================================================
   Responsive
   ====================================================== */
@media (max-width: 768px) {
    .page { padding: 0 24px; }
    .block { padding: 56px 0; }

    .panel-yellow, .panel-blue,
    .play-square, .how-strip,
    .splash-tld, .how-title, .go-line {
        transform: none !important;
    }

    .block-what {
        grid-template-columns: 1fr;
    }
    .panel-yellow { margin: 0 0 -20px 0; align-self: stretch; }
    .panel-blue   { margin: 0; align-self: stretch; }

    .panel-circle { right: -30px; width: 80px; height: 80px; }

    .how-strip { width: 100%; }
    .how-grid  { transform: scale(0.6) rotate(8deg); bottom: 4%; left: 2%; }
    .how-dotted-circle { width: 70px; height: 70px; }

    .play-square { aspect-ratio: auto; padding: 36px 28px; }

    .scatter { transform: scale(0.6); }
}

@media (max-width: 480px) {
    .squiggle { display: none; }
    .splash-shape-triangle {
        border-left-width: 70px;
        border-right-width: 70px;
        border-bottom-width: 140px;
    }
}
