@font-face {
  font-family: "Freesentation";
  src: url("/assets/fonts/Freesentation-9Black.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "Paperlogy";
  src: url("/assets/fonts/Paperlogy-5Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "RIDIBatang";
  src: url("/assets/fonts/RIDIBatang.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #f7f8fa;
  --theme: #416de2;
  --glow: #7898ef;
  --line: rgba(255, 255, 255, 0.16);
  --font-headline: "Freesentation", "Pretendard Variable", Pretendard, "Noto Sans KR", Arial, sans-serif;
  --font-section: "Paperlogy", "Pretendard Variable", Pretendard, "Noto Sans KR", Arial, sans-serif;
  --font-body: "RIDIBatang", "Noto Serif KR", serif;
  color-scheme: dark;
  font-family: var(--font-section);
}

* { box-sizing: border-box; }

html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }

body {
  overflow-x: hidden;
  overflow-y: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--theme) 22%, transparent), transparent 34%),
    linear-gradient(145deg, #081322 0%, #03070e 72%);
  transition: background 600ms ease;
}

.portal { position: relative; width: 100%; height: 100svh; min-height: 580px; isolation: isolate; }

html { scroll-behavior: smooth; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 15px;
  border-radius: 999px;
  background: #fff;
  color: #06101b;
  font-weight: 900;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 38vw;
  height: 38vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.14;
  pointer-events: none;
  background: var(--glow);
  transition: background 400ms ease;
}

.ambient-one { top: -24vw; right: -12vw; }
.ambient-two { bottom: -27vw; left: -13vw; }

.stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.robot-bubble {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  padding: 8px 15px;
  border-radius: 15px;
  background: #fff;
  color: #0a1220;
  font-family: var(--font-section);
  font-size: clamp(13px, 1.15vw, 17px);
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -135%) scale(0);
  transform-origin: bottom center;
  opacity: 0;
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 200ms ease;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.robot-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
}

.robot-bubble.show {
  transform: translate(-50%, -135%) scale(1);
  opacity: 1;
}

#maker-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  outline: none;
}
#maker-canvas:active { cursor: crosshair; }

.fallback {
  display: none;
  position: absolute;
  width: 240px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--theme);
  color: white;
  font: 900 90px/1 Arial;
}

.stage.is-fallback .fallback { display: grid; }

.brand-lockup {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  margin: 0;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 24px);
  padding: clamp(14px, 1.6vw, 22px) clamp(20px, 2.4vw, 36px);
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 6px;
  background:
    linear-gradient(rgba(2, 5, 10, 0.9), rgba(2, 5, 10, 0.9)) padding-box,
    linear-gradient(115deg,
      color-mix(in srgb, var(--glow) 85%, white 10%),
      rgba(255, 255, 255, 0.14) 38%,
      rgba(255, 255, 255, 0.1) 62%,
      color-mix(in srgb, var(--theme) 90%, transparent)) border-box;
  box-shadow:
    0 0 18px color-mix(in srgb, var(--glow) 26%, transparent),
    0 0 70px color-mix(in srgb, var(--theme) 20%, transparent),
    inset 0 0 26px color-mix(in srgb, var(--theme) 12%, transparent),
    0 18px 50px rgba(0, 0, 0, 0.32);
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.46));
  transition: box-shadow 500ms ease;
}

.brand-lockup:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 4px;
}

/* 뒤에서 숨쉬는 네온 — 발광구와 같은 3.6초 주기 */
.brand-lockup::after {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(115deg, var(--glow), transparent 45%, transparent 55%, var(--theme));
  filter: blur(20px);
  opacity: 0.28;
  animation: lockup-neon 3.6s ease-in-out infinite;
}

@keyframes lockup-neon {
  0%, 100% { opacity: 0.16; }
  50% { opacity: 0.48; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-lockup::after { animation: none; opacity: 0.25; }
}

.brand-logo {
  flex: none;
  width: clamp(58px, 6vw, 96px);
  aspect-ratio: 1;
  padding: clamp(6px, 0.7vw, 10px);
  border-radius: clamp(14px, 1.5vw, 22px);
  background: rgba(255,255,255,0.96);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 10px 26px rgba(0,0,0,0.32);
}

.brand-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }

.brand-text { display: grid; gap: clamp(4px, 0.5vw, 8px); }

