/* ==========================================================================
   1. Global Reset & Base Setup / 글로벌 초기화 및 기본 변수 설정
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-cream: #FAF6F5;
    --text-main: #4A3E3D;
    --text-muted: #705F5D;
    --brand-primary: #7A5C58;
    --brand-accent: #D37B70;
    --card-bg: #FDF8F7;
    --border-color: #EFE4E1;
    --max-width: 1140px;
    /* Standard Desktop Content Width / 데스크톱 표준 콘텐트 넓이 */
}

body {
    background-color: var(--bg-cream);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* ==========================================================================
   2. Layout Header & Navigation / 헤더 및 상단 바 레이아웃
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    background-color: rgba(250, 246, 245, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-primary);
    letter-spacing: -0.5px;
}

.header-logo-img {
    height: 48px;
    width: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.desktop-menu {
    display: none;
    /* Default hidden on mobile / 모바일 기본 숨김 */
    gap: 32px;
}

.desktop-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.desktop-menu a:hover {
    color: var(--brand-accent);
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background-color: var(--brand-primary);
    transition: 0.3s;
}

/* ==========================================================================
   3. Responsive Grid Main Container / 반응형 메인 컨테이너 구조
   ========================================================================== */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px 100px 20px;
    /* Safe area for bottom nav / 하단 탭바 여백 */
}

.content-section {
    padding: 56px 0;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #5C4643;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.section-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    word-break: keep-all;
}

/* ==========================================================================
   4. Component Elements (Buttons, Badges) / 공통 컴포넌트 요소
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 28px;
    border-radius: 24px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: #ffffff;
    margin-bottom: 12px;
}

.btn-primary:hover {
    background-color: #634945;
}

.btn-secondary {
    background-color: #F3E6E3;
    color: var(--brand-primary);
}

.btn-secondary:hover {
    background-color: #EADCD9;
}

.btn-dark {
    background-color: #554846;
    color: #ffffff;
}

.badge {
    display: inline-block;
    background-color: #FCECE9;
    color: var(--brand-accent);
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 18px;
    text-transform: uppercase;
}

/* ==========================================================================
   5. Content Sections Layout / 각 섹션별 기본 모바일 스타일
   ========================================================================== */
/* Hero Section Layout */
.hero-section {
    padding: 48px 0;
    display: flex;
    flex-direction: column;
    /* Stacks vertically on mobile / 모바일 종형 배치 */
    gap: 40px;
    text-align: center;
}

.hero-title {
    font-size: 1.45rem;
    line-height: 1.45;
    font-weight: 400;
    color: #3A3231;
    margin-bottom: 18px;
    word-break: keep-all;
}

.hero-title strong {
    font-weight: 700;
    color: var(--brand-accent);
}

.hero-desc {
    font-size: 0.95rem;
    color: #8A7775;
    margin-bottom: 32px;
    word-break: keep-all;
}

/* Live Web Site Button & Poka Character positioning */
.button-poka-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

.button-poka-wrapper .btn-primary {
    margin-bottom: 0;
}

.poka-character-live {
    position: absolute;
    width: 70px;
    height: auto;
    right: 15px;
    top: -42px;
    pointer-events: none;
    z-index: 5;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.poka-character-live img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0; /* Reset global border-radius */
    animation: peekAnimation 3s ease-in-out infinite;
}

.button-poka-wrapper:hover .poka-character-live {
    transform: scale(1.15) rotate(-8deg) translateY(-5px);
    filter: drop-shadow(0 12px 24px rgba(122, 92, 88, 0.20));
}

@keyframes peekAnimation {
    0%, 100% {
        transform: translateY(0) rotate(2deg);
    }
    50% {
        transform: translateY(-4px) rotate(6deg);
    }
}

