/* =========================================================
   ITNIX homepage
   브랜드 색상 변경 시 :root 의 --brand / --accent 만 교체
   ========================================================= */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --accent: #22d3ee;
  --navy: #0a1330;
  --navy-2: #111c44;
  --text: #0f172a;
  --muted: #5b6475;
  --line: #e5e8f0;
  --bg-alt: #f5f7fb;
  --radius: 18px;
  --max: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--text);
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.02em; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 600;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 30px -10px rgba(37,99,235,.7); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { border: 1px solid rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-outline { border: 1px solid var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  color: #fff; transition: background .3s, color .3s, box-shadow .3s;
}
.site-header.is-scrolled { background: rgba(255,255,255,.92); backdrop-filter: blur(12px); color: var(--text); box-shadow: 0 1px 0 var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 40px; }
.logo { font-size: 1.6rem; font-weight: 800; letter-spacing: .04em; }
.logo span { color: var(--accent); }
.site-header.is-scrolled .logo span { color: var(--brand); }

.gnb { margin-left: auto; }
.gnb ul { display: flex; gap: 36px; list-style: none; margin: 0; padding: 0; }
.gnb > ul > li > a { font-weight: 600; padding: 26px 0; position: relative; }
.gnb > ul > li > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 18px; height: 2px;
  background: currentColor; transform: scaleX(0); transition: transform .25s var(--ease);
}
.gnb > ul > li > a:hover::after { transform: scaleX(1); }

