/* ========================================
   반응형 디자인: 태블릿 / 모바일
======================================== */

@media (min-width: 1200px) {
    .container {
        width: min(calc(100% - 5rem), var(--container));
    }
}


/* ========================================
   태블릿
======================================== */

@media (max-width: 1024px) {

    :root {
        --space-2xl: 5rem;
    }

    .nav-shell {
        min-height: 80px;
    }

    .main-nav a {
        padding: .65rem .45rem;
        font-size: .82rem;
    }

    .main-nav a::after {
        left: .45rem;
        right: .45rem;
    }

    .hero {
        min-height: 610px;
    }

    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .card-grid,
    .activity-grid,
    .club-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .year-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .career-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .roadmap {
        gap: 1.4rem;
    }

    .roadmap-step:not(:last-child)::after {
        right: -1.05rem;
    }

    .footer-main {
        gap: 2rem;
    }
}


/* ========================================
   모바일 / 태블릿
======================================== */

@media (max-width: 768px) {

    :root {
        --space-xl: 3rem;
        --space-2xl: 4rem;
    }

    .container {
        width: min(calc(100% - 2rem), var(--container));
    }

    .utility-inner {
        min-height: 32px;
    }

    .utility-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .utility-link {
        flex: none;
    }

    .nav-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 74px;
        gap: 1rem;
    }

    .brand {
        min-width: 0;
    }

    .brand-mark {
        width: 38px;
        height: 44px;
        flex: none;
    }

    .brand-text {
        min-width: 0;
    }

    .brand-text strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 1rem;
    }

    .brand-text small {
        display: none;
    }

    .nav-toggle-label {
        display: grid;
        flex: none;
    }

    .main-nav {
        position: absolute;
        top: 106px;
        left: 0;
        right: 0;
        max-height: 0;
        overflow: hidden;
        background: var(--bg-primary);
        box-shadow: var(--shadow-md);
        transition: max-height var(--transition);
    }

    .main-nav ul {
        display: block;
        width: min(calc(100% - 2rem), var(--container));
        margin: auto;
        padding: .5rem 0 1rem;
    }

    .main-nav a {
        min-height: 48px;
        padding: .7rem .5rem;
        border-bottom: 1px solid var(--border);
    }

    .main-nav a::after {
        display: none;
    }

    .nav-toggle:checked ~ .main-nav {
        max-height: 470px;
    }

    .nav-toggle:checked + .nav-toggle-label span {
        opacity: 0;
    }

    .nav-toggle:checked + .nav-toggle-label::before {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle:checked + .nav-toggle-label::after {
        transform: translateY(-7px) rotate(-45deg);
    }


    /* 메인 화면 */

    .hero {
        min-height: 620px;
        align-items: flex-start;
    }

    .hero::before {
        background:
            linear-gradient(
                90deg,
                rgba(255, 255, 255, .98),
                rgba(255, 255, 255, .78)
            ),
            url("../images/hero-security.jpg") center/cover no-repeat;
    }

    .hero-content {
        padding: 4.5rem 0;
    }

    .hero h1 {
        font-size: clamp(2.25rem, 11vw, 3.6rem);
    }

    .hero-copy {
        font-size: 1rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: .45rem;
    }

    .hero-stat {
        display: grid;
        grid-template-columns: 110px 1fr;
        align-items: center;
        padding: .7rem 0;
        border-bottom: 1px solid #dbeafe;
    }


    /* 콘텐츠 */

    .about-grid,
    .feature-split {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .network-visual {
        min-height: 330px;
    }

    .ring-one {
        left: calc(50% - 120px);
        width: 240px;
        height: 240px;
    }

    .ring-two {
        left: calc(50% - 70px);
        width: 140px;
        height: 140px;
    }

    .goal-grid,
    .values-grid,
    .research-grid,
    .club-grid,
    .club-detail,
    .club-activity-grid {
        grid-template-columns: 1fr;
    }


    /* 교육과정 */

    .roadmap {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .roadmap-step:not(:last-child)::after {
        content: "↓";
        right: auto;
        left: 50%;
        top: auto;
        bottom: -1.8rem;
        transform: translateX(-50%);
    }


    /* 타임라인 */

    .timeline {
        grid-template-columns: 1fr;
        gap: 1.7rem;
        max-width: 460px;
        margin-inline: auto;
    }

    .timeline-step {
        padding: 0 0 0 2.5rem;
        text-align: left;
    }

    .timeline-step:first-child::before {
        content: "";
        position: absolute;
        display: block;
        top: 11px;
        bottom: -1.7rem;
        left: 8px;
        right: auto;
        width: 2px;
        height: auto;
        background: #bfdbfe;
    }

    .timeline-step:not(:last-child)::before {
        top: 11px;
        bottom: -1.7rem;
        left: 8px;
        right: auto;
        width: 2px;
        height: auto;
    }

    .timeline-step:last-child::before {
        display: none;
    }

    .timeline-dot {
        left: 0;
        top: 2px;
        transform: none;
    }


    /* CTA */

    .cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }


    /* 내부 페이지 */

    .page-hero {
        padding: 4rem 0;
    }


    /* 대학생활 */

    .life-card,
    .life-card:nth-child(3n+1) {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

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

    .life-card:nth-child(3n+1) .life-visual {
        aspect-ratio: auto;
    }


    /* 진로 */

    .career-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* 푸터 */

    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 3rem 0;
    }
}


/* ========================================
   소형 모바일
======================================== */

@media (max-width: 480px) {

    .container {
        width: min(calc(100% - 1.5rem), var(--container));
    }

    .section {
        padding: 3.5rem 0;
    }

    .button-row {
        display: grid;
    }

    .btn {
        width: 100%;
    }

    .hero {
        min-height: 650px;
    }

    .hero-content {
        padding: 3.5rem 0;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero-kicker {
        font-size: .68rem;
    }

    .card-grid,
    .activity-grid,
    .year-grid,
    .career-grid,
    .club-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        margin-bottom: 1.75rem;
    }

    .statement {
        font-size: 1.2rem;
    }

    .page-hero {
        padding: 3.2rem 0;
    }

    .page-hero::after {
        width: 300px;
        height: 300px;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }
}


/* ========================================
   모션 최소화 설정
======================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
