/* ========================================
   senggack.net - Contemporary Korean Design
   ======================================== */

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

:root {
    --primary-red: #E63946;
    --deep-navy: #1D3557;
    --bright-white: #F1FAEE;
    --sky-blue: #457B9D;
    --soft-teal: #A8DADC;
    --signal-yellow: #FFB703;
    --carbon-black: #0B0C10;
    --grid-gap: 4px;
    --baseline: 20px;
    --nav-width: 48px;
    --nav-expanded: 200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: var(--deep-navy);
    background-color: var(--bright-white);
    margin-left: var(--nav-width);
    overflow-x: hidden;
}

/* --- Scroll Progress Bar --- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-red);
    z-index: 1000;
    transition: background-color 0.3s;
}

#scroll-progress.complete {
    background-color: var(--signal-yellow);
    animation: pulse-flash 0.3s ease-out;
}

@keyframes pulse-flash {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* --- Navigation Strip --- */
#nav-strip {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--nav-width);
    height: 100vh;
    background-color: var(--deep-navy);
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

#nav-strip:hover {
    width: var(--nav-expanded);
}

.nav-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-red);
    letter-spacing: 0.05em;
    white-space: nowrap;
    margin-bottom: 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 0;
    text-decoration: none;
    color: var(--soft-teal);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.2s, border-left 0.2s;
    border-left: 4px solid transparent;
    position: relative;
}

.nav-link:hover {
    color: var(--bright-white);
}

.nav-link.active {
    color: var(--bright-white);
    border-left: 4px solid var(--primary-red);
}

.nav-label {
    opacity: 0;
    transform: rotate(-90deg);
    transition: opacity 0.3s 0.1s, transform 0.3s 0.1s;
    font-size: 0.8rem;
}

#nav-strip:hover .nav-label {
    opacity: 1;
    transform: rotate(0deg);
}

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: var(--deep-navy);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-cityscape {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bands {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.band {
    flex: 1;
    background-color: var(--deep-navy);
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.band.revealed-left {
    transform: translateX(-110%);
}

.band.revealed-right {
    transform: translateX(110%);
}

.hero-title {
    position: absolute;
    bottom: 48px;
    left: 48px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 8vw;
    color: var(--bright-white);
    letter-spacing: -0.02em;
    z-index: 20;
    line-height: 1;
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-20px);
}

.hero-title .letter.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.06s ease-out, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-subtitle {
    position: absolute;
    bottom: 24px;
    left: 48px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--soft-teal);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- Slash Marks --- */
.slash-mark {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--sky-blue);
    opacity: 0.6;
    letter-spacing: -0.05em;
}

.slash-mark.large {
    font-size: 2rem;
    color: var(--primary-red);
    opacity: 1;
}

.slash-inline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--sky-blue);
    opacity: 0.6;
    margin: 0 4px;
}

/* --- Breathing Zones --- */
.breathing-zone {
    width: 100%;
    height: 120px;
    background-color: var(--bright-white);
}

.footer-zone {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--deep-navy);
    letter-spacing: -0.02em;
}

.footer-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--sky-blue);
    letter-spacing: 0.05em;
}

/* --- Grid Section --- */
.grid-section {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
    padding: 0 var(--grid-gap);
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Modules --- */
.module {
    position: relative;
    background-color: var(--bright-white);
    border: 1px solid var(--deep-navy);
    padding: clamp(20px, 3vw, 40px);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.module:hover {
    transform: translate(-4px, -4px);
    border-color: var(--primary-red);
    box-shadow: 0 8px 32px rgba(230, 57, 70, 0.1);
}

.module:hover .dot-grid-overlay {
    opacity: 0.4;
}

/* Module Sizes */
.module-1x1 {
    grid-column: span 3;
    min-height: 160px;
}

.module-2x1 {
    grid-column: span 6;
    min-height: 160px;
}

.module-2x2 {
    grid-column: span 6;
    min-height: 340px;
}

.module-3x2 {
    grid-column: span 9;
    min-height: 340px;
}

.module-4x2 {
    grid-column: span 12;
    min-height: 340px;
}

.module-4x4 {
    grid-column: span 12;
    min-height: 500px;
}

/* Dark Module Variant */
.dark-module {
    background-color: var(--carbon-black);
    color: var(--bright-white);
}

.dark-module .module-label {
    color: var(--soft-teal);
}

.dark-module .module-meta {
    color: var(--sky-blue);
}

.dark-module p {
    color: var(--soft-teal);
}

/* Accent Module Variant */
.accent-module {
    background-color: var(--soft-teal);
    border-color: var(--sky-blue);
}

.accent-module:hover {
    border-color: var(--primary-red);
}

/* --- Dot Grid Overlay --- */
.dot-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, var(--soft-teal) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

/* --- Module Content --- */
.module-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.module-content.centered {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.module-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sky-blue);
}

.module-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--sky-blue);
    letter-spacing: 0.05em;
    margin-top: auto;
}

