/* ============================================
   T&C MEDIA — mobile.css
   Responsive styles (max-width: 768px)
   ============================================ */

/* ----------------------------------------
   GLOBAL / COMMON
---------------------------------------- */
@media (max-width: 768px) {

  /* 가로 스크롤 / 사이드 여백 제거 */
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* 커서 비활성화 (터치 기기) */
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }

  /* 컨테이너 패딩 축소 */
  .container { padding: 0 20px; }

  /* 섹션 패딩 축소 */
  section { padding: 100px 0; }


  /* ----------------------------------------
     SCROLL PROGRESS
  ---------------------------------------- */
  .scroll-progress { height: 2px; }


  /* ----------------------------------------
     NAV
  ---------------------------------------- */
  nav { padding: 18px 0; }
  nav.scrolled { padding: 14px 0; }

  .nav-inner {
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .nav-logo { font-size: 17px; }

  /* 햄버거 버튼 */
  .nav-hamburger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 600;
    background: none;
    border: none;
    padding: 4px;
    position: static;
    flex-shrink: 0;
  }
  .nav-hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: #fff;
    transition: all 0.3s ease;
    transform-origin: center;
  }
  .nav-hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .nav-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .nav-hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  /* 모바일 메뉴 */
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 550;
  }
  .nav-links.mobile-open {
    display: flex;
  }
  .nav-links a {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.05em;
  }


  /* ----------------------------------------
     DOT NAV — 모바일 숨김
  ---------------------------------------- */
  .dot-nav { display: none; }


  /* ----------------------------------------
     HERO
  ---------------------------------------- */
  #hero { min-height: 100svh; }

  .hero-content { padding: 0 20px; }

  .hero-eyebrow {
    font-size: 9px;
    letter-spacing: 0.2em;
    margin-bottom: 24px;
  }

  .hero-title {
    font-size: clamp(22px, 5.8vw, 36px);
    margin-bottom: 24px;
    letter-spacing: -0.04em;
    word-break: normal;
    white-space: normal;
  }

  .hero-sub {
    font-size: 13px;
    line-height: 1.7;
    word-break: keep-all;
  }

  /* 비디오 있을 때 텍스트 위치 */
  #hero.has-video .hero-content {
    top: 60%;
    padding: 0 20px;
  }
  #hero.has-video .hero-title {
    font-size: clamp(26px, 6.5vw, 44px);
    white-space: normal;
    word-break: keep-all;
  }
  #hero.has-video .hero-sub {
    font-size: 13px;
    white-space: normal;
    word-break: keep-all;
  }

  /* Scroll indicator 중앙 고정 */
  .hero-scroll-indicator {
    bottom: 28px;
    left: 50%;
    position: absolute;
    width: auto;
    animation: scrollIndicatorIn .8s ease forwards 1.6s;
  }

  /* Scroll 텍스트/라인 더 잘 보이게 */
  .hero-scroll-indicator span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    letter-spacing: 0.25em;
  }
  .scroll-line {
    height: 50px;
    background: linear-gradient(180deg, #D4AF37, rgba(212,175,55,0.2));
  }

  /* ── 모바일 Hero 배경 강화 (영상 없을 때) ── */

  /* 골드 그라디언트 훨씬 밝게 */
  .hero-cinematic {
    background:
      radial-gradient(ellipse 100% 70% at 15% 50%, rgba(212,175,55,.22) 0%, transparent 55%),
      radial-gradient(ellipse 80% 90% at 85% 20%, rgba(212,175,55,.14) 0%, transparent 55%),
      radial-gradient(ellipse 60% 50% at 50% 100%, rgba(212,175,55,.1) 0%, transparent 60%),
      linear-gradient(160deg, #120d00 0%, #000 45%, #080400 100%);
    animation: cinematicPulse 8s ease-in-out infinite alternate;
  }

  /* 그리드 선 더 잘 보이게 */
  .hero-grid {
    background-image:
      linear-gradient(rgba(212,175,55,.1) 1px, transparent 1px),
      linear-gradient(90deg, rgba(212,175,55,.1) 1px, transparent 1px);
    background-size: 60px 60px;
  }

  /* 원형 장식 더 잘 보이게 */
  .shape-1 {
    width: 320px; height: 320px;
    top: -60px; right: -60px;
    border-color: rgba(212,175,55,.2);
  }
  .shape-2 {
    width: 200px; height: 200px;
    border-color: rgba(212,175,55,.15);
  }
  .shape-3 { display: none; }


  /* ----------------------------------------
     ABOUT
  ---------------------------------------- */
  #about { padding: 80px 0; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-headline {
    font-size: clamp(26px, 6.5vw, 36px);
    word-break: keep-all;
  }

  /* About visual 축소 */
  .about-visual { height: 300px; }

  .av-ring-1 { width: 260px; height: 260px; }
  .av-ring-2 { width: 190px; height: 190px; }
  .av-ring-3 { width: 120px; height: 120px; }

  .av-stat-num { font-size: 20px; }
  .av-stat-label { font-size: 8px; }

  @keyframes avOrbit {
    0%   { top: calc(50% - 130px); left: 50%; transform: translate(-50%,-50%); opacity: .8; }
    25%  { top: 50%; left: calc(50% + 130px); transform: translate(-50%,-50%); opacity: .4; }
    50%  { top: calc(50% + 130px); left: 50%; transform: translate(-50%,-50%); opacity: .8; }
    75%  { top: 50%; left: calc(50% - 130px); transform: translate(-50%,-50%); opacity: .4; }
    100% { top: calc(50% - 130px); left: 50%; transform: translate(-50%,-50%); opacity: .8; }
  }

  /* Values */
  .values-wrap { margin-top: 80px; }

  .values-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1px;
  }

  .value-card { padding: 32px 20px; }

  .value-title { font-size: 17px; }
  .value-desc { font-size: 12px; margin-top: 20px; }

  /* Ticker */
  .award-ticker-wrap { margin-top: 80px; padding-top: 48px; }
  .award-ticker-label { font-size: 12px; margin-bottom: 24px; }
  .ticker-item { font-size: 12px; padding: 0 28px; }

  /* About 배경 텍스트 숨김 */
  #about::before { display: none; }


  /* ----------------------------------------
     FULLWIDE BLOCK
  ---------------------------------------- */
  .fullwide-block { height: 280px; }
  .fullwide-copy { font-size: clamp(22px, 5.5vw, 36px); word-break: keep-all; }
  .fullwide-sub { font-size: 11px; }


  /* ----------------------------------------
     COUNTER
  ---------------------------------------- */
  .counter-section { padding: 70px 0; }

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

  .counter-item {
    padding: 36px 20px;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,.1);
  }
  .counter-item:nth-child(odd)  { border-right: 1px solid rgba(0,0,0,.1); }
  .counter-item:nth-child(3),
  .counter-item:nth-child(4)    { border-bottom: none; }

  .counter-num { font-size: clamp(36px, 10vw, 56px); }
  .counter-suffix { font-size: clamp(20px, 5vw, 30px); }
  .counter-label { font-size: 10px; }
  .counter-desc { font-size: 11px; }

  .counter-bg-text { display: none; }


  /* ----------------------------------------
     SERVICE
  ---------------------------------------- */
  #service { padding: 100px 0; }
  #service::before { display: none; }

  .service-header { margin-bottom: 48px; }
  .service-headline { font-size: clamp(26px, 6.5vw, 40px); word-break: keep-all; }

  .svc-layout {
    grid-template-columns: 1fr;
  }

  .svc-left {
    padding: 40px 24px 32px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.05);
  }

  .svc-num { font-size: 56px; }
  .svc-title { font-size: 26px; }

  .svc-right { padding: 36px 24px 40px; }

  .svc-tl-item {
    grid-template-columns: 80px 1fr;
  }

  .svc-tl-name { font-size: 15px; }
  .svc-tl-desc { font-size: 12px; }

  .svc-num-ghost { display: none; }


  /* ----------------------------------------
     WORK
  ---------------------------------------- */
  #work { padding: 100px 0; }

  .work-tagline {
    font-size: clamp(20px, 5.5vw, 32px);
    margin-bottom: 48px;
    word-break: keep-all;
  }

  .work-tabs { gap: 6px; flex-wrap: wrap; }
  .work-tab { padding: 10px 20px; font-size: 12px; }

  /* 슬라이더 배경 회색 선 제거 */
  .broadcast-grid,
  .digital-grid {
    background: transparent;
  }

  /* 슬라이더 배경 회색 선 제거 */
  .broadcast-grid,
  .digital-grid { background: transparent; }

  /* ── 모바일 슬라이더 공통 래퍼 ── */
  .work-slider-wrap {
    overflow: hidden;
    margin: 0 -20px;
    padding: 0 20px;
    position: relative;
  }

  /* Broadcast 슬라이더 */
  .broadcast-grid {
    display: flex;
    flex-direction: row;
    gap: 12px;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    cursor: grab;
  }
  .broadcast-grid.dragging { cursor: grabbing; transition: none; }
  .broadcast-item {
    flex: 0 0 calc(85vw - 20px);
    width: calc(85vw - 20px);
    aspect-ratio: 16 / 9;
  }
  /* 채널명/타이틀 항상 보이게 */
  .broadcast-info {
    opacity: 1;
    transform: translateY(0);
  }
  .broadcast-play-btn { width: 44px; height: 44px; }
  .broadcast-bg-text  { font-size: 56px; }
  .broadcast-channel  { font-size: 9px; }
  .broadcast-name     { font-size: 12px; }

  /* Digital 슬라이더 */
  .digital-grid {
    display: flex;
    flex-direction: row;
    gap: 12px;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    cursor: grab;
  }
  .digital-grid.dragging { cursor: grabbing; transition: none; }
  .digital-item {
    flex: 0 0 calc(85vw - 20px);
    width: calc(85vw - 20px);
    aspect-ratio: 4 / 3;
  }
  /* 채널명/타이틀 항상 보이게 */
  .digital-info    { opacity: 1; transform: translateY(0); }
  .digital-overlay { background: rgba(0,0,0,.55); }
  .digital-channel { font-size: 9px; }
  .digital-name    { font-size: 12px; }

  /* 슬라이더 점 인디케이터 */
  .slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
  }
  .slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    transition: all .3s;
    cursor: pointer;
    border: none;
    padding: 0;
  }
  .slider-dot.active {
    background: #D4AF37;
    width: 20px;
    border-radius: 3px;
  }

  /* Clients */
  .clients-section { margin-top: 70px; padding-top: 48px; }
  .clients-label { font-size: clamp(22px, 5.5vw, 32px); }
  .clients-sublabel { font-size: 12px; margin-bottom: 36px; }

  .clients-marquee-wrap::before,
  .clients-marquee-wrap::after { width: 60px; }

  .client-item { padding: 14px 28px; font-size: 12px; }


  /* ----------------------------------------
     CONTACT
  ---------------------------------------- */
  #contact { padding-top: 100px; }

  .contact-top { margin-bottom: 60px; }

  .contact-headline {
    font-size: clamp(24px, 6.5vw, 40px);
    word-break: keep-all;
  }

  .contact-sub { font-size: 13px; word-break: keep-all; }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .submit-btn {
    width: 100%;
    justify-content: center;
    padding: 18px 32px;
  }

  /* Contact glow 위치 보정 */
  #contact::after {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
  }
  .contact-bottom-glow {
    width: 250px;
    height: 250px;
    bottom: -80px;
    right: -80px;
  }


  /* ----------------------------------------
     FOOTER
  ---------------------------------------- */
  footer { padding: 48px 0 32px; }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
  }

  .footer-logo { font-size: 14px; }

  .footer-info {
    font-size: 10px;
    gap: 2px 0;
    line-height: 2;
  }

  .footer-sep { margin: 0 6px; }

  .footer-copy { font-size: 10px; }

}


