/* =============================================
   senggack.com — The Geography of Thought
   Flat-design meditation on cognition
   ============================================= */

/* === CSS Custom Properties === */
:root {
    --summit-slate: #6b7b8d;
    --lake-silver: #c8cdd3;
    --bedrock-charcoal: #3a3f47;
    --ground-parchment: #e6e2dc;
    --thought-sage: #8a9a88;
    --depth-indigo: #4a5568;
    --bubble-foam: #dfe5ea;
    --highlight-ochre: #b8a67e;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.72;
    color: var(--depth-indigo);
    background-color: var(--ground-parchment);
    background-image: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 39px,
        rgba(107, 123, 141, 0.08) 39px,
        rgba(107, 123, 141, 0.08) 40px
    );
}

.kr {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.05em;
}

a {
    color: var(--depth-indigo);
    text-decoration: none;
    transition: color 320ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a:hover {
    color: var(--thought-sage);
}

/* === Fade-in Animation === */
.fade-in {
    opacity: 0;
    transition: opacity 600ms ease-out;
}

.fade-in.visible {
    opacity: 1;
}

/* === Terrain Zones === */
.terrain-zone {
    position: relative;
    width: 100%;
}

/* =============================================
   THE SUMMIT
   ============================================= */
#summit {
    background-color: var(--summit-slate);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(40px, 8vw, 120px) clamp(20px, 4vw, 80px);
    padding-bottom: 160px;
    overflow: hidden;
}

.summit-content {
    text-align: center;
    max-width: 720px;
    z-index: 2;
    position: relative;
}

.summit-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ground-parchment);
    margin-bottom: 16px;
}

.summit-subtitle {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: 0.04em;
    color: var(--bubble-foam);
    margin-bottom: 24px;
}

.summit-description {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    color: var(--lake-silver);
    max-width: 560px;
    margin: 0 auto;
}

/* === Mountain Silhouette === */
.mountain-silhouette {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 1;
}

.mountain-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.mountain-bg {
    clip-path: polygon(0% 85%, 8% 65%, 18% 72%, 28% 50%, 38% 60%, 50% 45%, 60% 55%, 72% 40%, 82% 58%, 92% 48%, 100% 60%, 100% 100%, 0% 100%);
    background-color: var(--lake-silver);
    opacity: 0.5;
}

.mountain-mid {
    clip-path: polygon(0% 90%, 5% 70%, 12% 80%, 22% 55%, 30% 68%, 40% 50%, 48% 62%, 58% 45%, 65% 58%, 75% 42%, 85% 55%, 93% 48%, 100% 65%, 100% 100%, 0% 100%);
    background-color: var(--thought-sage);
    opacity: 0.7;
}

.mountain-fg {
    clip-path: polygon(0% 100%, 3% 78%, 10% 88%, 15% 65%, 22% 75%, 28% 58%, 35% 70%, 42% 52%, 48% 68%, 55% 48%, 60% 62%, 68% 45%, 73% 58%, 78% 42%, 83% 55%, 88% 50%, 93% 62%, 97% 55%, 100% 70%, 100% 100%, 0% 100%);
    background-color: var(--summit-slate);
}

/* =============================================
   THE RIDGE
   ============================================= */
#ridge {
    padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 80px);
}

.ridge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(12px, 2vw, 32px);
    max-width: 1200px;
    margin: 0 auto;
}

.ridge-card {
    padding: clamp(24px, 3vw, 48px);
    border-radius: 2px;
    color: var(--ground-parchment);
    transition: transform 320ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
    cursor: default;
}

.ridge-card:hover {
    transform: scale(1.06);
}

.ridge-card-tall {
    grid-row: span 2;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ridge-card-medium {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ridge-card-short {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.card-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bubble-foam);
    margin-bottom: 12px;
    display: block;
}

.card-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: 0.04em;
    color: var(--ground-parchment);
    margin-bottom: 12px;
}

.card-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    line-height: 1.65;
    color: var(--bubble-foam);
}

/* =============================================
   THE LAKE
   ============================================= */
#lake {
    position: relative;
}

.lake-mountain-top {
    position: relative;
    height: 80px;
    background-color: var(--ground-parchment);
    overflow: hidden;
}

.mountain-lake-top {
    clip-path: polygon(0% 0%, 5% 40%, 12% 20%, 20% 50%, 30% 30%, 40% 55%, 50% 25%, 60% 50%, 70% 35%, 80% 55%, 90% 30%, 100% 45%, 100% 100%, 0% 100%);
    background-color: var(--lake-silver);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lake-body {
    background-color: var(--lake-silver);
    position: relative;
    min-height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* === Water Bubbles === */
.bubble-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: var(--bubble-foam);
    border: 1px solid var(--lake-silver);
}

@keyframes bubble-rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-120px) scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: translateY(-260px) scale(0.9);
        opacity: 0;
    }
}

