:root {
  --bg: #090c10;
  --bg-soft: #0d1218;
  --panel: rgba(255,255,255,.045);
  --panel-strong: rgba(255,255,255,.075);
  --line: rgba(255,255,255,.1);
  --text: #f7f9fb;
  --muted: #9aa7b4;
  --accent: #62a8ff;
  --accent2: #8bc4ff;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans KR", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 4px;
}
.domain-note {
  margin-top: 18px;
  color: #6f8090;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

img { max-width: 100%; display: block; }

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

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  border-bottom: 1px solid transparent;
  transition: .25s ease;
}
.nav.scrolled {
  background: rgba(9,12,16,.78);
  backdrop-filter: blur(16px);
  border-color: var(--line);
}
.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(98,168,255,.25), rgba(255,255,255,.03));
  color: var(--accent2);
  font-size: 13px;
}
.nav-inner { position: relative; z-index: 2; }
.nav-links {
  display: flex;
  gap: 28px;
  color: #c0cad4;
  font-size: 14px;
}
.nav-links a:hover { color: #fff; }

/* 햄버거 토글 — 720px 이하에서만 노출 */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  cursor: pointer;
  transition: .2s ease;
}
.nav-toggle:hover { background: var(--panel-strong); }
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: #dbe4ec;
  transition: transform .28s ease, opacity .2s ease;
}
.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* 모바일 전체화면 메뉴 */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 104px 24px 44px;
  background: rgba(9,12,16,.97);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
.nav-open .nav-mobile {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.nav-mobile-links { display: grid; }
.nav-mobile-links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 15px 4px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #eef4fa;
  font-size: clamp(28px, 9vw, 40px);
  font-weight: 800;
  letter-spacing: -.045em;
  transition: color .2s ease;
}
.nav-mobile-links a:hover { color: var(--accent2); }
.nav-mobile-num {
  flex: none;
  color: #7b8fa2;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
}
.nav-mobile-foot {
  margin-top: 30px;
  color: #6f8090;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
@media (min-width: 721px) {
  .nav-mobile { display: none; }
}

.hero {
  min-height: 100svh;
  position: relative;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  isolation: isolate;
  overflow: hidden;
}
/* 커서를 따라다니는 광원.
   배경(z-index:-3) 위 · 본문 아래에 깔려 데이터센터 텍스처와 AUTOMATE 아웃라인
   글자를 커서 주변에서만 들어올린다.
   매 프레임 그라디언트를 다시 그리면 페인트 비용이 커서, 크기가 고정된 원을
   transform 으로만 옮긴다(합성 단계에서 처리). 위치는 app.js 가 넣는다. */
.hero-spot {
  position: absolute;
  z-index: -2;
  top: 0;
  left: 0;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px; /* 원의 중심을 커서에 맞춘다 */
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
    rgba(98, 168, 255, .20),
    rgba(98, 168, 255, .08) 45%,
    rgba(98, 168, 255, 0) 72%);
  opacity: 0;
  transition: opacity .4s ease;
  transform: translate3d(-9999px, -9999px, 0); /* 켜지기 전엔 화면 밖 */
  will-change: transform, opacity;
  pointer-events: none;
}
.hero.spot-on .hero-spot { opacity: 1; }

/* 서버랙 LED 트윙클. 점 생성·배치는 js/app.js initHeroLeds 가 배경 사진(cover)의
   실제 렌더 좌표를 계산해 잡는다 — 리사이즈해도 사진 속 랙 위치에 붙어 있다.
   모션 최소화 설정에서는 깜빡임 없이 은은한 고정 점만 남긴다. */
