/* ==========================================
   AMAZEIN - ABRACADABRA Pyramid Maze
   Modern CSS recreation of mystical word art
   ========================================== */

/* === CSS RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: #000000;
    color: #FFD700;
    font-family: 'Georgia', 'Times New Roman', serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    line-height: 1.6;
}

/* === MAIN CONTAINER === */
main {
    width: 100%;
    max-width: 1400px;
    padding: 2rem;
    text-align: center;
}

/* === PYRAMID IMAGE HEADER === */
.pyramid-image {
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-in;
}

.header-icon {
    width: 80px;
    height: 80px;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

.header-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* === MAZE CONTAINER === */
.maze-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

/* === MAZE HEADER (A MAZE IN) === */
.maze-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: fadeInDown 1.2s ease-out;
}

.maze-link {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.5rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.maze-link:hover {
    color: #FFA500;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    transform: scale(1.05);
}

.maze-link:focus {
    outline: 2px solid #FFD700;
    outline-offset: 8px;
}

/* Individual word styling */
.letter-a {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.word-maze {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
}

.word-in {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

/* === PYRAMID STRUCTURE === */
.pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    animation: fadeInUp 1.5s ease-out;
}

.pyramid-row {
    display: flex;
    justify-content: center;
    gap: clamp(0.5rem, 2vw, 1.5rem);
    animation: revealRow 0.5s ease-out backwards;
}

/* Stagger animation for each row */
.row-1 { animation-delay: 0.1s; }
.row-2 { animation-delay: 0.2s; }
.row-3 { animation-delay: 0.3s; }
.row-4 { animation-delay: 0.4s; }
.row-5 { animation-delay: 0.5s; }
.row-6 { animation-delay: 0.6s; }
.row-7 { animation-delay: 0.7s; }
.row-8 { animation-delay: 0.8s; }
.row-9 { animation-delay: 0.9s; }
.row-10 { animation-delay: 1.0s; }
.row-11 { animation-delay: 1.1s; }

/* Individual letters */
.pyramid-row span {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: bold;
    text-transform: uppercase;
    color: #FFD700;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
}

.pyramid-row span:hover {
    color: #FFA500;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.9);
    transform: scale(1.2);
}

/* === ACCESSIBILITY === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* === RESPONSIVE DESIGN === */

/* Tablet adjustments */
@media (max-width: 768px) {
    main {
        padding: 1.5rem;
    }
    
    .maze-container {
        gap: 2rem;
    }
    
    .pyramid {
        gap: 0.3rem;
    }
    
    .pyramid-row {
        gap: clamp(0.3rem, 1.5vw, 1rem);
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    main {
        padding: 1rem;
    }
    
    .header-icon {
        width: 60px;
        height: 60px;
    }
    
    .maze-header {
        gap: 0.3rem;
    }
    
    .maze-link {
        letter-spacing: 0.3rem;
    }
    
    .pyramid {
        gap: 0.2rem;
    }
    
    .pyramid-row {
        gap: clamp(0.2rem, 1vw, 0.5rem);
    }
    
    .pyramid-row span {
        font-size: clamp(1rem, 2.5vw, 1.8rem);
    }
}

/* Large desktop - expand for drama */
@media (min-width: 1600px) {
    .pyramid-row span {
        font-size: 3rem;
    }
}

/* === PRINT STYLES === */
@media print {
    body {
        background-color: white;
        color: black;
    }
    
    .maze-link {
        color: black;
        text-decoration: underline;
    }
    
    .pyramid-row span {
        color: black;
    }
}

/* === DARK MODE PREFERENCE === */
@media (prefers-color-scheme: light) {
    /* Keep it dark - this is the aesthetic! */
    /* Users who want light mode will have to deal with the darkness */
}

/* === REDUCED MOTION ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
    .maze-link,
    .pyramid-row span {
        color: #FFFF00;
    }
    
    .maze-link:hover,
    .pyramid-row span:hover {
        color: #FFFFFF;
    }
}
