/* ==========================================================
   CELL Lighting — A안 (Dark & Orange)
   ========================================================== */
:root {
  --bg: #0b0b0d;
  --bg-2: #121216;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --muted: #9a9aa3;
  --accent: #ff5a1f;
  --accent-glow: rgba(255, 90, 31, 0.45);
  --radius: 20px;
  --container: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }
.accent { color: var(--accent); }
.m-only { display: none; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(11, 11, 13, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-color: var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; }
.logo__cell { color: var(--accent); font-weight: 800; }
.nav { display: flex; gap: 40px; }
.nav a {
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.08em; color: #d4d4d8;
  position: relative; transition: color 0.3s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease);
}
.nav a:hover, .nav a.is-active { color: #fff; }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.header__right { display: flex; align-items: center; gap: 20px; }
.lang { font-size: 0.78rem; letter-spacing: 0.06em; color: var(--muted); display: flex; gap: 6px; }
.lang .is-active { color: #fff; font-weight: 600; }
.menu-btn { display: none; width: 28px; height: 20px; position: relative; }
.menu-btn span {
  position: absolute; left: 0; width: 100%; height: 2px; background: #fff; border-radius: 2px;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.menu-btn span:nth-child(1) { top: 5px; }
.menu-btn span:nth-child(2) { top: 13px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { top: 9px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s, border-color 0.3s;
}
.btn span { transition: transform 0.3s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 10px 40px -8px var(--accent-glow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -6px var(--accent-glow); }
.btn--ghost { border: 1px solid rgba(255, 255, 255, 0.35); }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 1080px); display: flex; align-items: flex-end;
  padding: 140px 0 120px; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
#ledCanvas { width: 100%; height: 100%; display: block; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,11,13,0.55) 0%, rgba(11,11,13,0) 30%, rgba(11,11,13,0.35) 55%, var(--bg) 100%),
    radial-gradient(ellipse at 15% 85%, rgba(11,11,13,0.85), transparent 60%);
}
.hero__content { position: relative; z-index: 2; }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.32em; color: var(--accent); font-weight: 600; margin-bottom: 20px; }
.hero__title {
  font-size: clamp(3rem, 9vw, 7.5rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.04em;
  margin-bottom: 28px;
}
.hero__sub { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #d4d4d8; font-weight: 400; margin-bottom: 40px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.scroll-hint {
  position: absolute; z-index: 2; left: 50%; bottom: 32px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid rgba(255,255,255,0.4); border-radius: 20px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  background: #fff; border-radius: 2px; animation: scroll 1.8s infinite;
}
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Stats ---------- */
.stats { padding: 40px 0 100px; }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 48px 0 0; display: flex; flex-direction: column; }
.stat + .stat { padding-left: 48px; border-left: 1px solid var(--line); }
.stat__num { font-size: clamp(3rem, 6vw, 5.2rem); font-weight: 300; line-height: 1; letter-spacing: -0.04em; }
.stat__label { font-size: 1.1rem; color: var(--muted); margin-top: 12px; }

/* ---------- Section common ---------- */
.section { padding: 130px 0; position: relative; }
.section__label { font-size: 0.8rem; letter-spacing: 0.28em; font-weight: 600; color: var(--accent); margin-bottom: 18px; }
.section__title { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; line-height: 1.25; letter-spacing: -0.03em; margin-bottom: 28px; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 56px; flex-wrap: wrap; }
.section__head .section__title { margin-bottom: 0; }
.section__desc { color: var(--muted); text-align: right; }

/* ---------- Company ---------- */
.company__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: center; }
.company__text p:not(.section__label) { color: #b8b8c0; font-size: 1.08rem; margin-bottom: 18px; max-width: 560px; }
.company__text strong { color: #fff; font-weight: 600; }
.venn { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin-inline: auto; }
.venn__circle {
  position: absolute; width: 58%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.03), transparent 70%);
  display: flex; padding: 14%; font-size: 0.78rem; letter-spacing: 0.2em; color: var(--muted); font-weight: 600;
  animation: float 8s ease-in-out infinite;
}
.venn__circle--a { top: 2%; left: 21%; justify-content: center; align-items: flex-start; }
.venn__circle--b { bottom: 4%; left: 2%; align-items: flex-end; animation-delay: -2.6s; }
.venn__circle--c { bottom: 4%; right: 2%; align-items: flex-end; justify-content: flex-end; animation-delay: -5.2s; }
.venn__core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -38%);
  width: 34%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--accent), #c43a08);
  box-shadow: 0 0 80px 10px var(--accent-glow);
  display: grid; place-items: center; text-align: center;
  font-size: 0.8rem; font-weight: 700; line-height: 1.3; color: #fff;
  animation: pulse 3.6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 60px 6px var(--accent-glow); } 50% { box-shadow: 0 0 110px 22px var(--accent-glow); } }