/* Graphic Device Mockup Container */
.hero-graphic-side {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup-wrapper {
    position: relative;
    padding: 0 20px;
}

.phone-mockup {
    width: 290px;         /* Fine-tuned width for better aspect ratio */
    height: 590px;        /* Balanced height to prevent stretching */
    background-color: #ffffff;
    border: 9px solid var(--border-color);
    border-radius: 40px;
    box-shadow: 0 24px 48px rgba(122, 92, 88, 0.12);
    overflow: hidden;
    position: relative;
}

.mockup-screen {
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.mockup-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* Preserves ratio while filling the frame */
    border-radius: 0;
}

.mockup-screen .animated-diorama {
    animation: hyperLiveShowcase 3.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite alternate;
}

@keyframes hyperLiveShowcase {
    0% {
        transform: scale(1) translate(0, 0) rotate(0deg);
    }
    50% {
        transform: scale(1.02) translate(3px, -5px) rotate(1deg);
    }
    100% {
        transform: scale(1) translate(-1px, 2px) rotate(-0.5deg);
    }
}

.floating-badge {
    position: absolute;
    background: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
    font-size: 1.15rem;
    z-index: 10;
    animation: floatAnimation 3s ease-in-out infinite;
}

@keyframes floatAnimation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.badge-heart {
    right: -14px;
    top: 26.5%;
}

.badge-cart {
    left: -14px;
    bottom: 45.5%;
    animation-delay: 0.5s;
}

/* Tech Stack Grid Area */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 28px;
    background: #FAF0EE;
    padding: 20px;
    border-radius: 20px;
}

.tech-item {
    background: #ffffff;
    padding: 16px 8px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(122, 92, 88, 0.02);
}

.tech-icon {
    display: inline-block;
    width: 38px;
    height: 38px;
    line-height: 38px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.tech-icon.html {
    background-color: #E44D26;
}

.tech-icon.css {
    background-color: #264DE4;
}

.tech-icon.js {
    background-color: #F7DF1E;
    color: #000;
}

.tech-icon.ai {
    background-color: #A259FF;
}

.tech-icon.github {
    background-color: #24292E;
}

.tech-icon.figma {
    background-color: #F24E1E;
}

.tech-item p {
    font-size: 0.8rem;
    font-weight: 500;
    color: #5C4643;
}

/* Principles Cards Layout */
.principles-layout-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.principle-card {
    background-color: var(--card-bg);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid #F5EAE7;
}

.card-icon {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.principle-card h4 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.principle-card p {
    font-size: 0.9rem;
    color: #7A6967;
    margin-bottom: 18px;
    word-break: keep-all;
}

.card-preview {
    background: #F3EBE9;
    border-radius: 16px;
    overflow: hidden;
    border: 4px solid #ffffff;
}

/* AI Collaboration Timeline Flow */
.process-timeline {
    position: relative;
    margin-top: 28px;
    padding-left: 24px;
    border-left: 2px dashed #E5D4D0;
}

.process-step {
    position: relative;
    margin-bottom: 32px;
}

.process-step:last-child {
    margin-bottom: 0;
}

.step-number {
    position: absolute;
    left: -37px;
    top: 2px;
    width: 24px;
    height: 24px;
    background-color: var(--brand-primary);
    color: #ffffff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content {
    background: #ffffff;
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(122, 92, 88, 0.02);
}

.step-content h4 {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.85rem;
    color: #7A6967;
    line-height: 1.55;
}

/* Footer Conversion Banner */
.footer-banner {
    background-color: #EFE4E1;
    border-radius: 28px;
    padding: 40px 24px;
    text-align: center;
    margin-top: 32px;
}

.footer-banner h3 {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.45;
    color: #3A3231;
    margin-bottom: 24px;
}

.footer-banner h3 strong {
    font-weight: 700;
}

.mobile-break {
    display: block;
}

.footer-banner .btn {
    max-width: 260px;
    margin: 0 auto 24px auto;
}

.social-links-area {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 1.35rem;
}

/* Real Footer Element */
.footer {
    text-align: center;
    padding: 40px 20px 120px 20px;
    /* Extra bottom pad for mobile floating navbar */
    background-color: var(--bg-cream);
}

.footer-logo {
    font-weight: 700;
    color: #A691EE;
    margin-bottom: 8px;
}

.copyright {
    font-size: 0.75rem;
    color: #A090EE;
}

/* Mobile Fixed Bottom Tabbar Menu */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.96);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.03);
    z-index: 999;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.15rem;
    color: #A69795;
    cursor: pointer;
}