h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--deep-navy);
}

.dark-module h2 {
    color: var(--bright-white);
}

h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--deep-navy);
}

.dark-module h3 {
    color: var(--bright-white);
}

p {
    color: var(--deep-navy);
    max-width: 600px;
}

/* --- Circle Badge --- */
.circle-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--deep-navy);
    margin-bottom: 8px;
}

/* --- Stat Display --- */
.stat-display {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
    color: var(--deep-navy);
}

.stat-desc {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--sky-blue);
    letter-spacing: 0.05em;
}

/* --- Service List --- */
.service-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.service-list li {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-list .slash-mark {
    font-size: 0.7rem;
}

/* --- Social List --- */
.social-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-list li {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--soft-teal);
    transition: color 0.2s;
    cursor: pointer;
}

.social-list li:hover {
    color: var(--bright-white);
}

.social-list .slash-mark {
    font-size: 0.7rem;
    color: var(--primary-red);
    opacity: 1;
}

/* --- Tags --- */
.showcase-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tag {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 6px 14px;
    border: 1px solid var(--sky-blue);
    color: var(--sky-blue);
    text-transform: uppercase;
}

/* --- Stepped Decoration --- */
.stepped-decoration {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stepped-decoration .step {
    background-color: var(--primary-red);
    opacity: 0.15;
}

.stepped-decoration .step:nth-child(1) {
    width: 200px;
    height: 12px;
}

.stepped-decoration .step:nth-child(2) {
    width: 160px;
    height: 12px;
}

.stepped-decoration .step:nth-child(3) {
    width: 120px;
    height: 12px;
}

.stepped-decoration .step:nth-child(4) {
    width: 80px;
    height: 12px;
}

.stepped-decoration .step:nth-child(5) {
    width: 40px;
    height: 12px;
}

/* --- Data Grid --- */
.data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.data-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.data-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    color: var(--deep-navy);
}

.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--sky-blue);
    letter-spacing: 0.05em;
}

/* --- Big Text --- */
.big-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: -0.02em;
    color: var(--bright-white);
}

/* --- Contact --- */
.contact-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.contact-item {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--deep-navy);
    letter-spacing: 0.02em;
}

/* --- Anchor Block --- */
.anchor-block {
    border-left: 4px solid var(--primary-red);
}

/* --- Module Reveal Animation --- */
.module[data-reveal] {
    opacity: 0;
    transform: translateX(8.33vw);
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.module[data-reveal].revealed {
    opacity: 1;
    transform: translateX(0);
}

.module:hover {
    transform: translate(-4px, -4px);
}

.module[data-reveal].revealed:hover {
    transform: translate(-4px, -4px);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    body {
        margin-left: 0;
    }

    #nav-strip {
        display: none;
    }

    .module-1x1,
    .module-2x1,
    .module-2x2,
    .module-3x2,
    .module-4x2,
    .module-4x4 {
        grid-column: span 12;
    }

    .hero-title {
        font-size: 12vw;
    }

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

    .contact-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .module-1x1 {
        grid-column: span 6;
    }

    .module-3x2 {
        grid-column: span 12;
    }
}

/* --- Hairline Grid Accents --- */
.grid-section {
    background-image: linear-gradient(to right, var(--soft-teal) 1px, transparent 1px);
    background-size: calc(100% / 12) 100%;
    background-position: center;
    padding-top: var(--grid-gap);
    padding-bottom: var(--grid-gap);
}
