/* miris.xyz v2 -- Memphis fever dream meets calm serenity
   Palette: cream base, pink/blue duotone, yellow accent, navy ink, gray text, botanical green */

:root {
    --cream: #FBF5E8;
    --pink: #E8506A;
    --blue: #4A80C8;
    --yellow: #F0C840;
    --navy: #1A2040;
    --gray: #A8A0A0;
    --green: #48A060;

    --font-display: "Poiret One", "Poppins", serif;
    --font-body: "DM Sans", "Inter", sans-serif;
    --font-label: "Rubik", "Inter", sans-serif;

    --gutter: clamp(20px, 4vw, 64px);
    --section-pad: clamp(60px, 9vw, 140px);
    --radius: 4px;
}

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

html, body { width: 100%; }

body {
    background: var(--cream);
    color: var(--navy);
    font-family: var(--font-body);
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* GENERATIVE BACKGROUND CANVAS */
#generative-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 1200ms ease-out;
}

#generative-canvas.is-loaded {
    opacity: 0.85;
}

/* MEMPHIS DECORATIVE LAYER */
.memphis-layer {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.memphis-piece {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transform: translateY(40px) rotate(0deg);
    transition: opacity 800ms ease-out, transform 800ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.memphis-piece.is-shown {
    opacity: 1;
    transform: translateY(0) rotate(var(--rot, 0deg));
}

/* BOTANICAL ILLUSTRATIONS (fixed bottom) */
.botanical {
    position: fixed;
    bottom: 0;
    width: clamp(120px, 18vw, 220px);
    height: auto;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 900ms ease-out 600ms, transform 900ms cubic-bezier(0.2, 0.8, 0.3, 1) 600ms;
}

.botanical.is-shown {
    opacity: 0.95;
    transform: translateY(0);
}

.botanical-left {
    left: 1vw;
}

.botanical-right {
    right: 1vw;
}

.bot-flower {
    transform-origin: 80px 60px;
    animation: bloom-sway 7s ease-in-out infinite;
}

.botanical-right .bot-flower {
    transform-origin: 160px 90px;
}

@keyframes bloom-sway {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: rotate(4deg); }
}

/* MINIMAL NAV TRIGGER (three stacked circles) */
.nav-trigger {
    position: fixed;
    top: clamp(20px, 3vw, 36px);
    right: clamp(20px, 3vw, 36px);
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.nav-dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--navy);
    transition: transform 400ms cubic-bezier(0.2, 0.8, 0.3, 1), background 300ms;
}

.nav-trigger:hover .nav-dot { background: var(--pink); }
.nav-trigger:hover .nav-dot:nth-child(2) { transform: translateX(4px); background: var(--blue); }
.nav-trigger:hover .nav-dot:nth-child(3) { background: var(--yellow); }

.nav-trigger.is-pulsing .nav-dot {
    animation: pulse-dot 1600ms ease-out 1;
}

@keyframes pulse-dot {
    0% { transform: scale(1); }
    40% { transform: scale(1.6); }
    100% { transform: scale(1); }
}

/* OVERLAY MENU */
.overlay-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--cream);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 500ms ease-out;
}

.overlay-menu.is-open {
    opacity: 1;
    pointer-events: auto;
}

.overlay-shape {
    position: absolute;
    top: 50%; left: 50%;
    width: 120vmax;
    height: 120vmax;
    background: var(--pink);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 700ms cubic-bezier(0.65, 0, 0.35, 1), border-radius 700ms cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 0;
}

.overlay-menu.is-open .overlay-shape {
    transform: translate(-50%, -50%) scale(1);
    border-radius: 0;
}

.overlay-list {
    list-style: none;
    position: relative;
    z-index: 1;
    text-align: center;
}

.overlay-list li {
    margin: clamp(10px, 2vw, 18px) 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 400ms ease-out, transform 500ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.overlay-menu.is-open .overlay-list li {
    opacity: 1;
    transform: translateY(0);
}

.overlay-menu.is-open .overlay-list li:nth-child(1) { transition-delay: 350ms; }
.overlay-menu.is-open .overlay-list li:nth-child(2) { transition-delay: 420ms; }
.overlay-menu.is-open .overlay-list li:nth-child(3) { transition-delay: 490ms; }
.overlay-menu.is-open .overlay-list li:nth-child(4) { transition-delay: 560ms; }
.overlay-menu.is-open .overlay-list li:nth-child(5) { transition-delay: 630ms; }

.overlay-list a {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 80px);
    color: var(--cream);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: transform 300ms;
    display: inline-block;
}