.nav-item span {
    font-size: 0.65rem;
    margin-top: 4px;
    color: var(--text-muted);
}

.nav-item.active,
.nav-item.active span {
    color: var(--brand-accent);
    font-weight: 700;
}

/* ==========================================================================
   6. Media Query for Desktop / 대형 화면(PC/태블릿) 최적화 미디어 쿼리
   ========================================================================== */
@media (min-width: 850px) {

    /* Menu / 상단 헤더 전환 */
    .menu-toggle {
        display: none;
    }

    .desktop-menu {
        display: flex;
    }

    /* Layout Spacer / 하단 바 제거 처리 */
    .mobile-bottom-nav {
        display: none;
    }

    .main-container {
        padding-bottom: 60px;
    }

    .footer {
        padding-bottom: 40px;
    }

    /* Hero Section Horizontal Arrangement / 히어로 섹션 가로 2열 배치 정렬 */
    .hero-section {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 80px 0;
        gap: 60px;
    }

    .hero-text-side {
        flex: 1.2;
    }

    .hero-graphic-side {
        flex: 0.8;
        justify-content: flex-end;
    }

    .hero-title {
        font-size: 2.3rem;
        line-height: 1.35;
    }

    .hero-buttons {
        display: flex;
        gap: 14px;
    }

    .btn {
        width: auto;
        padding: 14px 36px;
    }

    .btn-primary {
        margin-bottom: 0;
    }

    .button-poka-wrapper {
        width: auto;
        margin-bottom: 0;
        margin-right: 40px; /* Space between buttons for the Poka character */
    }

    .poka-character-live {
        width: 80px;
        right: -45px;
        top: -45px;
    }

    .phone-mockup {
        width: 290px;
        height: 590px;
    }

    /* Overview Flexbox Grid Expand / 프로젝트 개요 영역 구조 고도화 */
    .project-overview {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .tech-grid {
        grid-template-columns: repeat(6, 1fr);
        /* 6 columns layout / 가로 6열 전개 */
        padding: 24px;
        gap: 20px;
    }

    /* Core Design Principles Parallel Layout / 디자인 원칙 카드 가로 2열 나란히 배치 */
    .principles-layout-grid {
        flex-direction: row;
        gap: 24px;
    }

    .principle-card {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    /* Footer Banner Linebreak Filter / 하단 배너 개행 최적화 */
    .mobile-break {
        display: none;
    }

    .footer-banner {
        padding: 60px 40px;
    }

    .footer-banner h3 {
        font-size: 1.7rem;
    }
}

/* ==========================================================================
   7. Modal Inquiry Window / 1:1 문의 모달창 스타일
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(74, 62, 61, 0.4); /* Darkened bg overlay */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg);
    width: 90%;
    max-width: 480px;
    border-radius: 28px;
    padding: 36px 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-title {
    font-size: 1.45rem;
    color: var(--brand-primary);
    text-align: center;
    margin-bottom: 24px;
    font-weight: 700;
}

.inquiry-form .form-group {
    margin-bottom: 16px;
}

.inquiry-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.inquiry-form .required {
    color: #E25B45;
    margin-left: 2px;
}

.inquiry-form input[type="text"],
.inquiry-form input[type="email"],
.inquiry-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    background-color: #ffffff;
    color: var(--text-main);
    transition: border-color 0.2s;
    outline: none;
    font-family: inherit;
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
    border-color: var(--brand-accent);
}

.inquiry-form textarea {
    resize: none;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 28px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-accent);
    cursor: pointer;
}