.bubble-1 { width: 36px; height: 36px; left: 8%; bottom: -10px; animation: bubble-rise 10s ease-in infinite; animation-delay: 0s; }
.bubble-2 { width: 22px; height: 22px; left: 18%; bottom: -10px; animation: bubble-rise 8s ease-in infinite; animation-delay: 2s; }
.bubble-3 { width: 14px; height: 14px; left: 28%; bottom: -10px; animation: bubble-rise 7s ease-in infinite; animation-delay: 4s; }
.bubble-4 { width: 8px; height: 8px; left: 38%; bottom: -10px; animation: bubble-rise 6s ease-in infinite; animation-delay: 1s; }
.bubble-5 { width: 22px; height: 22px; left: 50%; bottom: -10px; animation: bubble-rise 9s ease-in infinite; animation-delay: 3s; }
.bubble-6 { width: 36px; height: 36px; left: 62%; bottom: -10px; animation: bubble-rise 11s ease-in infinite; animation-delay: 5s; }
.bubble-7 { width: 14px; height: 14px; left: 72%; bottom: -10px; animation: bubble-rise 8s ease-in infinite; animation-delay: 7s; }
.bubble-8 { width: 8px; height: 8px; left: 82%; bottom: -10px; animation: bubble-rise 12s ease-in infinite; animation-delay: 6s; }
.bubble-9 { width: 22px; height: 22px; left: 90%; bottom: -10px; animation: bubble-rise 7s ease-in infinite; animation-delay: 8s; }
.bubble-10 { width: 14px; height: 14px; left: 45%; bottom: -10px; animation: bubble-rise 10s ease-in infinite; animation-delay: 4.5s; }

/* === Text Stream === */
.text-stream-wrapper {
    width: 100%;
    overflow: hidden;
    z-index: 2;
    position: relative;
}

.text-stream {
    display: flex;
    white-space: nowrap;
    animation: text-stream 60s linear infinite;
}

@keyframes text-stream {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.stream-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--depth-indigo);
    padding: 0 8px;
}

.lake-mountain-bottom {
    position: relative;
    height: 80px;
    background-color: var(--ground-parchment);
    overflow: hidden;
}

.mountain-lake-bottom {
    clip-path: polygon(0% 60%, 8% 30%, 16% 50%, 25% 15%, 35% 40%, 45% 10%, 55% 35%, 65% 20%, 75% 45%, 85% 25%, 95% 50%, 100% 35%, 100% 0%, 0% 0%);
    background-color: var(--lake-silver);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =============================================
   THE FOOTHILLS
   ============================================= */
#foothills {
    padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 80px);
}

.foothills-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: 0.04em;
    color: var(--depth-indigo);
    text-align: center;
    margin-bottom: clamp(24px, 4vw, 48px);
}

.foothills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: clamp(12px, 2vw, 32px);
    max-width: 1200px;
    margin: 0 auto;
}

.foothill-cell {
    background-color: var(--bubble-foam);
    border-radius: 2px;
    padding: clamp(24px, 2vw, 36px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    transition: transform 320ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
    cursor: default;
}

.foothill-cell:hover {
    transform: scale(1.03);
}

.foothill-cell:hover .foothill-icon svg {
    stroke: var(--thought-sage);
}

.foothill-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.foothill-icon svg {
    width: 100%;
    height: 100%;
    transition: stroke 320ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.foothill-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--depth-indigo);
}

/* =============================================
   THE BEDROCK
   ============================================= */
#bedrock {
    background-color: var(--bedrock-charcoal);
    padding: clamp(48px, 8vw, 100px) clamp(20px, 4vw, 80px);
}

.bedrock-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.bedrock-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    letter-spacing: 0.04em;
    color: var(--ground-parchment);
    margin-bottom: 16px;
}

.bedrock-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    color: var(--lake-silver);
    margin-bottom: 16px;
}

.bedrock-attribution {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--summit-slate);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .ridge-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ridge-card-tall {
        grid-row: span 1;
        min-height: 260px;
    }
}

@media (max-width: 640px) {
    .ridge-grid {
        grid-template-columns: 1fr;
    }
    .ridge-card-tall {
        min-height: 200px;
    }
    .ridge-card-medium,
    .ridge-card-short {
        min-height: 160px;
    }
    .foothills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .bubble {
        display: none;
    }
    .foothills-grid {
        grid-template-columns: 1fr;
    }
}
