/**
 * FLOAT Dark Mode
 * [data-theme="dark"] 셀렉터로 라이트 페이지/밝은 구간 오버라이드
 * 팔레트: #111(베이스), #1a1a1a(서피스), #1e1e1e(카드), #252525(호버), #2a2a2a(강조)
 */

/* ═══════════════════════════════════════
   1. GLOBAL / BODY
   ═══════════════════════════════════════ */

/* ═══════════════════════════════════════
   1-1. INDEX HERO — dark mode: red → black
   ═══════════════════════════════════════ */
[data-theme="dark"] .hero {
  background: #111;
}

/* ═══════════════════════════════════════
   2. MOBILE MENU (nav-menu) — 항상 흰색 → 다크
   ═══════════════════════════════════════ */
[data-theme="dark"] .nav-menu {
  background: #151515;
}
[data-theme="dark"] .nav-menu__header {
  background: rgba(21,21,21,0.95);
  backdrop-filter: blur(30px);
}
[data-theme="dark"] .nav-menu__close img {
  filter: invert(1);
}
[data-theme="dark"] .nav-menu__company-title,
[data-theme="dark"] .nav-menu__brand-title,
[data-theme="dark"] .nav-menu__news-title,
[data-theme="dark"] .nav-menu__contact-title {
  color: rgba(255,255,255,.85);
}
[data-theme="dark"] .nav-menu.active .nav-menu__brand-title {
  color: rgba(255,255,255,.85);
}
[data-theme="dark"] .nav-menu__submenu .nav-menu__item {
  color: rgba(255,255,255,.6);
}
[data-theme="dark"] .nav-menu__submenu .nav-menu__item:hover {
  color: #e63a46;
}
[data-theme="dark"] .nav-menu__content .--active {
  color: #e63a46;
}
[data-theme="dark"] .nav-menu__ip-title,
[data-theme="dark"] .nav-menu__lab-title {
  color: rgba(255,255,255,.85) !important;
}
[data-theme="dark"] .nav-menu__lang {
  border-top-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .nav-menu__lang-btn {
  color: rgba(255,255,255,.5);
  border-color: rgba(255,255,255,.12);
}
[data-theme="dark"] .nav-menu__lang-btn:hover {
  color: #e63a46;
  border-color: #e63a46;
}
[data-theme="dark"] .nav-menu__lang-btn.--active {
  color: #e63a46;
  border-color: #e63a46;
  background: rgba(230,58,70,.08);
}
[data-theme="dark"] .nav-menu__theme {
  border-top-color: rgba(255,255,255,.08);
}
/* Mobile header bg override */
@media (max-width: 768px) {
  [data-theme="dark"] .nav-menu__header {
    background: #151515;
  }
}

/* ═══════════════════════════════════════
   3. THEME TOGGLE BUTTON
   ═══════════════════════════════════════ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  color: #777;
  transition: all .2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: #e63a46;
  border-color: #e63a46;
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle__moon {
  display: none;
}
[data-theme="dark"] .theme-toggle {
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.5);
}
[data-theme="dark"] .theme-toggle:hover {
  color: #f59e0b;
  border-color: #f59e0b;
}

/* ═══════════════════════════════════════
   4. ABOUT PAGE
   ═══════════════════════════════════════ */
[data-theme="dark"] .about-page .header {
  background: rgba(17,17,17,0.85);
  backdrop-filter: blur(30px);
}
[data-theme="dark"] .about-page .nav .nav__item {
  color: rgba(255,255,255,.2);
}
[data-theme="dark"] .about-page .nav .nav__item.--active {
  color: #fff;
}
[data-theme="dark"] .about-page .menu-btn {
  color: #fff;
}
[data-theme="dark"] .about-page .logo-small {
  --fill-0: #fff;
}
[data-theme="dark"] .about-page .lang__current {
  color: rgba(255,255,255,.5);
}
/* About side nav */
[data-theme="dark"] .about-side .item {
  color: rgba(255,255,255,.2);
}
[data-theme="dark"] .about-side .item:hover {
  color: rgba(255,255,255,.5);
}
[data-theme="dark"] .about-side.--on-light .item {
  color: rgba(255,255,255,.2);
}
[data-theme="dark"] .about-side.--on-light .item.--active {
  color: #e63a46;
}
/* About content sections */
[data-theme="dark"] .ab-bg-white {
  background: #111;
}
[data-theme="dark"] .ab-bg-light {
  background: #151515;
}
[data-theme="dark"] .ab-h2 {
  color: #fff;
}
[data-theme="dark"] .ab-h3 {
  color: #fff;
}
[data-theme="dark"] .ab-p {
  color: rgba(255,255,255,.6);
}
[data-theme="dark"] .ab-div {
  background: rgba(255,255,255,.06);
}
/* Facts */
[data-theme="dark"] .ab-fact__label {
  color: rgba(255,255,255,.4);
}
[data-theme="dark"] .ab-fact__value {
  color: rgba(255,255,255,.75);
}
/* Mission quote */
[data-theme="dark"] .ab-mission-quote {
  color: rgba(255,255,255,.65);
}
/* Founder */
[data-theme="dark"] .ab-founder-name {
  color: #fff;
}
[data-theme="dark"] .ab-founder-title {
  color: rgba(255,255,255,.5);
}
[data-theme="dark"] .ab-founder-dob {
  color: rgba(255,255,255,.3);
}
/* Products */
[data-theme="dark"] .ab-product-name {
  color: #fff;
}
[data-theme="dark"] .ab-product-sub {
  color: rgba(255,255,255,.5);
}
[data-theme="dark"] .ab-product-block li {
  color: rgba(255,255,255,.5);
}
[data-theme="dark"] .ab-tag {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.5);
}
[data-theme="dark"] .ab-tag:hover {
  background: #e63a46;
  color: #fff;
}
/* Why Float */
[data-theme="dark"] .ab-why-lead {
  color: rgba(255,255,255,.6);
}
[data-theme="dark"] .ab-why-close {
  color: rgba(255,255,255,.4);
}
[data-theme="dark"] .ab-why-trio {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .ab-why-trio__item {
  background: #1a1a1a;
}
[data-theme="dark"] .ab-why-trio__item:nth-child(1):hover {
  background: rgba(230,58,70,0.08);
}
[data-theme="dark"] .ab-why-trio__item:nth-child(2):hover {
  background: rgba(79,195,247,0.08);
}
[data-theme="dark"] .ab-why-trio__item:nth-child(3):hover {
  background: rgba(168,85,247,0.08);
}
[data-theme="dark"] .ab-why-trio__text {
  color: rgba(255,255,255,.5);
}

/* ═══════════════════════════════════════
   5. IP PAGE
   ═══════════════════════════════════════ */
[data-theme="dark"] .ip-page {
  background: #111;
}
[data-theme="dark"] .ip-page .header {
  background: rgba(17,17,17,0.85);
  backdrop-filter: blur(30px);
}
[data-theme="dark"] .ip-page .nav .nav__item {
  color: rgba(255,255,255,.2);
}
[data-theme="dark"] .ip-page .nav .nav__item.--active {
  color: #fff;
}
[data-theme="dark"] .ip-page .menu-btn {
  color: #fff;
}
[data-theme="dark"] .ip-page .logo-small {
  --fill-0: #fff;
}
[data-theme="dark"] .ip-page .lang__current {
  color: rgba(255,255,255,.5);
}
/* Side nav */
[data-theme="dark"] .ip-side .item {
  color: rgba(255,255,255,.2);
}
[data-theme="dark"] .ip-side .item:hover {
  color: rgba(255,255,255,.5);
}
/* Hero */
[data-theme="dark"] .ip-hero__title {
  color: #fff;
}
[data-theme="dark"] .ip-hero__desc {
  color: rgba(255,255,255,.45);
}
/* Table */
[data-theme="dark"] .ip-table-wrap {
  border-color: rgba(255,255,255,.06);
  box-shadow: 0 1px 3px rgba(0,0,0,.2), 0 4px 16px rgba(0,0,0,.15);
}
[data-theme="dark"] .ip-table {
  background: #1a1a1a;
}
[data-theme="dark"] .ip-table thead th {
  background: #222;
}
[data-theme="dark"] .ip-table tbody td {
  color: rgba(255,255,255,.65);
  border-bottom-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .ip-table tbody tr:hover {
  background: rgba(230,58,70,.04);
}
[data-theme="dark"] .ip-name {
  color: rgba(255,255,255,.75);
}
/* Badges dark variants */
[data-theme="dark"] .ip-badge--registered {
  background: rgba(46,125,50,.15);
  color: #66bb6a;
}
[data-theme="dark"] .ip-badge--filed {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
}
[data-theme="dark"] .ip-badge--provisional {
  background: rgba(230,81,0,.15);
  color: #ffb74d;
}
[data-theme="dark"] .ip-badge--published {
  background: rgba(21,101,192,.15);
  color: #64b5f6;
}
/* Cert thumb */
[data-theme="dark"] .ip-cert-thumb {
  border-color: rgba(255,255,255,.1);
}
/* CTA */
[data-theme="dark"] .ip-cta__label {
  color: rgba(255,255,255,.25);
}
[data-theme="dark"] .ip-cta__btn {
  border-color: rgba(255,255,255,.15);
  color: #fff;
}

/* ═══════════════════════════════════════
   6. TEAM PAGE
   ═══════════════════════════════════════ */
[data-theme="dark"] .team-page {
  background: #111;
  color: #fff;
}
[data-theme="dark"] .team-page .header {
  background: rgba(17,17,17,0.5);
  backdrop-filter: blur(30px);
}
[data-theme="dark"] .team-page .nav .nav__item {
  color: rgba(255,255,255,.2);
}
[data-theme="dark"] .team-page .nav .nav__item.--active {
  color: #fff;
}
[data-theme="dark"] .team-page .menu-btn {
  color: #fff;
}
[data-theme="dark"] .team-page .logo-small {
  --fill-0: #fff;
}
[data-theme="dark"] .team-page .lang__current {
  color: rgba(255,255,255,.5);
}
/* Side nav */
[data-theme="dark"] .team-side .item {
  color: rgba(255,255,255,.2);
}
[data-theme="dark"] .team-side .item:hover {
  color: rgba(255,255,255,.5);
}
/* Content */
[data-theme="dark"] .team-kicker {
  color: rgba(255,255,255,.6);
}
[data-theme="dark"] .team-title {
  color: #fff;
}
[data-theme="dark"] .team-name {
  color: #fff;
}
[data-theme="dark"] .team-name-kr {
  color: rgba(255,255,255,.4);
}
/* Avatar */
[data-theme="dark"] .circle-bg {
  background: #2a2a2a;
}
/* Hover gradients */
[data-theme="dark"] .team-member--float:hover .circle-bg {
  background: linear-gradient(135deg, #2a2a2a 0%, rgba(230,58,70,.15) 100%);
}
[data-theme="dark"] .team-member--hrum:hover .circle-bg {
  background: linear-gradient(135deg, #2a2a2a 0%, rgba(168,85,247,.15) 100%);
}
[data-theme="dark"] .team-member--ridm:hover .circle-bg {
  background: linear-gradient(135deg, #2a2a2a 0%, rgba(79,195,247,.15) 100%);
}
/* Bottom panel */
[data-theme="dark"] .team-bottom-panel__text {
  color: rgba(255,255,255,.35);
}
/* Buttons */
[data-theme="dark"] .team-next-btn {
  border-color: rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
}
[data-theme="dark"] .team-btn--brand {
  color: rgba(255,255,255,.4);
  border-color: rgba(255,255,255,.15);
}
/* History button — same as light mode (white bg, red border/text) */
[data-theme="dark"] .team-btn--history {
  background: #fff;
  border-color: #e63a46;
  color: #e63a46;
}
[data-theme="dark"] .team-btn--history:hover {
  background: #e63a46;
  border-color: #e63a46;
  color: #fff;
}
/* Connector lines */
[data-theme="dark"] #team-connectors line {
  stroke: rgba(255,255,255,.04);
}

/* ═══════════════════════════════════════
   7. VISION PAGE
   ═══════════════════════════════════════ */
[data-theme="dark"] .vision-page {
  background: #111;
  color: #fff;
}
[data-theme="dark"] .vision-page .header {
  background: rgba(17,17,17,0.5);
}

/* ═══════════════════════════════════════
   8. NEWS PAGE
   ═══════════════════════════════════════ */
[data-theme="dark"] .news-page {
  background: #111;
}
[data-theme="dark"] .news-page .header {
  background: rgba(17,17,17,0.85);
  backdrop-filter: blur(30px);
}
[data-theme="dark"] .news-page .nav .nav__item {
  color: rgba(255,255,255,.2);
}
[data-theme="dark"] .news-page .nav .nav__item.--active {
  color: #fff;
}
[data-theme="dark"] .news-page .menu-btn {
  color: #fff;
}
[data-theme="dark"] .news-page .logo-small {
  --fill-0: #fff;
}
[data-theme="dark"] .news-page .lang__current {
  color: rgba(255,255,255,.5);
}
/* Hero title */
[data-theme="dark"] .news-hero__title {
  color: #fff;
}
/* Title */
[data-theme="dark"] .news-title {
  color: #fff;
}
/* Cards */
[data-theme="dark"] .news-card {
  background: #1a1a1a;
  border-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .news-grid .news-card {
  border-color: rgba(255,255,255,.06);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
[data-theme="dark"] .news-card__title {
  color: #fff;
}
[data-theme="dark"] .news-card__desc {
  color: rgba(255,255,255,.45);
}
[data-theme="dark"] .news-grid .news-card__date {
  color: rgba(255,255,255,.3);
}
/* Tabs */
[data-theme="dark"] .news-tab {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.4);
}
[data-theme="dark"] .news-tab--active {
  background: #fff;
  color: #111;
}
/* More button */
[data-theme="dark"] .news-more-btn {
  background: #1a1a1a;
  border-color: rgba(255,255,255,.2);
  color: #fff;
}
[data-theme="dark"] .news-more-btn:hover {
  background: #fff;
  color: #111;
}
[data-theme="dark"] .news-more-btn img {
  filter: invert(1);
}
[data-theme="dark"] .news-more-btn:hover img {
  filter: none;
}
/* Category filter */
[data-theme="dark"] .news-filter__btn {
  color: rgba(255,255,255,.5);
  border-color: rgba(255,255,255,.1);
}
[data-theme="dark"] .news-filter__btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
[data-theme="dark"] .news-filter__btn::before {
  background: rgba(255,255,255,.06);
}
[data-theme="dark"] .news-filter__count {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.4);
}
/* CTA buttons */
[data-theme="dark"] .news-cta-btn {
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
[data-theme="dark"] .news-cta-btn--history {
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
/* Detail page */
[data-theme="dark"] .news-detail {
  color: #fff;
}
[data-theme="dark"] .news-detail__title {
  color: #fff;
}
[data-theme="dark"] .news-detail__divider {
  background: rgba(255,255,255,.08);
}
[data-theme="dark"] .news-detail__section h2,
[data-theme="dark"] .news-detail__section h3 {
  color: #fff;
}
[data-theme="dark"] .news-detail__section p {
  color: rgba(255,255,255,.6);
}
[data-theme="dark"] .news-detail__back-btn {
  background: #1a1a1a;
  border-color: rgba(255,255,255,.2);
  color: #fff;
}
[data-theme="dark"] .news-detail__back-btn:hover {
  background: #fff;
  color: #111;
}

/* ═══════════════════════════════════════
   9. CONTACT PAGE (이미 어둡지만 CTA 구간)
   ═══════════════════════════════════════ */
/* contact는 이미 대부분 어두움 — 추가 변경 최소 */

/* ═══════════════════════════════════════
   10. FOOTER OVERRIDES
   밝은 페이지의 라이트 footer → 다크로 통일
   ═══════════════════════════════════════ */
[data-theme="dark"] .about-page .site-footer,
[data-theme="dark"] .team-page .site-footer,
[data-theme="dark"] .contact-page .site-footer,
[data-theme="dark"] .ip-page .site-footer {
  background: #1a1a1a;
  border-top-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .about-page .site-footer__heading,
[data-theme="dark"] .team-page .site-footer__heading,
[data-theme="dark"] .contact-page .site-footer__heading,
[data-theme="dark"] .ip-page .site-footer__heading {
  color: rgba(255,255,255,.5);
}
[data-theme="dark"] .about-page .site-footer__link,
[data-theme="dark"] .team-page .site-footer__link,
[data-theme="dark"] .contact-page .site-footer__link,
[data-theme="dark"] .ip-page .site-footer__link {
  color: rgba(255,255,255,.35);
}
[data-theme="dark"] .about-page .site-footer__link:hover,
[data-theme="dark"] .team-page .site-footer__link:hover,
[data-theme="dark"] .contact-page .site-footer__link:hover,
[data-theme="dark"] .ip-page .site-footer__link:hover {
  color: #fff;
}
/* Biz footer */
[data-theme="dark"] .about-page .biz-footer,
[data-theme="dark"] .team-page .biz-footer,
[data-theme="dark"] .contact-page .biz-footer,
[data-theme="dark"] .ip-page .biz-footer {
  background: #111;
  border-top-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .about-page .biz-footer__inner,
[data-theme="dark"] .team-page .biz-footer__inner,
[data-theme="dark"] .contact-page .biz-footer__inner,
[data-theme="dark"] .ip-page .biz-footer__inner {
  color: rgba(255,255,255,.35);
}
[data-theme="dark"] .about-page .biz-footer__name,
[data-theme="dark"] .team-page .biz-footer__name,
[data-theme="dark"] .contact-page .biz-footer__name,
[data-theme="dark"] .ip-page .biz-footer__name {
  color: rgba(255,255,255,.5);
}
[data-theme="dark"] .about-page .biz-footer__mail,
[data-theme="dark"] .team-page .biz-footer__mail,
[data-theme="dark"] .contact-page .biz-footer__mail,
[data-theme="dark"] .ip-page .biz-footer__mail {
  color: rgba(255,255,255,.35);
}
[data-theme="dark"] .about-page .biz-footer__sns-link,
[data-theme="dark"] .team-page .biz-footer__sns-link,
[data-theme="dark"] .contact-page .biz-footer__sns-link,
[data-theme="dark"] .ip-page .biz-footer__sns-link {
  color: rgba(255,255,255,.3);
}
[data-theme="dark"] .about-page .biz-footer__sns-link:hover,
[data-theme="dark"] .team-page .biz-footer__sns-link:hover,
[data-theme="dark"] .contact-page .biz-footer__sns-link:hover,
[data-theme="dark"] .ip-page .biz-footer__sns-link:hover {
  color: #fff;
}

/* ═══════════════════════════════════════
   11. NEWS PAGE FOOTER (라이트 → 다크)
   ═══════════════════════════════════════ */
[data-theme="dark"] .news-page .site-footer {
  background: #1a1a1a;
  border-top-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .news-page .site-footer__heading {
  color: rgba(255,255,255,.5);
}
[data-theme="dark"] .news-page .site-footer__link {
  color: rgba(255,255,255,.35);
}
[data-theme="dark"] .news-page .site-footer__link:hover {
  color: #fff;
}

/* ═══════════════════════════════════════
   12. HEADER LANG DROPDOWN
   ═══════════════════════════════════════ */
[data-theme="dark"] .lang__dropdown {
  background: #1e1e1e;
  border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .lang__dropdown a {
  color: rgba(255,255,255,.6);
}
[data-theme="dark"] .lang__dropdown a:hover {
  color: #fff;
}

/* ═══════════════════════════════════════
   13. SYSTEM AUTO-DETECT FALLBACK
   JS 미로드 시 미디어쿼리로 폴백
   ═══════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) .nav-menu {
    background: #151515;
  }
  html:not([data-theme="light"]):not([data-theme="dark"]) .nav-menu__company-title,
  html:not([data-theme="light"]):not([data-theme="dark"]) .nav-menu__brand-title,
  html:not([data-theme="light"]):not([data-theme="dark"]) .nav-menu__news-title,
  html:not([data-theme="light"]):not([data-theme="dark"]) .nav-menu__contact-title {
    color: rgba(255,255,255,.85);
  }
  html:not([data-theme="light"]):not([data-theme="dark"]) .nav-menu__submenu .nav-menu__item {
    color: rgba(255,255,255,.6);
  }
  html:not([data-theme="light"]):not([data-theme="dark"]) .nav-menu__close img {
    filter: invert(1);
  }
}
