/* =========================================================
   Regentec site.css (LOCK-SAFE)
   - base.html(HTML) 수정 금지
   - 단일 파일: app/static/css/site.css 만 수정
   - 헤더/본문 영향 최소화(푸터는 footer 스코프로만)
   ========================================================= */

/* -----------------------
   0) Base / Tokens
------------------------ */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scrollbar-gutter: stable; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Noto Sans KR","Apple SD Gothic Neo", Arial, sans-serif;
  line-height: 1.55;
  background: var(--bg);
  color: var(--fg);
  position: relative;
}
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }
img{ max-width: 100%; height: auto; }

:root{
  --bg: #070B14;
  --bg-2: #0B1220;
  --panel: rgba(255,255,255,.06);
  --panel-2: rgba(255,255,255,.10);
  --line: rgba(255,255,255,.12);

  --fg: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --muted-2: rgba(255,255,255,.52);

  --brand: #7C5CFF;

  --shadow-sm: 0 10px 30px rgba(0,0,0,.30);

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;

  --container: 1120px;

  /* z-index lock */
  --rt-z-header: 1000;
  --rt-z-footer: 10;
}

/* 배경 은은한 그라데이션(푸터/헤더와 충돌 방지) */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(124,92,255,.25), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(124,92,255,.14), transparent 60%),
    radial-gradient(900px 500px at 60% 110%, rgba(124,92,255,.10), transparent 60%);
  opacity: .95;
  z-index: -1;
}

.rg-container{
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

/* -----------------------
   1) Header (현재 DOM 기준)
------------------------ */
.rg-topbar{
  position: sticky;
  top: 0;
  z-index: var(--rt-z-header);
  isolation: isolate;
  width: 100%;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 20, .92) 0%,
    rgba(7, 11, 20, .84) 55%,
    rgba(7, 11, 20, .78) 100%
  );
  border-bottom: 1px solid rgba(255,255,255,.10);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.rg-topbar__row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.rg-topbar__row--1{ padding: 12px 0 10px; }
.rg-topbar__row--2{ padding: 10px 0 12px; }

.rg-brand{
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rg-brand__name{
  font-weight: 900;
  letter-spacing: .02em;
  font-size: 18px;
  line-height: 1.1;
  color: var(--fg);
}
.rg-brand__tag{
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
}

/* 우측 메뉴: 글씨 조금 작게 + 약하게 */
.rg-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  opacity: .80;
}
.rg-actions .rg-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
  padding: 7px 10px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.72);
  cursor: pointer;
}
.rg-actions .rg-pill:hover{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.14);
  color: rgba(255,255,255,.84);
}
.rg-actions .rg-pill--primary{
  background: rgba(124,92,255,.06);
  border-color: rgba(124,92,255,.18);
  color: rgba(255,255,255,.78);
}

/* 좌측 메뉴: 글씨 크게 + 강조 */
.rg-nav{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.rg-nav > a{
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .01em;
  padding: 8px 10px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255,255,255,.92);
}
.rg-nav > a:hover{
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.10);
}
.rg-nav > a.is-active{
  background: rgba(124,92,255,.14);
  border-color: rgba(124,92,255,.32);
}

/* 검색 입력: 가로 폭 축소(데스크탑) */
.rg-search{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 280px;
}
.rg-search input[type="search"]{
  width: min(260px, 26vw);
  min-width: 180px;
  max-width: 280px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--fg);
  outline: none;
}
.rg-search input[type="search"]::placeholder{ color: var(--muted-2); }
.rg-search input[type="search"]:focus{
  border-color: rgba(124,92,255,.35);
  box-shadow: 0 0 0 3px rgba(124,92,255,.10);
}
.rg-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.82);
  font-weight: 750;
  cursor: pointer;
}
.rg-btn:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.14);
}
.rg-btn--ghost{ background: transparent; }

/* -----------------------
   2) Footer (SEAMLESS / CLEAN)
   ✅푸터 내부에서만 적용 (다른 섹션 영향 0)
------------------------ */
footer, .rg-footer{
  position: relative;
  z-index: var(--rt-z-footer);
  border-top: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(8,12,20,.86), rgba(8,12,20,.92));
}