.overlay-list a:hover {
    transform: scale(1.06) rotate(-2deg);
    color: var(--yellow);
}

.overlay-close {
    position: absolute;
    top: clamp(20px, 3vw, 36px);
    right: clamp(20px, 3vw, 36px);
    background: transparent;
    border: 1px solid var(--cream);
    color: var(--cream);
    font-family: var(--font-label);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.15em;
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    z-index: 1;
}

.overlay-close:hover {
    background: var(--cream);
    color: var(--pink);
}

/* MAIN LAYOUT */
main {
    position: relative;
    z-index: 3;
}

/* HERO SECTION */
.hero {
    position: relative;
    min-height: 100vh;
    padding: var(--gutter);
    padding-top: clamp(80px, 10vw, 140px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.hero-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) rotate(0deg);
    transition: opacity 800ms ease-out, transform 900ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.shape.is-shown {
    opacity: 1;
    transform: translateY(0) rotate(var(--shape-rot, 0deg));
}

.shape-circle {
    width: clamp(100px, 14vw, 180px);
    height: clamp(100px, 14vw, 180px);
    border-radius: 50%;
    background: var(--pink);
}

.shape-triangle {
    width: 0; height: 0;
    border-left: clamp(60px, 9vw, 100px) solid transparent;
    border-right: clamp(60px, 9vw, 100px) solid transparent;
    border-bottom: clamp(110px, 16vw, 180px) solid var(--blue);
}

.shape-square {
    width: clamp(70px, 10vw, 120px);
    height: clamp(70px, 10vw, 120px);
    background: var(--yellow);
}

.shape-zigzag svg,
.shape-dots svg,
.shape-arc svg,
.shape-stripes svg {
    display: block;
    width: 100%;
    height: 100%;
}

.shape-zigzag { width: clamp(120px, 16vw, 200px); height: clamp(40px, 5vw, 70px); }
.shape-dots { width: clamp(80px, 10vw, 120px); height: clamp(80px, 10vw, 120px); }
.shape-arc { width: clamp(120px, 14vw, 180px); height: clamp(60px, 7vw, 90px); }
.shape-stripes { width: clamp(120px, 14vw, 180px); height: clamp(60px, 8vw, 100px); }

.shape-1 { top: 6%; right: 8%; --shape-rot: -8deg; }
.shape-2 { top: 14%; left: 4%; --shape-rot: 6deg; }
.shape-3 { top: 30%; right: 12%; --shape-rot: 4deg; }
.shape-4 { bottom: 22%; right: 22%; --shape-rot: 14deg; }
.shape-5 { top: 50%; left: 50%; --shape-rot: 0deg; }
.shape-6 { bottom: 14%; left: 14%; --shape-rot: -10deg; }
.shape-7 { top: 56%; right: 6%; --shape-rot: 0deg; }

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin-left: clamp(20px, 6vw, 80px);
    margin-right: auto;
}

.label {
    font-family: var(--font-label);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--gray);
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--gray);
    border-radius: 999px;
    margin-bottom: clamp(18px, 3vw, 30px);
    opacity: 0;
    transform: translateY(10px);
    animation: fade-up 700ms ease-out 300ms forwards;
}

.logotype {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(48px, 9vw, 128px);
    line-height: 0.95;
    letter-spacing: 0.01em;
    color: var(--navy);
    margin-bottom: clamp(20px, 3vw, 36px);
    opacity: 0;
    animation: fade-in 1100ms ease-out 500ms forwards;
}

.logo-mi { color: var(--navy); }
.logo-dot { color: var(--pink); display: inline-block; transform: translateY(-0.04em); }
.logo-xyz { color: var(--blue); font-style: italic; }

.hero-tagline {
    font-size: clamp(15px, 1.4vw, 20px);
    line-height: 1.65;
    color: var(--navy);
    max-width: 56ch;
    margin-bottom: clamp(28px, 4vw, 48px);
    opacity: 0;
    transform: translateY(12px);
    animation: fade-up 800ms ease-out 800ms forwards;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(16px, 2.5vw, 32px);
    opacity: 0;
    animation: fade-in 800ms ease-out 1100ms forwards;
}