.brand-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(30px, 4.4vw, 72px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.05em;
}

.brand-title em {
  margin-left: 0.08em;
  color: var(--glow);
  font: 800 0.52em/1 Arial, sans-serif;
  font-style: normal;
  letter-spacing: -0.03em;
  transition: color 300ms ease;
}

.brand-tagline {
  margin: 0;
  color: rgba(247, 248, 250, 0.72);
  font-family: var(--font-section);
  font-size: clamp(11px, 1.15vw, 19px);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.corner-links { position: absolute; z-index: 5; inset: 0; pointer-events: none; }

.service-card {
  --x: 0px;
  --y: 0px;
  --connector-length: clamp(42px, 5vw, 94px);
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(320px, 29vw, 500px);
  min-height: 112px;
  padding: 15px 18px 15px 15px;
  display: grid;
  grid-template-columns: clamp(64px, 5.6vw, 92px) minmax(0, 1fr) 30px;
  align-items: center;
  gap: 16px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(7, 13, 23, 0.7);
  box-shadow: 0 18px 50px rgba(0,0,0,0.3), inset 0 1px rgba(255,255,255,0.05);
  backdrop-filter: blur(18px);
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  pointer-events: auto;
  isolation: isolate;
  transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y)));
  transition: transform 360ms cubic-bezier(.2,.8,.2,1), border-color 260ms ease, background 260ms ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(120deg, color-mix(in srgb, var(--theme) 42%, transparent), transparent 72%);
  transition: opacity 260ms ease;
}

.service-card:hover,
.service-card:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--glow) 70%, white 10%);
  background: rgba(7, 13, 23, 0.88);
  transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) - 4px)) scale(1.025);
}

.service-card.is-selected {
  border-color: var(--glow);
  background: rgba(9, 18, 32, 0.92);
  box-shadow: 0 18px 50px rgba(0,0,0,0.3), 0 0 24px color-mix(in srgb, var(--glow) 22%, transparent);
}

.service-card:hover::before,
.service-card:focus-visible::before { opacity: 1; }

.top-left { --x: clamp(-500px, -27vw, -335px); --y: clamp(-235px, -21vh, -150px); }
.top-right { --x: clamp(335px, 27vw, 500px); --y: clamp(-235px, -21vh, -150px); }
.bottom-left { --x: clamp(-500px, -27vw, -335px); --y: clamp(150px, 21vh, 235px); }
.bottom-right { --x: clamp(335px, 27vw, 500px); --y: clamp(150px, 21vh, 235px); }

.connector {
  position: absolute;
  z-index: -2;
  width: var(--connector-length);
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0.18), rgba(255,255,255,0.42));
  transition: background 260ms ease, box-shadow 260ms ease;
}

.connector::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%) rotate(45deg);
  border: 1px solid rgba(255,255,255,0.5);
  background: #0a1422;
}

.top-left .connector { right: calc(-1 * var(--connector-length)); top: 64%; transform: rotate(17deg); transform-origin: left; }
.top-right .connector { left: calc(-1 * var(--connector-length)); top: 64%; transform: rotate(-17deg); transform-origin: right; }
.bottom-left .connector { right: calc(-1 * var(--connector-length)); top: 36%; transform: rotate(-17deg); transform-origin: left; }
.bottom-right .connector { left: calc(-1 * var(--connector-length)); top: 36%; transform: rotate(17deg); transform-origin: right; }
.top-left .connector::after,
.bottom-left .connector::after { right: -3px; }
.top-right .connector::after,
.bottom-right .connector::after { left: -3px; }

.service-card:hover .connector,
.service-card:focus-visible .connector { background: var(--glow); box-shadow: 0 0 10px color-mix(in srgb, var(--glow) 70%, transparent); }

.service-card .logo {
  width: clamp(64px, 5.6vw, 92px);
  height: clamp(64px, 5.6vw, 92px);
  padding: 5px;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.07);
}

.service-card .logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.service-card .logo.wrench { padding: 0; background: #151a22; }
.service-card .logo.wrench img { object-fit: cover; }

.card-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.service-card[data-href] { cursor: pointer; }

.sub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.sub-links a {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(247, 248, 250, 0.85);
  font-size: clamp(11px, 0.85vw, 14px);
  font-weight: 500;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.sub-links a:hover,
.sub-links a:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--glow) 70%, white 10%);
  background: #fff;
  color: #06101b;
}