/* 푸터 타이포를 “세림하게” */
footer{
  color: rgba(255,255,255,.70);
  font-size: 12.5px;       /* ✅ 살짝 작게 */
  line-height: 1.65;       /* ✅ 촘촘 */
  letter-spacing: 0;
}

/* footer 안의 기본 마진 제거(지저분함 원인 제거) */
footer :where(p, ul, ol, li){
  margin: 0;
  padding: 0;
}
footer :where(ul, ol){
  list-style: none;
}

/* 링크 톤을 정리(너무 튀지 않게) */
footer :where(a){
  color: rgba(255,255,255,.74);
}
footer :where(a:hover){
  color: rgba(255,255,255,.92);
}

/* 컨테이너: 너무 퍼지지 않게 + 컬럼 균형 */
footer .rg-container,
.rg-footer .rg-container{
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 22px;     /* ✅ 높이 줄여 세련되게 */
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr)); /* ✅ 3컬럼 정리 */
  gap: 14px 24px;           /* ✅ 간격 통일 */
  align-items: start;
}

/* 컨테이너에 블록이 1개면 깨짐 방지 */
footer .rg-container > :only-child{
  grid-column: 1 / -1;
}

/* 푸터 내부 텍스트 줄바꿈이 어색하지 않게 */
footer .rg-container > *{
  min-width: 0;
}
footer .rg-container :where(p){
  color: rgba(255,255,255,.70);
}
footer .rg-container :where(li){
  margin: 4px 0;            /* ✅ 리스트 간격 촘촘 */
}

/* 회사명/브랜드처럼 보이는 굵은 텍스트가 있으면 딱 정돈 */
footer .rg-container :where(strong){
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
  color: rgba(255,255,255,.90);
  letter-spacing: .01em;
}

/* 구분선이 있으면 정돈 */
footer :where(hr){
  border: 0;
  border-top: 1px solid rgba(255,255,255,.10);
  margin: 12px 0 0;
}

/* “하단 링크줄” 같은 텍스트들이 있으면 자동 정돈 */
footer .rg-container :where(.footer-bottom, .rg-footer__bottom, .bottom-links){
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,.10);
}

/* 푸터에서 문장/정보가 너무 넓게 퍼지지 않게 */
footer .rg-container :where(p){
  max-width: 46ch;
}

/* 반응형 */
@media (max-width: 980px){
  footer .rg-container{
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}
@media (max-width: 640px){
  footer .rg-container{
    grid-template-columns: 1fr;
  }
  footer .rg-container :where(p){
    max-width: none;
  }
}

/* -----------------------
   3) Responsive (header safe)
------------------------ */
@media (max-width: 820px){
  .rg-topbar__row{
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .rg-actions,
  .rg-nav,
  .rg-search{
    flex-wrap: wrap;
    white-space: normal;
  }
  .rg-search{
    min-width: 0;
    width: 100%;
  }
  .rg-search input[type="search"]{
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* === RG Footer v2 (minimal impact) === */
.rg-footer{
  margin-top: 56px;
  padding: 28px 0 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.rg-footer__inner{
  padding-bottom: 18px;
}
.rg-footer__company{
  max-width: 980px;
}
.rg-footer__brand{
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 10px;
  opacity: .92;
}
.rg-footer__companyinfo{
  font-size: 13px;
  line-height: 1.65;
  opacity: .78;
}
.rg-footer__companyinfo p{
  margin: 6px 0;
}
.rg-footer__copyright{
  margin-top: 12px;
  font-size: 12px;
  opacity: .55;
}

.rg-footer__bottom{
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 14px 0;
}
.rg-footer__bottom-inner{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.rg-footer__links{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  opacity: .7;
}
.rg-footer__links a{
  color: inherit;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}
.rg-footer__links a:hover{
  background: rgba(255,255,255,.08);
  opacity: .95;
}
/* === /RG Footer v2 === */

