/* =========================================================
   NITRO MUSIC — mobile.css
   모바일(≤767px) 전용 오버라이드.
   768px 이상(PC/태블릿)에는 전혀 영향 없음.
   ========================================================= */

/* ---- 데스크탑 기본값: 햄버거·모바일 메뉴 숨김 ---- */
.nav-hamburger { display: none; }
.mobile-menu { display: none; }

@media (max-width: 767px) {

  /* ---- 전역 토큰 축소 ---- */
  :root {
    --pad: 20px;
    --site-min: 0;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
    font-size: 14px;
  }

  /* ---- NAV ---- */
  .nav {
    padding: 12px 16px;
    gap: 8px;
  }
  .nav-logo img { height: 42px; }
  .nav-links { display: none; }
  .nav-right { gap: 13px; }

  /* 모바일 nav 순서: [문의하기] [KR/EN] [햄버거] */
  .btn-cta { order: 1; }
  .lang-toggle { order: 2; }
  .nav-hamburger { order: 3; }

  .btn-cta {
    padding: 7px 14px;
    font-size: 14px;
    font-family: var(--font-kr);
    font-weight: 700;
    border-radius: 14px;
    box-shadow: none;
    letter-spacing: -0.02em;
  }
  .btn-cta .arrow { display: none; }

  /* 언어 토글 — 문의하기 오른쪽에 작게 */
  .lang-toggle {
    display: inline-flex;
    font-size: 10px;
    border-radius: 14px;
  }
  .lang-toggle button {
    padding: 5px 8px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  /* 햄버거 버튼 */
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 210;
  }
  .nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
  }
  body.menu-open .nav-hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  body.menu-open .nav-hamburger span:nth-child(2) {
    opacity: 0;
  }
  body.menu-open .nav-hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  body.menu-open { overflow: hidden; }

  /* ---- 모바일 메뉴 드로어 ---- */
  .mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    background: rgba(10,10,11,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
    overflow-y: auto;
  }
  .mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 24px 20px 8px;
    flex: 1;
  }
  .mobile-menu-links a {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 14px 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu-foot {
    padding: 20px;
    border-top: 1px solid var(--line);
  }
  .mobile-menu-foot .btn-cta {
    display: flex;
    justify-content: center;
    padding: 14px 20px;
    min-height: 48px;
    font-size: 14px;
    box-shadow: 0 4px 14px -4px rgba(230,57,70,.5);
  }
  .mobile-menu-foot .btn-cta .arrow { display: inline-flex; }

  /* ---- 섹션 인디케이터 / 히어로 variant switch 숨김 ---- */
  .section-indicator,
  .hero-variant-switch { display: none; }

  /* ---- HERO ---- */
  .hero {
    min-height: 100vh;
    padding-top: 96px;
    padding-bottom: 56px;
  }
  .hero-bg {
    background-position: center 60%;
  }
  .hero-grid {
    background-size: calc(100% / 6) 100%;
  }

  .hero-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .hero-meta-top {
    padding-bottom: 40px;
    font-size: 10px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .hero-meta-top .pill {
    padding: 5px 10px;
    font-size: 10px;
    letter-spacing: 0.18em;
  }

  .hero-kicker {
    font-size: 10px;
    letter-spacing: 0.25em;
    margin-bottom: 16px;
    gap: 10px;
  }
  .hero-kicker::before { width: 20px; }

  .hero-title {
    font-size: 44px;
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin-bottom: 18px;
  }
  .hero-title .line2 {
    font-size: 0.72em;
  }

  .hero-sub {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 100%;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .btn-primary,
  .btn-ghost {
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 14px 20px;
    font-size: 14px;
  }

  .hero-foot {
    margin-top: 44px;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 22px;
    column-gap: 0;
    padding-top: 22px;
  }
  .hero-foot .item {
    padding: 0 14px;
    border-right: 1px solid var(--line);
  }
  .hero-foot .item:nth-child(2n) {
    border-right: 0;
    padding-right: 0;
  }
  .hero-foot .item:nth-child(odd) {
    padding-left: 0;
  }
  .hero-foot .item .k {
    font-size: 26px;
    letter-spacing: -0.015em;
  }
  .hero-foot .item .l {
    font-family: var(--font-kr);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--text-dim);
    margin-top: 6px;
    line-height: 1.4;
  }

  /* 섹션 공통 패딩 — 다른 섹션은 다음 단계에서 세부 조정 예정 */
  section {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* ---- LOGO WALL 2-row marquee (모바일) ---- */
  .logo-wall {
    padding: 24px 0 28px;
  }
  .logo-wall .logos {
    gap: 10px;
  }
  .logo-wall .logo-track {
    gap: 28px;
    padding: 4px 12px;
  }
  .logo-wall .logo-cell {
    width: 110px;
    height: 60px;
  }

  /* ---- 섹션 헤드 공통 축소 (h-lg 타이틀 잘림 방지) ---- */
  /* 모바일에선 PC용 -70px 쉬프트 취소 */
  .section-head {
    translate: 0 0;
  }
  .h-lg {
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.025em;
  }
  .h-lg.kr {
    letter-spacing: -0.035em;
  }
  .section-head {
    margin-bottom: 36px;
  }
  .eyebrow {
    font-size: 12px;
    letter-spacing: 0.18em;
    margin-bottom: 14px;
  }
  .lead {
    font-size: 15px;
    line-height: 1.6;
  }

  /* ---- SERVICE GRID 1열 스택 ---- */
  .service-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .service-card,
  .service-card.wide,
  .service-card.narrow,
  .service-card.feature {
    grid-column: 1 / -1;
    padding: 26px 22px;
  }
  .service-card .num {
    font-size: 12px;
  }
  .service-card h3 { font-size: 18px; }
  .service-card p { font-size: 14px; }
  .service-card.feature h3 { font-size: 22px; }
  .service-card.feature .big {
    font-size: 52px;
    margin-top: 20px;
  }

  /* ---- NETWORK STATS 2x2 ---- */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat {
    padding: 22px 14px;
  }
  .stat .v {
    font-size: 34px;
    letter-spacing: -0.03em;
  }
  .stat .v .unit {
    font-size: 18px;
  }
  .stat .l {
    font-size: 10px;
    letter-spacing: 0.1em;
    margin-top: 14px;
  }
  .stat .d {
    font-size: 11px;
    margin-top: 6px;
    line-height: 1.35;
  }

  /* 플랫폼 마키 모바일 */
  .platform-row {
    margin-top: 28px;
    gap: 12px;
  }
  .platform-row .p-label {
    flex: 0 0 100%;
    font-size: 10px;
  }
  .platform-row .p-list .p-item {
    font-size: 13px;
    gap: 8px;
  }
  .platform-row .p-track {
    gap: 24px;
    animation-duration: 22s;
  }

  /* ---- CAMPAIGN CARDS 간소화 ---- */
  .case-section { padding-top: 64px; padding-bottom: 64px; }
  .case-row {
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 22px 8px;
  }
  .case-row:hover,
  .case-row.open {
    padding-left: 8px;
  }
  .case-row .no,
  .case-row .period,
  .case-row .posts { display: none; }

  .case-row .client {
    font-size: 16px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .case-row .client .sub {
    font-size: 11px;
    margin-top: 2px;
  }
  .case-row .views {
    font-size: 18px;
  }
  .case-row .chev { font-size: 14px; }

  /* 펼쳤을 때 기간·포스트수 복원 (detail 안에 노출) */
  .case-row.open .no,
  .case-row.open .period,
  .case-row.open .posts {
    display: block;
    grid-column: 1 / -1;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--text-mute);
    font-family: var(--font-mono);
  }
  .case-row.open .period { order: 10; }
  .case-row.open .posts { order: 11; }

  .case-detail-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px 0 8px;
  }
  .case-detail .metrics {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .case-detail .metrics .m { padding: 10px 0; }
  .case-detail .metrics .m .mv { font-size: 15px; }
  .case-detail .metrics .m .ml { font-size: 9px; letter-spacing: 0.08em; }

  /* ---- AGGREGATE 모바일 ---- */
  .aggregate {
    gap: 28px;
  }
  .aggregate .big-num {
    font-size: 88px;
    line-height: 0.9;
    align-self: center;
  }
  .aggregate .caption {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 20px;
  }
  .aggregate .breakdown .b {
    padding: 16px 14px;
  }
  .aggregate .breakdown .b .bv { font-size: 22px; }
  .aggregate .breakdown .b .bl { font-size: 10px; margin-top: 4px; letter-spacing: 0.1em; }

  /* ---- PILOT 2×2 (준비·검증 / 확산·정착) ---- */
  .pilot-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .pilot-step {
    min-height: 180px;
    padding: 22px 16px 18px;
  }
  .pilot-step .title {
    font-size: 20px;
    margin-top: 12px;
    margin-bottom: 14px;
  }
  .pilot-step .wk { font-size: 9px; letter-spacing: 0.16em; }
  .pilot-step .desc { font-size: 12px; line-height: 1.5; }
  .pilot-step .arrow-line { display: none; }
  .pilot-deliverables {
    margin-top: 24px;
    padding: 18px 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* ---- WHY 섹션 모바일 숨김 (내용이 길어 모바일 UX 저하) ---- */
  section#why { display: none; }

  /* ---- FAQ 섹션 모바일: 2열 grid → 1열 수직 (제목 → Q/A) ---- */
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .faq-q { font-size: 15px; gap: 14px; }
  .faq-a { font-size: 13px; }

  /* ---- CONTACT 모바일 ---- */
  /* h2 모바일 폰트 축소 (현재 PC clamp 48px 때문에 "함께 설계하시죠."가 3줄로 쪼개짐) */
  .contact-left h2 {
    font-size: 30px;
    line-height: 1.15;
  }
  .contact-left h2 em {
    /* 단 한 줄 보장 */
    white-space: nowrap;
  }
  .contact-left p {
    font-size: 14px;
    margin-top: 16px;
  }
  .contact-channels { margin-top: 28px; }
  .contact-channels a { padding: 14px 0; grid-template-columns: 72px 1fr auto; gap: 12px; }
  .contact-channels .k { font-size: 10px; letter-spacing: 0.15em; }
  .contact-channels .v { font-size: 15px; }

  /* 모바일 contact: 2열 → 1열 + form을 channels 앞으로 DOM 이동 (mobile.js) */
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .contact-form {
    padding: 24px 18px;
  }
  .contact-form .form-head h3 { font-size: 16px; }
  .contact-form .form-head .seq { font-size: 10px; }
  .form-field input,
  .form-field textarea,
  .form-field select { font-size: 16px; }
  .form-field label { font-size: 11px; letter-spacing: 0.14em; }
  .form-notice { font-size: 12px; padding: 10px 12px; }
  /* .form-row는 grid(2열)이므로 grid-template-columns 오버라이드 필요 */
  .form-row {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 14px;
  }
  .form-field,
  .form-field.full {
    grid-column: auto;
    min-width: 0;
  }
  .form-field input,
  .form-field textarea,
  .form-field select { width: 100%; }
  .check { font-size: 13px; padding: 7px 12px; }

  /* ---- COLUMN 섹션 ---- */
  /* 모바일: col-layout을 1열 스택으로 재구성.
     mobile.js가 필터를 col-layout 안 마지막 위치로 이동 → Top5 → 새로발행 → 필터 */
  .col-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .col-filters {
    margin-top: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .col-filters::-webkit-scrollbar { display: none; }
  .col-filters button { flex-shrink: 0; }

  /* Top 5 썸네일·텍스트 크기 조정, 제목 강조 */
  .col-top5 .head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 18px;
  }
  .col-top5 .head h3 { font-size: 22px; }
  .col-top5 .head .month { font-size: 11px; }

  .top5-item {
    /* 모바일: rank(28) / thumb(88) / body / views 로 재배치 — 빈 공간 제거 */
    grid-template-columns: 28px 88px 1fr auto;
    gap: 10px;
    padding: 14px 4px;
  }
  .top5-item .rank {
    font-size: 28px;
  }
  .top5-item .thumb {
    /* 가로로 긴 비율 (5:4) */
    width: 88px;
    height: 70px;
    border-radius: 4px;
  }
  .top5-item .body { min-width: 0; }
  .top5-item .body .cat {
    font-size: 11px;
    margin-bottom: 4px;
  }
  .top5-item .body .t {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text);
    font-weight: 700;
  }
  .top5-item .body .t em {
    font-size: 13px;
    font-weight: 500;
  }
  .top5-item .views {
    font-size: 11px;
    flex-shrink: 0;
    text-align: right;
  }
  .top5-item .views .vv {
    font-size: 13px;
  }

  /* 일반 칼럼 헤더 폰트 축소 (한 줄 정렬) */
  .col-new .head {
    gap: 10px;
  }
  .col-new .head h3 {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .col-new .head h3 .new-pill {
    font-size: 9px;
    padding: 2px 6px;
  }
  .col-new .head .more {
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 일반 칼럼 2개만 · 중앙 정렬 · 박스 확대 */
  .col-new-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 420px;
    margin: 0 auto;
  }
  .col-new-grid > *:nth-child(n+3) {
    display: none;
  }
  .col-new-card .thumb {
    aspect-ratio: 16/10;
    padding: 22px;
  }
  .col-new-card .thumb .t-text {
    font-size: 22px;
  }
  .col-new-card .body {
    padding: 16px 18px 18px;
    gap: 8px;
  }
  .col-new-card h4 { font-size: 16px; }
  .col-new-card .cat { font-size: 11px; }
  /* 메타는 가로 한 줄 유지 (세로로 잘리지 않게) */
  .col-new-card .meta {
    flex-wrap: nowrap;
    font-size: 11px;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .col-new-card .meta > * {
    flex-shrink: 0;
  }
}