.service-card strong {
  overflow: hidden;
  font-size: clamp(19px, 1.75vw, 28px);
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-card small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: rgba(247, 248, 250, 0.72);
  font-size: clamp(14px, 1.2vw, 19px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.42;
  word-break: keep-all;
}

.service-card > i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: rgba(255,255,255,0.68);
  font: normal 15px/1 Arial;
  transition: 240ms ease;
}

.service-card:hover > i,
.service-card:focus-visible > i { color: #06101b; background: white; transform: rotate(45deg); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.service-guide[hidden] { display: none; }

.service-guide {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: clamp(22px, 3.5vh, 46px);
  width: min(650px, calc(100% - 28px));
  padding: 18px 64px 18px 22px;
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--glow) 55%, rgba(255, 255, 255, 0.18));
  border-radius: 20px;
  background: rgba(5, 11, 20, 0.94);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.52), 0 0 32px color-mix(in srgb, var(--theme) 20%, transparent);
  backdrop-filter: blur(22px);
}

.guide-eyebrow {
  margin: 0 0 5px;
  color: var(--glow);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.guide-title {
  margin: 0;
  font: 900 clamp(20px, 2vw, 28px)/1.1 var(--font-headline);
  letter-spacing: -0.02em;
}

.guide-copy {
  margin: 8px 0 14px;
  color: rgba(247, 248, 250, 0.78);
  font-size: clamp(13px, 1.1vw, 16px);
  line-height: 1.55;
  word-break: keep-all;
}

.guide-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--glow);
  color: #06101b;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.guide-link:hover,
.guide-link:focus-visible { background: #fff; outline: none; }

.guide-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  cursor: pointer;
  font: 400 23px/1 Arial, sans-serif;
}

.guide-close:hover,
.guide-close:focus-visible { background: white; color: #06101b; outline: none; }

/* 세로/좁은 화면: 코너 배치 대신 위·아래 2×2 고정 배치 */
@media (max-width: 900px) {
  .portal { min-height: 560px; }
  .connector { display: none; }
  .service-card {
    --x: 0px;
    --y: 0px;
    width: calc(50% - 18px);
    min-height: 0;
    padding: 10px 12px;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    border-radius: 16px;
    transform: none;
  }
  .service-card:hover,
  .service-card:focus-visible { transform: translateY(-3px) scale(1.015); }
  .service-card .logo { width: 58px; height: 58px; border-radius: 14px; padding: 4px; }
  .service-card > i { display: none; }
  .service-card strong { font-size: 19px; }
  .service-card small { font-size: 14px; }
  .top-left { top: 14px; left: 12px; right: auto; bottom: auto; }
  .top-right { top: 14px; right: 12px; left: auto; bottom: auto; }
  .bottom-left { bottom: 14px; left: 12px; right: auto; top: auto; }
  .bottom-right { bottom: 14px; right: 12px; left: auto; top: auto; }
  .brand-lockup {
    width: min(92vw, 560px);
    justify-content: center;
    padding: 12px 16px;
    gap: 12px;
    white-space: normal;
  }
  .brand-logo { width: 54px; border-radius: 13px; padding: 5px; }
  .brand-title { font-size: clamp(26px, 7.2vw, 44px); white-space: nowrap; }
  .brand-tagline { font-size: clamp(11px, 2.6vw, 14px); }
}

/* 9:16처럼 폭은 세로 화면: 중앙에 몰리던 카드를 상·하단으로 분산 */
@media (min-width: 901px) and (max-aspect-ratio: 3 / 4) {
  .portal { min-height: 800px; }
  .connector { display: none; }

  .service-card {
    --x: 0px;
    --y: 0px;
    width: min(42vw, 470px);
    min-height: clamp(108px, 7.2svh, 138px);
    padding: clamp(13px, 1.35vw, 18px);
    grid-template-columns: clamp(68px, 7vw, 86px) minmax(0, 1fr) 30px;
    gap: clamp(12px, 1.4vw, 18px);
    transform: none;
  }

  .service-card:hover,
  .service-card:focus-visible {
    transform: translateY(-4px) scale(1.015);
  }

  .service-card .logo {
    width: clamp(68px, 7vw, 86px);
    height: clamp(68px, 7vw, 86px);
  }

  .service-card strong { font-size: clamp(20px, 2.1vw, 25px); }
  .service-card small { font-size: clamp(13px, 1.45vw, 17px); }

  .top-left,
  .top-right { top: 22svh; bottom: auto; }

  .bottom-left,
  .bottom-right { top: auto; bottom: 22svh; }

  .top-left,
  .bottom-left { left: clamp(24px, 4vw, 54px); right: auto; }

  .top-right,
  .bottom-right { right: clamp(24px, 4vw, 54px); left: auto; }

  .brand-lockup {
    width: min(70vw, 720px);
    justify-content: center;
    white-space: normal;
  }

  .brand-title { white-space: nowrap; }
}

/* 모바일: 위 2행 + 아래 2행, 전체 폭 스택 배치 */
@media (max-width: 520px) {
  .corner-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }
  .service-card {
    position: static;
    width: 100%;
    min-height: 0;
    padding: 9px 12px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    transform: none;
  }
  .service-card:hover,
  .service-card:focus-visible { transform: translateY(-2px); }
  .bottom-left { margin-top: auto; }
  .service-card .logo { width: 46px; height: 46px; border-radius: 11px; }
  .service-card strong { font-size: 16px; }
  .service-card small { font-size: 12px; -webkit-line-clamp: 3; }
  .brand-tagline { display: none; }
  .brand-logo { width: 44px; }
}

