/* ============================================
   miris-project.net - Styles
   Hand-drawn sketchbook aesthetic
   Aurora gradient palette
   Art Deco + sketchy illustration
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    color: #3A3A3A;
    background: #FBF6F0;
    overflow-x: hidden;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    color: #3A3A3A;
}

h2 {
    font-size: clamp(28px, 4vw, 52px);
    margin-bottom: 1.2em;
    letter-spacing: 0.04em;
}

h3 {
    font-size: clamp(20px, 2.5vw, 32px);
    margin-bottom: 0.6em;
}

p {
    margin-bottom: 1em;
}

.annotation {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(16px, 1.2vw, 20px);
    color: #6A5A4A;
}

/* ---------- Hero Section ---------- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Aurora gradient background */
.aurora-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(128, 216, 176, 0.30) 0%, transparent 70%),
        radial-gradient(ellipse 70% 50% at 70% 60%, rgba(176, 128, 216, 0.25) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 50% 80%, rgba(216, 128, 176, 0.20) 0%, transparent 70%),
        #FBF6F0;
    animation: auroraShift 12s ease-in-out infinite alternate;
}

@keyframes auroraShift {
    0% {
        background:
            radial-gradient(ellipse 80% 60% at 20% 30%, rgba(128, 216, 176, 0.30) 0%, transparent 70%),
            radial-gradient(ellipse 70% 50% at 70% 60%, rgba(176, 128, 216, 0.25) 0%, transparent 70%),
            radial-gradient(ellipse 60% 40% at 50% 80%, rgba(216, 128, 176, 0.20) 0%, transparent 70%),
            #FBF6F0;
    }
    33% {
        background:
            radial-gradient(ellipse 70% 50% at 40% 50%, rgba(128, 216, 176, 0.35) 0%, transparent 70%),
            radial-gradient(ellipse 80% 60% at 80% 30%, rgba(176, 128, 216, 0.28) 0%, transparent 70%),
            radial-gradient(ellipse 50% 50% at 30% 70%, rgba(216, 128, 176, 0.22) 0%, transparent 70%),
            #FBF6F0;
    }
    66% {
        background:
            radial-gradient(ellipse 60% 70% at 60% 40%, rgba(128, 216, 176, 0.28) 0%, transparent 70%),
            radial-gradient(ellipse 75% 45% at 30% 70%, rgba(176, 128, 216, 0.30) 0%, transparent 70%),
            radial-gradient(ellipse 65% 55% at 70% 20%, rgba(216, 128, 176, 0.25) 0%, transparent 70%),
            #FBF6F0;
    }
    100% {
        background:
            radial-gradient(ellipse 75% 55% at 50% 20%, rgba(128, 216, 176, 0.32) 0%, transparent 70%),
            radial-gradient(ellipse 65% 65% at 20% 50%, rgba(176, 128, 216, 0.27) 0%, transparent 70%),
            radial-gradient(ellipse 55% 45% at 60% 70%, rgba(216, 128, 176, 0.23) 0%, transparent 70%),
            #FBF6F0;
    }
}

/* Logotype - off-center right */
#logotype {
    position: relative;
    z-index: 2;
    margin-right: 8vw;
    text-align: right;
    opacity: 0;
    animation: fadeInLogo 1.2s ease-out 1.5s forwards;
}

.logo-text {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    font-size: clamp(36px, 6vw, 80px);
    letter-spacing: 0.08em;
    color: #3A3A3A;
    line-height: 1.1;
}

.logo-suffix {
    font-family: 'Poiret One', cursive;
    font-size: clamp(20px, 3vw, 42px);
    letter-spacing: 0.12em;
    color: #5A7A9A;
    display: block;
    margin-top: -0.1em;
}

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

/* Hero annotation */
.hero-annotation {
    position: absolute;
    bottom: 28%;
    left: 6vw;
    z-index: 3;
    opacity: 0;
    animation: fadeInAnnotation 1s ease-out 2.5s forwards;
}

@keyframes fadeInAnnotation {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 0.8; transform: translateX(0); }
}

/* Mountain Landscape */
#mountain-landscape {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    z-index: 1;
}

.mountain-path {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    animation: drawMountain 3s ease-in-out 0.3s forwards;
}

@keyframes drawMountain {
    to { stroke-dashoffset: 0; }
}

.mountain-back { animation-delay: 0.3s; }
.mountain-mid { animation-delay: 0.8s; }
.mountain-front { animation-delay: 1.2s; }

