@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    /* Common Colors */
    --white: #ffffff;
    --white-alpha-10: rgba(255, 255, 255, 0.1);
    --white-alpha-20: rgba(255, 255, 255, 0.2);
    --white-alpha-60: rgba(255, 255, 255, 0.6);
    --black: #000000;

    /* Anchor Theme (University - Deep Blue) */
    --anchor-bg-start: #00152e;
    --anchor-bg-end: #000a12;
    --anchor-accent: #4fc3f7;
    --anchor-text: #ffffff;

    /* Healper Theme (Hospital - Medical Green) */
    --healper-bg-start: #1b5e20;
    --healper-bg-end: #0d3310;
    --healper-accent: #66bb6a;
    --healper-text: #ffffff;

    /* Spacing & Layout Defaults (Desktop) */
    --header-height: 80px;
    --footer-height: 80px;
    --container-max-width: 1600px;
    --border-radius: 12px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    /* GLOBAL NO SCROLL DEFAULT */
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    color: white;
}

/* LAYOUT STRUCTURE */
header {
    flex: 0 0 var(--header-height);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    z-index: 100;
}

main {
    flex: 1;
    /* Take remaining height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    position: relative;
    overflow: hidden;
}

footer {
    flex: 0 0 var(--footer-height);
    background: rgba(255, 255, 255, 0.95);
    color: var(--black);
    z-index: 50;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.header-content,
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* THEMES */
.theme-anchor {
    background: radial-gradient(circle at 70% 30%, #002d5c 0%, var(--anchor-bg-start) 40%, var(--anchor-bg-end) 100%);
}

.theme-healper {
    background: radial-gradient(circle at 70% 30%, #2e7d32 0%, var(--healper-bg-start) 40%, var(--healper-bg-end) 100%);
}

/* HEADER ELEMENTS */
.logo-area {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-main {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.7;
    margin-top: 4px;
}

.nav-steps {
    display: flex;
    gap: 4rem;
}

.nav-step {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    padding: 0.5rem 0;
}

.nav-step.active {
    color: white;
    font-weight: 700;
}

.nav-step.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* MAIN GRID */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    width: 100%;
    max-width: var(--container-max-width);
    align-items: center;
    /* Vertical Center */
}

/* LEFT COLUMN */
.input-section {
    display: flex;
    flex-direction: column;
    /* No strict gap here, controlled by margin-bottom of children */
}

.step-group {
    margin-bottom: 3.5rem;
}

.step-group:last-child {
    margin-bottom: 0;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.step-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.section-label {
    font-size: 1.4rem;
    font-weight: 700;
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-left: 1rem;
}

.glass-box {
    background: rgba(255, 255, 255, 0.9);
    color: var(--black);
    padding: 0.8rem 1.5rem;
    /* Reduced padding from 1.2rem 2rem */
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    /* Reduced font from 1.1rem */
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: 0.2s;
    cursor: pointer;
    min-width: 200px;
    /* Ensure uniform width */
}

.glass-box:hover {
    transform: translateY(-2px);
    background: white;
}

.upload-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.4);
    color: white;
    padding: 0.8rem 1.5rem;
    /* Reduced padding */
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-left: 1rem;
    backdrop-filter: blur(4px);
    font-size: 1rem;
    /* Reduced font */
}

.upload-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.plus-icon {
    font-size: 1.4rem;
    font-weight: 300;
}

/* RIGHT COLUMN (HERO) */
.hero-content {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.main-title {
    font-size: 8rem;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-subtitle {
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.05em;
    line-height: 0.8;
}

.solution-desc {
    margin-top: 5rem;
    text-align: right;
    border-right: 4px solid var(--white-alpha-20);
    padding-right: 2rem;
}

.desc-en {
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.desc-kr {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--white-alpha-60);
}

/* FOOTER ELEMENTS */
.eval-list {
    display: flex;
    gap: 4rem;
}

.eval-item {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    cursor: pointer;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    color: #4b5563;
}

.footer-logo strong {
    font-weight: 900;
    font-size: 1.4rem;
    margin-right: 6px;
    color: #111;
}

/* =========================================
   STRICT FIT-TO-SCREEN OPTIMIZATION (1024x768)
   ========================================= */

/* Applies when width is narrow OR height is short (like 768px height) */
@media screen and (max-width: 1280px),
screen and (max-height: 850px) {

    /* Enforce Compact Height */
    :root {
        --header-height: 60px;
        --footer-height: 50px;
    }

    header {
        flex: 0 0 60px;
    }

    footer {
        flex: 0 0 50px;
    }

    /* Compact Main Area */
    main {
        padding: 0 2rem;
    }

    .main-grid {
        gap: 3rem;
    }

    /* Scale Down Fonts & Spacing */
    .logo-main {
        font-size: 1.4rem;
    }

    .nav-step {
        font-size: 0.95rem;
    }

    .nav-steps {
        gap: 2.5rem;
    }

    /* Left Side Compact */
    .step-group {
        margin-bottom: 2rem;
    }

    .step-header {
        margin-bottom: 0.5rem;
    }

    .step-badge {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }

    .section-label {
        font-size: 1.1rem;
    }

    .input-container {
        gap: 0.5rem;
    }

    .glass-box {
        padding: 0.6rem 1rem;
        /* Much smaller */
        font-size: 0.95rem;
        border-radius: 6px;
    }

    .upload-btn {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
        margin-top: 0.5rem;
    }

    /* Right Side Compact */
    .main-title {
        font-size: 5.5rem;
    }

    .main-subtitle {
        font-size: 2.8rem;
    }

    .solution-desc {
        margin-top: 2rem;
        padding-right: 1.5rem;
    }

    .desc-en {
        font-size: 1.4rem;
    }

    .desc-kr {
        font-size: 1.1rem;
    }

    /* Footer Compact */
    .eval-list {
        gap: 2rem;
    }

    .eval-item {
        font-size: 0.9rem;
    }

    .footer-logo {
        font-size: 0.9rem;
    }

    .footer-logo strong {
        font-size: 1.1rem;
    }
}

/* Even Stricter for actual 1024x768 Device match */
@media screen and (max-height: 768px) {
    :root {
        --header-height: 50px;
    }

    header {
        flex: 0 0 50px;
    }

    /* Further reduction */
    .main-title {
        font-size: 5rem;
        margin-bottom: 0;
    }

    .main-subtitle {
        font-size: 2.5rem;
        margin-top: -5px;
    }

    .step-group {
        margin-bottom: 1.2rem;
    }

    .nav-steps {
        font-size: 0.85rem;
    }

    .glass-box {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .upload-btn {
        padding: 0.5rem 1rem;
    }

    /* Ensure no overlap */
    .main-grid {
        align-content: center;
        height: 100%;
    }
}

/* Mobile Scroll Enable */
@media (max-width: 768px) {

    html,
    body {
        overflow-y: auto;
        /* Enable scroll on mobile */
        height: auto;
    }

    .nav-steps {
        display: none;
    }

    main {
        padding: 2rem 1rem;
        display: block;
        height: auto;
    }

    .main-grid {
        display: flex;
        flex-direction: column-reverse;
        gap: 2rem;
    }

    .hero-content {
        align-items: center;
        text-align: center;
    }

    .solution-desc {
        text-align: center;
        border-right: none;
        padding-right: 0;
    }
}