/* 세로형 모바일: 브랜드는 상단, 모든 서비스 카드는 하단에 모은다. */
@media (max-width: 520px) and (orientation: portrait) {
  .brand-lockup {
    top: max(24px, env(safe-area-inset-top));
    left: 50%;
    width: calc(100% - 20px);
    padding: 10px 14px;
    transform: translateX(-50%);
  }

  .corner-links {
    justify-content: flex-end;
    padding: 96px 10px max(10px, env(safe-area-inset-bottom));
  }

  .bottom-left { margin-top: 0; }

  .service-guide {
    top: max(104px, calc(env(safe-area-inset-top) + 88px));
    bottom: calc(342px + env(safe-area-inset-bottom));
    width: calc(100% - 20px);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 22px;
    background: rgba(5, 11, 20, 0.86);
  }

  .guide-eyebrow { margin-bottom: 7px; font-size: 11px; }
  .guide-title { padding-right: 30px; font-size: clamp(24px, 7vw, 30px); }
  .guide-copy { margin: 14px 0 20px; font-size: clamp(15px, 4.1vw, 17px); line-height: 1.62; }
  .guide-link { align-self: flex-start; padding: 11px 20px; font-size: 15px; }
  .guide-close { top: 14px; right: 14px; width: 36px; height: 36px; }
}

