:root {
  --bg: #0b0d12;
  --bg-2: #11141c;
  --card: #161a24;
  --line: #262b38;
  --ink: #eceef4;
  --mute: #9aa1b2;
  --accent: #8c9bff;
  --accent-2: #c08cff;
  --grad: linear-gradient(100deg, var(--accent), var(--accent-2));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Malgun Gothic", sans-serif;
  font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased;
  word-break: keep-all; overflow-wrap: anywhere;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 64px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
  transition: background .3s, border-color .3s; border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(11, 13, 18, .82); backdrop-filter: blur(12px); border-color: var(--line); }
.brand { font-weight: 800; letter-spacing: .18em; font-size: 14px; }
.links { display: flex; gap: 26px; font-size: 14px; color: var(--mute); }
.links a:hover { color: var(--ink); }

/* hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.slides, .slide, .hero-shade { position: absolute; inset: 0; }
.slide { background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity 1.6s ease, transform 7s ease; }
.slide.active { opacity: 1; transform: scale(1); }
.hero-shade { background: linear-gradient(180deg, rgba(11,13,18,.35) 0%, rgba(11,13,18,.25) 40%, rgba(11,13,18,.92) 88%, var(--bg) 100%); }
.hero-inner { position: relative; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px 72px; }
.eyebrow { margin: 0; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: #c9cffd; }
.hero h1 { margin: 6px 0 8px; font-size: clamp(48px, 9vw, 104px); font-weight: 900; letter-spacing: .04em; line-height: 1.05; }
.lead { margin: 0; font-size: clamp(17px, 2.2vw, 22px); color: #d9dcea; }
.cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.btn { padding: 12px 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); font-weight: 600; font-size: 15px; transition: background .2s, border-color .2s; }
.btn:hover { background: rgba(255,255,255,.1); }
.btn.primary { background: var(--grad); border-color: transparent; color: #0b0d12; }
.btn.primary:hover { filter: brightness(1.08); }
.stats { display: flex; gap: 40px; margin: 44px 0 0; flex-wrap: wrap; }
.stats div { border-left: 2px solid var(--accent); padding-left: 14px; }
.stats dt { font-size: 28px; font-weight: 800; line-height: 1.2; }
.stats dd { margin: 2px 0 0; font-size: 13.5px; color: var(--mute); }

/* sections */
.section { padding: 110px 0; }
.section.alt { background: var(--bg-2); }
.kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .28em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { margin: 6px 0 10px; font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; letter-spacing: -.01em; }
.section-lead { margin: 0 0 40px; color: var(--mute); max-width: 760px; }