/* Geometric Diagrams */
.geometric-diagrams {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.geo-diagram {
    position: absolute;
    opacity: 0;
    animation: floatInDiagram 1.2s ease-out forwards;
}

.geo-diagram-1 {
    width: 100px;
    top: 12%;
    left: 5%;
    animation-delay: 2s;
}

.geo-diagram-2 {
    width: 130px;
    top: 8%;
    right: 30%;
    animation-delay: 2.3s;
}

.geo-diagram-3 {
    width: 80px;
    bottom: 55%;
    left: 18%;
    animation-delay: 2.6s;
}

@keyframes floatInDiagram {
    from { opacity: 0; transform: translateX(-20px) scale(0.9); }
    to { opacity: 0.7; transform: translateX(0) scale(1); }
}

/* ---------- Content Sections ---------- */
.content-section {
    position: relative;
    padding: 8vh 6vw;
    min-height: 70vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Aurora wash backgrounds for sections */
.aurora-wash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.aurora-wash-1 {
    background: radial-gradient(ellipse 70% 50% at 30% 50%, rgba(128, 216, 176, 0.15) 0%, transparent 70%);
}

.aurora-wash-2 {
    background: radial-gradient(ellipse 70% 50% at 70% 50%, rgba(176, 128, 216, 0.15) 0%, transparent 70%);
}

.aurora-wash-3 {
    background: radial-gradient(ellipse 60% 60% at 40% 40%, rgba(216, 128, 176, 0.12) 0%, transparent 70%);
}

.aurora-wash-4 {
    background: radial-gradient(ellipse 65% 55% at 60% 60%, rgba(128, 216, 176, 0.12) 0%, transparent 70%),
               radial-gradient(ellipse 50% 40% at 30% 30%, rgba(176, 128, 216, 0.10) 0%, transparent 70%);
}

/* Asymmetric Blocks */
.asymmetric-block {
    position: relative;
    z-index: 1;
    background: rgba(251, 246, 240, 0.85);
    padding: clamp(24px, 4vw, 48px);
    border-radius: 2px;
}

.block-left {
    width: clamp(300px, 42%, 600px);
    margin-right: auto;
    margin-left: 2vw;
}

.block-right {
    width: clamp(300px, 58%, 750px);
    margin-left: auto;
    margin-right: 2vw;
}

.block-annotation {
    display: block;
    margin-bottom: 0.8em;
    opacity: 0.75;
    border-left: 2px solid #B080D8;
    padding-left: 0.6em;
}

/* Section Diagrams */
.section-diagram {
    position: absolute;
    z-index: 0;
    opacity: 0.5;
}

.diagram-about {
    width: clamp(120px, 18vw, 220px);
    right: 8vw;
    top: 50%;
    transform: translateY(-50%);
}

.diagram-arch {
    width: clamp(140px, 20vw, 260px);
    left: 6vw;
    top: 50%;
    transform: translateY(-50%);
}

.section-mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    z-index: 0;
}

/* ---------- Components Section ---------- */
#components .asymmetric-block {
    width: clamp(320px, 75%, 1000px);
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(16px, 2vw, 32px);
    margin-top: 1.5em;
}

.component-card {
    background: rgba(251, 246, 240, 0.6);
    border: 1px solid rgba(58, 58, 58, 0.1);
    padding: clamp(16px, 2vw, 28px);
    border-radius: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.component-card:hover {
    box-shadow: 0 4px 20px rgba(90, 122, 154, 0.12);
    border-color: #80D8B0;
}

.component-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.8em;
}

.component-card h3 {
    font-size: clamp(18px, 2vw, 24px);
    margin-bottom: 0.4em;
}

.component-card p {
    font-size: clamp(13px, 0.9vw, 15px);
    line-height: 1.6;
    opacity: 0.85;
}

/* ---------- Exploration Section ---------- */
.exploration-cta {
    margin-top: 2em;
    padding: 0.8em 0;
}

.exploration-cta .annotation {
    font-size: clamp(18px, 1.5vw, 24px);
    color: #5A7A9A;
    cursor: pointer;
    transition: color 0.3s ease;
}

.exploration-cta .annotation:hover {
    color: #D880B0;
}

/* ---------- Footer ---------- */
#footer {
    position: relative;
    padding: 4vh 6vw 6vh;
    overflow: hidden;
}

.footer-content {
    position: relative;
}

.footer-mountains {
    width: 100%;
    height: 80px;
    margin-bottom: 2em;
}

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

.footer-text .annotation {
    display: block;
    margin-bottom: 0.6em;
    opacity: 0.65;
}

.footer-brand {
    font-family: 'Poiret One', cursive;
    font-size: clamp(18px, 2vw, 28px);
    letter-spacing: 0.1em;
    color: #5A7A9A;
}

/* ---------- Scroll Reveal Animations ---------- */
.content-section .asymmetric-block {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.content-section .asymmetric-block.revealed {
    opacity: 1;
    transform: translateY(0);
}

.content-section .section-diagram {
    transition: opacity 0.8s ease-out 0.2s;
}

.content-section .section-diagram.revealed {
    opacity: 0.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .content-section {
        flex-direction: column;
        padding: 6vh 5vw;
    }

    .block-left,
    .block-right {
        width: 92%;
        margin: 0 auto;
    }

    #components .asymmetric-block {
        width: 92%;
    }

    .component-grid {
        grid-template-columns: 1fr;
    }

    .section-diagram {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        transform: none;
        margin: 2em auto;
        display: block;
    }

    .diagram-about, .diagram-arch {
        top: auto;
        right: auto;
        left: auto;
        transform: none;
    }

    .geo-diagram-1 { width: 70px; }
    .geo-diagram-2 { width: 90px; }
    .geo-diagram-3 { width: 60px; }

    #logotype {
        margin-right: 5vw;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: clamp(28px, 8vw, 48px);
    }

    .logo-suffix {
        font-size: clamp(16px, 5vw, 28px);
    }

    h2 {
        font-size: clamp(24px, 6vw, 36px);
    }
}