/* ---------- Projects (bento) ---------- */
.projects { background: linear-gradient(180deg, var(--bg), var(--bg-2) 30%, var(--bg-2) 70%, var(--bg)); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  padding: 9px 20px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 0.82rem; letter-spacing: 0.08em; color: var(--muted); transition: all 0.3s;
}
.filter:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.filter.is-active { background: #fff; color: #000; border-color: #fff; font-weight: 600; }

.bento {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 260px; gap: 18px; grid-auto-flow: dense;
}
.card {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #1a1a1f;
  border: 1px solid var(--line); isolation: isolate;
}
.card--xl { grid-column: span 2; grid-row: span 2; }
.card--wide { grid-column: span 2; }
.card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease), filter 0.6s;
  filter: saturate(1.05) brightness(0.85);
}
.card::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85));
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 0.4s;
}
.card:hover img { transform: scale(1.06); filter: saturate(1.2) brightness(1); }
.card:hover::before { box-shadow: inset 0 0 0 1px var(--accent), 0 0 40px -10px var(--accent-glow); }
.card__info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px 24px; }
.card__tag {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.1em; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: rgba(255, 90, 31, 0.18); color: #ff8a5c;
  margin-bottom: 10px; backdrop-filter: blur(6px);
}
.card h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.35; }
.card--xl h3 { font-size: 1.6rem; }
.card p { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.card.is-hidden { display: none; }

/* ---------- Products ---------- */
.series { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.series__item {
  position: relative; padding: 18px 18px 26px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--line);
  transition: transform 0.5s var(--ease), border-color 0.4s, background 0.4s;
}
.series__item:hover { transform: translateY(-6px); border-color: rgba(255, 90, 31, 0.5); background: #16161b; }
.series__img { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; margin-bottom: 22px; background: #000; }
.series__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.series__item:hover .series__img img { transform: scale(1.08); }
.series__no { font-size: 0.75rem; color: var(--accent); font-weight: 600; letter-spacing: 0.1em; }
.series__item h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em; margin: 4px 0 10px; }
.series__item p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

.control { margin-top: 64px; padding: 40px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(135deg, rgba(255,90,31,0.06), transparent 50%); }
.control__title { font-size: 0.85rem; letter-spacing: 0.24em; color: var(--muted); margin-bottom: 24px; font-weight: 600; }
.control__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; }
.control__list li { background: var(--bg); padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; }
.control__list strong { font-size: 1rem; }
.control__list span { font-size: 0.85rem; color: var(--muted); }

/* ---------- Works ---------- */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 56px; counter-reset: p; }
.process li { padding: 32px 24px 0 0; border-top: 1px solid var(--line); position: relative; }
.process li::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 0; background: var(--accent);
  transition: width 1.2s var(--ease);
}
.process li.is-visible::before { width: 100%; }
.process span { display: block; font-size: 3rem; font-weight: 200; color: var(--accent); line-height: 1; margin-bottom: 18px; letter-spacing: -0.04em; }
.process h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.45; }