/* company */
.company { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px; margin-bottom: 28px; }
.company-head { display: flex; gap: 18px; align-items: center; }
.company-head h3 { margin: 0; font-size: 22px; }
.meta { margin: 0; color: var(--mute); font-size: 14px; }
.pill { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: rgba(140,155,255,.14); color: var(--accent); }
.logo { width: 64px; height: 64px; border-radius: 14px; object-fit: contain; background: #fff; flex: none; }
.logo.dark { background: #000; }
.logo.round { border-radius: 50%; object-fit: cover; }
.company-body { margin: 20px 0 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.summary { margin: 0 0 10px; }
.points { margin: 0; padding-left: 18px; color: #c9cdd9; font-size: 15px; }
.points li { margin: 4px 0; }
.points b { color: var(--ink); }

/* video cards */
.vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.vcard { background: #0f121a; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, border-color .25s, box-shadow .25s; }
.vcard:hover, .mini:hover { transform: translateY(-4px); border-color: #3a4160; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.vcard:hover .thumb img, .mini:hover .thumb img { transform: scale(1.05); }
.badge { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.7); font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 9px; border-radius: 6px; }
.play { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 28px; border-radius: 8px; background: #ff0033; }
.play::after { content: ""; position: absolute; left: 16px; top: 8px; border-left: 11px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.play.sm { width: 30px; height: 21px; border-radius: 6px; }
.play.sm::after { left: 12px; top: 5.5px; border-left-width: 8px; border-top-width: 5px; border-bottom-width: 5px; }
.vbody { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.vbody h4 { margin: 0; font-size: 15.5px; line-height: 1.4; }
.vbody p { margin: 4px 0 0; font-size: 13.5px; color: var(--mute); flex: 1; }
.vbody time { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.sub { margin: 30px 0 12px; font-size: 14px; color: var(--mute); font-weight: 600; }
.minis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.minis.four { grid-template-columns: repeat(4, 1fr); }
.mini { background: #0f121a; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; }
.mini span { display: block; padding: 8px 10px; font-size: 13px; font-weight: 600; }
.note { margin: 12px 0 0; font-size: 13px; color: var(--mute); }

/* gallery */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 26px; }
.tab { font: inherit; font-size: 14px; color: var(--mute); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; cursor: pointer; transition: all .2s; }
.tab small { opacity: .6; margin-left: 2px; }
.tab:hover { color: var(--ink); border-color: #3a4160; }
.tab.active { color: #0b0d12; background: var(--grad); border-color: transparent; font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gitem { display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #000; position: relative; }
.gitem img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .3s; }
.gitem:hover img { transform: scale(1.04); }
.gitem.contain { background: radial-gradient(circle at 50% 45%, #2a2e3b, #12141b 75%); }
.gitem.contain img { object-fit: contain; }
.gitem.hide { display: none; }

/* R&D */
.flow { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; counter-reset: s; }
.flow li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; font-weight: 600; font-size: 14.5px; }
.flow li::before { content: counter(s, decimal-leading-zero); margin-right: 8px; font-size: 12px; color: var(--accent); font-weight: 800; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cards.four { grid-template-columns: repeat(4, 1fr); margin: 34px 0; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.card h4 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: #c2c6d3; font-size: 14.5px; }
.tech { margin: 22px 0 0; font-size: 13.5px; color: var(--mute); }
.subhead { margin: 56px 0 10px; font-size: 22px; font-weight: 800; }
.sublead { margin: 0 0 24px; color: var(--mute); max-width: 820px; }
.case { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 900px; }
.gitem.square { aspect-ratio: 1 / 1; }
.steps { list-style: none; counter-reset: st; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.steps li { counter-increment: st; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; font-size: 14px; color: #c2c6d3; }
.steps li::before { content: counter(st, decimal-leading-zero); display: block; font-size: 12px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.steps b { display: block; color: var(--ink); font-size: 15.5px; margin-bottom: 4px; }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gitem.shot { aspect-ratio: auto; background: var(--card); border: 1px solid var(--line); }
.gitem.shot img { aspect-ratio: 1920 / 1142; height: auto; object-fit: contain; background: #09090b; }
.shot-cap { display: block; padding: 10px 14px 12px; font-size: 13.5px; color: var(--mute); }
.shot-cap b { display: block; color: var(--ink); font-size: 15px; }

/* about */
.about-text { max-width: 860px; font-size: 17px; color: #d3d6e2; margin: 0; }
.skills { display: grid; gap: 0; border-top: 1px solid var(--line); }
.skills div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.skills h5 { margin: 0; font-size: 14px; color: var(--accent); }
.skills p { margin: 0; color: #c9cdd9; font-size: 15px; }

/* contact */
.contact { text-align: center; padding: 130px 0; background: radial-gradient(60% 80% at 50% 100%, rgba(140,155,255,.16), transparent 70%); }
.mail { display: inline-block; margin-top: 18px; font-size: clamp(22px, 3.6vw, 36px); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; border-bottom: 2px solid rgba(140,155,255,.4); }
.links2 { margin: 22px 0 0; color: var(--mute); font-size: 15px; }
.links2 a:hover { color: var(--ink); }
.foot { text-align: center; color: #5d6476; font-size: 13px; padding: 28px 0 40px; }

/* modal / lightbox */
.modal, .lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5,6,10,.9); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden], .lightbox[hidden] { display: none; }
.modal-box { width: min(1100px, 100%); }
.frame { aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.frame iframe { width: 100%; height: 100%; border: 0; }
.modal-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 15px; }
.yt-link { color: var(--accent); white-space: nowrap; }
.close { position: fixed; top: 16px; right: 20px; font-size: 34px; line-height: 1; background: none; border: 0; color: #fff; cursor: pointer; opacity: .8; }
.close:hover { opacity: 1; }
.lightbox figure { margin: 0; max-width: min(1500px, 92vw); }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox figcaption { text-align: center; color: var(--mute); font-size: 14px; margin-top: 10px; }
.nav-btn { position: fixed; top: 50%; transform: translateY(-50%); font-size: 48px; background: none; border: 0; color: #fff; opacity: .7; cursor: pointer; padding: 10px 18px; }
.nav-btn:hover { opacity: 1; }
.prev { left: 6px; } .next { right: 6px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .vgrid { grid-template-columns: repeat(2, 1fr); }
  .minis { grid-template-columns: repeat(3, 1fr); }
  .cards.four { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .links { display: none; }
  .lead br { display: none; }
  .nav { padding: 0 18px; }
  .wrap, .hero-inner { padding-left: 16px; padding-right: 16px; }
  .section { padding: 80px 0; }
  .company { padding: 20px; border-radius: 16px; }
  .vgrid, .cards, .cards.four, .cards.three, .shots { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .minis, .minis.four { grid-template-columns: repeat(2, 1fr); }
  .stats { gap: 22px; }
  .stats dt { font-size: 22px; }
  .skills div { grid-template-columns: 1fr; gap: 2px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .reveal, .vcard, .mini, .thumb img, .gitem img { transition: none; }
  .reveal { opacity: 1; transform: none; }
}