.meta-item {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.meta-key {
    font-family: var(--font-label);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--gray);
}

.meta-val {
    font-family: var(--font-display);
    font-size: clamp(18px, 2vw, 24px);
    color: var(--navy);
}

.scroll-cue {
    position: absolute;
    bottom: clamp(20px, 3vw, 32px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fade-in 700ms ease-out 1400ms forwards;
}

.scroll-cue span {
    font-family: var(--font-label);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--navy);
}

.scroll-cue svg {
    width: 22px;
    height: 32px;
    animation: scroll-bounce 1800ms ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(8px); opacity: 1; }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* SECTIONS (works, process, playground, contact) */
.section {
    position: relative;
    padding: var(--section-pad) var(--gutter);
    z-index: 4;
    background: transparent;
}

.section-head {
    max-width: 880px;
    margin: 0 auto clamp(40px, 6vw, 80px);
    text-align: center;
}

.section-head .label {
    margin-bottom: 18px;
    animation: none;
    opacity: 1;
    transform: none;
}

.section-head h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    color: var(--navy);
    margin-bottom: 18px;
    letter-spacing: 0.01em;
}

.section-lede {
    font-size: clamp(15px, 1.3vw, 19px);
    color: var(--navy);
    max-width: 56ch;
    margin: 0 auto;
}

/* MORPH DIVIDERS */
.morph-divider {
    display: flex;
    justify-content: center;
    margin-bottom: clamp(40px, 6vw, 80px);
}

.morph-svg {
    width: clamp(120px, 14vw, 200px);
    height: clamp(120px, 14vw, 200px);
    overflow: visible;
}

.morph-svg path {
    transition: d 800ms cubic-bezier(0.65, 0, 0.35, 1), fill 800ms ease;
    transform-origin: 100px 100px;
    animation: morph-spin 16s linear infinite;
}

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

/* WORKS GRID -- Memphis style cards */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(20px, 3vw, 40px);
    max-width: 1240px;
    margin: 0 auto;
}

.work-card {
    background: var(--cream);
    border: 2px solid var(--navy);
    border-radius: 12px;
    padding: clamp(20px, 2.5vw, 32px);
    position: relative;
    box-shadow: 8px 8px 0 var(--navy);
    transition: transform 400ms cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 400ms;
}

.work-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 12px 12px 0 var(--pink);
}

.work-card[data-duotone="blue-pink"]:hover { box-shadow: 12px 12px 0 var(--blue); }
.work-card[data-duotone="yellow-navy"]:hover { box-shadow: 12px 12px 0 var(--yellow); }
.work-card[data-duotone="green-pink"]:hover { box-shadow: 12px 12px 0 var(--green); }

.work-visual {
    border: 2px solid var(--navy);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    margin-bottom: 18px;
    background: var(--cream);
}

.work-art {
    width: 100%;
    height: 100%;
    display: block;
}

.work-label {
    font-family: var(--font-label);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--gray);
    display: inline-block;
    margin-bottom: 8px;
}

.work-card h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(22px, 2.4vw, 32px);
    color: var(--navy);
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}

.work-card p {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--navy);
}

/* PROCESS SECTION */
.process-list {
    list-style: none;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(18px, 2.5vw, 36px);
}

.process-list li {
    background: var(--cream);
    border: 2px solid var(--navy);
    border-radius: 50% 8px 50% 8px;
    padding: clamp(22px, 3vw, 36px);
    position: relative;
    transition: border-radius 600ms cubic-bezier(0.2, 0.8, 0.3, 1), transform 400ms;
}

.process-list li:nth-child(2) { border-radius: 8px 50% 8px 50%; background: rgba(232, 80, 106, 0.08); }
.process-list li:nth-child(3) { border-radius: 50% 50% 8px 50%; background: rgba(74, 128, 200, 0.08); }
.process-list li:nth-child(4) { border-radius: 8px 50% 50% 50%; background: rgba(240, 200, 64, 0.1); }

.process-list li:hover {
    border-radius: 18px;
    transform: translateY(-6px);
}

.process-num {
    font-family: var(--font-display);
    font-size: clamp(36px, 4vw, 56px);
    color: var(--pink);
    display: block;
    line-height: 1;
    margin-bottom: 10px;
}