@media (max-width: 520px) and (orientation: portrait) and (max-height: 700px) {
  .service-guide { top: 94px; padding: 18px 20px; }
  .guide-title { font-size: 22px; }
  .guide-copy { margin: 9px 0 12px; font-size: 13px; line-height: 1.45; }
  .guide-link { padding: 8px 15px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── 채널별 콘텐츠 ─────────────────────────────────────────── */
.channel-jump {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "label arrow" "title arrow";
  column-gap: 16px;
  align-items: center;
  padding: 10px 14px 10px 17px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(3, 8, 17, 0.78);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.channel-jump span {
  grid-area: label;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  line-height: 1;
}

.channel-jump strong { grid-area: title; font-size: 14px; line-height: 1.25; }
.channel-jump i { grid-area: arrow; font: 400 20px/1 Arial, sans-serif; }
.channel-jump:hover,
.channel-jump:focus-visible {
  border-color: rgba(129, 164, 255, 0.72);
  background: rgba(10, 25, 55, 0.92);
  outline: none;
  transform: translateX(-50%) translateY(-3px);
}

.channels-section {
  position: relative;
  z-index: 10;
  min-height: 100svh;
  padding: clamp(78px, 9vw, 132px) clamp(18px, 5vw, 86px) 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(62, 101, 220, 0.18), transparent 35%),
    radial-gradient(circle at 84% 45%, rgba(106, 66, 197, 0.13), transparent 32%),
    linear-gradient(180deg, #050b15 0%, #02050b 100%);
  scroll-margin-top: 0;
}

.channels-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.channels-heading {
  width: min(1180px, 100%);
  margin: 0 auto clamp(34px, 5vw, 66px);
}

.section-kicker {
  margin: 0 0 13px;
  color: #85a5ff;
  font: 900 13px/1 var(--font-headline);
  letter-spacing: 0.18em;
}

.channels-heading h2 {
  max-width: 850px;
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(34px, 5vw, 70px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.channels-heading > p:last-child {
  margin: 18px 0 0;
  color: rgba(247, 248, 250, 0.62);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.65;
}

.channel-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(15px, 1.7vw, 25px);
}

.channel-card {
  --channel-accent: #7395ff;
  position: relative;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(18, 29, 50, 0.96), rgba(5, 10, 19, 0.98));
  color: #f7f8fa;
  text-decoration: none;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.channel-youtube { --channel-accent: #ff4c58; }
.channel-blog { --channel-accent: #43d18c; }
.channel-instagram { --channel-accent: #d878ff; }

.channel-card:hover,
.channel-card:focus-visible {
  border-color: color-mix(in srgb, var(--channel-accent) 72%, white 8%);
  outline: none;
  transform: translateY(-8px);
  box-shadow: 0 30px 78px color-mix(in srgb, var(--channel-accent) 16%, transparent);
}

.channel-visual {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #040a16;
}

.channel-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(5, 10, 19, 0.94), transparent);
  pointer-events: none;
}

.channel-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 480ms cubic-bezier(.2,.7,.2,1), filter 240ms ease;
}

.channel-card:hover .channel-visual img,
.channel-card:focus-visible .channel-visual img {
  transform: scale(1.045);
  filter: contrast(1.05) brightness(1.05);
}

.channel-number {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  background: rgba(2, 6, 13, 0.65);
  color: rgba(255,255,255,0.8);
  font: 500 12px/1 Arial, sans-serif;
  backdrop-filter: blur(8px);
}

.channel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(21px, 2.2vw, 30px);
}

.channel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  color: var(--channel-accent);
  font: 900 14px/1 var(--font-headline);
  letter-spacing: 0.06em;
}

.channel-kicker i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.channel-content > strong {
  display: block;
  font-family: var(--font-headline);
  font-size: clamp(24px, 2vw, 31px);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.channel-content > small {
  display: block;
  margin: 13px 0 25px;
  color: rgba(247, 248, 250, 0.62);
  font-family: var(--font-section);
  font-size: 16px;
  line-height: 1.62;
}

.channel-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 3px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.channel-cta b {
  color: var(--channel-accent);
  font-size: 18px;
  transition: transform 180ms ease;
}

.channel-card:hover .channel-cta b,
.channel-card:focus-visible .channel-cta b { transform: translate(3px, -3px); }

.site-footer {
  width: min(1180px, 100%);
  margin: clamp(62px, 8vw, 110px) auto 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.11);
}

.site-footer img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: #fff; }
.site-footer p { margin: 0; display: grid; gap: 3px; }
.site-footer p strong { font-family: var(--font-headline); font-size: 18px; }
.site-footer p span { color: rgba(255,255,255,0.48); font-size: 13px; }
.site-footer > a { color: rgba(255,255,255,0.65); font-size: 14px; font-weight: 900; text-decoration: none; }
.site-footer > a:hover,
.site-footer > a:focus-visible { color: #fff; outline: none; }

@media (max-width: 980px) {
  .channel-jump { display: none; }
  .channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel-card:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr); }
  .channel-card:last-child .channel-visual { aspect-ratio: auto; min-height: 300px; }
}

@media (max-width: 640px) {
  .channels-section { padding: 70px 14px 24px; }
  .channels-heading { margin-bottom: 30px; padding: 0 5px; }
  .channels-heading h2 { font-size: clamp(32px, 10vw, 46px); }
  .channels-heading > p:last-child { margin-top: 14px; font-size: 16px; }
  .channel-grid { grid-template-columns: 1fr; gap: 14px; }
  .channel-card:last-child { grid-column: auto; display: flex; }
  .channel-card:last-child .channel-visual { aspect-ratio: 16 / 9; min-height: 0; }
  .channel-card { border-radius: 20px; }
  .channel-content { padding: 21px; }
  .channel-content > strong { font-size: 26px; }
  .channel-content > small { margin-bottom: 20px; font-size: 15px; }
  .site-footer { grid-template-columns: 40px minmax(0, 1fr); }
  .site-footer img { width: 40px; height: 40px; }
  .site-footer > a { grid-column: 1 / -1; margin-top: 10px; padding: 12px 0; text-align: center; border-radius: 999px; background: rgba(255,255,255,0.06); }
}

/* 현재 허브 화면 위에 표시하는 고나 채널 선택지 */
.gona-family {
  position: absolute;
  left: 6.5%;
  bottom: 6%;
  width: min(40vw, 600px);
  padding: 17px;
  border: 1px solid rgba(132,210,179,.28);
  border-radius: 22px;
  background: rgba(5,12,22,.94);
  pointer-events: auto;
}
.gona-parent { display: flex; align-items: center; gap: 12px; }
.gona-parent::after,
.gona-branches::before,
.gona-channel::before { display: none; }
@media (min-width: 901px) and (min-aspect-ratio: 3 / 4) {
  .gona-family {
    left: calc(50% + var(--x) - clamp(320px, 29vw, 500px) / 2);
    top: calc(50% + var(--y));
    bottom: auto;
    transform: translateY(-50%);
  }
}
.gona-parent > img { width: 50px; height: 50px; border-radius: 12px; background: white; object-fit: contain; }
.gona-parent h2 { margin: 0; font: 900 clamp(20px,1.8vw,28px)/1.1 var(--font-headline); }
.gona-parent p { margin: 5px 0 0; color: rgba(255,255,255,.6); font-size: 14px; }
.gona-branches { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding-top: 26px; }
.gona-branches::before { content: ""; position: absolute; top: 14px; left: 16.66%; right: 16.66%; height: 1px; background: rgba(132,210,179,.45); }
.gona-parent::after { content: ""; position: absolute; left: 50%; width: 1px; height: 14px; top: 67px; background: rgba(132,210,179,.45); }
.gona-channel { --accent: #ff4c58; position: relative; min-width: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: #040a16; color: white; text-decoration: none; transition: transform .2s, border-color .2s; }
.gona-channel::before { content: ""; position: absolute; left: 50%; top: -13px; height: 12px; width: 1px; background: var(--accent); }
.gona-instagram { --accent: #d878ff; }
.gona-blog { --accent: #43d18c; }
.gona-channel > img { display: block; width: 100%; height: clamp(65px,6.5vw,98px); object-fit: contain; border-radius: 12px 12px 0 0; }
.gona-channel > span { display: grid; gap: 4px; padding: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.gona-channel small { color: rgba(255,255,255,.5); font-size: 12px; }
.gona-channel strong { color: var(--accent); font: 900 clamp(17px,1.6vw,24px)/1.1 var(--font-headline); white-space: nowrap; }
.gona-channel i { font: normal 14px Arial,sans-serif; }
.gona-channel:hover,.gona-channel:focus-visible { border-color: var(--accent); outline: none; transform: translateY(-4px); }
@media (max-width: 900px) {
  .gona-family { left: 12px; bottom: 14px; width: calc(56% - 20px); padding: 12px; }
  .gona-family + .bottom-right { width: calc(42% - 18px); }
  .gona-parent::after { top: 62px; }
  .gona-parent h2 { font-size: 21px; }
  .gona-channel > span { padding: 8px 5px; }
  .gona-channel small { display: none; }
  .gona-channel strong { font-size: 17px; }
}
@media (max-width: 520px) {
  body { overflow-y: auto; }
  .portal { min-height: 760px; }
  .corner-links { display: flex; justify-content: flex-end; }
  .gona-family { position: relative; left: auto; bottom: auto; width: 100%; order: 4; margin-top: 0; padding: 12px; flex-shrink: 0; }
  .gona-family + .bottom-right { width: 100%; }
  .gona-parent > img { width: 40px; height: 40px; }
  .gona-parent h2 { font-size: 22px; }
  .gona-parent p { font-size: 14px; }
  .gona-parent::after { top: 52px; }
  .gona-channel > img { height: 65px; }
  .gona-channel strong { font-size: clamp(14px,4.1vw,19px); }
  .gona-branches { gap: 7px; padding-top: 24px; }
}
.sub-links > span { color: rgba(255,255,255,.72); font-size: 12px; }
/* 데스크톱: 고나 부모 노드와 세 채널을 분산한 그래프형 클러스터 */
@media (min-width: 901px) {
  .gona-family {
    width: min(40vw, 600px);
    height: 330px;
    padding: 0;
    border: 0;
    background: none;
  }
  .gona-parent {
    position: absolute;
    top: 8px;
    left: 50%;
    width: max-content;
    max-width: 100%;
    transform: translateX(-50%);
    padding: 14px 18px;
    border: 1px solid rgba(132,210,179,.35);
    border-radius: 20px;
    background: rgba(5,12,22,.94);
    box-shadow: 0 14px 40px rgba(0,0,0,.28);
  }
  .gona-parent h2 { font-size: clamp(20px,1.6vw,26px); }
  .gona-branches { display: contents; padding: 0; }
  .gona-channel {
    position: absolute;
    width: clamp(130px,10vw,160px);
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0,0,0,.3);
    background: rgba(4,10,22,.94);
  }
  .gona-youtube { left: 0; top: 112px; }
  .gona-instagram { right: 0; top: 100px; }
  .gona-blog { left: 50%; top: 182px; transform: translateX(-50%); }
  .gona-channel > img { height: 82px; border-radius: 17px 17px 0 0; }
  .gona-channel strong { font-size: clamp(18px,1.4vw,22px); }
  .gona-blog:hover,.gona-blog:focus-visible { transform: translateX(-50%) translateY(-4px); }
}
@media (max-width: 900px) {
  .gona-branches { padding-top: 14px; }
}
.channel-dialog {
  width: min(1060px, calc(100% - 40px));
  max-height: calc(100svh - 40px);
  padding: 38px;
  overflow: auto;
  border: 1px solid rgba(130,159,255,.4);
  border-radius: 26px;
  color: #f7f8fa;
  background: linear-gradient(145deg, #101c32, #040a15);
  box-shadow: 0 30px 120px rgba(0,0,0,.65);
}
.channel-dialog::backdrop { background: rgba(1,4,10,.72); backdrop-filter: blur(8px); }
.channel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: white;
  font: 26px/1 Arial, sans-serif;
  cursor: pointer;
}
.channel-close:focus-visible { outline: 2px solid #9eb6ff; outline-offset: 3px; }
.channel-dialog .channels-heading { margin-bottom: 28px; padding-right: 32px; }
.channel-dialog .channels-heading h2 { font-size: clamp(28px, 3vw, 40px); }
.channel-dialog .channel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.channel-dialog .channel-card:last-child { grid-column: auto; display: flex; }
.channel-dialog .channel-card:last-child .channel-visual { aspect-ratio: 16 / 9; min-height: 0; }
.channel-dialog .channel-content { padding: 20px; }
.channel-dialog .channel-content > strong { font-size: 23px; }
.channel-dialog .channel-content > small { font-size: 14px; margin-bottom: 20px; }
.channel-dialog .channel-number { display: none; }
@media (max-width: 700px) {
  .channel-dialog { width: calc(100% - 24px); max-height: calc(100svh - 24px); padding: 26px 16px 16px; border-radius: 22px; }
  .channel-dialog .channels-heading { margin-bottom: 20px; padding-left: 4px; }
  .channel-dialog .section-kicker { font-size: 12px; }
  .channel-dialog .channel-grid { grid-template-columns: 1fr; gap: 10px; }
  .channel-dialog .channel-card,
  .channel-dialog .channel-card:last-child { display: grid; grid-template-columns: 36% minmax(0, 1fr); border-radius: 16px; }
  .channel-dialog .channel-visual,
  .channel-dialog .channel-card:last-child .channel-visual { aspect-ratio: auto; min-height: 126px; height: 100%; }
  .channel-dialog .channel-visual img { object-fit: contain; }
  .channel-dialog .channel-visual::after { display: none; }
  .channel-dialog .channel-content { padding: 16px 12px; }
  .channel-dialog .channel-kicker { margin-bottom: 9px; font-size: 14px; }
  .channel-dialog .channel-content > strong { font-size: 19px; }
  .channel-dialog .channel-content > small { display: none; }
  .channel-dialog .channel-cta { margin-top: 12px; font-size: 14px; }
}