.form-checkbox label {
    margin-bottom: 0;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn {
    margin-bottom: 0;
    padding: 14px;
    flex: 1;
}

.banner-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 32px; /* Adjusted spacing to balance the newly enlarged logo with the text above */
}

.banner-logo-img {
    height: 110px;    
    width: auto;      
    object-fit: contain;
    
    /* Anti-blur rendering guards for baseline quality */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0); /* Triggers GPU hardware acceleration to prevent blur */
    backface-visibility: hidden;
    
    filter: drop-shadow(0 6px 16px rgba(122, 92, 88, 0.08)); 
    transition: transform 0.25s cubic-bezier(0.33, 1, 0.68, 1), filter 0.25s ease;
    cursor: pointer;  
}

/* When the mouse hovers over the logo (Ultra-sharp state) */
.banner-logo-img:hover {
    /* Scales up the logo nicely by 1.12x */
    transform: scale(1.12);
    
    /* Crucial: Forces pixel-perfect crispness and sharp edges during the scale animation */
    image-rendering: pixelated;
    
    /* Deepens the shadow and adjusts contrast slightly to make the logo look vivid and high-definition */
    filter: drop-shadow(0 14px 28px rgba(122, 92, 88, 0.14)) contrast(1.05);
}

.persona-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}
.persona-card {
    background-color: var(--card-bg);
    border: 1px solid #F5EAE7;
    border-radius: 24px;
    padding: 24px;
    text-align: left;
    flex: 1;
}
.persona-header {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 16px;
}
.persona-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden; /* 원형 박스 밖으로 나가는 사진 커팅 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(122, 92, 88, 0.08);
    flex-shrink: 0; /* 부모 박스가 줄어들어도 원형이 찌그러지지 않게 고정 */
}