.process-list li:nth-child(2) .process-num { color: var(--blue); }
.process-list li:nth-child(3) .process-num { color: var(--yellow); }
.process-list li:nth-child(4) .process-num { color: var(--green); }

.process-list h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(22px, 2.4vw, 30px);
    color: var(--navy);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.process-list p {
    font-size: 14.5px;
    color: var(--navy);
}

/* PLAYGROUND */
.playground-frame {
    max-width: 1100px;
    margin: 0 auto;
    border: 2px solid var(--navy);
    border-radius: 14px;
    background: var(--cream);
    box-shadow: 10px 10px 0 var(--navy);
    overflow: hidden;
    position: relative;
}

#playground-canvas {
    display: block;
    width: 100%;
    height: clamp(320px, 50vw, 520px);
    background: var(--cream);
    cursor: crosshair;
}

.playground-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    border-top: 2px solid var(--navy);
    background: var(--cream);
}

.pg-btn {
    font-family: var(--font-label);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.18em;
    padding: 10px 16px;
    background: var(--cream);
    border: 1.5px solid var(--navy);
    color: var(--navy);
    border-radius: 999px;
    cursor: pointer;
    transition: background 250ms, color 250ms, transform 250ms;
}

.pg-btn:hover {
    background: var(--navy);
    color: var(--cream);
    transform: translateY(-2px);
}

.pg-btn[data-action="morph"]:hover { background: var(--pink); border-color: var(--pink); }
.pg-btn[data-action="scatter"]:hover { background: var(--blue); border-color: var(--blue); }
.pg-btn[data-action="duotone"]:hover { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.pg-btn[data-action="reseed"]:hover { background: var(--green); border-color: var(--green); }

.playground-readout {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(14px, 2vw, 26px);
    padding: 14px 18px;
    border-top: 2px solid var(--navy);
    background: rgba(74, 128, 200, 0.06);
}

/* CONTACT */
.contact-card {
    max-width: 760px;
    margin: 0 auto;
    border: 2px solid var(--navy);
    border-radius: 18px;
    background: var(--cream);
    padding: clamp(24px, 4vw, 48px);
    box-shadow: 10px 10px 0 var(--green);
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2vw, 22px);
}

.contact-link {
    display: flex;
    align-items: baseline;
    gap: clamp(12px, 2vw, 24px);
    text-decoration: none;
    padding-bottom: clamp(14px, 2vw, 20px);
    border-bottom: 1px dashed var(--gray);
    transition: transform 300ms;
}

.contact-link:last-child { border-bottom: none; padding-bottom: 0; }

.contact-link:hover {
    transform: translateX(8px);
}

.contact-key {
    font-family: var(--font-label);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--gray);
    min-width: 80px;
}

.contact-val {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 36px);
    color: var(--navy);
    letter-spacing: 0.01em;
}

.contact-link:hover .contact-val { color: var(--pink); }

/* FOOTER */
.site-footer {
    padding: clamp(30px, 5vw, 50px) var(--gutter);
    border-top: 1px solid rgba(26, 32, 64, 0.15);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    font-family: var(--font-label);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--gray);
    background: var(--cream);
}

.footer-mark {
    font-family: var(--font-display);
    font-size: 18px;
    text-transform: none;
    letter-spacing: 0.01em;
    color: var(--navy);
}

.footer-meta { color: var(--navy); }

/* REVEAL ON SCROLL */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 800ms ease-out, transform 800ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

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

/* RESPONSIVE */
@media (max-width: 720px) {
    .hero-content { margin-left: 0; }
    .hero-meta { gap: 14px; }
    .botanical { width: 110px; }
    .work-card { box-shadow: 6px 6px 0 var(--navy); }
    .work-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--pink); }
    .playground-frame { box-shadow: 6px 6px 0 var(--navy); }
    .contact-card { box-shadow: 6px 6px 0 var(--green); }
    .scroll-cue { display: none; }
}

@media (max-width: 480px) {
    .shape-3, .shape-7 { display: none; }
    .overlay-list a { font-size: clamp(28px, 8vw, 56px); }
    .nav-trigger { top: 16px; right: 16px; }
}

/* PREFERS REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .bot-flower, .scroll-cue svg, .morph-svg path { animation: none !important; }
    .shape, .memphis-piece, .botanical { transition-duration: 200ms; }
}