.hero-leds {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.hero-led {
  position: absolute;
  border-radius: 50%;
  opacity: .1;
  animation: led-twinkle var(--led-dur, 2.4s) ease-in-out var(--led-delay, 0s) infinite;
}
@keyframes led-twinkle {
  0%, 100% { opacity: .08; }
  50% { opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-led { animation: none; opacity: .4; }
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(9,12,16,.98) 0%, rgba(9,12,16,.88) 42%, rgba(9,12,16,.42) 74%, rgba(9,12,16,.74) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 25%),
    url("../img/hero-datacenter.jpg") center/cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  top: -160px;
  left: 22%;
  background: radial-gradient(circle, rgba(39,111,194,.14), transparent 68%);
  z-index: -2;
  pointer-events: none;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #bfd7ef;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  background: rgba(255,255,255,.03);
  margin-bottom: 28px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #76b7ff;
  box-shadow: 0 0 16px rgba(118,183,255,.95);
}
.hero h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(58px, 9vw, 120px);
  line-height: .92;
  letter-spacing: -.065em;
  font-weight: 800;
}
.hero h1 span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.58);
}
.hero-copy {
  margin-top: 34px;
  max-width: 610px;
  color: #c3ccd5;
  font-size: clamp(17px, 2vw, 21px);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  transition: .2s ease;
}
.btn.primary {
  color: #07111c;
  background: #eef6ff;
  border-color: #eef6ff;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost:hover { background: var(--panel-strong); }

.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #0a0f14;
  overflow: hidden;
}
.ticker-track {
  display: flex;
  padding: 14px 0;
  font-size: 13px;
  color: #8fa0b0;
  letter-spacing: .08em;
  text-transform: uppercase;
}
/* 그룹 2벌이 각자 자기 폭만큼 왼쪽으로 이동해 순환한다.
   min-width:100%로 한 벌이 항상 화면 이상이라 빈 구간이 생기지 않는다.
   (직전 방식은 track 전체를 -50% 이동시켜, 한 벌(1077px)이 화면(1440px)보다
    좁으면 루프 끝에 363px 빈 공간이 보였다.) */
.ticker-group {
  display: flex;
  flex: 0 0 auto;
  min-width: 100%;
  justify-content: space-around;
  animation: ticker 48s linear infinite;
}
.ticker-group span {
  padding: 0 28px;
  white-space: nowrap;
}
@keyframes ticker { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-group { animation: none; }
}

section { padding: 120px 0; }
.section-kicker {
  color: #8fc5ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.section-title {
  margin: 0;
  font-size: clamp(38px, 5.5vw, 72px);
  line-height: 1.03;
  letter-spacing: -.05em;
  max-width: 900px;
}
.section-desc {
  margin-top: 24px;
  max-width: 740px;
  color: var(--muted);
  font-size: 18px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 70px;
  align-items: start;
}
.quote {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: -.04em;
  margin: 0 0 26px;
}
.quote em {
  font-style: normal;
  color: #8fc5ff;
}
.about-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.about-chip {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--panel);
  color: #ccd5dd;
  font-size: 14px;
}

.services {
  background: var(--bg-soft);
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.card-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.card {
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.018));
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(90,168,255,.18), transparent 70%);
}
.card-num {
  font-size: 12px;
  color: #728392;
  margin-bottom: 54px;
}
.card h3 {
  font-size: 21px;
  margin: 0 0 12px;
  letter-spacing: -.02em;
}
.card p {
  margin: 0;
  color: #8d9aa6;
  font-size: 14px;
}

.workflow {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.workflow-item {
  min-height: 220px;
  padding: 26px;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,.025);
}
.workflow-item:last-child { border-right: 0; }
.workflow-item .step {
  color: #7f8d9a;
  font-size: 11px;
  letter-spacing: .12em;
  margin-bottom: 60px;
}
.workflow-item h4 {
  margin: 0 0 9px;
  font-size: 18px;
}
.workflow-item p {
  margin: 0;
  font-size: 13px;
  color: #8f9ba7;
}

.stack-wrap {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.stack-group {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.stack-group h4 {
  margin: 0 0 16px;
  color: #7e8b97;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  font-size: 13px;
  color: #d6dde4;
}

.projects {
  background: linear-gradient(180deg, #0b1016, #090c10);
}
.project {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 50px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project-meta {
  color: #758390;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px;
}
.project h3 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.06;
  letter-spacing: -.045em;
}
.project p {
  color: #99a6b2;
  margin: 0 0 24px;
}
.metric-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.metric strong {
  display: block;
  font-size: 24px;
}
.metric span {
  color: #758390;
  font-size: 12px;
}
.project-visual {
  min-height: 360px;
  border-radius: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center;
}
.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(5,8,12,.6));
}

.automation {
  position: relative;
  overflow: hidden;
}
.pipeline {
  margin-top: 55px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
}
.pipe-node {
  flex: 1;
  min-width: 0;
  padding: 24px 16px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  position: relative;
}
.pipe-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -22px;
  transform: translateY(-50%);
  color: #607080;
  z-index: 2;
}
.pipe-node strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}
.pipe-node span {
  color: #788897;
  font-size: 12px;
}

.manifesto {
  padding: 150px 0;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(6,9,12,.62), rgba(6,9,12,.88)),
    url("../img/manifesto-fiber.jpg") center/cover no-repeat;
}
.manifesto p {
  margin: 0 auto;
  max-width: 960px;
  font-size: clamp(40px, 7vw, 88px);
  line-height: .98;
  letter-spacing: -.06em;
  font-weight: 800;
}
.manifesto span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.68);
}