.has-mega { position: static; }
.mega {
  position: absolute; left: 0; right: 0; top: var(--header-h);
  background: #fff; color: var(--text); box-shadow: 0 20px 40px -20px rgba(15,23,42,.25);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega-inner { max-width: var(--max); margin: 0 auto; padding: 32px 24px; display: grid; grid-template-columns: 1fr 1.5fr 1.2fr; gap: 40px; }
.mega-title { font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.mega-col a { display: block; padding: 6px 0; font-weight: 600; }
.mega-col a:hover { color: var(--brand); }
.mega-col small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.mega-banner { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: 14px; padding: 24px; }
.mega-banner p { margin: 0 0 12px; font-weight: 600; }
.mega-banner .link-arrow { color: var(--accent); }

.header-cta { padding: 10px 20px; border-radius: 999px; border: 1px solid currentColor; font-weight: 600; font-size: .9rem; transition: background .25s, color .25s; }
.header-cta:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  background: radial-gradient(ellipse at 70% 30%, #1b2b6b 0%, var(--navy) 60%);
  color: #fff; display: flex; flex-direction: column; justify-content: center;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute; width: 60vw; height: 60vw; right: -15vw; top: -20vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.25), transparent 65%);
  animation: float 12s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes float { to { transform: translate(-6vw, 8vw) scale(1.1); } }

.hero-slides { position: relative; width: 100%; min-height: 380px; }
.slide { position: absolute; inset: 0 24px; opacity: 0; visibility: hidden; transition: opacity .8s, visibility .8s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide > * { transform: translateY(30px); opacity: 0; transition: transform .9s var(--ease), opacity .9s; }
.slide.is-active > * { transform: none; opacity: 1; }
.slide.is-active > :nth-child(2) { transition-delay: .1s; }
.slide.is-active > :nth-child(3) { transition-delay: .2s; }
.slide.is-active > :nth-child(4) { transition-delay: .3s; }
.slide-eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .12em; font-size: .9rem; margin: 0 0 16px; }
.slide-title { font-size: clamp(2.2rem, 5.5vw, 4.2rem); font-weight: 800; margin: 0 0 24px; }
.slide-title em { font-style: normal; background: linear-gradient(90deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.slide-desc { font-size: clamp(1rem, 1.6vw, 1.2rem); color: rgba(255,255,255,.75); margin: 0 0 36px; }
.slide-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-controls { position: relative; width: 100%; display: flex; align-items: center; gap: 14px; margin-top: 48px; }
.slide-counter { font-variant-numeric: tabular-nums; color: rgba(255,255,255,.6); min-width: 70px; }
.slide-counter strong { color: #fff; font-size: 1.1rem; }
.slide-progress { width: 160px; height: 2px; background: rgba(255,255,255,.2); overflow: hidden; }
.slide-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.slide-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: transparent; color: #fff; cursor: pointer; font-size: 1rem; transition: background .2s;
}
.slide-btn:hover { background: rgba(255,255,255,.12); }
.slide-btn.js-toggle { font-size: .65rem; letter-spacing: -1px; }

.scroll-hint { position: absolute; left: 50%; bottom: 28px; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.5); border-radius: 14px; transform: translateX(-50%); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: scroll 1.8s infinite; }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Marquee ---------- */
.marquee { background: var(--brand); color: #fff; overflow: hidden; padding: 18px 0; }
.marquee-track { display: flex; width: max-content; gap: 56px; animation: marquee 30s linear infinite; font-weight: 800; letter-spacing: .08em; font-size: 1.1rem; }
.marquee-track span::before { content: "✦"; margin-right: 56px; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 120px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--navy); color: #fff; }
.section-head { margin-bottom: 56px; }
.section-eyebrow { color: var(--brand); font-weight: 700; letter-spacing: .12em; font-size: .85rem; margin: 0 0 12px; }
.section-dark .section-eyebrow { color: var(--accent); }
.section-head h2, .nms-text h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin: 0 0 16px; }
.section-lead { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 760px; }
.section-dark .section-lead { color: rgba(255,255,255,.65); }

/* About */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value-card { padding: 36px; border: 1px solid var(--line); border-radius: var(--radius); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.value-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(37,99,235,.35); border-color: transparent; }
.value-num { font-size: 2.6rem; font-weight: 800; color: transparent; -webkit-text-stroke: 1.5px var(--brand); }
.value-card h3 { margin: 12px 0 8px; font-size: 1.25rem; }
.value-card p { margin: 0; color: var(--muted); }

/* Lineup */
.lineup-card {
  position: relative; padding: 36px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.1); overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s;
}
.lineup-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--accent), transparent 40%, transparent 60%, var(--brand));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.lineup-card:hover { transform: translateY(-6px); }
.lineup-card:hover::before { opacity: 1; }
.lineup-num { font-size: 3.4rem; font-weight: 800; line-height: 1; color: rgba(255,255,255,.08); position: absolute; right: 28px; top: 22px; }
.lineup-tag { font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); margin: 0 0 6px; }
.lineup-card h3 { font-size: 1.5rem; margin: 0 0 12px; }
.lineup-card p { color: rgba(255,255,255,.7); margin: 0 0 18px; }
.lineup-card .link-arrow { color: var(--accent); }
.lineup-feature { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; margin-bottom: 24px; background: linear-gradient(135deg, rgba(37,99,235,.35), rgba(34,211,238,.12)); }
.lineup-feature .lineup-num { color: rgba(255,255,255,.12); }
.lineup-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.check-list, .chip-list { list-style: none; padding: 0; margin: 0 0 24px; }
.check-list li { padding-left: 24px; position: relative; margin: 6px 0; color: rgba(255,255,255,.85); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chip-list li { padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: .9rem; }

/* NMS spotlight */
.nms-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; margin-bottom: 72px; }
.nms-text .section-lead { margin-bottom: 32px; }
.nms-links { display: flex; gap: 12px; flex-wrap: wrap; }
.nms-visual { background: radial-gradient(circle at 50% 40%, #16246180, var(--navy)); border-radius: 24px; padding: 32px; }
.topology .links line { stroke: rgba(34,211,238,.35); stroke-width: 2; stroke-dasharray: 6 6; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -12; } }
.topology .packets circle { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.topology .nodes circle { fill: #1e3a8a; stroke: #93c5fd; stroke-width: 2; }
.topology .nodes .core { fill: var(--brand); stroke: #fff; }
.topology .nodes .alert { stroke: #f97316; animation: pulse 1.6s ease-in-out infinite; transform-origin: 350px 240px; }
@keyframes pulse { 50% { stroke-width: 6; stroke-opacity: .4; } }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 30px; border-radius: var(--radius); background: var(--bg-alt); transition: background .3s, transform .3s var(--ease); }
.feature:hover { background: #eaf0ff; transform: translateY(-4px); }
.feature-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand); color: #fff; font-size: 1.3rem; }
.feature h3 { margin: 16px 0 6px; font-size: 1.15rem; }
.feature p { margin: 0; color: var(--muted); }
.source-note { margin: 28px 0 0; font-size: .85rem; color: var(--muted); }
.source-note a { text-decoration: underline; }

/* Process */
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.process li { position: relative; padding: 32px 28px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.process li:not(:last-child)::after { content: "→"; position: absolute; right: -16px; top: 50%; transform: translateY(-50%); color: var(--brand); font-weight: 700; z-index: 1; }
.process span { font-size: .8rem; font-weight: 700; color: var(--brand); letter-spacing: .08em; }
.process h3 { margin: 8px 0 6px; }
.process p { margin: 0; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card {
  display: flex; flex-direction: column; gap: 10px; padding: 36px; border-radius: var(--radius);
  border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s, background .3s, color .3s;
}
.contact-card:hover { transform: translateY(-6px); background: var(--navy); color: #fff; box-shadow: 0 24px 50px -24px rgba(10,19,48,.6); }
.contact-card:hover .link-arrow { color: var(--accent); }
.contact-label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.contact-card:hover .contact-label { color: rgba(255,255,255,.6); }
.contact-card strong { font-size: 1.15rem; flex: 1; }

/* Footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,.65); padding: 56px 0 28px; font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.logo-footer { color: #fff; display: inline-block; margin-bottom: 10px; }
.footer-inner p { margin: 0; }
.footer-inner a:hover { color: #fff; }
.footer-nav { display: flex; gap: 24px; }
.footer-copy { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }

.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700;
  opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .3s; pointer-events: none;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .value-grid, .feature-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .process li::after { display: none; }
  .nms-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .header-cta { display: none; }
  .menu-toggle { display: grid; gap: 5px; margin-left: auto; width: 40px; height: 40px; place-content: center; background: none; border: 0; cursor: pointer; color: inherit; }
  .menu-toggle span { width: 22px; height: 2px; background: currentColor; transition: transform .3s, opacity .3s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .gnb { position: fixed; inset: var(--header-h) 0 auto 0; background: #fff; color: var(--text); padding: 12px 24px 24px; box-shadow: 0 20px 30px -20px rgba(0,0,0,.3); transform: translateY(-120%); transition: transform .35s var(--ease); margin: 0; }
  .gnb.is-open { transform: none; }
  .gnb ul { flex-direction: column; gap: 0; }
  .gnb > ul > li > a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .gnb > ul > li > a::after { display: none; }
  .mega { display: none; }
  .section { padding: 84px 0; }
  .lineup-grid, .value-grid, .feature-grid, .contact-grid, .process { grid-template-columns: 1fr; }
  .lineup-feature { grid-template-columns: 1fr; }
  .hero-slides { min-height: 440px; }
  .pc-only { display: none; }
  .slide-desc br { display: none; }
}

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