/* ---------- Contact ---------- */
.contact__box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
  padding: 72px; border-radius: 32px; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 0% 100%, rgba(255, 90, 31, 0.28), transparent 55%), var(--bg-2);
  border: 1px solid var(--line);
}
.contact__title { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.03em; margin-bottom: 36px; }
.contact__info { display: grid; gap: 0; }
.contact__info div { display: grid; grid-template-columns: 100px 1fr; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact__info dt { font-size: 0.8rem; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; padding-top: 3px; }
.contact__info a { transition: color 0.3s; }
.contact__info a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { padding: 40px 0 56px; border-top: 1px solid var(--line); margin-top: 60px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer p { font-size: 0.82rem; color: var(--muted); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .series { grid-template-columns: repeat(3, 1fr); }
  .bento { grid-template-columns: repeat(3, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
}
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(11, 11, 13, 0.96); backdrop-filter: blur(16px);
    padding: 12px 24px 28px; border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all 0.4s var(--ease);
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 16px 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .company__grid, .contact__box { grid-template-columns: 1fr; gap: 48px; }
  .contact__box { padding: 44px 28px; }
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .series { grid-template-columns: repeat(2, 1fr); }
  .control__list { grid-template-columns: 1fr 1fr; }
  .section__desc { text-align: left; }
  .section { padding: 96px 0; }
}
@media (max-width: 560px) {
  .m-only { display: inline; }
  .lang { display: none; }
  .stats__grid { grid-template-columns: 1fr; }
  .stat + .stat { padding-left: 0; border-left: 0; }
  .stat { padding-top: 32px; flex-direction: row; align-items: baseline; gap: 16px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .card--xl, .card--wide { grid-column: auto; grid-row: span 1; }
  .card--xl h3 { font-size: 1.25rem; }
  .series { grid-template-columns: 1fr; }
  .control { padding: 28px 20px; }
  .control__list { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .contact__info div { grid-template-columns: 80px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 제품 페이지 연결 (홈) ---------- */
a.series__item { display: block; }
.section__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.section__aside .section__desc { margin: 0; }
.more { color: var(--muted); font-size: 0.92rem; transition: color 0.3s; }
.more:hover { color: var(--accent); }
.more--strong { color: #fff; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.control__list li { position: relative; padding: 0; }
.control__list li a { display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; height: 100%; transition: background 0.3s; }
.control__list li a:hover { background: #16161b; }
.control__list li a:hover strong { color: var(--accent); }
a.card__tag { transition: background 0.3s, color 0.3s; }
a.card__tag:hover { background: var(--accent); color: #fff; }
@media (max-width: 860px) { .section__aside { align-items: flex-start; } }


/* ---------- Navigation & Card Links Fixes ---------- */
html { scroll-behavior: smooth; }
section[id], [id] { scroll-margin-top: 96px; }

.card { cursor: pointer; }
.card__link { color: inherit; text-decoration: none; }
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}
.card__tag {
  position: relative;
  z-index: 4;
}
.card:hover .card__link {
  color: var(--accent);
}

/* ========================================================
   Motion Graphic 1: Product Card Spotlight Theme
   =======================================================
 */
.series__item, .control__list li, .spotlight-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.45s var(--ease), border-color 0.3s, box-shadow 0.4s;
  will-change: transform;
}

/* 1. Warm Orange Radial Glow following mouse */
.series__item::before, .control__list li::before, .spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    360px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(255, 90, 31, 0.28),
    rgba(255, 90, 31, 0.08) 38%,
    transparent 75%
  );
  opacity: var(--spotlight-opacity, 0);
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

/* 2. Micro-dot LED Matrix Grid Reveal */
.series__item::after, .control__list li::after, .spotlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.16) 1.2px, transparent 1.6px);
  background-size: 15px 15px;
  mask-image: radial-gradient(
    28ppx circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    black 15%,
    transparent 70%
  );
  -webkit-mask-image: radial-gradient(
    280px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    black 15%,
    transparent 70%
  );
  opacity: var(--spotlight-opacity, 0);
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

/* Inner content lifted above spotlight */
.series__item > *, .control__list li > * {
  position: relative;
  z-index: 2;
}

/* Glowing Border on Hover */
.series__item:hover, .control__list li:hover {
  border-color: rgba(255, 90, 31, 0.55);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8), 0 0 25px -6px rgba(255, 90, 31, 0.28);
}

/* ======================================================
   Motion Graphic 2: System Flow Header on Home Page
   ====================================================== */
.control {
  position: relative;
  overflow: hidden;
}
.control::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 31, 0.6), #fff, rgba(255, 90, 31, 0.6), transparent);
  background-size: 200% 100%;
  animation: busFlow 3s linear infinite;
}
@keyframes busFlow {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