.contact {
  text-align: center;
  padding: 140px 0 110px;
}
.contact h2 {
  margin: 0;
  font-size: clamp(48px, 8vw, 100px);
  letter-spacing: -.065em;
  line-height: .95;
}
.contact p {
  max-width: 560px;
  margin: 28px auto 0;
  color: #8c9aa6;
  font-size: 17px;
}
.contact-links {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 문의 폼 — 브레드 폼메일 contact 접수 */
.contact-form {
  max-width: 720px;
  margin: 52px auto 0;
  text-align: left;
  display: grid;
  gap: 18px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field { display: grid; gap: 8px; }
.field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7e8b97;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: .2s ease;
}
.field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}
.field input::placeholder,
.field textarea::placeholder { color: #5f6e7c; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel-strong);
}
.field option {
  background: var(--bg-soft);
  color: var(--text);
}
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
}
.select-wrap::after {
  content: "▾";
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: #7e8b97;
  font-size: 12px;
  pointer-events: none;
}
/* .contact p (0,1,1)가 .field-error(0,1,0)를 이겨 에러 문구가 17px 회색으로
   가운데 정렬되던 문제 때문에 .contact-form을 붙여 특이도를 올린다.
   margin auto는 grid item을 shrink-to-fit + 중앙정렬시키므로 반드시 0으로 덮는다. */
.contact-form .field-error {
  display: none;
  margin: 0;
  max-width: none;
  color: #ff9c9c;
  font-size: 12px;
  line-height: 1.5;
}
.contact-form .field-error.show { display: block; }
.field-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #93a1ad;
  font-size: 13px;
  line-height: 1.55;
  cursor: pointer;
}
.field-agree input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.form-actions .btn { min-width: 168px; }
.btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}
.contact-success {
  max-width: 720px;
  margin: 52px auto 0;
  padding: 48px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}
.contact-success h3 {
  margin: 0 0 12px;
  font-size: 26px;
  letter-spacing: -.03em;
}
.contact-success p {
  margin: 0 auto;
  max-width: 460px;
  color: var(--muted);
  font-size: 15px;
}
.hidden { display: none !important; }
footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: #7a8794;
  font-size: 12px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* 스크롤 등장.
   초기 숨김은 html.js-reveal 아래에만 둔다 — app.js 가 이 클래스를 붙이지 못하면
   (스크립트 실패 · IntersectionObserver 미지원) 본문이 처음부터 그대로 보인다.
   숨김을 무조건 걸면 스크립트가 죽는 순간 페이지가 백지가 된다. */
.reveal {
  transition: opacity .7s ease, transform .7s ease;
}
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
}
.reveal.visible,
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* 같은 줄에 놓인 카드는 조금씩 늦게 들어온다. 한꺼번에 나타나면 덩어리로 보인다.
   요소마다 인라인 delay 를 심지 않고 위치로만 준다. */
.js-reveal .card-grid > .reveal:nth-child(2) { transition-delay: .07s; }
.js-reveal .card-grid > .reveal:nth-child(3) { transition-delay: .14s; }
.js-reveal .card-grid > .reveal:nth-child(4) { transition-delay: .21s; }

/* 모션 최소화 설정에서는 등장 효과를 끈다. 숨기지 않고 즉시 보이게만 한다.
   위쪽 ticker 블록이 아니라 여기 두는 이유: .js-reveal .reveal 정의보다 뒤에
   와야 같은 특이도에서 이긴다. 앞에 두면 규칙이 통째로 무시된다. */
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0s;
  }
}

@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow { grid-template-columns: 1fr; }
  .workflow-item { border-right: 0; border-bottom: 1px solid var(--line); min-height: auto; }
  .workflow-item:last-child { border-bottom: 0; }
  .workflow-item .step { margin-bottom: 28px; }
  .project { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .stack-wrap { grid-template-columns: 1fr 1fr; }
  .pipeline { flex-wrap: wrap; }
  .pipe-node { flex: 1 1 30%; }
  .pipe-node:not(:last-child)::after { display: none; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding-top: 110px; }
  .hero-bg {
    background:
      linear-gradient(180deg, rgba(9,12,16,.76) 0%, rgba(9,12,16,.9) 58%, rgba(9,12,16,1) 100%),
      url("../img/hero-datacenter.jpg") center/cover no-repeat;
  }
  section { padding: 90px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .stack-wrap { grid-template-columns: 1fr; }
  .about-list { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }
  .project-visual { min-height: 260px; }
  .pipeline { display: grid; grid-template-columns: 1fr 1fr; }
  .pipe-node { min-height: 120px; }
}