.persona-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 사진 비율을 유지하면서 원형틀에 꽉 차게 렌더링 */
}
.persona-meta h4 { font-size: 1.1rem; color: var(--text-main); font-weight: 700; }
.badge-tag {
    font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-top: 4px; display: inline-block;
}
.badge-tag.primary-tag { background: #FCECE9; color: var(--brand-accent); }
.badge-tag.secondary-tag { background: #EFE4E1; color: var(--brand-primary); }
.persona-body { display: flex; flex-direction: column; gap: 14px; }
.persona-info-block h5 { font-size: 0.9rem; color: var(--text-main); font-weight: 700; margin-bottom: 4px; }
.persona-text { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; word-break: keep-all; }

@media (min-width: 850px) {
    .persona-container {
        flex-direction: row;
        gap: 24px;
    }
}

.process-step:nth-child(1) { transition-delay: 0s; }
.process-step:nth-child(2) { transition-delay: 0.15s; }
.process-step:nth-child(3) { transition-delay: 0.3s; }
.process-step:nth-child(4) { transition-delay: 0.45s; }

/* Prevent horizontal overflow page-wide */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Responsive styles for mobile and tablet devices (Under 850px) */
@media (max-width: 850px) {
    /* Transform hero layout from side-by-side to vertical stack */
    .hero-section {
        flex-direction: column !important;
        text-align: center !important;
        gap: 40px !important;
        padding-top: 40px !important;
    }
    
    /* Center align button group components and balance spacing */
    .hero-buttons {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 16px !important;
    }
    
    .button-poka-wrapper {
        margin-right: 0 !important; 
        margin-bottom: 10px;
    }

    /* Tighten right mockup graphics for smaller displays */
    .hero-graphic-side {
        width: 100% !important;
        max-width: 340px !important; 
        height: auto !important;
        aspect-ratio: 1 / 1.3; 
        transform: translateY(0) !important; 
    }
}

.roadmap-diagram {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 50px;
    padding: 20px 10px;
}
.roadmap-line {
    position: absolute;
    left: 25px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: dashed #EFE4E1;
    z-index: 1;
}
.roadmap-node {
    position: relative;
    display: flex;
    gap: 20px;
    z-index: 2;
}
.node-marker {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border: 2px solid var(--brand-accent);
    color: var(--brand-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.node-card {
    background: var(--card-bg);
    border: 1px solid #F5EAE7;
    border-radius: 20px;
    padding: 24px;
    text-align: left;
    flex: 1;
    box-shadow: 0 4px 15px rgba(122, 92, 88, 0.02);
    transition: all 0.4s ease;
}
.node-week {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-accent);
    background: #FCECE9;
    padding: 3px 10px;
    border-radius: 12px;
}
.node-card h4 {
    margin-top: 10px;
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: var(--text-main);
}
.node-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.node-tags span {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #F8F6F5;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #F0EAE8;
}
.node-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Hover Interaction Styles */
.roadmap-node:hover .node-card {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(122, 92, 88, 0.08);
    border-color: var(--brand-accent);
}
.roadmap-node:hover .node-marker {
    background: var(--brand-accent);
    color: #ffffff;
    transform: scale(1.1);
}

/* Desktop Horizontal Blueprint Shift */
@media (min-width: 900px) {
    .roadmap-diagram {
        flex-direction: row;
        gap: 20px;
        justify-content: space-between;
    }
    .roadmap-line {
        left: 0;
        right: 0;
        top: 45px;
        width: 100%;
        height: 2px;
        bottom: auto;
    }
    .roadmap-node {
        flex-direction: column;
        align-items: center;
        flex: 1;
        text-align: center;
    }
    .node-card {
        text-align: center;
    }
    .node-tags {
        justify-content: center;
    }
}

.persona-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 35px;
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 380px; 
    perspective: 1000px; 
    flex: 1;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    box-shadow: 0 4px 20px rgba(122, 92, 88, 0.05);
    border-radius: 24px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    border: 1px solid #F5EAE7;
    box-sizing: border-box;
}

.flip-card-front {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 30px;
    text-align: left;
}

.front-info h4 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.front-info .age-job {
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.9;
}

.badge-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    margin-top: 8px;
    display: inline-block;
}
.badge-tag.primary-tag { background: #FCECE9; color: var(--brand-accent); }
.badge-tag.secondary-tag { background: #EFE4E1; color: var(--brand-primary); }

.flip-card-back {
    background-color: var(--card-bg);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 30px;
    text-align: left;
}

.persona-info-block h5 {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 6px;
    border-left: 3px solid var(--brand-accent);
    padding-left: 8px;
}

.persona-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    word-break: keep-all;
}

@media (min-width: 850px) {
    .persona-container {
        flex-direction: row;
        gap: 24px;
    }
}

/* Change header logo text and navigation link colors to soft black */
.header .logo, 
.desktop-menu a {
    color: #222222 !important; 
    font-weight: 700;
    transition: color 0.3s ease; 
}

/* Refine navigation link properties */
.desktop-menu a {
    font-weight: 500;
    text-decoration: none;
    opacity: 0.85;
}

/* Hover Interaction: Transition gently to the brand's signature rose-brown */
.desktop-menu a:hover {
    color: #7A5C58 !important; 
    opacity: 1;
}

.footer-section {
    padding: 50px 20px 40px 20px;
    background-color: transparent; 
    border-top: none !important; /* Completely removes the redundant second line */
    text-align: center;
}
.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #222222 !important; 
    letter-spacing: -0.3px;
}
.footer-bio {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.88rem;
}
.designer-name {
    color: #222222;
    font-weight: 500;
}
.footer-email {
    color: var(--brand-accent); 
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}
.footer-email:hover {
    opacity: 0.8;
    text-decoration: underline;
}
.footer-copyright {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 10px;
    opacity: 0.7;
}

.footer-github-btn {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: #F8F6F5;
    color: #222222;
    border: 1px solid #F0EAE8;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-github-btn:hover {
    background-color: #222222;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Prevent image overflow and maintain card's border radius when scaling up */
.core-design-principles .image-wrapper,
.core-design-principles picture,
.core-design-principles div:has(> img),
.core-principles .card-preview { 
    overflow: hidden !important; 
    border-radius: 16px;
}

/* Set transition property and smooth easing curve on the image */
.core-design-principles img,
.core-principles img {
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
    transform: scale(1);
    will-change: transform; 
}

/* Hover Interaction: Smoothly scale up only the image while keeping the card container static */
.core-design-principles .card:hover img,
.principles-container .card-item:hover img,
.core-principles .principle-card:hover img {
    transform: scale(1.06) !important; 
}

/* Initial hidden state before scroll reaching the section */
.ia-box {
    opacity: 0;
    transform: translateY(30px);
    will-change: transform, opacity;
}

/* ★Trigger animation ONLY when the parent container becomes .active via scroll */
.project-overview.active .ia-box,
.content-section.active .ia-box,
.reveal-element.active .ia-box {
    animation: dominoReveal 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Incremental animation delays for left-to-right cascade rendering */
.domino-1 { animation-delay: 0.1s; }
.domino-2 { animation-delay: 0.2s; }
.domino-3 { animation-delay: 0.3s; }
.domino-4 { animation-delay: 0.4s; }
.domino-5 { animation-delay: 0.5s; }
.domino-6 { animation-delay: 0.6s; }

/* Reveal animation keyframes definition */
@keyframes dominoReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Define 3D space perspective environment on the parent wrapper container */
.cta-section, 
.closing-banner-section,
.main-container {
    perspective: 1200px !important; 
}

/* Baseline properties for the target banner card */
.cta-banner, 
.closing-banner-section div:has(> h4),
.footer-banner { 
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease !important;
    transform-style: preserve-3d !important;
    transform: rotateX(0deg) rotateY(0deg) translateZ(0px);
    will-change: transform, box-shadow;
}

/* Hover Interaction: Introduce smooth rotational inclinations and float translations */
.cta-banner:hover,
.closing-banner-section div:has(> h4):hover,
.footer-banner:hover {
    transform: rotateX(4deg) rotateY(-4deg) translateZ(15px) !important;
    box-shadow: 0 30px 60px rgba(122, 92, 88, 0.12), 0 12px 25px rgba(0, 0, 0, 0.04) !important;
}

/* Push inner typography and Poka branding elements slightly further out along the z-axis */
.cta-banner:hover h4,
.cta-banner:hover .poka-logo,
.closing-banner-section div:has(> h4):hover *,
.footer-banner:hover h3,
.footer-banner:hover .banner-logo-wrapper {
    transform: translateZ(20px) !important;
    transition: transform 0.5s ease;
}

/* Anchor the header navigation to the top viewport with depth priority */
.header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000 !important; /* Ensures header always floats above flowing text/images */
    background-color: #faf8f5; /* Solid backdrop to block underlying scrolled content */
    box-shadow: 0 2px 10px rgba(122, 92, 88, 0.05); /* Premium subtle separation shadow */
    transition: all 0.3s ease;
}

/* Prevent the hero/first content section from drowning underneath the fixed header */
body {
    padding-top: 80px !important; /* Offsets page layout perfectly to match header height */
}

/* Set relative position baseline for navigation link tags */
.desktop-menu a {
    position: relative;
    color: #222222 !important;
    font-weight: 500;
    text-decoration: none;
    padding: 6px 0; 
    transition: color 0.3s ease;
}

/* Configure the hidden baseline state of the decorative underline */
.desktop-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px; 
    background-color: #7A5C58; 
    transform: scaleX(0); 
    transform-origin: bottom left;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); 
}

/* Hover & Active State: Transition text weight and color dynamically */
.desktop-menu a:hover,
.desktop-menu a.active {
    color: #7A5C58 !important; 
    font-weight: 700; 
}

/* Expand the transform scale to 100% width upon hover or active match */
.desktop-menu a:hover::after,
.desktop-menu a.active::after {
    transform: scaleX(1);
}