/* ----------------------------------------
   TABLET (769px ~ 1024px)
---------------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {

  .container { padding: 0 36px; }
  .nav-inner { padding: 0 36px; }

  section { padding: 140px 0; }

  /* About */
  .about-grid { gap: 48px; }
  .about-visual { height: 360px; }

  /* Values */
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .value-card { padding: 40px 24px; }

  /* Service */
  .svc-layout { grid-template-columns: 260px 1fr; }
  .svc-left { padding: 56px 40px; }
  .svc-right { padding: 56px 48px; }

  /* Counter */
  .counter-num { font-size: clamp(44px, 5vw, 64px); }

  /* Work grids */
  .broadcast-grid { grid-template-columns: repeat(3, 1fr); }
  .digital-grid { grid-template-columns: repeat(3, 1fr); }

  /* Contact */
  .contact-grid { gap: 60px; }

  /* Hero 비디오 텍스트 */
  #hero.has-video .hero-title {
    font-size: clamp(28px, 3.2vw, 52px);
    white-space: normal;
    word-break: keep-all;
  }
  #hero.has-video .hero-sub {
    white-space: normal;
    font-size: 14px;
  }
}

/* ----------------------------------------
   가로 넘침 유발 요소 강제 차단 (모바일)
---------------------------------------- */
@media (max-width: 768px) {

  /* 섹션 전체 overflow 차단 */
  section, nav, footer,
  .counter-section, .fullwide-block {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* 대형 배경 장식 텍스트 완전 숨김 */
  #about::before,
  #service::before,
  .counter-bg-text,
  .svc-num-ghost { display: none !important; }

  /* 가로 넘침 유발 요소 클리핑 */
  .hero-shapes,
  .about-visual,
  .fullwide-block,
  .award-ticker-wrap,
  .clients-marquee-wrap { overflow: hidden; max-width: 100%; }

}
