/* ========================================
   NONRI.XYZ - Styles
   Field Guide to Logic
   ======================================== */

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

html {
    font-size: 16px;
}

/* Add Space Mono font */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400&display=swap');

body {
    background-color: #F2EDE4;
    font-family: 'Work Sans', sans-serif;
    color: #3E3A32;
    line-height: 1.6;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3 {
    font-family: 'Righteous', sans-serif;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 400;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.04em;
    color: #2C3E2A;
}

h2 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: #4A5E3A;
    margin-bottom: 16px;
}

h3 {
    font-size: 1.1rem;
    color: #2C3E2A;
    margin-bottom: 12px;
}

p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #3E3A32;
}

/* ========================================
   ALTITUDE INDICATOR
   ======================================== */

.altitude-indicator {
    position: fixed;
    top: 24px;
    left: 24px;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7A8A6A;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
    animation-delay: 1.5s;
}

.altitude-indicator .altitude-value {
    font-weight: 400;
    color: #8B7A5E;
}

/* ========================================
   LAYOUT - CONTAINER & GRID
   ======================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    row-gap: 24px;
    margin-top: 24px;
    position: relative;
}

/* Elevation bands - horizontal rules between rows */
.card-grid::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: #8B7A5E;
    bottom: 50%;
    left: 0;
    opacity: 0.3;
}

/* ========================================
   CARDS - BASE STYLES
   ======================================== */

.card {
    border: 1px solid #A0907A;
    padding: 24px;
    background-color: #FAFAF5;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Hero Card */
.card-hero {
    grid-column: 1 / -1;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: #F2EDE4;
    border-color: #A0907A;
}

.card-hero .hero-contour {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.card-hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.card-hero .hero-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    color: #2C3E2A;
    margin: 0;
    letter-spacing: 0.08em;
}

.card-hero .hero-subtitle {
    font-size: 1.2rem;
    color: #7A8A6A;
    font-family: 'Work Sans', sans-serif;
    text-transform: capitalize;
    margin-top: 12px;
}

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

.border-draw {
    stroke-dasharray: 2400;
    stroke-dashoffset: 2400;
    animation: drawBorder 1s ease-in-out forwards;
    animation-delay: 0.4s;
}

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

/* Feature Cards (2 columns) */
.card-feature {
    grid-column: span 2;
    padding-top: 32px;
}

.card-feature .card-minimap {
    width: 100%;
    height: 120px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-feature svg {
    width: 100%;
    height: 100%;
}

/* Panoramic Cards (4 columns) */
.card-panoramic {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

.card-panoramic .panoramic-content {
    flex: 1;
}

.card-panoramic .panoramic-content h2 {
    margin-bottom: 16px;
}

.card-panoramic .panoramic-content p {
    line-height: 1.7;
}

.panoramic-content {
    margin-bottom: 20px;
}

.minimap-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.small-map {
    width: 100px;
    height: 100px;
    flex: 0 0 100px;
}

/* Closing Card */
.closing-card {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 1.2s;
}

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

/* Standard Cards */
.card:not(.card-hero):not(.card-feature):not(.card-panoramic) {
    grid-column: span 1;
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.card:nth-child(3) { animation-delay: 0.5s; }
.card:nth-child(4) { animation-delay: 0.6s; }
.card:nth-child(6) { animation-delay: 0.7s; }
.card:nth-child(7) { animation-delay: 0.8s; }
.card:nth-child(9) { animation-delay: 0.9s; }
.card:nth-child(10) { animation-delay: 1s; }
.card:nth-child(12) { animation-delay: 1.1s; }
.card:nth-child(13) { animation-delay: 1.2s; }

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

/* ========================================
   CARD INTERACTIONS
   ======================================== */

.card {
    transition: all 0.3s ease;
    cursor: default;
}

.card:hover {
    border-color: #7A8A6A;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card:hover h2,
.card:hover h3 {
    color: #B84A3C;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        row-gap: 20px;
    }

    .card-feature {
        grid-column: span 1.5;
    }

    .card-panoramic {
        flex-direction: column;
        gap: 20px;
    }

    .minimap-row {
        gap: 12px;
    }

    .small-map {
        width: 80px;
        height: 80px;
        flex: 0 0 80px;
    }

    h1 {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }

    h2 {
        font-size: clamp(1.1rem, 2vw, 1.5rem);
    }

    .container {
        padding: 20px;
    }

    .card {
        padding: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        row-gap: 16px;
    }

    .card-feature,
    .card-panoramic {
        grid-column: span 1;
    }

    .card {
        padding: 16px;
    }

    .container {
        padding: 16px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1rem;
    }

    p {
        font-size: 0.9rem;
    }

    .card-feature .card-minimap {
        height: 100px;
    }

    .small-map {
        width: 70px;
        height: 70px;
        flex: 0 0 70px;
    }

    .card-hero {
        min-height: 300px;
    }

    .card-hero .hero-title {
        font-size: 2rem;
    }

    .card-hero .hero-subtitle {
        font-size: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .card {
        padding: 12px;
    }

    .container {
        padding: 12px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1rem;
    }

    h3 {
        font-size: 0.95rem;
    }

    p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .card-hero {
        min-height: 250px;
    }

    .card-hero .hero-title {
        font-size: 1.5rem;
    }

    .minimap-row {
        gap: 8px;
    }

    .small-map {
        width: 60px;
        height: 60px;
        flex: 0 0 60px;
    }
}
